[open-ils-commits] [GIT] Evergreen ILS branch rel_2_2 updated. 8b2282731b14c166b5b0b64044d01d9f138a4a10
Evergreen Git
git at git.evergreen-ils.org
Sat Jun 2 18:32:41 EDT 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_2_2 has been updated
via 8b2282731b14c166b5b0b64044d01d9f138a4a10 (commit)
from 4bf9e821db2756f93a8ca149ffebfdaa9a3f9d7a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8b2282731b14c166b5b0b64044d01d9f138a4a10
Author: Bill Erickson <berick at esilibrary.com>
Date: Fri Mar 23 15:17:50 2012 -0400
ACQ guarantee no PO re-activation
Prevent the possibility of double PO activation by preventing it within
the API. There have been reports in the wild of double-activation, even
though the UI is supposed to prevent it.
Signed-off-by: Bill Erickson <berick at esilibrary.com>
Signed-off-by: Michael Peters <mrpeters at library.in.gov>
Signed-off-by: Dan Scott <dan at coffeecode.net>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
index 7272f63..9e25668 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
@@ -2328,6 +2328,10 @@ sub activate_purchase_order_impl {
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);
+
+ return $e->die_event(OpenILS::Event->new('PO_ALREADY_ACTIVATED'))
+ if $po->order_date; # PO cannot be re-activated
+
my $provider = $e->retrieve_acq_provider($po->provider);
# find lineitems and create assets for all
-----------------------------------------------------------------------
Summary of changes:
.../perlmods/lib/OpenILS/Application/Acq/Order.pm | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list