Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 93cde6f5

Von Jan Büren vor mehr als 2 Jahren hinzugefügt

  • ID 93cde6f5b9772aa25b8afe7a45b0f16e260c83f9
  • Vorgänger 5adc35c8
  • Nachfolger 8d252953

BankTransaction neuen Rückgabewert von pay_invoice benutzen .. Tests

Unterschiede anzeigen:

SL/Controller/BankTransaction.pm
skonto_amount => $free_skonto_amount,
bt_id => $bt_id,
transdate => $bank_transaction->valutadate->to_kivitendo);
my $bank_amount = shift @acc_ids;
die "Invalid state, calculated invoice_amount differs from expected invoice amount" unless (abs($bank_amount->{return_bank_amount}) - abs($amount_for_booking) < 0.001);
# ... and record the origin via BankTransactionAccTrans
if (scalar(@acc_ids) < 2) {
return {
t/bank/bank_transactions.t
use Test::More tests => 293;
use Test::More tests => 297;
use strict;
......
create_invoice_item(part => $part2, qty => 10, sellprice => 50),
]
);
is($credit_note->amount ,'-844.9' ,"$testname: amount before booking ok");
is($credit_note->paid ,'0' ,"$testname: paid before booking ok");
my $bt = create_bank_transaction(record => $credit_note,
amount => $credit_note->amount,
bank_chart_id => $bank->id,
......
is($credit_note->amount , '-844.90000', "$testname: amount ok");
is($credit_note->netamount, '-710.00000', "$testname: netamount ok");
is($credit_note->paid , '-844.90000', "$testname: paid ok");
is($bt->invoice_amount , '-844.90000', "$testname: bt invoice amount for credit note was assigned");
is($bt->amount , '-844.90000', "$testname: bt amount for credit note was assigned");
}
sub test_neg_ap_transaction {
t/db_helper/payment.t
use strict;
use Test::More tests => 197;
use Test::More tests => 258;
use strict;

Auch abrufbar als: Unified diff