https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28994 Bug ID: 28994 Summary: Make writeoff_debts.pl use amountoutstanding, not amount Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: magnus@libriotech.no QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz This script uses "amount" to write off debts, when it should be using "amountoutstanding": # A 'writeoff' is a 'credit' my $writeoff = Koha::Account::Line->new( { date => \'NOW()', amount => 0 - $line->amount, <== HERE credit_type_code => 'WRITEOFF', status => 'ADDED', amountoutstanding => 0 - $line->amount, <== HERE manager_id => undef, borrowernumber => $line->borrowernumber, interface => 'intranet', branchcode => undef, } )->store(); my $writeoff_offset = Koha::Account::Offset->new( { credit_id => $writeoff->accountlines_id, type => 'WRITEOFF', amount => $line->amount <== HERE } )->store(); Patch coming. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.