[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. 20dc2fb5eabe1dc36a2b5219f9a1c833b6bd4506
Evergreen Git
git at git.evergreen-ils.org
Sat Jun 2 18:37:35 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_1 has been updated
via 20dc2fb5eabe1dc36a2b5219f9a1c833b6bd4506 (commit)
from 573f15ee1d309f4f79b41e4802013d0ee271fdf8 (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 20dc2fb5eabe1dc36a2b5219f9a1c833b6bd4506
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>
Conflicts:
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
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 699a6bb..085293b 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
@@ -2195,6 +2195,9 @@ 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);
$po->state('on-order');
-----------------------------------------------------------------------
Summary of changes:
.../perlmods/lib/OpenILS/Application/Acq/Order.pm | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list