From: erickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Tue, 13 Apr 2010 15:18:12 +0000 (+0000)
Subject: added a balance owed column to invoice UI
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=fe0deee805fb8bcba840f2f591f29c7aa05701cd;p=evergreen%2Fmasslnc.git

added a balance owed column to invoice UI

git-svn-id: svn://svn.open-ils.org/ILS/trunk@16224 dcc99617-32d9-48b4-a31d-7c20da2025e4
---

diff --git a/Open-ILS/web/js/ui/default/acq/invoice/view.js b/Open-ILS/web/js/ui/default/acq/invoice/view.js
index 7e9188a434..0ee9941260 100644
--- a/Open-ILS/web/js/ui/default/acq/invoice/view.js
+++ b/Open-ILS/web/js/ui/default/acq/invoice/view.js
@@ -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));
 }
 
 
diff --git a/Open-ILS/web/templates/default/acq/invoice/view.tt2 b/Open-ILS/web/templates/default/acq/invoice/view.tt2
index 190dbd7d91..c9424cfe42 100644
--- a/Open-ILS/web/templates/default/acq/invoice/view.tt2
+++ b/Open-ILS/web/templates/default/acq/invoice/view.tt2
@@ -93,6 +93,7 @@
                     <td colspan='4'/>
                     <td>Total Invoiced</td>
                     <td>Total Paid</td>
+                    <td>Balance Owed</td>
                 </tr>
             </thead>
             <tbody>
@@ -105,6 +106,7 @@
                     </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>