From 8499f8e6815705d7a1289da808bd0d32641c6578 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 28 Dec 2012 11:40:39 -0500 Subject: [PATCH] EDI order template includes empty GIR for B&T When the vendor is 'baker and taylor', include all agreed-upon GIR fields, regardless of whether the field has a value. Signed-off-by: Bill Erickson --- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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 665d5fb51d..ffcaf9a93e 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -8194,12 +8194,17 @@ $$ # If we assume owning_lib is required and set, # it is safe to prepend each following copy field w/ a "," + # B&T EDI requires expected GIR fields to be + # present regardless of whether a value exists. + # some fields are required to have a value in ACQ, + # though, so they are not forced into place below. + %]{[%- IF INC_OWNING_LIB AND copy.owning_lib %] "owning_lib":"[% copy.owning_lib %]"[% END -%] [%- IF INC_FUND AND copy.fund %],"fund":"[% copy.fund %]"[% END -%] - [%- IF INC_CALLNUMBER AND copy.callnumber %],"call_number":"[% copy.callnumber %]"[% END -%] - [%- IF INC_ITEM_TYPE AND copy.item_type %],"item_type":"[% copy.item_type %]"[% END -%] + [%- IF INC_CALLNUMBER AND (VENDOR_BT OR copy.callnumber) %],"call_number":"[% copy.callnumber %]"[% END -%] + [%- IF INC_ITEM_TYPE AND (VENDOR_BT OR copy.item_type) %],"item_type":"[% copy.item_type %]"[% END -%] [%- IF INC_LOCATION AND copy.location %],"copy_location":"[% copy.location %]"[% END -%] - [%- IF INC_COLLECTION_CODE AND copy.collection_code %],"collection_code":"[% copy.collection_code %]"[% END -%] + [%- IF INC_COLLECTION_CODE AND (VENDOR_BT OR copy.collection_code) %],"collection_code":"[% copy.collection_code %]"[% END -%] [%- IF INC_QUANTITY %],"quantity":"[% copy.quantity %]"[% END -%] [%- IF INC_COPY_ID %],"copy_id":"[% copy.copy_id %]" [% END %]}[% ',' UNLESS loop.last -%] [%- END -%] [%# FOR compressed_copies -%] -- 2.11.0