[open-ils-commits] r9633 -
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun May 18 12:28:53 EDT 2008
Author: erickson
Date: 2008-05-18 12:28:51 -0400 (Sun, 18 May 2008)
New Revision: 9633
Modified:
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm
Log:
added some missing copy fields. updated some faulty search calls
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm 2008-05-18 16:04:52 UTC (rev 9632)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm 2008-05-18 16:28:51 UTC (rev 9633)
@@ -382,10 +382,12 @@
my $volume = $volcache{$li_detail->cn_label};
unless($volume and $volume->owning_lib == $li_detail->owning_lib) {
- $volume = $U->simplereq(
+ my $vol_id = $U->simplereq(
'open-ils.cat',
'open-ils.cat.call_number.find_or_create',
$auth, $li_detail->cn_label, $li->eg_bib_id, $li_detail->owning_lib);
+ $volume = $e->retrieve_asset_call_number($vol_id) or return $e->die_event;
+ $volcache{$vol_id} = $volume;
}
if($U->event_code($volume)) {
@@ -400,6 +402,8 @@
$copy->status(OILS_COPY_STATUS_ON_ORDER);
$copy->barcode($li_detail->barcode);
$copy->location($li_detail->location);
+ $copy->call_number($volume->id);
+ $copy->circ_lib($volume->owning_lib);
my $stat = $U->simplereq(
'open-ils.cat',
@@ -410,12 +414,11 @@
return $stat;
}
- my $new_copy = $e->retrieve_asset_copy({deleted=>'f', barcode=>$copy->barcode})
+ my $new_copy = $e->search_asset_copy({deleted=>'f', barcode=>$copy->barcode})->[0]
or return $e->die_event;
$li_detail->eg_copy_id($new_copy->id);
- $e->update_acq_lineitem_detail($li_detail)
- or return $e->die_event;
+ $e->update_acq_lineitem_detail($li_detail) or return $e->die_event;
}
$e->commit;
More information about the open-ils-commits
mailing list