Bugzilla – Attachment 36848 Details for
Bug 9481
charge not showing fines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 9481 - charge not showing fines On 'Check out' and 'Details'.
PASSED-QA-Bug-9481---charge-not-showing-fines-On-C.patch (text/plain), 6.54 KB, created by
Kyle M Hall (khall)
on 2015-03-13 12:28:50 UTC
(
hide
)
Description:
[PASSED QA] Bug 9481 - charge not showing fines On 'Check out' and 'Details'.
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-03-13 12:28:50 UTC
Size:
6.54 KB
patch
obsolete
>From b760d57b962ad760f9f77f128d0b3a2ba4af6bc8 Mon Sep 17 00:00:00 2001 >From: Rafal Kopaczka <rkk0@poczta.onet.pl> >Date: Mon, 9 Mar 2015 14:30:30 +0100 >Subject: [PATCH] [PASSED QA] 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. >Removed unused(?) footer values in checkouts-table-footer.inc > >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. > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../prog/en/includes/checkouts-table-footer.inc | 5 +++-- > .../prog/en/includes/checkouts-table.inc | 1 + > koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js | 17 ++++++++++++++++- > svc/checkouts | 3 +++ > 4 files changed, 23 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc >index 3f8db22..dcc5ffc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc >@@ -1,8 +1,9 @@ > <tfoot> > <tr> > <td colspan="9" style="text-align: right; font-weight:bold;">Totals:</td> >- <td>[% totaldue %]</td> >- <td>[% totalprice %]</td> >+ <td>[% totaldue %]</td> >+ <td>[% finetotal %]</td> >+ <td>[% totalprice %]</td> > <td colspan="3"><div class="date-select"> > <p><label for="newduedate">Renewal due date:</label> <input type="text" size="12" id="newduedate" name="newduedate" value="[% newduedate %]" readonly="readonly" /> > </p> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc >index c471c46..dcc0079 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc >@@ -19,6 +19,7 @@ > <th scope="col">Checked out from</th> > <th scope="col">Call no</th> > <th scope="col">Charge</th> >+ <th scope="col">Fine</th> > <th scope="col">Price</th> > <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllRenewals">select all</a> | <a href="#" id="UncheckAllRenewals">none</a></p></th> > <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllCheckins">select all</a> | <a href="#" id="UncheckAllCheckins">none</a></p></th> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >index e8f6f44..a7f86d0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >@@ -273,6 +273,12 @@ $(document).ready(function() { > }, > { > "mDataProp": function ( oObj ) { >+ if ( ! oObj.fine ) oObj.fine = 0; >+ return parseFloat(oObj.fine).toFixed(2); >+ } >+ }, >+ { >+ "mDataProp": function ( oObj ) { > if ( ! oObj.price ) oObj.price = 0; > return parseFloat(oObj.price).toFixed(2); > } >@@ -376,14 +382,17 @@ $(document).ready(function() { > ], > "fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) { > var total_charge = 0; >+ var total_fine = 0; > var total_price = 0; > for ( var i=0; i < aaData.length; i++ ) { > total_charge += aaData[i]['charge'] * 1; >+ total_fine += aaData[i]['fine'] * 1; > total_price += aaData[i]['price'] * 1; > } > var nCells = nRow.getElementsByTagName('td'); > nCells[1].innerHTML = total_charge.toFixed(2); >- nCells[2].innerHTML = total_price.toFixed(2); >+ nCells[2].innerHTML = total_fine.toFixed(2); >+ nCells[3].innerHTML = total_price.toFixed(2); > }, > "bPaginate": false, > "bProcessing": true, >@@ -508,6 +517,12 @@ $(document).ready(function() { > }, > { > "mDataProp": function ( oObj ) { >+ if ( ! oObj.fine ) oObj.fine = 0; >+ return parseFloat(oObj.fine).toFixed(2); >+ } >+ }, >+ { >+ "mDataProp": function ( oObj ) { > if ( ! oObj.price ) oObj.price = 0; > return parseFloat(oObj.price).toFixed(2); > } >diff --git a/svc/checkouts b/svc/checkouts >index 51fd861..cfd42dc 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,7 @@ 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} ); > > my ( $can_renew, $can_renew_error ) = > CanBookBeRenewed( $c->{borrowernumber}, $c->{itemnumber} ); >@@ -154,6 +156,7 @@ while ( my $c = $sth->fetchrow_hashref() ) { > branchname => $c->{branchname}, > itemcallnumber => $c->{itemcallnumber} || q{}, > charge => $charge, >+ fine => $fine, > price => $c->{replacementprice} || q{}, > can_renew => $can_renew, > can_renew_error => $can_renew_error, >-- >1.7.2.5
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 9481
:
14816
|
14817
|
26193
|
26457
|
26674
|
26675
|
26684
|
26685
|
36739
|
36740
|
36742
|
36787
| 36848