[open-ils-commits] r15796 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Mar 11 11:33:21 EST 2010
Author: erickson
Date: 2010-03-11 11:33:18 -0500 (Thu, 11 Mar 2010)
New Revision: 15796
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
Log:
create standalone PO activation routine so PO's can be activated during create time
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm 2010-03-11 16:07:42 UTC (rev 15795)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm 2010-03-11 16:33:18 UTC (rev 15796)
@@ -2000,7 +2000,18 @@
my $e = new_editor(xact=>1, authtoken=>$auth);
return $e->die_event unless $e->checkauth;
my $mgr = OpenILS::Application::Acq::BatchManager->new(editor => $e, conn => $conn);
+ my $die_event = activate_purchase_order_impl($mgr, $po_id);
+ return $die_event if $die_event;
+ $e->commit;
+ $conn->respond_complete(1);
+ $mgr->run_post_response_hooks;
+ return undef;
+}
+sub activate_purchase_order_impl {
+ my($mgr, $po_id) = @_;
+ my $e = $mgr->editor;
+
my $po = $e->retrieve_acq_purchase_order($po_id) or return $e->die_event;
return $e->die_event unless $e->allowed('CREATE_PURCHASE_ORDER', $po->ordering_agency);
@@ -2020,9 +2031,6 @@
$mgr->respond;
}
- $e->commit;
- $conn->respond_complete(1);
- $mgr->run_post_response_hooks;
return undef;
}
More information about the open-ils-commits
mailing list