@@ -, +, @@
to the login you will be using to test.
"24 00120121210 085332AEHenry Acevedo|AA23529000035676|BLY|CQN|AFGreetings from Koha. |AFMPL|AO|"
Note the second AF field with the value MPL.
---
C4/SIP/Sip/Configuration/Account.pm | 5 +++++
C4/SIP/Sip/MsgType.pm | 6 ++++--
etc/SIPconfig.xml | 3 ++-
3 files changed, 11 insertions(+), 3 deletions(-)
--- a/C4/SIP/Sip/Configuration/Account.pm
+++ a/C4/SIP/Sip/Configuration/Account.pm
@@ -37,4 +37,9 @@ sub password {
return $self->{password};
}
+sub send_patron_home_library_in_af {
+ my $self = shift;
+ return $self->{send_patron_home_library_in_af};
+}
+
1;
--- a/C4/SIP/Sip/MsgType.pm
+++ a/C4/SIP/Sip/MsgType.pm
@@ -431,7 +431,8 @@ sub handle {
# information will be returned to the terminal.
#
sub build_patron_status {
- my ($patron, $lang, $fields)= @_;
+ my ($patron, $lang, $fields, $server)= @_;
+
my $patron_pwd = $fields->{(FID_PATRON_PWD)};
my $resp = (PATRON_STATUS_RESP);
@@ -452,6 +453,7 @@ sub build_patron_status {
}
$resp .= maybe_add(FID_SCREEN_MSG, $patron->screen_msg);
+ $resp .= maybe_add(FID_SCREEN_MSG, $patron->{branchcode}) if ( $server->{account}->{send_patron_home_library_in_af} );
$resp .= maybe_add(FID_PRINT_LINE, $patron->print_line);
} else {
# Invalid patron id. Report that the user has no privs.,
@@ -485,7 +487,7 @@ sub handle_patron_status {
#warn $fields->{(FID_INST_ID)};
$ils->check_inst_id($fields->{(FID_INST_ID)}, "handle_patron_status");
$patron = $ils->find_patron($fields->{(FID_PATRON_ID)});
- $resp = build_patron_status($patron, $lang, $fields);
+ $resp = build_patron_status($patron, $lang, $fields, $server );
$self->write_msg($resp);
return (PATRON_STATUS_REQ);
}
--- a/etc/SIPconfig.xml
+++ a/etc/SIPconfig.xml
@@ -41,7 +41,8 @@
+ delimiter="|" error-detect="enabled" institution="LPL"
+ send_patron_home_library_in_af="1" />