Revision 944d0062
Von Jan Büren vor mehr als 7 Jahren hinzugefügt
t/bank/bank_transactions.t | ||
---|---|---|
1 |
use Test::More tests => 130;
|
|
1 |
use Test::More tests => 137;
|
|
2 | 2 |
|
3 | 3 |
use strict; |
4 | 4 |
|
... | ... | |
76 | 76 |
test_partial_payment(); |
77 | 77 |
test_credit_note(); |
78 | 78 |
test_ap_transaction(); |
79 |
test_neg_ap_transaction(); |
|
79 |
test_neg_ap_transaction(invoice => 0); |
|
80 |
test_neg_ap_transaction(invoice => 1); |
|
80 | 81 |
test_ap_payment_transaction(); |
81 | 82 |
test_ap_payment_part_transaction(); |
82 | 83 |
test_neg_sales_invoice(); |
... | ... | |
448 | 449 |
|
449 | 450 |
sub test_neg_ap_transaction { |
450 | 451 |
my (%params) = @_; |
451 |
my $testname = 'test_neg_ap_transaction'; |
|
452 |
my $testname = 'test_neg_ap_transaction' . $params{invoice} ? ' invoice booking' : ' credit booking';
|
|
452 | 453 |
my $netamount = -20; |
453 | 454 |
my $amount = $::form->round_amount($netamount * 1.19,2); |
454 | 455 |
my $invoice = SL::DB::PurchaseInvoice->new( |
455 |
invoice => 0, |
|
456 |
invoice => $params{invoice} // 0,
|
|
456 | 457 |
invnumber => $params{invnumber} || 'test_neg_ap_transaction', |
457 | 458 |
amount => $amount, |
458 | 459 |
netamount => $netamount, |
Auch abrufbar als: Unified diff
bank_transaction Testfall erweitert
Sowohl negative Kreditorenbelege als auch negative Einkaufsrechnungen testen.