diff --git a/Koha/Patron/Debarments.pm b/Koha/Patron/Debarments.pm index 8512342a4b..9926116fd2 100644 --- a/Koha/Patron/Debarments.pm +++ b/Koha/Patron/Debarments.pm @@ -23,6 +23,7 @@ use C4::Context; use C4::Log qw( logaction ); use Koha::Database; +use Koha::Patrons; use Koha::Patron::Restriction::Types; use Koha::Patron::Restrictions; diff --git a/misc/cronjobs/writeoff_debts.pl b/misc/cronjobs/writeoff_debts.pl index ec990c41a3..edb684766c 100755 --- a/misc/cronjobs/writeoff_debts.pl +++ b/misc/cronjobs/writeoff_debts.pl @@ -113,7 +113,7 @@ while ( my $line = $lines->next ) { my $writeoff_offset = Koha::Account::Offset->new( { credit_id => $writeoff->accountlines_id, - type => 'WRITEOFF', + type => 'CREATE', amount => $line->amountoutstanding } )->store();