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

(-)a/misc/cronjobs/writeoff_debts.pl (-4 / +3 lines)
Lines 72-81 while ( my $line = $lines->next ) { Link Here
72
                my $writeoff = Koha::Account::Line->new(
72
                my $writeoff = Koha::Account::Line->new(
73
                    {
73
                    {
74
                        date              => \'NOW()',
74
                        date              => \'NOW()',
75
                        amount            => 0 - $line->amount,
75
                        amount            => 0 - $line->amountoutstanding,
76
                        credit_type_code  => 'WRITEOFF',
76
                        credit_type_code  => 'WRITEOFF',
77
                        status            => 'ADDED',
77
                        status            => 'ADDED',
78
                        amountoutstanding => 0 - $line->amount,
78
                        amountoutstanding => 0 - $line->amountoutstanding,
79
                        manager_id        => undef,
79
                        manager_id        => undef,
80
                        borrowernumber    => $line->borrowernumber,
80
                        borrowernumber    => $line->borrowernumber,
81
                        interface         => 'intranet',
81
                        interface         => 'intranet',
Lines 87-93 while ( my $line = $lines->next ) { Link Here
87
                    {
87
                    {
88
                        credit_id => $writeoff->accountlines_id,
88
                        credit_id => $writeoff->accountlines_id,
89
                        type      => 'WRITEOFF',
89
                        type      => 'WRITEOFF',
90
                        amount    => $line->amount
90
                        amount    => $line->amountoutstanding
91
                    }
91
                    }
92
                )->store();
92
                )->store();
93
93
94
- 

Return to bug 28994