Some SIP devices ( in this particular case, bin sorting machines from RFID Library Solutions ) require a CT field to be sent, even if that field is empty. Koha should be able to support this behavior.
Test Plan:
1) Apply this patch
2) Enable the new option ct_always_send for a SIP2 account
3) Restart SIP
4) Check in an item successfully via SIP, which will not be transferred
5) Note the response contains a CT field with no value
Sponsored-by: Pueblo City-County Library District
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jill Kleven <jill.kleven@pueblolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
$resp .= maybe_add( FID_ITEM_PROPS, $item->sip_item_properties );
$resp .= maybe_add( FID_COLLECTION_CODE, $item->collection_code );
$resp .= maybe_add( FID_CALL_NUMBER, $item->call_number );
- $resp .= maybe_add( FID_DESTINATION_LOCATION, $item->destination_loc );
+ $resp .= add_field( FID_DESTINATION_LOCATION, $item->destination_loc ) if ( $item->destination_loc || $server->{account}->{ct_always_send} );
$resp .= maybe_add( FID_HOLD_PATRON_ID, $item->hold_patron_bcode );
$resp .= maybe_add( FID_HOLD_PATRON_NAME, $item->hold_patron_name( $server->{account}->{da_field_template} ) );
if ( $status->hold and $status->hold->{branchcode} ne $item->destination_loc ) {
delimiter="|" error-detect="enabled" institution="LPL"
send_patron_home_library_in_af="1"
cv_send_00_on_success="1"
+ ct_always_send="1"
ae_field_template="[% patron.surname %][% IF patron.firstname %], [% patron.firstname %][% END %]"
da_field_template="[% patron.surname %][% IF patron.firstname %], [% patron.firstname %][% END %]"
av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]" >