View | Details | Raw Unified | Return to bug 30612
Collapse All | Expand All

(-)a/Koha/Checkout.pm (-4 / +4 lines)
Lines 79-93 sub item { Link Here
79
    return Koha::Item->_new_from_dbic( $item_rs );
79
    return Koha::Item->_new_from_dbic( $item_rs );
80
}
80
}
81
81
82
=head3 accountlines
82
=head3 account_lines
83
83
84
my $accountlines = $checkout->accountlines;
84
my $account_lines = $checkout->account_lines;
85
85
86
Return the checked out accountlines
86
Return the checked out account_lines
87
87
88
=cut
88
=cut
89
89
90
sub accountlines {
90
sub account_lines {
91
    my ( $self ) = @_;
91
    my ( $self ) = @_;
92
    my $accountlines_rs = $self->_result->accountlines;
92
    my $accountlines_rs = $self->_result->accountlines;
93
    return Koha::Account::Lines->_new_from_dbic( $accountlines_rs );
93
    return Koha::Account::Lines->_new_from_dbic( $accountlines_rs );
(-)a/Koha/Old/Checkout.pm (-4 / +4 lines)
Lines 45-59 sub item { Link Here
45
    return Koha::Item->_new_from_dbic( $item_rs );
45
    return Koha::Item->_new_from_dbic( $item_rs );
46
}
46
}
47
47
48
=head3 accountlines
48
=head3 account_lines
49
49
50
my $accountlines = $checkout->accountlines;
50
my $account_lines = $checkout->account_lines;
51
51
52
Return the checked out accountlines
52
Return the checked out account_lines
53
53
54
=cut
54
=cut
55
55
56
sub accountlines {
56
sub account_lines {
57
    my ( $self ) = @_;
57
    my ( $self ) = @_;
58
    my $accountlines_rs = $self->_result->accountlines;
58
    my $accountlines_rs = $self->_result->accountlines;
59
    return Koha::Account::Lines->_new_from_dbic( $accountlines_rs );
59
    return Koha::Account::Lines->_new_from_dbic( $accountlines_rs );
(-)a/t/db_dependent/Koha/Account/Line.t (-1 / +1 lines)
Lines 346-352 subtest 'apply() tests' => sub { Link Here
346
        }
346
        }
347
    )->store();
347
    )->store();
348
348
349
    my $a = $checkout->accountlines->next;
349
    my $a = $checkout->account_lines->next;
350
    is( $a->id, $accountline->id, "Koha::Checkout::accountlines returns the related acountline" );
350
    is( $a->id, $accountline->id, "Koha::Checkout::accountlines returns the related acountline" );
351
351
352
    # Enable renewing upon fine payment
352
    # Enable renewing upon fine payment
(-)a/t/db_dependent/Koha/Checkouts.t (-3 / +2 lines)
Lines 110-116 subtest 'item' => sub { Link Here
110
        'Koha::Checkout->item should return the correct item' );
110
        'Koha::Checkout->item should return the correct item' );
111
};
111
};
112
112
113
subtest 'accountlines' => sub {
113
subtest 'account_lines' => sub {
114
    plan tests => 3;
114
    plan tests => 3;
115
115
116
    my $accountline = Koha::Account::Line->new(
116
    my $accountline = Koha::Account::Line->new(
Lines 128-134 subtest 'accountlines' => sub { Link Here
128
        }
128
        }
129
    )->store();
129
    )->store();
130
130
131
    my $accountlines = $retrieved_checkout_1->accountlines;
131
    my $accountlines = $retrieved_checkout_1->account_lines;
132
    is( ref($accountlines), 'Koha::Account::Lines',
132
    is( ref($accountlines), 'Koha::Account::Lines',
133
        'Koha::Checkout->accountlines should return a Koha::Item' );
133
        'Koha::Checkout->accountlines should return a Koha::Item' );
134
134
135
- 

Return to bug 30612