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

(-)a/t/db_dependent/Accounts.t (-4 / +3 lines)
Lines 816-822 subtest "Koha::Account::non_issues_charges tests" => sub { Link Here
816
816
817
    my $debit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => 0 })->store();
817
    my $debit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => 0 })->store();
818
    my $credit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => -5 })->store();
818
    my $credit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => -5 })->store();
819
    my $offset = Koha::Account::Offset->new({ credit_id => $credit->id, debit_id => $debit->id, type => 'Payment' })->store();
819
    my $offset = Koha::Account::Offset->new({ credit_id => $credit->id, debit_id => $debit->id, type => 'Payment', amount => 0 })->store();
820
    purge_zero_balance_fees( 1 );
820
    purge_zero_balance_fees( 1 );
821
    my $debit_2 = Koha::Account::Lines->find( $debit->id );
821
    my $debit_2 = Koha::Account::Lines->find( $debit->id );
822
    my $credit_2 = Koha::Account::Lines->find( $credit->id );
822
    my $credit_2 = Koha::Account::Lines->find( $credit->id );
Lines 826-832 subtest "Koha::Account::non_issues_charges tests" => sub { Link Here
826
826
827
    $debit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => 5 })->store();
827
    $debit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => 5 })->store();
828
    $credit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => 0 })->store();
828
    $credit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => 0 })->store();
829
    $offset = Koha::Account::Offset->new({ credit_id => $credit->id, debit_id => $debit->id, type => 'Payment' })->store();
829
    $offset = Koha::Account::Offset->new({ credit_id => $credit->id, debit_id => $debit->id, type => 'Payment', amount => 0 })->store();
830
    purge_zero_balance_fees( 1 );
830
    purge_zero_balance_fees( 1 );
831
    $debit_2 = $credit_2 = undef;
831
    $debit_2 = $credit_2 = undef;
832
    $debit_2 = Koha::Account::Lines->find( $debit->id );
832
    $debit_2 = Koha::Account::Lines->find( $debit->id );
Lines 837-843 subtest "Koha::Account::non_issues_charges tests" => sub { Link Here
837
837
838
    $debit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => 0 })->store();
838
    $debit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => 0 })->store();
839
    $credit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => 0 })->store();
839
    $credit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => 0 })->store();
840
    $offset = Koha::Account::Offset->new({ credit_id => $credit->id, debit_id => $debit->id, type => 'Payment' })->store();
840
    $offset = Koha::Account::Offset->new({ credit_id => $credit->id, debit_id => $debit->id, type => 'Payment', amount => 0 })->store();
841
    purge_zero_balance_fees( 1 );
841
    purge_zero_balance_fees( 1 );
842
    $debit_2 = Koha::Account::Lines->find( $debit->id );
842
    $debit_2 = Koha::Account::Lines->find( $debit->id );
843
    $credit_2 = Koha::Account::Lines->find( $credit->id );
843
    $credit_2 = Koha::Account::Lines->find( $credit->id );
844
- 

Return to bug 21597