Lines 981-987
sub CanBookBeIssued {
Link Here
|
981 |
if ( $rentalConfirmation ){ |
981 |
if ( $rentalConfirmation ){ |
982 |
my ($rentalCharge) = GetIssuingCharges( $item->{'itemnumber'}, $borrower->{'borrowernumber'} ); |
982 |
my ($rentalCharge) = GetIssuingCharges( $item->{'itemnumber'}, $borrower->{'borrowernumber'} ); |
983 |
if ( $rentalCharge > 0 ){ |
983 |
if ( $rentalCharge > 0 ){ |
984 |
$rentalCharge = sprintf("%.02f", $rentalCharge); |
|
|
985 |
$needsconfirmation{RENTALCHARGE} = $rentalCharge; |
984 |
$needsconfirmation{RENTALCHARGE} = $rentalCharge; |
986 |
} |
985 |
} |
987 |
} |
986 |
} |
Lines 3210-3215
sub GetIssuingCharges {
Link Here
|
3210 |
my $discount = _get_discount_from_rule($discount_rules, $branch, $item_type); |
3209 |
my $discount = _get_discount_from_rule($discount_rules, $branch, $item_type); |
3211 |
$charge = ( $charge * ( 100 - $discount ) ) / 100; |
3210 |
$charge = ( $charge * ( 100 - $discount ) ) / 100; |
3212 |
} |
3211 |
} |
|
|
3212 |
if ($charge) { |
3213 |
$charge = sprintf '%.2f', $charge; # ensure no fractions of a penny returned |
3214 |
} |
3213 |
} |
3215 |
} |
3214 |
|
3216 |
|
3215 |
return ( $charge, $item_type ); |
3217 |
return ( $charge, $item_type ); |
3216 |
- |
|
|