View | Details | Raw Unified | Return to bug 16755
Collapse All | Expand All

(-)a/C4/SIP/ILS/Item.pm (-3 / +15 lines)
Lines 11-16 use warnings; Link Here
11
11
12
use Sys::Syslog qw(syslog);
12
use Sys::Syslog qw(syslog);
13
use Carp;
13
use Carp;
14
use Template;
14
15
15
use C4::SIP::ILS::Transaction;
16
use C4::SIP::ILS::Transaction;
16
17
Lines 22-28 use C4::Circulation; Link Here
22
use C4::Members;
23
use C4::Members;
23
use C4::Reserves;
24
use C4::Reserves;
24
use Koha::Database;
25
use Koha::Database;
25
26
use Koha::Patrons;
26
27
27
=encoding UTF-8
28
=encoding UTF-8
28
29
Lines 165-172 sub hold_patron_id { Link Here
165
166
166
}
167
}
167
sub hold_patron_name {
168
sub hold_patron_name {
168
    my $self = shift;
169
    my ( $self, $template ) = @_;
169
    my $borrowernumber = (@_ ? shift: $self->hold_patron_id()) or return;
170
    my $borrowernumber = $self->hold_patron_id() or return;
171
172
    if ($template) {
173
        my $tt = Template->new();
174
175
        my $patron = Koha::Patrons->find($borrowernumber);
176
177
        my $output;
178
        $tt->process( \$template, { patron => $patron }, \$output );
179
        return $output;
180
    }
181
170
    my $holder = GetMember(borrowernumber=>$borrowernumber);
182
    my $holder = GetMember(borrowernumber=>$borrowernumber);
171
    unless ($holder) {
183
    unless ($holder) {
172
        syslog("LOG_ERR", "While checking hold, GetMember failed for borrowernumber '$borrowernumber'");
184
        syslog("LOG_ERR", "While checking hold, GetMember failed for borrowernumber '$borrowernumber'");
(-)a/C4/SIP/Sip/MsgType.pm (-1 / +1 lines)
Lines 679-685 sub handle_checkin { Link Here
679
            $resp .= maybe_add( FID_CALL_NUMBER,          $item->call_number );
679
            $resp .= maybe_add( FID_CALL_NUMBER,          $item->call_number );
680
            $resp .= maybe_add( FID_DESTINATION_LOCATION, $item->destination_loc );
680
            $resp .= maybe_add( FID_DESTINATION_LOCATION, $item->destination_loc );
681
            $resp .= maybe_add( FID_HOLD_PATRON_ID,       $item->hold_patron_bcode );
681
            $resp .= maybe_add( FID_HOLD_PATRON_ID,       $item->hold_patron_bcode );
682
            $resp .= maybe_add( FID_HOLD_PATRON_NAME,     $item->hold_patron_name );
682
            $resp .= maybe_add( FID_HOLD_PATRON_NAME,     $item->hold_patron_name( $server->{account}->{da_field_template} ) );
683
            if ( $status->hold and $status->hold->{branchcode} ne $item->destination_loc ) {
683
            if ( $status->hold and $status->hold->{branchcode} ne $item->destination_loc ) {
684
                warn 'SIP hold mismatch: $status->hold->{branchcode}=' . $status->hold->{branchcode} . '; $item->destination_loc=' . $item->destination_loc;
684
                warn 'SIP hold mismatch: $status->hold->{branchcode}=' . $status->hold->{branchcode} . '; $item->destination_loc=' . $item->destination_loc;
685
685
(-)a/etc/SIPconfig.xml (-1 / +1 lines)
Lines 51-56 Link Here
51
      <login id="lpl-sc-beacock" password="xyzzy"
51
      <login id="lpl-sc-beacock" password="xyzzy"
52
             delimiter="|" error-detect="enabled" institution="LPL"
52
             delimiter="|" error-detect="enabled" institution="LPL"
53
             send_patron_home_library_in_af="1"
53
             send_patron_home_library_in_af="1"
54
             da_field_template="[% patron.surname %][% IF patron.firstname %], [% patron.firstname %][% END %]"
54
             av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]" >
55
             av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]" >
55
          <screen_msg_regex find="Greetings from Koha." replace="Welcome to your library!" />
56
          <screen_msg_regex find="Greetings from Koha." replace="Welcome to your library!" />
56
          <screen_msg_regex find="Invalid patron barcode." replace="Barcode not found, are you sure this is your library card?" />
57
          <screen_msg_regex find="Invalid patron barcode." replace="Barcode not found, are you sure this is your library card?" />
57
- 

Return to bug 16755