added a balance owed column to invoice UI
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 13 Apr 2010 15:18:12 +0000 (15:18 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 13 Apr 2010 15:18:12 +0000 (15:18 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16224 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 7e9188a..0ee9941 100644 (file)
@@ -27,6 +27,7 @@ var itemTemplate;
 var entryTemplate;
 var totalInvoicedBox;
 var totalPaidBox;
+var balanceOwedBox;
 var invoicePane;
 var itemTypes;
 var virtualId = -1;
@@ -214,6 +215,12 @@ function updateTotalCost() {
             invoiceProrateButton.attr('disabled', false);
         }
     }
+
+    if(!balanceOwedBox) {
+        balanceOwedBox = new dijit.form.CurrencyTextBox(
+            {style : 'width: 6em'}, dojo.byId('acq-invoice-balance-owed'));
+    }
+    balanceOwedBox.attr('value', (totalCost - totalPaid));
 }
 
 
index 190dbd7..c9424cf 100644 (file)
@@ -93,6 +93,7 @@
                     <td colspan='4'/>
                     <td>Total Invoiced</td>
                     <td>Total Paid</td>
+                    <td>Balance Owed</td>
                 </tr>
             </thead>
             <tbody>
                     </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>
                 </tr>
             </tbody>
         </table>