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

(-)a/C4/Circulation.pm (-8 / +4 lines)
Lines 2299-2320 C<$itm> itemnumber Link Here
2299
C<$exemptfine> BOOL -- remove overdue charge associated with this issue. 
2299
C<$exemptfine> BOOL -- remove overdue charge associated with this issue. 
2300
C<$dropboxmode> BOOL -- remove lastincrement on overdue charge associated with this issue.
2300
C<$dropboxmode> BOOL -- remove lastincrement on overdue charge associated with this issue.
2301
2301
2302
Internal function, called only by AddReturn
2302
Internal function
2303
2303
2304
=cut
2304
=cut
2305
2305
2306
sub _FixOverduesOnReturn {
2306
sub _FixOverduesOnReturn {
2307
    my ($borrowernumber, $item);
2307
    my ($borrowernumber, $item, $exemptfine, $dropbox ) = @_;
2308
    unless ($borrowernumber = shift) {
2308
    unless( $borrowernumber ) {
2309
        warn "_FixOverduesOnReturn() not supplied valid borrowernumber";
2309
        warn "_FixOverduesOnReturn() not supplied valid borrowernumber";
2310
        return;
2310
        return;
2311
    }
2311
    }
2312
    unless ($item = shift) {
2312
    unless( $item ) {
2313
        warn "_FixOverduesOnReturn() not supplied valid itemnumber";
2313
        warn "_FixOverduesOnReturn() not supplied valid itemnumber";
2314
        return;
2314
        return;
2315
    }
2315
    }
2316
    my ($exemptfine, $dropbox) = @_;
2317
    my $dbh = C4::Context->dbh;
2318
2316
2319
    # check for overdue fine
2317
    # check for overdue fine
2320
    my $accountline = Koha::Account::Lines->search(
2318
    my $accountline = Koha::Account::Lines->search(
Lines 2329-2335 sub _FixOverduesOnReturn { Link Here
2329
    )->next();
2327
    )->next();
2330
    return 0 unless $accountline;    # no warning, there's just nothing to fix
2328
    return 0 unless $accountline;    # no warning, there's just nothing to fix
2331
2329
2332
    my $uquery;
2333
    if ($exemptfine) {
2330
    if ($exemptfine) {
2334
        my $amountoutstanding = $accountline->amountoutstanding;
2331
        my $amountoutstanding = $accountline->amountoutstanding;
2335
2332
2336
- 

Return to bug 20598