[open-ils-commits] [GIT] Evergreen ILS branch master updated. 98d4fd4946c7d534a4287624520a6938bbd22fa0
Evergreen Git
git at git.evergreen-ils.org
Tue Nov 15 15:06:44 EST 2011
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 98d4fd4946c7d534a4287624520a6938bbd22fa0 (commit)
from 5a0beda6173e6d7715ed3f454e787297d96d29d2 (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 98d4fd4946c7d534a4287624520a6938bbd22fa0
Author: Bill Erickson <berick at esilibrary.com>
Date: Fri Sep 23 17:45:39 2011 -0400
Acq: (un)receive w/o assets should not attempt a copy update
When receiveing a lineitem for a PO that was activated without assets,
avoid any attempts to update said non-existent assets.
Signed-off-by: Bill Erickson <berick at esilibrary.com>
Signed-off-by: Mike Rylander <mrylander at gmail.com>
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 8e478ca..1b1aff3 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
@@ -523,13 +523,15 @@ sub receive_lineitem_detail {
$lid->recv_time('now');
$e->update_acq_lineitem_detail($lid) or return 0;
- my $copy = $e->retrieve_asset_copy($lid->eg_copy_id) or return 0;
- $copy->status(OILS_COPY_STATUS_IN_PROCESS);
- $copy->edit_date('now');
- $copy->editor($e->requestor->id);
- $copy->creator($e->requestor->id) if $U->ou_ancestor_setting_value(
- $e->requestor->ws_ou, 'acq.copy_creator_uses_receiver', $e);
- $e->update_asset_copy($copy) or return 0;
+ if ($lid->eg_copy_id) {
+ my $copy = $e->retrieve_asset_copy($lid->eg_copy_id) or return 0;
+ $copy->status(OILS_COPY_STATUS_IN_PROCESS);
+ $copy->edit_date('now');
+ $copy->editor($e->requestor->id);
+ $copy->creator($e->requestor->id) if $U->ou_ancestor_setting_value(
+ $e->requestor->ws_ou, 'acq.copy_creator_uses_receiver', $e);
+ $e->update_asset_copy($copy) or return 0;
+ }
$mgr->add_lid;
@@ -561,11 +563,13 @@ sub rollback_receive_lineitem_detail {
$lid->clear_recv_time;
$e->update_acq_lineitem_detail($lid) or return 0;
- my $copy = $e->retrieve_asset_copy($lid->eg_copy_id) or return 0;
- $copy->status(OILS_COPY_STATUS_ON_ORDER);
- $copy->edit_date('now');
- $copy->editor($e->requestor->id);
- $e->update_asset_copy($copy) or return 0;
+ if ($lid->eg_copy_id) {
+ my $copy = $e->retrieve_asset_copy($lid->eg_copy_id) or return 0;
+ $copy->status(OILS_COPY_STATUS_ON_ORDER);
+ $copy->edit_date('now');
+ $copy->editor($e->requestor->id);
+ $e->update_asset_copy($copy) or return 0;
+ }
$mgr->add_lid;
return $lid;
-----------------------------------------------------------------------
Summary of changes:
.../perlmods/lib/OpenILS/Application/Acq/Order.pm | 28 +++++++++++--------
1 files changed, 16 insertions(+), 12 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list