|
Lines 959-965
sub CanBookBeIssued {
Link Here
|
| 959 |
} |
959 |
} |
| 960 |
else { |
960 |
else { |
| 961 |
my $itemtype = Koha::ItemTypes->find($biblioitem->itemtype); |
961 |
my $itemtype = Koha::ItemTypes->find($biblioitem->itemtype); |
| 962 |
if ( $itemtype and $itemtype->notforloan == 1){ |
962 |
if ( $itemtype && defined $itemtype->notforloan && $itemtype->notforloan == 1){ |
| 963 |
if (!C4::Context->preference("AllowNotForLoanOverride")) { |
963 |
if (!C4::Context->preference("AllowNotForLoanOverride")) { |
| 964 |
$issuingimpossible{NOT_FOR_LOAN} = 1; |
964 |
$issuingimpossible{NOT_FOR_LOAN} = 1; |
| 965 |
$issuingimpossible{itemtype_notforloan} = $effective_itemtype; |
965 |
$issuingimpossible{itemtype_notforloan} = $effective_itemtype; |
|
Lines 2294-2300
sub _calculate_new_debar_dt {
Link Here
|
| 2294 |
if ( $deltadays->subtract($grace)->is_positive() ) { |
2294 |
if ( $deltadays->subtract($grace)->is_positive() ) { |
| 2295 |
my $suspension_days = $deltadays * $finedays; |
2295 |
my $suspension_days = $deltadays * $finedays; |
| 2296 |
|
2296 |
|
| 2297 |
if ( $issuing_rule->{suspension_chargeperiod} > 1 ) { |
2297 |
if ( defined $issuing_rule->{suspension_chargeperiod} && $issuing_rule->{suspension_chargeperiod} > 1 ) { |
| 2298 |
# No need to / 1 and do not consider / 0 |
2298 |
# No need to / 1 and do not consider / 0 |
| 2299 |
$suspension_days = DateTime::Duration->new( |
2299 |
$suspension_days = DateTime::Duration->new( |
| 2300 |
days => floor( $suspension_days->in_units('days') / $issuing_rule->{suspension_chargeperiod} ) |
2300 |
days => floor( $suspension_days->in_units('days') / $issuing_rule->{suspension_chargeperiod} ) |
|
Lines 3784-3790
sub LostItem{
Link Here
|
| 3784 |
defined($fix) or warn "_FixOverduesOnReturn($borrowernumber, $itemnumber...) failed!"; # zero is OK, check defined |
3784 |
defined($fix) or warn "_FixOverduesOnReturn($borrowernumber, $itemnumber...) failed!"; # zero is OK, check defined |
| 3785 |
|
3785 |
|
| 3786 |
if (C4::Context->preference('WhenLostChargeReplacementFee')){ |
3786 |
if (C4::Context->preference('WhenLostChargeReplacementFee')){ |
| 3787 |
C4::Accounts::chargelostitem($borrowernumber, $itemnumber, $issues->{'replacementprice'}, "$issues->{'title'} $issues->{'barcode'} $issues->{'itemcallnumber'}"); |
3787 |
C4::Accounts::chargelostitem( |
|
|
3788 |
$borrowernumber, |
| 3789 |
$itemnumber, |
| 3790 |
$issues->{'replacementprice'}, |
| 3791 |
sprintf( "%s %s %s", |
| 3792 |
$issues->{'title'} || q{}, |
| 3793 |
$issues->{'barcode'} || q{}, |
| 3794 |
$issues->{'itemcallnumber'} || q{}, |
| 3795 |
), |
| 3796 |
); |
| 3788 |
#FIXME : Should probably have a way to distinguish this from an item that really was returned. |
3797 |
#FIXME : Should probably have a way to distinguish this from an item that really was returned. |
| 3789 |
#warn " $issues->{'borrowernumber'} / $itemnumber "; |
3798 |
#warn " $issues->{'borrowernumber'} / $itemnumber "; |
| 3790 |
} |
3799 |
} |