Browse Source

Bug 22014: Add ability to send "00" in SIP CV field on checkin success

Some SIP devices ( in this particular case, bin sorting machines from RFID Library Solutions ) require a checkin success to return a CV field of the value "00" rather than no CV field at all. Koha should be able to support this behavior.

Test Plan:
1) Apply this patch
2) Enable the new option cv_send_00_on_success for a SIP2 account
3) Restart SIP
4) Check in an item successfully via SIP
5) Note the response contains a CV field with the value '00'

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>
19.05.x
Kyle Hall 5 years ago
committed by Nick Clemens
parent
commit
9cdac855c9
  1. 6
      C4/SIP/Sip/MsgType.pm
  2. 1
      etc/SIPconfig.xml

6
C4/SIP/Sip/MsgType.pm

@ -684,7 +684,11 @@ sub handle_checkin {
} }
} }
$resp .= maybe_add( FID_ALERT_TYPE, $status->alert_type ) if $status->alert; if ( $status->alert && $status->alert_type ) {
$resp .= maybe_add( FID_ALERT_TYPE, $status->alert_type );
} elsif ( $server->{account}->{cv_send_00_on_success} ) {
$resp .= add_field( FID_ALERT_TYPE, '00' );
}
$resp .= maybe_add( FID_SCREEN_MSG, $status->screen_msg, $server ); $resp .= maybe_add( FID_SCREEN_MSG, $status->screen_msg, $server );
$resp .= maybe_add( FID_PRINT_LINE, $status->print_line ); $resp .= maybe_add( FID_PRINT_LINE, $status->print_line );

1
etc/SIPconfig.xml

@ -51,6 +51,7 @@
<login id="lpl-sc-beacock" password="xyzzy" <login id="lpl-sc-beacock" password="xyzzy"
delimiter="|" error-detect="enabled" institution="LPL" delimiter="|" error-detect="enabled" institution="LPL"
send_patron_home_library_in_af="1" send_patron_home_library_in_af="1"
cv_send_00_on_success="1"
ae_field_template="[% patron.surname %][% IF patron.firstname %], [% patron.firstname %][% END %]" ae_field_template="[% patron.surname %][% IF patron.firstname %], [% patron.firstname %][% END %]"
da_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') %]" > av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]" >

Loading…
Cancel
Save