X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=t%2Fbank%2Fbank_transactions.t;h=0220c951e441a033c40a56a8b06b026249827a77;hb=421ed1f7d71c242bf8286919dc00e4ae879a56fe;hp=69028b143856a420f1067593fd91c055403ccb42;hpb=63410aa68c7c57655dc66eba4291592358d46cf2;p=kivitendo-erp.git diff --git a/t/bank/bank_transactions.t b/t/bank/bank_transactions.t index 69028b143..0220c951e 100644 --- a/t/bank/bank_transactions.t +++ b/t/bank/bank_transactions.t @@ -1,4 +1,4 @@ -use Test::More tests => 130; +use Test::More tests => 138; use strict; @@ -76,7 +76,8 @@ test_two_invoices(); 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(); @@ -118,7 +119,7 @@ sub reset_state { )->save; $customer = new_customer( - name => 'Test Customer', + name => 'Test Customer OLÉ S.L. Årdbärg AB', iban => 'DE12500105170648489890', bic => 'TESTBIC', account_number => '648489890', @@ -448,11 +449,11 @@ sub test_credit_note { 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, @@ -709,6 +710,15 @@ sub test_sepa_export { vc_depositor => $customer->depositor, amount => $ar_transaction->amount, ); + require SL::SEPA::XML; + my $sepa_xml = SL::SEPA::XML->new('company' => $customer->name, + 'creditor_id' => "id", + 'src_charset' => 'UTF-8', + 'message_id' => "test", + 'grouped' => 1, + 'collection' => 1, + ); + is($sepa_xml->{company} , 'Test Customer OLE S.L. Ardbaerg AB'); $ar_transaction->load; $bt->load;