Bug 13461 - Circ always asking for confirmation if RentalFeesCheckoutConfirmation...
authorKatrin Fischer <Katrin.Fischer.83@web.de>
Sun, 14 Dec 2014 21:31:04 +0000 (22:31 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Fri, 19 Dec 2014 20:04:06 +0000 (17:04 -0300)
To test:
- Check RentalFeesCheckoutConfirmation is activated
- Try to check out an item without rental fine
- Verify confirmation message without explanation
  is shown
- Apply patch
- Verify confirmation message is no longer shown
- Configure itemtype to have rental fee
- Veirfy now the confirmation message appears as
  it should

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/Circulation.pm

index f24f2f7..5f7e866 100644 (file)
@@ -928,7 +928,7 @@ sub CanBookBeIssued {
 
     if ( $rentalConfirmation ){
         my ($rentalCharge) = GetIssuingCharges( $item->{'itemnumber'}, $borrower->{'borrowernumber'} );
-        if ( $rentalCharge ){
+        if ( $rentalCharge > 0 ){
             $rentalCharge = sprintf("%.02f", $rentalCharge);
             $needsconfirmation{RENTALCHARGE} = $rentalCharge;
         }