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

(-)a/C4/SIP/ILS/Item.pm (-4 / +8 lines)
Lines 82-91 sub new { Link Here
82
        return;
82
        return;
83
    }
83
    }
84
    my $self = $item->unblessed;
84
    my $self = $item->unblessed;
85
    $self->{      'id'       } = $item->barcode;     # to SIP, the barcode IS the id.
85
    $self->{'id'} = $item->barcode;    # to SIP, the barcode IS the id.
86
    $self->{permanent_location}= $item->homebranch;
86
    $self->{permanent_location}            = $item->homebranch;
87
    $self->{'collection_code'} = $item->ccode;
87
    $self->{'collection_code'}             = $item->ccode;
88
    $self->{  'call_number'  } = $item->itemcallnumber;
88
    $self->{'call_number'}                 = $item->itemcallnumber;
89
    $self->{'shelving_location'}           = $item->location;
90
    $self->{'permanent_shelving_location'} = $item->permanent_location;
89
91
90
    my $it = $item->effective_itemtype;
92
    my $it = $item->effective_itemtype;
91
    my $itemtype = Koha::Database->new()->schema()->resultset('Itemtype')->find( $it );
93
    my $itemtype = Koha::Database->new()->schema()->resultset('Itemtype')->find( $it );
Lines 130-135 my %fields = ( Link Here
130
    barcode             => 0,
132
    barcode             => 0,
131
    onloan              => 0,
133
    onloan              => 0,
132
    collection_code     => 0,
134
    collection_code     => 0,
135
    shelving_location   => 0,
136
    permanent_shelving_location   => 0,
133
    call_number         => 0,
137
    call_number         => 0,
134
    enumchron           => 0,
138
    enumchron           => 0,
135
    location            => 0,
139
    location            => 0,
(-)a/C4/SIP/Sip/MsgType.pm (-7 / +18 lines)
Lines 683-695 sub handle_checkin { Link Here
683
            $resp .= add_field( FID_PATRON_ID, $patron->id, $server );
683
            $resp .= add_field( FID_PATRON_ID, $patron->id, $server );
684
        }
684
        }
685
        if ($item) {
685
        if ($item) {
686
$resp .= maybe_add( FID_MEDIA_TYPE,           $item->sip_media_type,      $server );
686
            $resp .= maybe_add( FID_MEDIA_TYPE,           $item->sip_media_type,      $server );
687
$resp .= maybe_add( FID_ITEM_PROPS,           $item->sip_item_properties, $server );
687
            $resp .= maybe_add( FID_ITEM_PROPS,           $item->sip_item_properties, $server );
688
$resp .= maybe_add( FID_COLLECTION_CODE,      $item->collection_code,     $server );
688
            $resp .= maybe_add( FID_CALL_NUMBER,          $item->call_number,         $server );
689
$resp .= maybe_add( FID_CALL_NUMBER,          $item->call_number,         $server );
689
            $resp .= maybe_add( FID_HOLD_PATRON_ID,       $item->hold_patron_bcode,   $server );
690
$resp .= maybe_add( FID_HOLD_PATRON_ID,       $item->hold_patron_bcode,   $server );
690
            $resp .= add_field( FID_DESTINATION_LOCATION, $item->destination_loc,     $server ) if ( $item->destination_loc || $server->{account}->{ct_always_send} );
691
$resp .= add_field( FID_DESTINATION_LOCATION, $item->destination_loc,     $server ) if ( $item->destination_loc || $server->{account}->{ct_always_send} );
691
            $resp .= maybe_add( FID_HOLD_PATRON_NAME,     $item->hold_patron_name( $server->{account}->{da_field_template} ), $server );
692
$resp .= maybe_add( FID_HOLD_PATRON_NAME,     $item->hold_patron_name( $server->{account}->{da_field_template} ), $server );
692
693
            if ( my $CR = $server->{account}->{cr_item_field} ) {
694
                $resp .= maybe_add( FID_COLLECTION_CODE, $item->{$CR}, $server );
695
            } else {
696
                $resp .= maybe_add( FID_COLLECTION_CODE, $item->collection_code, $server );
697
            }
693
698
694
            if ( $status->hold and $status->hold->{branchcode} ne $item->destination_loc ) {
699
            if ( $status->hold and $status->hold->{branchcode} ne $item->destination_loc ) {
695
                warn 'SIP hold mismatch: $status->hold->{branchcode}=' . $status->hold->{branchcode} . '; $item->destination_loc=' . $item->destination_loc;
700
                warn 'SIP hold mismatch: $status->hold->{branchcode}=' . $status->hold->{branchcode} . '; $item->destination_loc=' . $item->destination_loc;
Lines 1200-1205 sub handle_item_information { Link Here
1200
        $resp .= maybe_add( FID_CURRENT_LOCN, $item->current_location, $server );
1205
        $resp .= maybe_add( FID_CURRENT_LOCN, $item->current_location, $server );
1201
        $resp .= maybe_add( FID_ITEM_PROPS,   $item->sip_item_properties, $server );
1206
        $resp .= maybe_add( FID_ITEM_PROPS,   $item->sip_item_properties, $server );
1202
1207
1208
        if ( my $CR = $server->{account}->{cr_item_field} ) {
1209
                $resp .= maybe_add( FID_COLLECTION_CODE, $item->$CR, $server );
1210
        } else {
1211
          $resp .= maybe_add( FID_COLLECTION_CODE, $item->collection_code, $server );
1212
        }
1213
1203
        if ( ( $i = $item->fee ) != 0 ) {
1214
        if ( ( $i = $item->fee ) != 0 ) {
1204
            $resp .= add_field( FID_CURRENCY, $item->fee_currency, $server );
1215
            $resp .= add_field( FID_CURRENCY, $item->fee_currency, $server );
1205
            $resp .= add_field( FID_FEE_AMT,  $i, $server );
1216
            $resp .= add_field( FID_FEE_AMT,  $i, $server );
(-)a/etc/SIPconfig.xml (-1 / +1 lines)
Lines 55-60 Link Here
55
             ct_always_send="1"
55
             ct_always_send="1"
56
             cv_triggers_alert="1"
56
             cv_triggers_alert="1"
57
             allow_empty_passwords="1"
57
             allow_empty_passwords="1"
58
             cr_item_field="shelving_location"
58
             ae_field_template="[% patron.surname %][% IF patron.firstname %], [% patron.firstname %][% END %]"
59
             ae_field_template="[% patron.surname %][% IF patron.firstname %], [% patron.firstname %][% END %]"
59
             da_field_template="[% patron.surname %][% IF patron.firstname %], [% patron.firstname %][% END %]"
60
             da_field_template="[% patron.surname %][% IF patron.firstname %], [% patron.firstname %][% END %]"
60
             av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]"
61
             av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]"
61
- 

Return to bug 21979