[open-ils-commits] r9915 -
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Jun 22 23:46:30 EDT 2008
Author: erickson
Date: 2008-06-22 23:46:28 -0400 (Sun, 22 Jun 2008)
New Revision: 9915
Modified:
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm
Log:
marking lineitem as received if all copies are received
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm 2008-06-23 03:25:17 UTC (rev 9914)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm 2008-06-23 03:46:28 UTC (rev 9915)
@@ -632,6 +632,18 @@
# XXX update the fund_debit to encumberance=false
+ my $non_recv = $e->search_acq_lineitem_detail(
+ {recv_time => undef, lineitem => $lid->lineitem});
+
+ unless(@$non_recv) {
+ # if all of the lineitem details for this lineitem have
+ # been received, mark the lineitem as received
+ my $li = $e->retrieve_acq_lineitem($lid->lineitem);
+ $li->state('received');
+ $li->edit_time('now');
+ $e->update_acq_lineitem($li) or return $e->die_event;
+ }
+
return undef;
}
More information about the open-ils-commits
mailing list