Lines 71-78
if ( $input->param('borrowernumber') ) {
Link Here
|
71 |
# Generating discharge if needed |
71 |
# Generating discharge if needed |
72 |
if ($input->param('generatedischarge')) { |
72 |
if ($input->param('generatedischarge')) { |
73 |
# If borrower has pending reserves, we cancel them |
73 |
# If borrower has pending reserves, we cancel them |
74 |
foreach (@reserves) { |
74 |
for my $reserve (@reserves) { |
75 |
CancelReserve($_->{'reservenumber'}); |
75 |
CancelReserve({ reserve_id => $reserve->{reserve_id} }); |
76 |
} |
76 |
} |
77 |
$hasreserves = 0; |
77 |
$hasreserves = 0; |
78 |
|
78 |
|
Lines 118-124
if ( $input->param('borrowernumber') ) {
Link Here
|
118 |
|
118 |
|
119 |
# Error handling: |
119 |
# Error handling: |
120 |
# Check if we really got our discharge as a pdf file |
120 |
# Check if we really got our discharge as a pdf file |
121 |
my $todayiso = output_pref(dt_from_string(), 'iso', 1); |
121 |
my $todayiso = output_pref(dt_from_string(), 'iso', 0, 1); |
122 |
# If we don't, then |
122 |
# If we don't, then |
123 |
unless (-e "$dischargePath/$borrowernumber/discharge-$todayiso.pdf") { |
123 |
unless (-e "$dischargePath/$borrowernumber/discharge-$todayiso.pdf") { |
124 |
# Show an error message to the librarian |
124 |
# Show an error message to the librarian |
125 |
- |
|
|