From 9035c539f11b076adf83c79e2795016b1270acd6 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 20 Aug 2010 14:11:27 +0000 Subject: [PATCH] repair faulty lineitem detachment from invoices git-svn-id: svn://svn.open-ils.org/ILS/trunk@17283 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/ui/default/acq/invoice/view.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/js/ui/default/acq/invoice/view.js b/Open-ILS/web/js/ui/default/acq/invoice/view.js index 956ec7850a..102294e65c 100644 --- a/Open-ILS/web/js/ui/default/acq/invoice/view.js +++ b/Open-ILS/web/js/ui/default/acq/invoice/view.js @@ -472,11 +472,19 @@ function addInvoiceEntry(entry) { nodeByName('detach', row).onclick = function() { var cost = widgetRegistry.acqie[entry.id()].cost_billed.getFormattedValue(); + var idents = []; + dojo.forEach(['isbn', 'upc', 'issn'], + function(ident) { + var val = liMarcAttr(entry.lineitem(), ident); + if(val) idents.push(val); + } + ); + var msg = dojo.string.substitute( localeStrings.INVOICE_CONFIRM_ENTRY_DETACH, [ cost || 0, - liMarcAttr(lineitem, 'title'), - liMarcAttr(lineitem, 'author'), + liMarcAttr(entry.lineitem(), 'title'), + liMarcAttr(entry.lineitem(), 'author'), idents.join(',') ] ); -- 2.11.0