unselected balance
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Aug 2006 15:33:51 +0000 (15:33 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Aug 2006 15:33:51 +0000 (15:33 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5296 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/patron/bills.js
Open-ILS/xul/staff_client/server/patron/bills_overlay.xul

index 4046719..4a915e6 100644 (file)
@@ -250,6 +250,10 @@ patron.bills.prototype = {
                                                                ['render'],
                                                                function(e) { return function() {}; }
                                                        ],
+                                                       'unselected_balance' : [
+                                                               ['render'],
+                                                               function(e) { return function() {}; }
+                                                       ],
                                                        'bill_total_owed' : [
                                                                ['render'],
                                                                function(e) { return function() {}; }
@@ -378,6 +382,7 @@ patron.bills.prototype = {
                        var obj = this;
                        JSAN.use('util.money');
                        var selected_total = 0;
+                       var unselected_total = 0;
                        //var s = '';
 
                        for (var i = 0; i < obj.current_payments.length; i++) {
@@ -387,10 +392,13 @@ patron.bills.prototype = {
                                        selected_total += bo;
                                        //s += ('tallying ' + i + ' : checked, bo = ' + bo + '  total = ' + selected_total + '\n');
                                } else {
+                                       var bo = util.money.dollars_float_to_cents_integer( bill.balance_owed );
+                                       unselected_total += bo;
                                        //s += ('tallying ' + i + ' : not checked, total = ' + selected_total + '\n');
                                }
                        }
                        obj.controller.view.selected_balance.setAttribute('value', '$' + util.money.cents_as_dollars( selected_total ) );
+                       obj.controller.view.unselected_balance.setAttribute('value', '$' + util.money.cents_as_dollars( unselected_total ) );
                        //dump(s); alert(s);
        },
 
index d29887b..90a3153 100644 (file)
 
 <box id="bills_main" flex="1" orient="vertical" class="my_overflow">
        <vbox id="bills_top_ui" />
-       <hbox><label style="font-weight: bold;" value="Selected Balance:"/><label id="selected_balance"/></hbox>
+       <hbox>
+               <label style="font-weight: bold;" value="Selected Balance:"/><label id="selected_balance"/>
+               <label style="font-weight: bold;" value="Un-Selected:"/><label id="unselected_balance"/>
+       </hbox>
        <listbox id="bill_list" flex="1"/>
        <hbox>
                <button command="cmd_uncheck_all" label="Uncheck All"/>