# 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 -%]