|
Lines 935-941
sub CanBookBeIssued {
Link Here
|
| 935 |
if ( $rentalConfirmation ){ |
935 |
if ( $rentalConfirmation ){ |
| 936 |
my ($rentalCharge) = GetIssuingCharges( $item->{'itemnumber'}, $borrower->{'borrowernumber'} ); |
936 |
my ($rentalCharge) = GetIssuingCharges( $item->{'itemnumber'}, $borrower->{'borrowernumber'} ); |
| 937 |
if ( $rentalCharge > 0 ){ |
937 |
if ( $rentalCharge > 0 ){ |
| 938 |
$rentalCharge = sprintf("%.02f", $rentalCharge); |
|
|
| 939 |
$needsconfirmation{RENTALCHARGE} = $rentalCharge; |
938 |
$needsconfirmation{RENTALCHARGE} = $rentalCharge; |
| 940 |
} |
939 |
} |
| 941 |
} |
940 |
} |
|
Lines 3133-3138
sub GetIssuingCharges {
Link Here
|
| 3133 |
my $discount = _get_discount_from_rule($discount_rules, $branch, $item_type); |
3132 |
my $discount = _get_discount_from_rule($discount_rules, $branch, $item_type); |
| 3134 |
$charge = ( $charge * ( 100 - $discount ) ) / 100; |
3133 |
$charge = ( $charge * ( 100 - $discount ) ) / 100; |
| 3135 |
} |
3134 |
} |
|
|
3135 |
if ($charge) { |
| 3136 |
$charge = sprintf '%.2f', $charge; # ensure no fractions of a penny returned |
| 3137 |
} |
| 3136 |
} |
3138 |
} |
| 3137 |
|
3139 |
|
| 3138 |
return ( $charge, $item_type ); |
3140 |
return ( $charge, $item_type ); |
| 3139 |
- |
|
|