display PO order (activation) date in PO page
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 2 Sep 2010 17:35:46 +0000 (17:35 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 2 Sep 2010 17:35:46 +0000 (17:35 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17446 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/acq/nls/acq.js
Open-ILS/web/js/ui/default/acq/po/view_po.js
Open-ILS/web/templates/default/acq/po/view.tt2

index c6e58f5..3b8f8b5 100644 (file)
@@ -49,6 +49,7 @@
     "FUND_LIST_ROLLOVER_SUMMARY_ROLLOVER_AMOUNT" : "<b>$${1}</b> unspent money rolled over to fiscal year ${0} for the selected locations",
     "FUND_XFER_SAME_SOURCE_AND_DEST" : "Cannot transfer. The source and destination funds are the same.",
     "FUND_XFER_CONFIRM" : "Are you sure you're ready to commit this transfer?",
+    "PO_ACTIVATED_ON" : "Activated ${0}",
     "PO_CHECKING" : "[One moment...]",
     "PO_COULD_ACTIVATE" : "Yes.",
     "PO_WARNING_NO_BLOCK_ACTIVATION" : "Yes; fund ${0} (${1}) would be encumbered beyond its warning level.",
index 65b978a..92cb396 100644 (file)
@@ -312,6 +312,21 @@ function renderPo() {
     dojo.byId("acq-po-view-total-enc").innerHTML = PO.amount_encumbered().toFixed(2);
     dojo.byId("acq-po-view-total-spent").innerHTML = PO.amount_spent().toFixed(2);
     dojo.byId("acq-po-view-state").innerHTML = PO.state(); // TODO i18n
+
+    if(PO.order_date()) {
+        openils.Util.show('acq-po-activated-on', 'inline');
+        dojo.byId('acq-po-activated-on').innerHTML = 
+            dojo.string.substitute(
+                localeStrings.PO_ACTIVATED_ON, [
+                    dojo.date.locale.format(
+                        dojo.date.stamp.fromISOString(PO.order_date()), 
+                        {formatLength:'short'}
+                    )
+                ]
+            );
+
+    }
+
     makePrepayWidget(
         dojo.byId("acq-po-view-prepay"),
         openils.Util.isTrue(PO.prepayment_required())
index 46358e9..1f14d9a 100644 (file)
@@ -5,7 +5,10 @@
 <div dojoType="dijit.layout.ContentPane" style="height:100%">
     <div>
         <div id='oils-acq-picklist-header'>
-            <big>Purchase Order (<span id="acq-po-view-state"></span>)</big>
+            <big>
+                Purchase Order (<span id="acq-po-view-state"></span>) 
+            </big>
+            <span id='acq-po-activated-on' class='hidden'></span>
             <table class="oils-generic-table acq-po-info">
                 <tr>
                     <th>ID</th><td><a id="acq-po-view-id"/></td>