[open-ils-commits] [GIT] Evergreen ILS branch master updated. 07fe6601dde861e25ded9174358e6807654d1a1e
Evergreen Git
git at git.evergreen-ils.org
Sat Jun 2 18:32:02 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, master has been updated
via 07fe6601dde861e25ded9174358e6807654d1a1e (commit)
from 9d7807b356d75453a5892e75b5538dcc2c908c40 (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 07fe6601dde861e25ded9174358e6807654d1a1e
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