@@ -, +, @@ accountline date --- C4/Circulation.pm | 1 + t/db_dependent/Circulation.t | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) --- a/C4/Circulation.pm +++ a/C4/Circulation.pm @@ -2343,6 +2343,7 @@ sub _FixOverduesOnReturn { $accountline->accounttype('FFOR'); $accountline->amountoutstanding(0); + $accountline->date( dt_from_string() ); Koha::Account::Offset->new( { --- a/t/db_dependent/Circulation.t +++ a/t/db_dependent/Circulation.t @@ -2360,7 +2360,7 @@ subtest '_FixAccountForLostAndReturned' => sub { }; subtest '_FixOverduesOnReturn' => sub { - plan tests => 10; + plan tests => 11; # Generate test biblio my $title = 'Koha for Dummies'; @@ -2391,6 +2391,7 @@ subtest '_FixOverduesOnReturn' => sub { amount => 99.00, amountoutstanding => 99.00, lastincrement => 9.00, + date => '1981-06-10', } )->store(); @@ -2419,6 +2420,7 @@ subtest '_FixOverduesOnReturn' => sub { is( $accountline->accounttype, 'FFOR', 'Open fine ( account type FU ) has been set to fine forgiven ( account type FFOR )'); is( ref $offset, "Koha::Account::Offset", "Found matching offset for fine reduction via forgiveness" ); is( $offset->amount, '-99.000000', "Amount of offset is correct" ); + is( $accountline->date, output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }), 'Accountline date is updated correctly' ); ## Run again, with dropbox mode enabled $accountline->set( --