add collection code as non-i18n version of shelving location
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 21 Jul 2010 21:17:00 +0000 (21:17 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 21 Jul 2010 21:17:00 +0000 (21:17 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17005 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/SIP/Item.pm

index a8e23bd..eaffd40 100644 (file)
@@ -127,6 +127,13 @@ sub new {
     $self->{call_number} = $copy->call_number->label;
     $self->{mods} = $U->record_to_mvr($self->{record}) if $self->{record}->marc;
 
+    # use the non-translated version of the copy location as the
+    # collection code, since it may be used for additional routing
+    # purposes by the SIP client.  Config option?
+    $self->{collection_code} = 
+        $e->retrieve_asset_copy_location([
+            $copy->location, {no_i18n => 1}])->name;
+
     if ($copy->status->id == OILS_COPY_STATUS_IN_TRANSIT) {
         my $transit = $e->search_action_transit_copy([
             {