From: erickson Date: Wed, 6 May 2009 14:35:01 +0000 (+0000) Subject: don't require a copy location in import records since we allow for the configuration... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=52e96c095ab9872e82d45e9331ecb08cb9dc6c1d;p=evergreen%2Ftadl.git don't require a copy location in import records since we allow for the configuration of a default. capture colleciton code on import git-svn-id: svn://svn.open-ils.org/ILS/trunk@13087 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm index 1cadd4f61d..ad14b037b6 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm @@ -1087,7 +1087,8 @@ sub import_lineitem_details { 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 @@ sub extract_lineitem_detail_data { # --------------------------------------------------------------------- # 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; }