From 44452317f9b9a1b1cb1a45af719ee8dfa2715f5d Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 28 Apr 2010 15:39:50 +0000 Subject: [PATCH] when a LI points to a PO, show the LI as a link in the lineitem summary blob 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 | 12 ++++++++---- Open-ILS/web/js/dojo/openils/acq/nls/acq.js | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Open-ILS/web/js/dojo/openils/acq/Lineitem.js b/Open-ILS/web/js/dojo/openils/acq/Lineitem.js index 3d9e67457..877ba546f 100644 --- a/Open-ILS/web/js/dojo/openils/acq/Lineitem.js +++ b/Open-ILS/web/js/dojo/openils/acq/Lineitem.js @@ -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 ] ); 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 b4e89c918..63d60545c 100644 --- a/Open-ILS/web/js/dojo/openils/acq/nls/acq.js +++ b/Open-ILS/web/js/dojo/openils/acq/nls/acq.js @@ -59,7 +59,7 @@ 'INVOICE_ITEM_DETAILS' : "${0}
${1}
${2}.
Estimated Price: $${3}.
Lineitem ID: ${4}
PO: ${5}
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' : "
${0}, by ${1} (${2})
" + + 'LINEITEM_SUMMARY' : "
${0}, by ${1} (${2})
" + "
" + "${3} Ordered, ${4} Received, ${7} Invoiced, ${8} Claimed, ${9} Cancelled
" + "
Estimated $${6}, Encumbered $${16}, Paid $${17}
" + -- 2.11.0