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

(-)a/t/db_dependent/Circulation.t (-3 / +5 lines)
Lines 2438-2444 subtest '_FixAccountForLostAndReturned' => sub { Link Here
2438
};
2438
};
2439
2439
2440
subtest '_FixOverduesOnReturn' => sub {
2440
subtest '_FixOverduesOnReturn' => sub {
2441
    plan tests => 6;
2441
    plan tests => 9;
2442
2442
2443
    my $biblio = $builder->build_sample_biblio({ author => 'Hall, Kylie' });
2443
    my $biblio = $builder->build_sample_biblio({ author => 'Hall, Kylie' });
2444
2444
Lines 2475-2481 subtest '_FixOverduesOnReturn' => sub { Link Here
2475
    is( $accountline->amountoutstanding, '99.000000', 'Fine has the same amount outstanding as previously' );
2475
    is( $accountline->amountoutstanding, '99.000000', 'Fine has the same amount outstanding as previously' );
2476
    is( $accountline->status, 'RETURNED', 'Open fine ( account type OVERDUE ) has been closed out ( status RETURNED )');
2476
    is( $accountline->status, 'RETURNED', 'Open fine ( account type OVERDUE ) has been closed out ( status RETURNED )');
2477
2477
2478
2479
    ## Run again, with exemptfine enabled
2478
    ## Run again, with exemptfine enabled
2480
    $accountline->set(
2479
    $accountline->set(
2481
        {
2480
        {
Lines 2494-2499 subtest '_FixOverduesOnReturn' => sub { Link Here
2494
    is( $accountline->status, 'FORGIVEN', 'Open fine ( account type OVERDUE ) has been set to fine forgiven ( status FORGIVEN )');
2493
    is( $accountline->status, 'FORGIVEN', 'Open fine ( account type OVERDUE ) has been set to fine forgiven ( status FORGIVEN )');
2495
    is( ref $offset, "Koha::Account::Offset", "Found matching offset for fine reduction via forgiveness" );
2494
    is( ref $offset, "Koha::Account::Offset", "Found matching offset for fine reduction via forgiveness" );
2496
    is( $offset->amount, '-99.000000', "Amount of offset is correct" );
2495
    is( $offset->amount, '-99.000000', "Amount of offset is correct" );
2496
    my $credit = $offset->credit;
2497
    is( ref $credit, "Koha::Account::Line", "Found matching credit for fine forgiveness" );
2498
    is( $credit->amount, '-99.000000', "Credit amount is set correctly" );
2499
    is( $credit->amountoutstanding + 0, 0, "Credit amountoutstanding is correctly set to 0" );
2497
};
2500
};
2498
2501
2499
subtest 'Set waiting flag' => sub {
2502
subtest 'Set waiting flag' => sub {
2500
- 

Return to bug 22200