From e3c62dc8387a1600118bd82c9683575d57fb528f Mon Sep 17 00:00:00 2001
From: erickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Mon, 26 Apr 2010 13:18:59 +0000
Subject: [PATCH] show PO order date in li summary display

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 | 8 ++++++++
 Open-ILS/web/js/dojo/openils/acq/nls/acq.js  | 4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/Open-ILS/web/js/dojo/openils/acq/Lineitem.js b/Open-ILS/web/js/dojo/openils/acq/Lineitem.js
index 6288d8b518..4bff2e9eb4 100644
--- a/Open-ILS/web/js/dojo/openils/acq/Lineitem.js
+++ b/Open-ILS/web/js/dojo/openils/acq/Lineitem.js
@@ -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
                     ]
                 );
 
diff --git a/Open-ILS/web/js/dojo/openils/acq/nls/acq.js b/Open-ILS/web/js/dojo/openils/acq/nls/acq.js
index b21b999777..f9bb64b31e 100644
--- a/Open-ILS/web/js/dojo/openils/acq/nls/acq.js
+++ b/Open-ILS/web/js/dojo/openils/acq/nls/acq.js
@@ -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.",
-- 
2.11.0