extract PO name from picklist upload
authorBill Erickson <berick@esilibrary.com>
Wed, 21 Nov 2012 15:12:39 +0000 (10:12 -0500)
committerMike Rylander <mrylander@gmail.com>
Mon, 11 Mar 2013 20:29:38 +0000 (16:29 -0400)
If a PO name is encoded in a lineitem (via provider attribute
definition), extract that PO name when creating a new purchase order
from lineitems that were previously only linked to a selection list.
This allows staff to create selection lists first, then orders second,
while retaining the encoded purchase order name.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm

index 8ec6538..e47e398 100644 (file)
@@ -1789,6 +1789,10 @@ sub create_purchase_order_api {
         }
     }
 
+    # see if we have a PO name encoded in any of our lineitems
+    my $evt = extract_po_name($mgr, $po, $li_ids);
+    return $evt if $evt;
+
     # commit before starting the asset creation
     $e->xact_commit;