PO Invoice link search by PO instead of Lineitem collab/berick/lp-927685
authorBill Erickson <berick@esilibrary.com>
Thu, 16 Feb 2012 17:50:47 +0000 (12:50 -0500)
committerBill Erickson <berick@esilibrary.com>
Thu, 16 Feb 2012 17:57:28 +0000 (12:57 -0500)
The button which allows the user to jump from the PO to linked invoices
now retrieves invoices directly based on the PO ID and instead of
jumping though the lineitem, which only works for POs that have
lineitems (invoiced).

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/web/js/ui/default/acq/po/view_po.js

index 8e510f9..370cf33 100644 (file)
@@ -285,7 +285,7 @@ function prepareInvoiceFeatures() {
     /* view invoices button */
     dijit.byId("acq-po-view-invoice-link").onClick = function() {
         location.href = oilsBasePath + "/acq/search/unified?so=" +
-            base64Encode({"jub":[{"purchase_order": PO.id()}]}) +
+            base64Encode({"acqpo":[{"id": PO.id()}]}) +
             "&rt=invoice";
     };