Lines 15-21
use CGI qw ( -utf8 );
Link Here
|
15 |
use C4::SIP::ILS::Transaction; |
15 |
use C4::SIP::ILS::Transaction; |
16 |
|
16 |
|
17 |
use C4::Context; |
17 |
use C4::Context; |
18 |
use C4::Circulation qw( AddIssue GetIssuingCharges CanBookBeIssued ); |
18 |
use C4::Circulation qw( AddIssue GetIssuingCharges CanBookBeIssued ProcessOfflineIssue ); |
19 |
use C4::Members; |
19 |
use C4::Members; |
20 |
use Koha::DateUtils qw( dt_from_string ); |
20 |
use Koha::DateUtils qw( dt_from_string ); |
21 |
|
21 |
|
Lines 58-65
sub do_checkout {
Link Here
|
58 |
my $minute = substr($no_block_due_date,14,2); |
58 |
my $minute = substr($no_block_due_date,14,2); |
59 |
my $second = substr($no_block_due_date,16,2); |
59 |
my $second = substr($no_block_due_date,16,2); |
60 |
|
60 |
|
61 |
my $iso = "$year-$month-$day $hour:$minute:$second"; |
61 |
$no_block_due_date = "$year-$month-$day $hour:$minute:$second 000"; |
62 |
$no_block_due_date = dt_from_string( $iso, "iso" ); |
|
|
63 |
} |
62 |
} |
64 |
|
63 |
|
65 |
my $noerror=1; # If set to zero we block the issue |
64 |
my $noerror=1; # If set to zero we block the issue |
Lines 127-145
sub do_checkout {
Link Here
|
127 |
} |
126 |
} |
128 |
} |
127 |
} |
129 |
|
128 |
|
130 |
if ( $no_block_due_date ) { |
129 |
if ( $noerror == 0 && !$no_block_due_date ) { |
131 |
$overridden_duedate = $no_block_due_date; |
|
|
132 |
$noerror = 1; |
133 |
} |
134 |
|
135 |
unless ($noerror) { |
136 |
$self->ok(0); |
130 |
$self->ok(0); |
137 |
return $self; |
131 |
return $self; |
138 |
} |
132 |
} |
139 |
|
133 |
|
140 |
# can issue |
134 |
if ( $no_block_due_date ) { |
141 |
my $issue = AddIssue( $patron->unblessed, $barcode, $overridden_duedate, 0 ); |
135 |
$overridden_duedate = $no_block_due_date; |
142 |
$self->{due} = $self->duedatefromissue($issue, $itemnumber); |
136 |
ProcessOfflineIssue({ |
|
|
137 |
cardnumber => $patron->cardnumber, |
138 |
barcode => $barcode, |
139 |
timestamp => $no_block_due_date, |
140 |
}); |
141 |
} else { |
142 |
# can issue |
143 |
my $issue = AddIssue( $patron->unblessed, $barcode, $overridden_duedate, 0 ); |
144 |
$self->{due} = $self->duedatefromissue($issue, $itemnumber); |
145 |
} |
143 |
|
146 |
|
144 |
$self->ok(1); |
147 |
$self->ok(1); |
145 |
return $self; |
148 |
return $self; |
146 |
- |
|
|