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

(-)a/C4/Circulation.pm (+1 lines)
Lines 2343-2348 sub _FixOverduesOnReturn { Link Here
2343
2343
2344
        $accountline->accounttype('FFOR');
2344
        $accountline->accounttype('FFOR');
2345
        $accountline->amountoutstanding(0);
2345
        $accountline->amountoutstanding(0);
2346
        $accountline->date( dt_from_string() );
2346
2347
2347
        Koha::Account::Offset->new(
2348
        Koha::Account::Offset->new(
2348
            {
2349
            {
(-)a/t/db_dependent/Circulation.t (-2 / +3 lines)
Lines 2360-2366 subtest '_FixAccountForLostAndReturned' => sub { Link Here
2360
};
2360
};
2361
2361
2362
subtest '_FixOverduesOnReturn' => sub {
2362
subtest '_FixOverduesOnReturn' => sub {
2363
    plan tests => 10;
2363
    plan tests => 11;
2364
2364
2365
    # Generate test biblio
2365
    # Generate test biblio
2366
    my $title  = 'Koha for Dummies';
2366
    my $title  = 'Koha for Dummies';
Lines 2391-2396 subtest '_FixOverduesOnReturn' => sub { Link Here
2391
            amount => 99.00,
2391
            amount => 99.00,
2392
            amountoutstanding => 99.00,
2392
            amountoutstanding => 99.00,
2393
            lastincrement => 9.00,
2393
            lastincrement => 9.00,
2394
            date => '1981-06-10',
2394
        }
2395
        }
2395
    )->store();
2396
    )->store();
2396
2397
Lines 2419-2424 subtest '_FixOverduesOnReturn' => sub { Link Here
2419
    is( $accountline->accounttype, 'FFOR', 'Open fine ( account type FU ) has been set to fine forgiven ( account type FFOR )');
2420
    is( $accountline->accounttype, 'FFOR', 'Open fine ( account type FU ) has been set to fine forgiven ( account type FFOR )');
2420
    is( ref $offset, "Koha::Account::Offset", "Found matching offset for fine reduction via forgiveness" );
2421
    is( ref $offset, "Koha::Account::Offset", "Found matching offset for fine reduction via forgiveness" );
2421
    is( $offset->amount, '-99.000000', "Amount of offset is correct" );
2422
    is( $offset->amount, '-99.000000', "Amount of offset is correct" );
2423
    is( $accountline->date, output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }), 'Accountline date is updated correctly' );
2422
2424
2423
    ## Run again, with dropbox mode enabled
2425
    ## Run again, with dropbox mode enabled
2424
    $accountline->set(
2426
    $accountline->set(
2425
- 

Return to bug 22200