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

(-)a/t/db_dependent/Accounts.t (-14 / +1 lines)
Lines 18-24 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use Test::More tests => 41;
21
use Test::More tests => 36;
22
use Test::MockModule;
22
use Test::MockModule;
23
use Test::Warn;
23
use Test::Warn;
24
24
Lines 103-120 ok( $accountline->description =~ /^$description/, 'Accountline description set c Link Here
103
is( $accountline->note, $note, 'Accountline note set correctly for manualinvoice' );
103
is( $accountline->note, $note, 'Accountline note set correctly for manualinvoice' );
104
is( $accountline->branchcode, $branchcode, 'Accountline branchcode set correctly for manualinvoice' );
104
is( $accountline->branchcode, $branchcode, 'Accountline branchcode set correctly for manualinvoice' );
105
105
106
# Test _FixAccountForLostAndReturned, use the accountline from the manualinvoice to test
107
C4::Circulation::_FixAccountForLostAndReturned( $item->{itemnumber} );
108
my ( $accountline_fee, $accountline_payment ) = Koha::Account::Lines->search(
109
    {
110
        borrowernumber => $patron->{borrowernumber}
111
    }
112
);
113
is( $accountline_fee->accounttype, 'LR', 'Lost item fee account type updated to LR' );
114
is( $accountline_fee->amountoutstanding, '0.000000', 'Lost item fee amount outstanding updated to 0' );
115
is( $accountline_payment->accounttype, 'CR', 'Lost item fee account type is CR' );
116
is( $accountline_payment->amount, "-$amount", 'Lost item refund amount is correct' );
117
is( $accountline_payment->branchcode, $branchcode, 'Lost item refund branchcode is set correctly' );
118
$dbh->do(q|DELETE FROM accountlines|);
106
$dbh->do(q|DELETE FROM accountlines|);
119
107
120
# Testing purge_zero_balance_fees
108
# Testing purge_zero_balance_fees
121
- 

Return to bug 19066