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>
This commit is contained in:
Kyle Hall 2018-12-17 12:34:14 -05:00 committed by Nick Clemens
parent 660d7bbd5e
commit 9cdac855c9
2 changed files with 6 additions and 1 deletions

View file

@ -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_PRINT_LINE, $status->print_line );

View file

@ -51,6 +51,7 @@
<login id="lpl-sc-beacock" password="xyzzy"
delimiter="|" error-detect="enabled" institution="LPL"
send_patron_home_library_in_af="1"
cv_send_00_on_success="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') %]" >