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

(-)a/C4/SIP/ILS.pm (-2 / +2 lines)
Lines 197-203 sub test_cardnumber_compare { Link Here
197
}
197
}
198
198
199
sub checkin {
199
sub checkin {
200
    my ( $self, $item_id, $trans_date, $return_date, $current_loc, $item_props, $cancel, $checked_in_ok ) = @_;
200
    my ( $self, $item_id, $trans_date, $return_date, $current_loc, $item_props, $cancel, $checked_in_ok, $cv_triggers_alert ) = @_;
201
    my ( $patron, $item, $circ );
201
    my ( $patron, $item, $circ );
202
202
203
    $circ = C4::SIP::ILS::Transaction::Checkin->new();
203
    $circ = C4::SIP::ILS::Transaction::Checkin->new();
Lines 206-212 sub checkin { Link Here
206
    $circ->item( $item = C4::SIP::ILS::Item->new($item_id) );
206
    $circ->item( $item = C4::SIP::ILS::Item->new($item_id) );
207
207
208
    if ($item) {
208
    if ($item) {
209
        $circ->do_checkin( $current_loc, $return_date );
209
        $circ->do_checkin( $current_loc, $return_date, $cv_triggers_alert );
210
    }
210
    }
211
    else {
211
    else {
212
        $circ->alert(1);
212
        $circ->alert(1);
(-)a/C4/SIP/ILS/Transaction/Checkin.pm (-1 / +10 lines)
Lines 47-52 sub do_checkin { Link Here
47
    my $self = shift;
47
    my $self = shift;
48
    my $branch = shift;
48
    my $branch = shift;
49
    my $return_date = shift;
49
    my $return_date = shift;
50
    my $cv_triggers_alert = shift;
50
    if (!$branch) {
51
    if (!$branch) {
51
        $branch = 'SIP2';
52
        $branch = 'SIP2';
52
    }
53
    }
Lines 66-71 sub do_checkin { Link Here
66
67
67
    $debug and warn "do_checkin() calling AddReturn($barcode, $branch)";
68
    $debug and warn "do_checkin() calling AddReturn($barcode, $branch)";
68
    my ($return, $messages, $issue, $borrower) = AddReturn($barcode, $branch, undef, undef, $return_date);
69
    my ($return, $messages, $issue, $borrower) = AddReturn($barcode, $branch, undef, undef, $return_date);
70
    $self->alert(!$return);
71
    # ignoring messages: NotIssued, WasLost, WasTransfered
69
72
70
    # biblionumber, biblioitemnumber, itemnumber
73
    # biblionumber, biblioitemnumber, itemnumber
71
    # borrowernumber, reservedate, branchcode
74
    # borrowernumber, reservedate, branchcode
Lines 115-121 sub do_checkin { Link Here
115
        $self->{item}->hold_patron_id( $messages->{ResFound}->{borrowernumber} );
118
        $self->{item}->hold_patron_id( $messages->{ResFound}->{borrowernumber} );
116
        $self->{item}->destination_loc( $messages->{ResFound}->{branchcode} );
119
        $self->{item}->destination_loc( $messages->{ResFound}->{branchcode} );
117
    }
120
    }
118
    $self->alert(defined $self->alert_type);  # alert_type could be "00", hypothetically
121
122
    if ( $cv_triggers_alert ) {
123
        $self->alert(defined $self->alert_type); # Overwrites existing alert value
124
    } else {
125
        $self->alert(1) if defined $self->alert_type; # Doesn't affect alert value unless an alert type is set
126
    }
127
119
    $self->ok($return);
128
    $self->ok($return);
120
}
129
}
121
130
(-)a/C4/SIP/Sip/MsgType.pm (-1 / +1 lines)
Lines 637-643 sub handle_checkin { Link Here
637
        syslog( "LOG_WARNING", "received no-block checkin from terminal '%s'", $account->{id} );
637
        syslog( "LOG_WARNING", "received no-block checkin from terminal '%s'", $account->{id} );
638
        $status = $ils->checkin_no_block( $item_id, $trans_date, $return_date, $item_props, $cancel );
638
        $status = $ils->checkin_no_block( $item_id, $trans_date, $return_date, $item_props, $cancel );
639
    } else {
639
    } else {
640
        $status = $ils->checkin( $item_id, $trans_date, $return_date, $my_branch, $item_props, $cancel, $account->{checked_in_ok} );
640
        $status = $ils->checkin( $item_id, $trans_date, $return_date, $my_branch, $item_props, $cancel, $account->{checked_in_ok}, $account->{cv_triggers_alert} );
641
    }
641
    }
642
642
643
    $patron = $status->patron;
643
    $patron = $status->patron;
(-)a/etc/SIPconfig.xml (-1 / +1 lines)
Lines 53-58 Link Here
53
             send_patron_home_library_in_af="1"
53
             send_patron_home_library_in_af="1"
54
             cv_send_00_on_success="1"
54
             cv_send_00_on_success="1"
55
             ct_always_send="1"
55
             ct_always_send="1"
56
             cv_triggers_alert="1"
56
             ae_field_template="[% patron.surname %][% IF patron.firstname %], [% patron.firstname %][% END %]"
57
             ae_field_template="[% patron.surname %][% IF patron.firstname %], [% patron.firstname %][% END %]"
57
             da_field_template="[% patron.surname %][% IF patron.firstname %], [% patron.firstname %][% END %]"
58
             da_field_template="[% patron.surname %][% IF patron.firstname %], [% patron.firstname %][% END %]"
58
             av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]" >
59
             av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]" >
59
- 

Return to bug 22043