LP833820 repair ACQ options passing thinko
authorBill Erickson <berick@esilibrary.com>
Thu, 11 Jul 2013 17:14:04 +0000 (13:14 -0400)
committerDan Wells <dbw2@calvin.edu>
Thu, 11 Jul 2013 19:07:00 +0000 (15:07 -0400)
Ensure zero_copy_activate option is passed down to
create_lineitem_debits with new no-asset-activation code.  Thanks to Dan
Wells for spotting this.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm

index 194fdb5..e813cd9 100644 (file)
@@ -803,8 +803,9 @@ sub set_lineitem_attr {
 # Lineitem Debits
 # ----------------------------------------------------------------------------
 sub create_lineitem_debits {
-    my ($mgr, $li, $dry_run, $options) = @_; 
+    my ($mgr, $li, $options) = @_;
     $options ||= {};
+    my $dry_run = $options->{dry_run};
 
     unless($li->estimated_unit_price) {
         $mgr->editor->event(OpenILS::Event->new('ACQ_LINEITEM_NO_PRICE', payload => $li->id));
@@ -2664,7 +2665,7 @@ sub activate_purchase_order_impl {
         $li->state('on-order');
         $li->claim_policy($provider->default_claim_policy)
             if $provider->default_claim_policy and !$li->claim_policy;
-        create_lineitem_debits($mgr, $li, $dry_run) or return $e->die_event;
+        create_lineitem_debits($mgr, $li, $options) or return $e->die_event;
         update_lineitem($mgr, $li) or return $e->die_event;
         $mgr->post_process( sub { create_lineitem_status_events($mgr, $li->id, 'aur.ordered'); });
         $mgr->respond;