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

(-)a/C4/Circulation.pm (-3 / +9 lines)
Lines 1069-1075 sub AddIssue { Link Here
1069
1069
1070
        ## If item was lost, it has now been found, reverse any list item charges if neccessary.
1070
        ## If item was lost, it has now been found, reverse any list item charges if neccessary.
1071
        if ( $item->{'itemlost'} ) {
1071
        if ( $item->{'itemlost'} ) {
1072
            _FixAccountForLostAndReturned( $item->{'itemnumber'}, undef, $item->{'barcode'} );
1072
            if ( C4::Context->preference('RefundLostItemFeeOnReturn' ) ) {
1073
                _FixAccountForLostAndReturned( $item->{'itemnumber'}, undef, $item->{'barcode'} );
1074
            }
1073
        }
1075
        }
1074
1076
1075
        ModItem({ issues           => $item->{'issues'},
1077
        ModItem({ issues           => $item->{'issues'},
Lines 1668-1676 sub AddReturn { Link Here
1668
    }
1670
    }
1669
1671
1670
    # fix up the accounts.....
1672
    # fix up the accounts.....
1671
    if ($item->{'itemlost'}) {
1673
    if ( $item->{'itemlost'} ) {
1672
        _FixAccountForLostAndReturned($item->{'itemnumber'}, $borrowernumber, $barcode);    # can tolerate undef $borrowernumber
1673
        $messages->{'WasLost'} = 1;
1674
        $messages->{'WasLost'} = 1;
1675
1676
        if ( C4::Context->preference('RefundLostItemFeeOnReturn' ) ) {
1677
            _FixAccountForLostAndReturned($item->{'itemnumber'}, $borrowernumber, $barcode);    # can tolerate undef $borrowernumber
1678
            $messages->{'LostItemFeeRefunded'} = 1;
1679
        }
1674
    }
1680
    }
1675
1681
1676
    # fix up the overdues in accounts...
1682
    # fix up the overdues in accounts...
(-)a/circ/returns.pl (+3 lines)
Lines 433-438 foreach my $code ( keys %$messages ) { Link Here
433
    elsif ( $code eq 'WasLost' ) {
433
    elsif ( $code eq 'WasLost' ) {
434
        $err{waslost} = 1;
434
        $err{waslost} = 1;
435
    }
435
    }
436
    elsif ( $code eq 'LostItemFeeRefunded' ) {
437
        $template->param( LostItemFeeRefunded => 1 );
438
    }
436
    elsif ( $code eq 'ResFound' ) {
439
    elsif ( $code eq 'ResFound' ) {
437
        ;    # FIXME... anything to do here?
440
        ;    # FIXME... anything to do here?
438
    }
441
    }
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 375-377 INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ( Link Here
375
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('EnableBorrowerFiles','0','If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo');
375
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('EnableBorrowerFiles','0','If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo');
376
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UpdateTotalIssuesOnCirc','0','Whether to update the totalissues field in the biblio on each circ.',NULL,'YesNo');
376
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UpdateTotalIssuesOnCirc','0','Whether to update the totalissues field in the biblio on each circ.',NULL,'YesNo');
377
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('IntranetSlipPrinterJS','','Use this JavaScript for printing slips. Define at least function printThenClose(). For use e.g. with Firefox PlugIn jsPrintSetup, see http://jsprintsetup.mozdev.org/','','Free');
377
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('IntranetSlipPrinterJS','','Use this JavaScript for printing slips. Define at least function printThenClose(). For use e.g. with Firefox PlugIn jsPrintSetup, see http://jsprintsetup.mozdev.org/','','Free');
378
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('RefundLostItemFeeOnReturn', '1', 'If enabled, the lost item fee charged to a borrower will be refunded when the lst item is returned.', NULL, 'YesNo');
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 5536-5541 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
5536
    SetVersion($DBversion);
5536
    SetVersion($DBversion);
5537
}
5537
}
5538
5538
5539
$DBversion = "3.09.00.XXX";
5540
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
5541
    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('RefundLostItemFeeOnReturn', '1', 'If enabled, the lost item fee charged to a borrower will be refunded when the lst item is returned.', NULL, 'YesNo')");
5542
    print "Upgrade to $DBversion done ( Add system preference RefundLostItemFeeOnReturn )\n";
5543
    SetVersion($DBversion);
5544
}
5545
5539
=head1 FUNCTIONS
5546
=head1 FUNCTIONS
5540
5547
5541
=head2 TableExists($table)
5548
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+6 lines)
Lines 393-398 Circulation: Link Here
393
                  test: Calculate (but only for mailing to the admin)
393
                  test: Calculate (but only for mailing to the admin)
394
                  production: Calculate and charge
394
                  production: Calculate and charge
395
            - fines (when <code>misc/cronjobs/fines.pl</code> is being run).
395
            - fines (when <code>misc/cronjobs/fines.pl</code> is being run).
396
        -
397
            - pref: RefundLostItemFeeOnReturn
398
              choices:
399
                  yes: Refund
400
                  no: "Don't refund"
401
            - lost item fees charged to a borrower when the lost item is returned.
396
    Self Checkout:
402
    Self Checkout:
397
        -
403
        -
398
            - pref: ShowPatronImageInWebBasedSelfCheck
404
            - pref: ShowPatronImageInWebBasedSelfCheck
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-1 / +5 lines)
Lines 333-338 $(document).ready(function () { Link Here
333
                    [% END %]
333
                    [% END %]
334
                    [% IF ( errmsgloo.waslost ) %]
334
                    [% IF ( errmsgloo.waslost ) %]
335
                        <p class="problem">Item was lost, now found.</p>
335
                        <p class="problem">Item was lost, now found.</p>
336
                        [% IF ( LostItemFeeRefunded ) %]
337
                            <p class="problem">A refund has been applied to the borrowing patron's account.</p>
338
                        [% ELSE %]
339
                            <p class="problem">Any lost item fees for this item will remain on the patron's account</p>
340
                        [% END %]
336
                    [% END %]
341
                    [% END %]
337
                    [% IF ( errmsgloo.withdrawn ) %]
342
                    [% IF ( errmsgloo.withdrawn ) %]
338
                        <p class="problem">Item is withdrawn.</p>
343
                        <p class="problem">Item is withdrawn.</p>
339
- 

Return to bug 7189