in checkin interface, keep a running tally of fines/bills encountered
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 24 Aug 2009 03:04:23 +0000 (03:04 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 24 Aug 2009 03:04:23 +0000 (03:04 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@13920 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul
Open-ILS/xul/staff_client/server/circ/util.js
Open-ILS/xul/staff_client/server/locale/en-US/circ.properties

index f471946..a169105 100644 (file)
@@ -97,6 +97,7 @@
                        </menu>
                        </menubar>
                </hbox>
+        <label id="fine_tally" value="" amount="0.00" style="color: red" hidden="true" />
        </vbox>
 
 </hbox>
index e4c9e1a..23e88f6 100644 (file)
@@ -2079,9 +2079,21 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
                                if (Number(bill.balance_owed()) == 0) { return; }
                                if (document.getElementById('no_change_label')) {
                                        var m = document.getElementById('no_change_label').getAttribute('value');
-                                       document.getElementById('no_change_label').setAttribute('value', m + document.getElementById('circStrings').getFormattedString('staff.circ.utils.billable.amount', [params.barcode, util.money.sanitize(bill.balance_owed())]) + '  ');
+                                       document.getElementById('no_change_label').setAttribute(
+                        'value', 
+                        m + document.getElementById('circStrings').getFormattedString('staff.circ.utils.billable.amount', [params.barcode, util.money.sanitize(bill.balance_owed())]) + '  '
+                    );
                                        document.getElementById('no_change_label').setAttribute('hidden','false');
                                }
+                               if (document.getElementById('fine_tally')) {
+                                       var amount = Number( document.getElementById('fine_tally').getAttribute('amount') ) + Number( bill.balance_owed() );
+                    document.getElementById('fine_tally').setAttribute('amount',amount);
+                    document.getElementById('fine_tally').setAttribute(
+                        'value',
+                        document.getElementById('circStrings').getFormattedString('staff.circ.utils.fine_tally_text', [ util.money.sanitize( amount ) ])
+                    );
+                                       document.getElementById('fine_tally').setAttribute('hidden','false');
+                }
                        });
                }
 
index e3aab81..8e1fa38 100644 (file)
@@ -283,6 +283,7 @@ staff.circ.utils.patron_first_given_name=Patron First Name
 staff.circ.utils.checkin.override=Override Checkin Failure?
 staff.circ.utils.checkin.override.item_deposit_paid.warning=A paid deposit will be owed to this patron if this action is overrided.
 staff.circ.utils.billable.amount=Transaction for %1$s billable $%2$s
+staff.circ.utils.fine_tally_text=Fine Tally: $%1$s
 staff.circ.utils.transit_hold_cancelled=Original hold for transit cancelled.
 staff.circ.utils.item_checked_in=%1$s was already checked in.
 staff.circ.utils.item_not_cataloged=ITEM_NOT_CATALOGED event but copy status is %1$s