From b05d9d98aca28241e4fce7d034c562d719716912 Mon Sep 17 00:00:00 2001 From: Rafal Kopaczka Date: Mon, 9 Mar 2015 14:30:30 +0100 Subject: [PATCH] [PATCH] Bug 9481 - charge not showing fines On 'Check out' and 'Details'. When looking at the patron record or the checkout screen the checkout summary is now showing 0 for all the Charges even if the item was overdue and has accrued fines. To test: 1/ Check out items with past due date 2/ Run fines.pl script (ensure finesMode is set to Calculate and Charge) 3/ Verify on Fines->Pay Fines screen that fines where calculated correct. 4/ Go to Patron record, charge column on Details and Check out screen should be 0 or rental charge amount only. But total amount row display right number, same as in pay fines screen. 4/ Apply patch. 5/ Now charges on display and check out screen shows all outstanding fees for each item. --- svc/checkouts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/svc/checkouts b/svc/checkouts index 51fd861..d93b0e9 100755 --- a/svc/checkouts +++ b/svc/checkouts @@ -27,6 +27,7 @@ use C4::Auth qw(check_cookie_auth); use C4::Biblio qw(GetMarcBiblio GetFrameworkCode GetRecordValue ); use C4::Circulation qw(GetIssuingCharges CanBookBeRenewed GetRenewCount GetSoonestRenewDate); use C4::Koha qw(GetAuthorisedValueByCode); +use C4::Overdues qw(GetFine); use C4::Context; use Koha::DateUtils; @@ -126,6 +127,8 @@ my @checkouts_today; my @checkouts_previous; while ( my $c = $sth->fetchrow_hashref() ) { my ($charge) = GetIssuingCharges( $c->{itemnumber}, $c->{borrowernumber} ); + my $fine = GetFine( $c->{itemnumber}, $c->{borrowernumber} ); + $charge += $fine if defined $fine; my ( $can_renew, $can_renew_error ) = CanBookBeRenewed( $c->{borrowernumber}, $c->{itemnumber} ); -- 1.7.10.4