View | Details | Raw Unified | Return to bug 12448
Collapse All | Expand All

(-)a/C4/Circulation.pm (+13 lines)
Lines 907-912 sub CanBookBeIssued { Link Here
907
        }
907
        }
908
    }
908
    }
909
909
910
    # CHECK IF THERE IS RENTAL CHARGES. RENTAL MUST BE CONFIRMED BY THE BORROWER
911
    my $sth = $dbh->prepare("SELECT rentalcharge FROM itemtypes WHERE itemtype = ?");
912
    $sth->execute( $item->{'itemtype'} );
913
    my $rentalCharge = $sth->fetchrow();
914
    my $rentalConfirmation = C4::Context->preference("RentalFeesCheckoutConfirmation");
915
916
    if ( $rentalCharge && $rentalConfirmation )
917
    {
918
        $rentalCharge = sprintf("%.02f \$", $rentalCharge);
919
        $rentalCharge =~ s/\./,/;
920
        $needsconfirmation{RENTALCHARGE} = $rentalCharge;
921
    }
922
910
    #
923
    #
911
    # CHECK IF BOOK ALREADY ISSUED TO THIS BORROWER
924
    # CHECK IF BOOK ALREADY ISSUED TO THIS BORROWER
912
    #
925
    #
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 332-337 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
332
('RenewalPeriodBase','date_due','date_due|now','Set whether the renewal date should be counted from the date_due or from the moment the Patron asks for renewal ','Choice'),
332
('RenewalPeriodBase','date_due','date_due|now','Set whether the renewal date should be counted from the date_due or from the moment the Patron asks for renewal ','Choice'),
333
('RenewalSendNotice','0','',NULL,'YesNo'),
333
('RenewalSendNotice','0','',NULL,'YesNo'),
334
('RenewSerialAddsSuggestion','0',NULL,'If ON, adds a new suggestion at serial subscription renewal','YesNo'),
334
('RenewSerialAddsSuggestion','0',NULL,'If ON, adds a new suggestion at serial subscription renewal','YesNo'),
335
('RentalFeesCheckoutConfirmation', '1', NULL , 'Allow user to confirme when checking out an item with rental fees.', 'YesNo'),
335
('RentalsInNoissuesCharge','1',NULL,'Rental charges block checkouts (added to noissuescharge).','YesNo'),
336
('RentalsInNoissuesCharge','1',NULL,'Rental charges block checkouts (added to noissuescharge).','YesNo'),
336
('RequestOnOpac','1',NULL,'If ON, globally enables patron holds on OPAC','YesNo'),
337
('RequestOnOpac','1',NULL,'If ON, globally enables patron holds on OPAC','YesNo'),
337
('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice'),
338
('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice'),
(-)a/installer/data/mysql/updatedatabase.pl (+9 lines)
Lines 8560-8565 if ( CheckVersion($DBversion) ) { Link Here
8560
    SetVersion($DBversion);
8560
    SetVersion($DBversion);
8561
}
8561
}
8562
8562
8563
$DBversion = "XXX";
8564
if ( CheckVersion($DBversion) ) {
8565
    $dbh->do(q|
8566
        INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('RentalFeesCheckoutConfirmation', '1', NULL , 'Allow user to confirme when checking out an item with rental fees.', 'YesNo')
8567
    |);
8568
    print "Upgrade to $DBversion done (Bug 11169 - Add RentalFeesCheckoutConfirmation syspref)\n";
8569
    SetVersion($DBversion);
8570
}
8571
8563
=head1 FUNCTIONS
8572
=head1 FUNCTIONS
8564
8573
8565
=head2 TableExists($table)
8574
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +8 lines)
Lines 327-333 Circulation: Link Here
327
                  block: Block
327
                  block: Block
328
                  noblock: "Don't block"
328
                  noblock: "Don't block"
329
                  confirmation: Ask for confirmation
329
                  confirmation: Ask for confirmation
330
            - when checking out to a borrower that has overdues outstanding	    
330
            - when checking out to a borrower that has overdues outstanding
331
        -
332
            - "When checking out an item with rental fees, "
333
            - pref: RentalFeesCheckoutConfirmation
334
              choices:
335
                  yes: ask
336
                  no: "do not ask"
337
            - a confirmation to check-out.
331
        -
338
        -
332
            - On checkin route the returned item to
339
            - On checkin route the returned item to
333
            - pref: HomeOrHoldingBranchReturn
340
            - pref: HomeOrHoldingBranchReturn
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-1 / +4 lines)
Lines 206-211 var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); Link Here
206
    <li>The patron has a debt of [% DEBT %]</li>
206
    <li>The patron has a debt of [% DEBT %]</li>
207
[% END %]
207
[% END %]
208
208
209
[% IF ( RENTALCHARGE ) %]
210
    <li>Rental charge for this item : [% RENTALCHARGE %]</li>
211
[% END %]
212
209
[% IF ( RENEW_ISSUE ) %]
213
[% IF ( RENEW_ISSUE ) %]
210
    <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) is currently checked out to this patron.  Renew?</li>
214
    <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) is currently checked out to this patron.  Renew?</li>
211
[% END %]
215
[% END %]
212
- 

Return to bug 12448