[open-ils-commits] r12900 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Apr 16 17:52:17 EDT 2009
Author: erickson
Date: 2009-04-16 17:52:12 -0400 (Thu, 16 Apr 2009)
New Revision: 12900
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
Log:
fixed logic error in check lineitem received. don't update picklist/po on li update becuase we're re-updating over and over
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm 2009-04-16 21:48:39 UTC (rev 12899)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm 2009-04-16 21:52:12 UTC (rev 12900)
@@ -207,18 +207,10 @@
my($mgr, $li) = @_;
$li = $mgr->editor->retrieve_acq_lineitem($li) unless ref $li;
- if($li->picklist) {
- return 0 unless update_picklist($mgr, $li->picklist);
- }
-
- if($li->purchase_order) {
- return 0 unless update_purchase_order($mgr, $li->purchase_order);
- }
-
# delete the attached lineitem_details
my $lid_ids = $mgr->editor->search_acq_lineitem_detail({lineitem => $li->id}, {idlist=>1});
for my $lid_id (@$lid_ids) {
- return 0 unless delete_lineitem_detail($mgr, undef, $lid_id);
+ return 0 unless delete_lineitem_detail($mgr, $lid_id);
}
return $mgr->editor->delete_acq_lineitem($li);
@@ -250,7 +242,7 @@
my $non_recv = $mgr->editor->search_acq_lineitem_detail(
{recv_time => undef, lineitem => $li_id}, {idlist=>1});
- return 1 unless @$non_recv;
+ return 1 if @$non_recv;
my $li = $mgr->editor->retrieve_acq_lineitem($li_id);
$li->state('received');
@@ -1431,14 +1423,14 @@
return $e->die_event unless $e->checkauth;
my $mgr = OpenILS::Application::Acq::BatchManager->new(editor => $e, conn => $conn);
- my $li = $e->retrieve_acq_lineitem_detail([
+ my $li = $e->retrieve_acq_lineitem([
$li_id, {
flesh => 1,
flesh_fields => {
jub => ['purchase_order']
}
}
- ]);
+ ]) or return $e->die_event;
return $e->die_event unless $e->allowed(
'RECEIVE_PURCHASE_ORDER', $li->purchase_order->ordering_agency);
More information about the open-ils-commits
mailing list