|
Lines 351-357
sub cancel {
Link Here
|
| 351 |
# and, if desired, charge a cancel fee |
351 |
# and, if desired, charge a cancel fee |
| 352 |
my $charge = C4::Context->preference("ExpireReservesMaxPickUpDelayCharge"); |
352 |
my $charge = C4::Context->preference("ExpireReservesMaxPickUpDelayCharge"); |
| 353 |
if ( $charge && $params->{'charge_cancel_fee'} ) { |
353 |
if ( $charge && $params->{'charge_cancel_fee'} ) { |
| 354 |
C4::Accounts::manualinvoice($self->borrowernumber, $self->itemnumber, '', 'HE', $charge); |
354 |
my $account = |
|
|
355 |
Koha::Account->new( { patron_id => $self->borrowernumber } ); |
| 356 |
$account->add_debit( |
| 357 |
{ |
| 358 |
amount => $charge, |
| 359 |
user_id => C4::Context->userenv ? C4::Context->userenv->{'number'} : 0, |
| 360 |
library_id => C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef, |
| 361 |
type => 'hold_expired', |
| 362 |
item_id => $self->itemnumber |
| 363 |
} |
| 364 |
); |
| 355 |
} |
365 |
} |
| 356 |
|
366 |
|
| 357 |
C4::Log::logaction( 'HOLDS', 'CANCEL', $self->reserve_id, Dumper($self->unblessed) ) |
367 |
C4::Log::logaction( 'HOLDS', 'CANCEL', $self->reserve_id, Dumper($self->unblessed) ) |
|
Lines 386-393
sub _type {
Link Here
|
| 386 |
=head1 AUTHORS |
396 |
=head1 AUTHORS |
| 387 |
|
397 |
|
| 388 |
Kyle M Hall <kyle@bywatersolutions.com> |
398 |
Kyle M Hall <kyle@bywatersolutions.com> |
| 389 |
|
|
|
| 390 |
Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
399 |
Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
|
|
400 |
Martin Renvoize <martin.renvoize@ptfs-europe.com> |
| 391 |
|
401 |
|
| 392 |
=cut |
402 |
=cut |
| 393 |
|
403 |
|
| 394 |
- |
|
|