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 3130-3135
sub GetIssuingCharges {
Link Here
|
3130 |
my $discount = _get_discount_from_rule($discount_rules, $branch, $item_type); |
3129 |
my $discount = _get_discount_from_rule($discount_rules, $branch, $item_type); |
3131 |
$charge = ( $charge * ( 100 - $discount ) ) / 100; |
3130 |
$charge = ( $charge * ( 100 - $discount ) ) / 100; |
3132 |
} |
3131 |
} |
|
|
3132 |
if ($charge) { |
3133 |
$charge = sprintf '%.2f', $charge; # ensure no fractions of a penny returned |
3134 |
} |
3133 |
} |
3135 |
} |
3134 |
|
3136 |
|
3135 |
return ( $charge, $item_type ); |
3137 |
return ( $charge, $item_type ); |
3136 |
- |
|
|