show PO order date in li summary display
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 26 Apr 2010 13:18:59 +0000 (13:18 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 26 Apr 2010 13:18:59 +0000 (13:18 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16302 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/acq/Lineitem.js
Open-ILS/web/js/dojo/openils/acq/nls/acq.js

index 6288d8b..4bff2e9 100644 (file)
@@ -22,6 +22,8 @@ dojo.require('fieldmapper.dojoData');
 dojo.require('openils.User');
 dojo.require('openils.Event');
 dojo.require('openils.Util');
+dojo.require('dojo.date.stamp');
+dojo.require('dojo.date.locale');
 
 dojo.requireLocalization('openils.acq', 'acq');
 var localeStrings = dojo.i18n.getLocalization('openils.acq', 'acq');
@@ -139,6 +141,11 @@ openils.acq.Lineitem.fetchAndRender = function(liId, args, callback) {
 
                 var po = lineitem.purchase_order();
                 var li = lineitem.picklist();
+                var orderDate = '';
+                if(po) {
+                    var date = dojo.date.stamp.fromISOString(po.order_date());
+                    orderDate = dojo.date.locale.format(date, {selector:'date'});
+                }
 
                 var displayString = dojo.string.substitute(
                     localeStrings.LINEITEM_SUMMARY, [
@@ -160,6 +167,7 @@ openils.acq.Lineitem.fetchAndRender = function(liId, args, callback) {
                         (li) ? li.name() : '',
                         lineitem.order_summary().encumbrance_amount() || '0.00',
                         lineitem.order_summary().paid_amount() || '0.00',
+                        orderDate
                     ]
                 );
 
index b21b999..f9bb64b 100644 (file)
@@ -64,8 +64,8 @@
             "${3} Ordered, ${4} Received, ${7} Invoiced, ${8} Claimed, ${9} Cancelled</div>" +
         "<div class='acq-lineitem-summary-extra'>Estimated $${6}, Encumbered $${16}, Paid $${17}</div>" +
         "<div class='acq-lineitem-summary-extra'>" +
-            "<a style='padding-right: 10px;' href='${11}/acq/po/view/${12}'>PO: ${13}</a>" +
-            "<a style='padding-right: 10px;' href='${11}/acq/picklist/view/${14}'>SL: ${15}</a></div>",
+            "<a style='padding-right: 10px;' href='${11}/acq/po/view/${12}'>PO#${13} ${18}</a>" +
+            "<a style='padding-right: 10px;' href='${11}/acq/picklist/view/${14}'>${15}</a></div>",
     'INVOICE_CONFIRM_PRORATE' : "Prorate charges?\n\nAny subsequent changes to the invoice that would affect prorated amounts should be resolved manually.",
     'UNNAMED': "Unnamed",
     'NO_FIND_INVOICE': "Could not find that invoice.\nNote that the Invoice # field is case-sensitive.",