Bugzilla – Attachment 85219 Details for
Bug 22200
Forgiving a fine (FOR) does not create a FORGIVEN credit line
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22200: Forgiving a fine (FFOR) does not update the accountline date
Bug-22200-Forgiving-a-fine-FFOR-does-not-update-th.patch (text/plain), 2.54 KB, created by
Katrin Fischer
on 2019-02-17 11:13:38 UTC
(
hide
)
Description:
Bug 22200: Forgiving a fine (FFOR) does not update the accountline date
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-02-17 11:13:38 UTC
Size:
2.54 KB
patch
obsolete
>From 8f08dc873db1198fa262fc32104bf9ad98deaaf4 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 23 Jan 2019 14:54:07 -0500 >Subject: [PATCH] Bug 22200: Forgiving a fine (FFOR) does not update the > accountline date > >Each time a fine is incremented, the date column is updated. When that fine is forgiven ( often via the "Forgive fines" option on the checkin page ), it does not update the column. It makes sense that if updating a fine sets the date column, forgiving it should do so as well. > >Test Plan: >1) Find a checkout that is overdue with fines, where the date is not today >2) Note the date in the accountlines table >3) Check it in, note the date is not updated >4) Apply this patch >5) Repeat steps 1-2 >6) Note the date is updated! > >Signed-off-by: Genevieve Beaudry <genevieve.beaudry@inlibro.com> >--- > C4/Circulation.pm | 1 + > t/db_dependent/Circulation.t | 4 +++- > 2 files changed, 4 insertions(+), 1 deletion(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index fa082104a1..0aff60e733 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2324,6 +2324,7 @@ sub _FixOverduesOnReturn { > > $accountline->accounttype('FFOR'); > $accountline->amountoutstanding(0); >+ $accountline->date( dt_from_string() ); > > Koha::Account::Offset->new( > { >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 707582d44a..f03208fb4b 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -2304,7 +2304,7 @@ subtest '_FixAccountForLostAndReturned' => sub { > }; > > subtest '_FixOverduesOnReturn' => sub { >- plan tests => 10; >+ plan tests => 11; > > my $biblio = $builder->build_sample_biblio({ author => 'Hall, Kylie' }); > >@@ -2330,6 +2330,7 @@ subtest '_FixOverduesOnReturn' => sub { > amount => 99.00, > amountoutstanding => 99.00, > lastincrement => 9.00, >+ date => '1981-06-10', > } > )->store(); > >@@ -2358,6 +2359,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( >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22200
:
84339
|
85219
|
88269
|
88270
|
88271
|
88273
|
88304
|
88305
|
88718
|
88719
|
88750
|
88759
|
88760
|
88761
|
88779
|
88780
|
88781