Revision b0d3ad92
Von Jan Büren vor mehr als 6 Jahren hinzugefügt
t/bank/bank_transactions.t | ||
---|---|---|
1 |
use Test::More tests => 197;
|
|
1 |
use Test::More tests => 205;
|
|
2 | 2 |
|
3 | 3 |
use strict; |
4 | 4 |
|
... | ... | |
299 | 299 |
|
300 | 300 |
sub test_bt_error { |
301 | 301 |
|
302 |
my $testname = 'test_free_skonto'; |
|
302 |
my $testname = 'test_rollback_error'; |
|
303 |
# without type with_free_skonto the helper function (Payment.pm) looks ugly but not |
|
304 |
# breakable |
|
303 | 305 |
|
304 | 306 |
$ar_transaction = test_ar_transaction(invnumber => 'salesinv skonto', |
305 | 307 |
payment_id => $payment_terms->id, |
... | ... | |
309 | 311 |
|
310 | 312 |
my $bt = create_bank_transaction(record => $ar_transaction, |
311 | 313 |
bank_chart_id => $bank->id, |
312 |
amount => 158.58,
|
|
314 |
amount => 160.15,
|
|
313 | 315 |
) or die "Couldn't create bank_transaction"; |
314 |
|
|
315 | 316 |
$::form->{invoice_ids} = { |
316 | 317 |
$bt->id => [ $ar_transaction->id ] |
317 | 318 |
}; |
318 | 319 |
$::form->{invoice_skontos} = { |
319 |
$bt->id => [ 'with_free_skonto' ]
|
|
320 |
$bt->id => [ 'with_skonto_pt' ]
|
|
320 | 321 |
}; |
321 | 322 |
|
322 | 323 |
is($ar_transaction->paid , '0' , "$testname: salesinv is not paid"); |
Auch abrufbar als: Unified diff
bank_transactions.t Odyn Testfall für kivi angepasst