[open-ils-commits] r13087 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed May 6 10:35:03 EDT 2009
Author: erickson
Date: 2009-05-06 10:35:01 -0400 (Wed, 06 May 2009)
New Revision: 13087
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
Log:
don't require a copy location in import records since we allow for the configuration of a default. capture colleciton code on import
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm 2009-05-06 14:34:16 UTC (rev 13086)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm 2009-05-06 14:35:01 UTC (rev 13087)
@@ -1087,7 +1087,8 @@
fund => $$compiled{fund},
circ_modifier => $$compiled{circ_modifier},
note => $$compiled{note},
- location => $$compiled{copy_location}
+ location => $$compiled{copy_location},
+ collection_code => $$compiled{collection_code}
) or return 0;
}
@@ -1189,18 +1190,19 @@
# ---------------------------------------------------------------------
# Shelving Location
my $name = $compiled{copy_location};
- return $killme->('no copy_location defined') unless $name;
- my $loc = $mgr->cache($base_org, "copy_loc.$name");
- unless($loc) {
- for my $org (@$org_path) {
- $loc = $mgr->editor->search_asset_copy_location(
- {owning_lib => $org, name => $name}, {idlist => 1})->[0];
- last if $loc;
+ if($name) {
+ my $loc = $mgr->cache($base_org, "copy_loc.$name");
+ unless($loc) {
+ for my $org (@$org_path) {
+ $loc = $mgr->editor->search_asset_copy_location(
+ {owning_lib => $org, name => $name}, {idlist => 1})->[0];
+ last if $loc;
+ }
}
+ return $killme->("Invalid copy location $name") unless $loc;
+ $compiled{copy_location} = $loc;
+ $mgr->cache($base_org, "copy_loc.$name", $loc);
}
- return $killme->("Invalid copy location $name") unless $loc;
- $compiled{copy_location} = $loc;
- $mgr->cache($base_org, "copy_loc.$name", $loc);
return \%compiled;
}
More information about the open-ils-commits
mailing list