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 104-121 ok( $accountline->description =~ /^$description/, 'Accountline description set c Link Here
104
is( $accountline->note, $note, 'Accountline note set correctly for manualinvoice' );
104
is( $accountline->note, $note, 'Accountline note set correctly for manualinvoice' );
105
is( $accountline->branchcode, $branchcode, 'Accountline branchcode set correctly for manualinvoice' );
105
is( $accountline->branchcode, $branchcode, 'Accountline branchcode set correctly for manualinvoice' );
106
106
107
# Test _FixAccountForLostAndReturned, use the accountline from the manualinvoice to test
108
C4::Circulation::_FixAccountForLostAndReturned( $item->{itemnumber} );
109
my ( $accountline_fee, $accountline_payment ) = Koha::Account::Lines->search(
110
    {
111
        borrowernumber => $patron->{borrowernumber}
112
    }
113
);
114
is( $accountline_fee->accounttype, 'LR', 'Lost item fee account type updated to LR' );
115
is( $accountline_fee->amountoutstanding, '0.000000', 'Lost item fee amount outstanding updated to 0' );
116
is( $accountline_payment->accounttype, 'CR', 'Lost item fee account type is CR' );
117
is( $accountline_payment->amount, "-$amount", 'Lost item refund amount is correct' );
118
is( $accountline_payment->branchcode, $branchcode, 'Lost item refund branchcode is set correctly' );
119
$dbh->do(q|DELETE FROM accountlines|);
107
$dbh->do(q|DELETE FROM accountlines|);
120
108
121
# Testing purge_zero_balance_fees
109
# Testing purge_zero_balance_fees
122
- 

Return to bug 19066