Revision 93cde6f5
Von Jan Büren vor etwa 2 Jahren hinzugefügt
SL/Controller/BankTransaction.pm | ||
---|---|---|
693 | 693 |
skonto_amount => $free_skonto_amount, |
694 | 694 |
bt_id => $bt_id, |
695 | 695 |
transdate => $bank_transaction->valutadate->to_kivitendo); |
696 |
my $bank_amount = shift @acc_ids; |
|
697 |
die "Invalid state, calculated invoice_amount differs from expected invoice amount" unless (abs($bank_amount->{return_bank_amount}) - abs($amount_for_booking) < 0.001); |
|
696 | 698 |
# ... and record the origin via BankTransactionAccTrans |
697 | 699 |
if (scalar(@acc_ids) < 2) { |
698 | 700 |
return { |
t/bank/bank_transactions.t | ||
---|---|---|
1 |
use Test::More tests => 293;
|
|
1 |
use Test::More tests => 297;
|
|
2 | 2 |
|
3 | 3 |
use strict; |
4 | 4 |
|
... | ... | |
717 | 717 |
create_invoice_item(part => $part2, qty => 10, sellprice => 50), |
718 | 718 |
] |
719 | 719 |
); |
720 |
is($credit_note->amount ,'-844.9' ,"$testname: amount before booking ok"); |
|
721 |
is($credit_note->paid ,'0' ,"$testname: paid before booking ok"); |
|
720 | 722 |
my $bt = create_bank_transaction(record => $credit_note, |
721 | 723 |
amount => $credit_note->amount, |
722 | 724 |
bank_chart_id => $bank->id, |
... | ... | |
737 | 739 |
is($credit_note->amount , '-844.90000', "$testname: amount ok"); |
738 | 740 |
is($credit_note->netamount, '-710.00000', "$testname: netamount ok"); |
739 | 741 |
is($credit_note->paid , '-844.90000', "$testname: paid ok"); |
742 |
is($bt->invoice_amount , '-844.90000', "$testname: bt invoice amount for credit note was assigned"); |
|
743 |
is($bt->amount , '-844.90000', "$testname: bt amount for credit note was assigned"); |
|
740 | 744 |
} |
741 | 745 |
|
742 | 746 |
sub test_neg_ap_transaction { |
t/db_helper/payment.t | ||
---|---|---|
1 | 1 |
use strict; |
2 |
use Test::More tests => 197;
|
|
2 |
use Test::More tests => 258;
|
|
3 | 3 |
|
4 | 4 |
use strict; |
5 | 5 |
|
Auch abrufbar als: Unified diff
BankTransaction neuen Rückgabewert von pay_invoice benutzen .. Tests