Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 944d0062

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

  • ID 944d0062121dbbf3058fc307df411899f766b377
  • Vorgänger cff4d333
  • Nachfolger 2f3b969e

bank_transaction Testfall erweitert

Sowohl negative Kreditorenbelege als auch negative Einkaufsrechnungen testen.

Unterschiede anzeigen:

t/bank/bank_transactions.t
use Test::More tests => 130;
use Test::More tests => 137;
use strict;
......
test_partial_payment();
test_credit_note();
test_ap_transaction();
test_neg_ap_transaction();
test_neg_ap_transaction(invoice => 0);
test_neg_ap_transaction(invoice => 1);
test_ap_payment_transaction();
test_ap_payment_part_transaction();
test_neg_sales_invoice();
......
sub test_neg_ap_transaction {
my (%params) = @_;
my $testname = 'test_neg_ap_transaction';
my $testname = 'test_neg_ap_transaction' . $params{invoice} ? ' invoice booking' : ' credit booking';
my $netamount = -20;
my $amount = $::form->round_amount($netamount * 1.19,2);
my $invoice = SL::DB::PurchaseInvoice->new(
invoice => 0,
invoice => $params{invoice} // 0,
invnumber => $params{invnumber} || 'test_neg_ap_transaction',
amount => $amount,
netamount => $netamount,

Auch abrufbar als: Unified diff