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 (+11 lines)
Lines 8613-8618 if ( CheckVersion($DBversion) ) { Link Here
8613
    SetVersion($DBversion);
8613
    SetVersion($DBversion);
8614
}
8614
}
8615
8615
8616
8617
8618
$DBversion = "XXX";
8619
if ( CheckVersion($DBversion) ) {
8620
    $dbh->do(q|
8621
        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')
8622
    |);
8623
    print "Upgrade to $DBversion done (Bug 11169 - Add RentalFeesCheckoutConfirmation syspref)\n";
8624
    SetVersion($DBversion);
8625
}
8626
8616
=head1 FUNCTIONS
8627
=head1 FUNCTIONS
8617
8628
8618
=head2 TableExists($table)
8629
=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
            - "for confirmation."
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 (-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