From: Bill Erickson Date: Wed, 2 Nov 2016 19:16:13 +0000 (-0400) Subject: LP#1513872 support copy barcode GIR+LAC field X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=29e0377b0fd18f76787afb610204f11061757adb;p=working%2FEvergreen.git LP#1513872 support copy barcode GIR+LAC field Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm index 412cb8cc88..613693a39b 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm @@ -288,6 +288,8 @@ sub compile_copy { my $owning_lib = $copy->owning_lib ? $copy->owning_lib->shortname : ''; my $location = $copy->location ? $copy->location->name : ''; my $collection_code = $copy->collection_code || ''; + my $barcode = $copy->barcode || ''; + # When an ACQ copy links to a real copy (acp), treat the real # copy as authoritative for certain fields. @@ -311,6 +313,7 @@ sub compile_copy { ($call_number eq $e_copy->{call_number}) && ($owning_lib eq $e_copy->{owning_lib}) && ($location eq $e_copy->{location}) && + ($barcode eq $e_copy->{barcode}) && ($collection_code eq $e_copy->{collection_code}) ) { $e_copy->{quantity}++; @@ -331,6 +334,7 @@ sub compile_copy { call_number => $self->escape_edi($call_number), owning_lib => $self->escape_edi($owning_lib), location => $self->escape_edi($location), + barcode => $self->escape_edi($barcode), collection_code => $self->escape_edi($collection_code), copy_id => $copy->id, # for INCLUDE_COPY_ID quantity => 1 @@ -512,6 +516,9 @@ my @gir_fields = ( field => 'location', attr => 'INCLUDE_LOCATION', empty_attr => 'INCLUDE_EMPTY_LOCATION'}, + { code => 'LAC', + field => 'barcode', + attr => 'INCLUDE_ITEM_BARCODE'}, { code => 'LQT', field => 'quantity', attr => 'INCLUDE_QUANTITY'} diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index 2cd85c6970..20ceaa924f 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -16481,6 +16481,9 @@ INSERT INTO acq.edi_attr (key, label) VALUES ('INCLUDE_ITEM_TYPE', oils_i18n_gettext('INCLUDE_ITEM_TYPE', 'Orders Include Copy Item Types', 'aea', 'label')), + ('INCLUDE_ITEM_BARCODE', + oils_i18n_gettext('INCLUDE_ITEM_BARCODE', + 'Orders Include Copy Barcodes', 'aea', 'label')), ('INCLUDE_LOCATION', oils_i18n_gettext('INCLUDE_LOCATION', 'Orders Include Copy Locations', 'aea', 'label')), diff --git a/Open-ILS/src/sql/Pg/upgrade/YYYY.data.edi_attr_set.sql b/Open-ILS/src/sql/Pg/upgrade/YYYY.data.edi_attr_set.sql index d1a5d267ed..7bb42f6ec3 100644 --- a/Open-ILS/src/sql/Pg/upgrade/YYYY.data.edi_attr_set.sql +++ b/Open-ILS/src/sql/Pg/upgrade/YYYY.data.edi_attr_set.sql @@ -18,6 +18,9 @@ INSERT INTO acq.edi_attr (key, label) VALUES ('INCLUDE_ITEM_TYPE', oils_i18n_gettext('INCLUDE_ITEM_TYPE', 'Orders Include Copy Item Types', 'aea', 'label')), + ('INCLUDE_ITEM_BARCODE', + oils_i18n_gettext('INCLUDE_ITEM_BARCODE', + 'Orders Include Copy Barcodes', 'aea', 'label')), ('INCLUDE_LOCATION', oils_i18n_gettext('INCLUDE_LOCATION', 'Orders Include Copy Locations', 'aea', 'label')),