repair faulty lineitem detachment from invoices
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 20 Aug 2010 14:11:27 +0000 (14:11 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 20 Aug 2010 14:11:27 +0000 (14:11 +0000)
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

index 956ec78..102294e 100644 (file)
@@ -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(',')
             ]
         );