[open-ils-commits] r15261 - trunk/Open-ILS/xul/staff_client/server/circ (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Jan 5 17:39:04 EST 2010


Author: phasefx
Date: 2010-01-05 17:38:58 -0500 (Tue, 05 Jan 2010)
New Revision: 15261

Modified:
   trunk/Open-ILS/xul/staff_client/server/circ/checkout.js
Log:
%balance_owed% macro for checkout receipts

Modified: trunk/Open-ILS/xul/staff_client/server/circ/checkout.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/checkout.js	2010-01-05 19:07:54 UTC (rev 15260)
+++ trunk/Open-ILS/xul/staff_client/server/circ/checkout.js	2010-01-05 22:38:58 UTC (rev 15261)
@@ -6,6 +6,7 @@
     JSAN.use('util.error'); this.error = new util.error();
     JSAN.use('util.network'); this.network = new util.network();
     JSAN.use('OpenILS.data'); this.data = new OpenILS.data(); this.data.init({'via':'stash'});
+    JSAN.use('util.money');
     JSAN.use('util.barcode');
 };
 
@@ -297,6 +298,9 @@
                 'patron' : obj.patron, 
                 'lib' : obj.data.hash.aou[ obj.data.list.au[0].ws_ou() ],
                 'staff' : obj.data.list.au[0],
+                'data' : {
+                    'balance_owed' : util.money.sanitize( obj.most_recent_balance_owed ),
+                },
                 'template' : 'checkout',
                 'callback' : function() {
                     setTimeout(
@@ -404,7 +408,11 @@
                         if (checkout.payload.copy.dummy_author()) {
                             checkout.payload.record.author( checkout.payload.copy.dummy_author() );
                         }
-            
+           
+                        if (checkout.payload.patron_money) {
+                            obj.most_recent_balance_owed = checkout.payload.patron_money.balance_owed();
+                        }
+ 
                         obj.list.append(
                             {
                                 'row' : {



More information about the open-ils-commits mailing list