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

(-)a/Koha/Checkout.pm (-2 / +2 lines)
Lines 89-96 Return the checked out account_lines Link Here
89
89
90
sub account_lines {
90
sub account_lines {
91
    my ( $self ) = @_;
91
    my ( $self ) = @_;
92
    my $accountlines_rs = $self->_result->accountlines;
92
    my $account_lines_rs = $self->_result->account_lines;
93
    return Koha::Account::Lines->_new_from_dbic( $accountlines_rs );
93
    return Koha::Account::Lines->_new_from_dbic( $account_lines_rs );
94
}
94
}
95
95
96
=head3 library
96
=head3 library
(-)a/Koha/Old/Checkout.pm (-2 / +2 lines)
Lines 55-62 Return the checked out account_lines Link Here
55
55
56
sub account_lines {
56
sub account_lines {
57
    my ( $self ) = @_;
57
    my ( $self ) = @_;
58
    my $accountlines_rs = $self->_result->accountlines;
58
    my $account_lines_rs = $self->_result->account_lines;
59
    return Koha::Account::Lines->_new_from_dbic( $accountlines_rs );
59
    return Koha::Account::Lines->_new_from_dbic( $account_lines_rs );
60
}
60
}
61
61
62
=head3 library
62
=head3 library
(-)a/Koha/Schema/Result/Issue.pm (-1 / +1 lines)
Lines 404-410 __PACKAGE__->might_have( Link Here
404
);
404
);
405
405
406
__PACKAGE__->has_many(
406
__PACKAGE__->has_many(
407
    "accountlines",
407
    "account_lines",
408
    "Koha::Schema::Result::Accountline",
408
    "Koha::Schema::Result::Accountline",
409
    { "foreign.issue_id" => "self.issue_id" },
409
    { "foreign.issue_id" => "self.issue_id" },
410
    { cascade_copy       => 0, cascade_delete => 0 },
410
    { cascade_copy       => 0, cascade_delete => 0 },
(-)a/Koha/Schema/Result/OldIssue.pm (-1 / +1 lines)
Lines 367-373 Related object: L<Koha::Schema::Result::ReturnClaim> Link Here
367
=cut
367
=cut
368
368
369
__PACKAGE__->has_many(
369
__PACKAGE__->has_many(
370
    "accountlines",
370
    "account_lines",
371
    "Koha::Schema::Result::Accountline",
371
    "Koha::Schema::Result::Accountline",
372
    { "foreign.issue_id" => "self.issue_id" },
372
    { "foreign.issue_id" => "self.issue_id" },
373
    { cascade_copy       => 0, cascade_delete => 0 },
373
    { cascade_copy       => 0, cascade_delete => 0 },
(-)a/t/db_dependent/Koha/Account/Line.t (-1 / +1 lines)
Lines 347-353 subtest 'apply() tests' => sub { Link Here
347
    )->store();
347
    )->store();
348
348
349
    my $a = $checkout->account_lines->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::account_lines returns the related acountline" );
351
351
352
    # Enable renewing upon fine payment
352
    # Enable renewing upon fine payment
353
    t::lib::Mocks::mock_preference( 'RenewAccruingItemWhenPaid', 1 );
353
    t::lib::Mocks::mock_preference( 'RenewAccruingItemWhenPaid', 1 );
(-)a/t/db_dependent/Koha/Checkouts.t (-6 / +5 lines)
Lines 128-145 subtest 'account_lines' => sub { Link Here
128
        }
128
        }
129
    )->store();
129
    )->store();
130
130
131
    my $accountlines = $retrieved_checkout_1->account_lines;
131
    my $account_lines = $retrieved_checkout_1->account_lines;
132
    is( ref($accountlines), 'Koha::Account::Lines',
132
    is( ref($account_lines), 'Koha::Account::Lines',
133
        'Koha::Checkout->accountlines should return a Koha::Item' );
133
        'Koha::Checkout->account_lines should return a Koha::Account::Lines' );
134
134
135
    my $line = $accountlines->next;
135
    my $line = $account_lines->next;
136
    is( ref($line), 'Koha::Account::Line',
136
    is( ref($line), 'Koha::Account::Line',
137
        'next returns a Koha::Account::Line' );
137
        'next returns a Koha::Account::Line' );
138
138
139
    is(
139
    is(
140
        $accountline->id,
140
        $accountline->id,
141
        $line->id,
141
        $line->id,
142
        'Koha::Checkout->accountlines should return the correct accountlines'
142
        'Koha::Checkout->account_lines should return the correct account_lines'
143
    );
143
    );
144
};
144
};
145
145
146
- 

Return to bug 30612