when a LI points to a PO, show the LI as a link in the lineitem summary blob
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 28 Apr 2010 15:39:50 +0000 (15:39 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 28 Apr 2010 15:39:50 +0000 (15:39 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16335 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 3d9e674..877ba54 100644 (file)
@@ -140,9 +140,12 @@ openils.acq.Lineitem.fetchAndRender = function(liId, args, callback) {
                 );
 
                 var po = lineitem.purchase_order();
-                var li = lineitem.picklist();
+                var pl = lineitem.picklist();
                 var orderDate = '';
+                var liLink = '';
+
                 if(po) {
+                    liLink = oilsBasePath + '/acq/po/view/' + po.id() + '/' + lineitem.id();
                     var date = dojo.date.stamp.fromISOString(po.order_date());
                     if(date) {
                         orderDate = dojo.date.locale.format(date, {selector:'date'});
@@ -165,11 +168,12 @@ openils.acq.Lineitem.fetchAndRender = function(liId, args, callback) {
                         oilsBasePath,
                         (po) ? po.id() : '',
                         (po) ? po.name() : '',
-                        (li) ? li.id() : '',
-                        (li) ? li.name() : '',
+                        (pl) ? pl.id() : '',
+                        (pl) ? pl.name() : '',
                         lineitem.order_summary().encumbrance_amount() || '0.00',
                         lineitem.order_summary().paid_amount() || '0.00',
-                        orderDate
+                        orderDate,
+                        liLink
                     ]
                 );
 
index b4e89c9..63d6054 100644 (file)
@@ -59,7 +59,7 @@
     'INVOICE_ITEM_DETAILS' : "${0} <br/> ${1} <br/> ${2}. <br/> Estimated Price: $${3}. <br/> Lineitem ID: ${4} <br/> PO: ${5} <br/> Order Date: ${6}",
     'INVOICE_CONFIRM_ITEM_DELETE' : "Remove this $${0} '${1}' charge from the invoice?",
     'INVOICE_CONFIRM_ENTRY_DETACH' : "Remove $${0} charge for item '${1}, ${2} [${3}] from the invoice?",
-    'LINEITEM_SUMMARY' : "<div class='acq-lineitem-summary'>${0}, by ${1} (${2})</div>" +
+    'LINEITEM_SUMMARY' : "<div class='acq-lineitem-summary'><a href='${19}'>${0}</a>, by ${1} (${2})</div>" +
         "<div class='acq-lineitem-summary-extra'>" +
             "${3} Ordered, ${4} Received, ${7} Invoiced, ${8} Claimed, ${9} Cancelled</div>" +
         "<div class='acq-lineitem-summary-extra'>Estimated $${6}, Encumbered $${16}, Paid $${17}</div>" +