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

(-)a/C4/Circulation.pm (-2 / +13 lines)
Lines 913-924 sub CanBookBeIssued { Link Here
913
              if ( $borrower->{'branchcode'} ne $userenv->{branch} );
913
              if ( $borrower->{'branchcode'} ne $userenv->{branch} );
914
        }
914
        }
915
    }
915
    }
916
    #
917
    # CHECK IF THERE IS RENTAL CHARGES. RENTAL MUST BE CONFIRMED BY THE BORROWER
918
    #
919
    my $rentalConfirmation = C4::Context->preference("RentalFeesCheckoutConfirmation");
920
921
    if ( $rentalConfirmation ){
922
        my ($rentalCharge) = GetIssuingCharges( $item->{'itemnumber'}, $borrower->{'borrowernumber'} );
923
        if ( $rentalCharge ){
924
            $rentalCharge = sprintf("%.02f", $rentalCharge);
925
            $needsconfirmation{RENTALCHARGE} = $rentalCharge;
926
        }
927
    }
916
928
917
    #
929
    #
918
    # CHECK IF BOOK ALREADY ISSUED TO THIS BORROWER
930
    # CHECK IF BOOK ALREADY ISSUED TO THIS BORROWER
919
    #
931
    #
920
    if ( $issue->{borrowernumber} && $issue->{borrowernumber} eq $borrower->{'borrowernumber'} )
932
    if ( $issue->{borrowernumber} && $issue->{borrowernumber} eq $borrower->{'borrowernumber'} ){
921
    {
922
933
923
        # Already issued to current borrower. Ask whether the loan should
934
        # Already issued to current borrower. Ask whether the loan should
924
        # be renewed.
935
        # be renewed.
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 331-336 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
331
('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'),
331
('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
('RenewalSendNotice','0','',NULL,'YesNo'),
332
('RenewalSendNotice','0','',NULL,'YesNo'),
333
('RenewSerialAddsSuggestion','0',NULL,'If ON, adds a new suggestion at serial subscription renewal','YesNo'),
333
('RenewSerialAddsSuggestion','0',NULL,'If ON, adds a new suggestion at serial subscription renewal','YesNo'),
334
('RentalFeesCheckoutConfirmation', '0', NULL , 'Allow user to confirm when checking out an item with rental fees.', 'YesNo'),
334
('RentalsInNoissuesCharge','1',NULL,'Rental charges block checkouts (added to noissuescharge).','YesNo'),
335
('RentalsInNoissuesCharge','1',NULL,'Rental charges block checkouts (added to noissuescharge).','YesNo'),
335
('RequestOnOpac','1',NULL,'If ON, globally enables patron holds on OPAC','YesNo'),
336
('RequestOnOpac','1',NULL,'If ON, globally enables patron holds on OPAC','YesNo'),
336
('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice'),
337
('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice'),
(-)a/installer/data/mysql/updatedatabase.pl (+9 lines)
Lines 8589-8594 if ( CheckVersion($DBversion) ) { Link Here
8589
    SetVersion ($DBversion);
8589
    SetVersion ($DBversion);
8590
}
8590
}
8591
8591
8592
$DBversion = "XXX";
8593
if ( CheckVersion($DBversion) ) {
8594
    $dbh->do(q|
8595
        INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('RentalFeesCheckoutConfirmation', '0', NULL , 'Allow user to confirm when checking out an item with rental fees.', 'YesNo')
8596
    |);
8597
    print "Upgrade to $DBversion done (Bug 11169 - Add RentalFeesCheckoutConfirmation syspref)\n";
8598
    SetVersion($DBversion);
8599
}
8600
8592
=head1 FUNCTIONS
8601
=head1 FUNCTIONS
8593
8602
8594
=head2 TableExists($table)
8603
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +8 lines)
Lines 321-327 Circulation: Link Here
321
                  block: Block
321
                  block: Block
322
                  noblock: "Don't block"
322
                  noblock: "Don't block"
323
                  confirmation: Ask for confirmation
323
                  confirmation: Ask for confirmation
324
            - when checking out to a borrower that has overdues outstanding	    
324
            - when checking out to a borrower that has overdues outstanding
325
        -
326
            - "When checking out an item with rental fees, "
327
            - pref: RentalFeesCheckoutConfirmation
328
              choices:
329
                  yes: ask
330
                  no: "do not ask"
331
            - "for confirmation."
325
        -
332
        -
326
            - On checkin route the returned item to
333
            - On checkin route the returned item to
327
            - pref: HomeOrHoldingBranchReturn
334
            - pref: HomeOrHoldingBranchReturn
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-2 / +5 lines)
Lines 160-166 $(document).ready(function() { Link Here
160
[% END %]
160
[% END %]
161
161
162
[% IF ( DEBT ) %]
162
[% IF ( DEBT ) %]
163
    <li>The patron has a debt of [% DEBT %]</li>
163
    <li>The patron has a debt of [% DEBT %].</li>
164
[% END %]
165
166
[% IF ( RENTALCHARGE ) %]
167
    <li>Rental charge for this item: [% RENTALCHARGE %]</li>
164
[% END %]
168
[% END %]
165
169
166
[% IF ( RENEW_ISSUE ) %]
170
[% IF ( RENEW_ISSUE ) %]
167
- 

Return to bug 12448