From: Bill Erickson Date: Fri, 28 Dec 2012 16:40:39 +0000 (-0500) Subject: EDI order template includes empty GIR for B&T X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8499f8e6815705d7a1289da808bd0d32641c6578;p=working%2FEvergreen.git 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 --- 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 -%]