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 23-29 use C4::Members; Link Here
23
use C4::Reserves;
24
use C4::Reserves;
24
use Koha::Database;
25
use Koha::Database;
25
use Koha::Biblios;
26
use Koha::Biblios;
26
27
use Koha::Patrons;
27
28
28
=encoding UTF-8
29
=encoding UTF-8
29
30
Lines 161-168 sub hold_patron_id { Link Here
161
162
162
}
163
}
163
sub hold_patron_name {
164
sub hold_patron_name {
164
    my $self = shift;
165
    my ( $self, $template ) = @_;
165
    my $borrowernumber = (@_ ? shift: $self->hold_patron_id()) or return;
166
    my $borrowernumber = $self->hold_patron_id() or return;
167
168
    if ($template) {
169
        my $tt = Template->new();
170
171
        my $patron = Koha::Patrons->find($borrowernumber);
172
173
        my $output;
174
        $tt->process( \$template, { patron => $patron }, \$output );
175
        return $output;
176
    }
177
166
    my $holder = GetMember(borrowernumber=>$borrowernumber);
178
    my $holder = GetMember(borrowernumber=>$borrowernumber);
167
    unless ($holder) {
179
    unless ($holder) {
168
        syslog("LOG_ERR", "While checking hold, GetMember failed for borrowernumber '$borrowernumber'");
180
        syslog("LOG_ERR", "While checking hold, GetMember failed for borrowernumber '$borrowernumber'");
(-)a/C4/SIP/Sip/MsgType.pm (-1 / +1 lines)
Lines 671-677 sub handle_checkin { Link Here
671
            $resp .= maybe_add( FID_CALL_NUMBER,          $item->call_number );
671
            $resp .= maybe_add( FID_CALL_NUMBER,          $item->call_number );
672
            $resp .= maybe_add( FID_DESTINATION_LOCATION, $item->destination_loc );
672
            $resp .= maybe_add( FID_DESTINATION_LOCATION, $item->destination_loc );
673
            $resp .= maybe_add( FID_HOLD_PATRON_ID,       $item->hold_patron_bcode );
673
            $resp .= maybe_add( FID_HOLD_PATRON_ID,       $item->hold_patron_bcode );
674
            $resp .= maybe_add( FID_HOLD_PATRON_NAME,     $item->hold_patron_name );
674
            $resp .= maybe_add( FID_HOLD_PATRON_NAME,     $item->hold_patron_name( $server->{account}->{da_field_template} ) );
675
            if ( $status->hold and $status->hold->{branchcode} ne $item->destination_loc ) {
675
            if ( $status->hold and $status->hold->{branchcode} ne $item->destination_loc ) {
676
                warn 'SIP hold mismatch: $status->hold->{branchcode}=' . $status->hold->{branchcode} . '; $item->destination_loc=' . $item->destination_loc;
676
                warn 'SIP hold mismatch: $status->hold->{branchcode}=' . $status->hold->{branchcode} . '; $item->destination_loc=' . $item->destination_loc;
677
677
(-)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