Lines 909-928
sub CanBookBeIssued {
Link Here
|
909 |
# |
909 |
# |
910 |
# CHECK IF THERE IS RENTAL CHARGES. RENTAL MUST BE CONFIRMED BY THE BORROWER |
910 |
# CHECK IF THERE IS RENTAL CHARGES. RENTAL MUST BE CONFIRMED BY THE BORROWER |
911 |
# |
911 |
# |
912 |
my ($rentalCharge) = GetIssuingCharges( $item->{'itemnumber'}, $borrower->{'borrowernumber'} ); |
|
|
913 |
my $rentalConfirmation = C4::Context->preference("RentalFeesCheckoutConfirmation"); |
912 |
my $rentalConfirmation = C4::Context->preference("RentalFeesCheckoutConfirmation"); |
914 |
|
913 |
|
915 |
if ( $rentalConfirmation && $rentalCharge != 0 ) |
914 |
if ( $rentalConfirmation ){ |
916 |
{ |
915 |
my ($rentalCharge) = GetIssuingCharges( $item->{'itemnumber'}, $borrower->{'borrowernumber'} ); |
917 |
$rentalCharge = sprintf("%.02f", $rentalCharge); |
916 |
if ( $rentalCharge ){ |
918 |
$needsconfirmation{RENTALCHARGE} = $rentalCharge; |
917 |
$rentalCharge = sprintf("%.02f", $rentalCharge); |
|
|
918 |
$needsconfirmation{RENTALCHARGE} = $rentalCharge; |
919 |
} |
919 |
} |
920 |
} |
920 |
|
921 |
|
921 |
# |
922 |
# |
922 |
# CHECK IF BOOK ALREADY ISSUED TO THIS BORROWER |
923 |
# CHECK IF BOOK ALREADY ISSUED TO THIS BORROWER |
923 |
# |
924 |
# |
924 |
if ( $issue->{borrowernumber} && $issue->{borrowernumber} eq $borrower->{'borrowernumber'} ) |
925 |
if ( $issue->{borrowernumber} && $issue->{borrowernumber} eq $borrower->{'borrowernumber'} ){ |
925 |
{ |
|
|
926 |
|
926 |
|
927 |
# Already issued to current borrower. Ask whether the loan should |
927 |
# Already issued to current borrower. Ask whether the loan should |
928 |
# be renewed. |
928 |
# be renewed. |