moved money summary boxes to regular in-markup dijits
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 13 Apr 2010 16:17:59 +0000 (16:17 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 13 Apr 2010 16:17:59 +0000 (16:17 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16225 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/ui/default/acq/invoice/view.js
Open-ILS/web/templates/default/acq/invoice/view.tt2

index 0ee9941..37527e5 100644 (file)
@@ -167,10 +167,6 @@ function doAttachPo() {
 function updateTotalCost() {
 
     var totalCost = 0;    
-    if(!totalInvoicedBox) {
-        totalInvoicedBox = new dijit.form.CurrencyTextBox(
-            {style : 'width: 6em'}, dojo.byId('acq-invoice-total-invoiced'));
-    }
     for(var id in widgetRegistry.acqii) 
         if(!widgetRegistry.acqii[id]._object.isdeleted())
             totalCost += widgetRegistry.acqii[id].cost_billed.getFormattedValue();
@@ -180,10 +176,6 @@ function updateTotalCost() {
     totalInvoicedBox.attr('value', totalCost);
 
     totalPaid = 0;    
-    if(!totalPaidBox) {
-        totalPaidBox = new dijit.form.CurrencyTextBox(
-            {style : 'width: 6em'}, dojo.byId('acq-invoice-total-paid'));
-    }
     for(var id in widgetRegistry.acqii) 
         if(!widgetRegistry.acqii[id]._object.isdeleted())
             totalPaid += widgetRegistry.acqii[id].amount_paid.getFormattedValue();
@@ -216,10 +208,6 @@ function updateTotalCost() {
         }
     }
 
-    if(!balanceOwedBox) {
-        balanceOwedBox = new dijit.form.CurrencyTextBox(
-            {style : 'width: 6em'}, dojo.byId('acq-invoice-balance-owed'));
-    }
     balanceOwedBox.attr('value', (totalCost - totalPaid));
 }
 
index c9424cf..1195750 100644 (file)
                         <button jsId='invoiceProrateButton' 
                             dojoType='dijit.form.Button' onclick='saveChanges(true);'>Save &amp; Prorate Charges</button>
                     </td>
-                    <td><div id='acq-invoice-total-invoiced'/></td>
-                    <td><div id='acq-invoice-total-paid'/></td>
-                    <td><div id='acq-invoice-balance-owed'/></td>
+                    <td><div jsId='totalInvoicedBox' dojoType='dijit.form.CurrencyTextBox' style='width:6em;'/></td>
+                    <td><div jsId='totalPaidBox' dojoType='dijit.form.CurrencyTextBox' style='width:6em;'/></td>
+                    <td><div jsId='balanceOwedBox' dojoType='dijit.form.CurrencyTextBox' style='width:6em;'/></td>
                 </tr>
             </tbody>
         </table>