LP 1177388 'Add to Po' Honors default copy count
authorBill Erickson <berick@esilibrary.com>
Tue, 7 May 2013 13:48:05 +0000 (09:48 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 19 Jun 2013 13:26:47 +0000 (09:26 -0400)
Create the requested number of copies for lineitems added to purchase
orders whose provider has a non-zero value for 'default copy count'.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm

index 7313471..9661f92 100644 (file)
@@ -3683,6 +3683,7 @@ sub add_li_to_po {
         $li->provider($po->provider);
         $li->purchase_order($po_id);
         $li->state('pending-order');
+        apply_default_copies($mgr, $po, $li->id) or return $e->die_event;
         update_lineitem($mgr, $li) or return $e->die_event;
     }