From a98a7cbc01933623e2b1eaa5e14252c43f05cc7d Mon Sep 17 00:00:00 2001
From: erickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Wed, 21 Jul 2010 21:17:00 +0000
Subject: [PATCH] add collection code as non-i18n version of shelving location

git-svn-id: svn://svn.open-ils.org/ILS/trunk@17005 dcc99617-32d9-48b4-a31d-7c20da2025e4
---
 Open-ILS/src/perlmods/OpenILS/SIP/Item.pm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Open-ILS/src/perlmods/OpenILS/SIP/Item.pm b/Open-ILS/src/perlmods/OpenILS/SIP/Item.pm
index a8e23bd2de..eaffd40882 100644
--- a/Open-ILS/src/perlmods/OpenILS/SIP/Item.pm
+++ b/Open-ILS/src/perlmods/OpenILS/SIP/Item.pm
@@ -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([
             {
-- 
2.11.0