extract PO name from picklist upload
authorBill Erickson <berick@esilibrary.com>
Wed, 21 Nov 2012 15:12:39 +0000 (10:12 -0500)
committerJason Stephenson <jstephenson@mvlc.org>
Fri, 1 Feb 2013 15:00:21 +0000 (10:00 -0500)
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>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm

index 4f899b7..03c6e07 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;