From a906b00887d0330dbcfb3a4f8ee9ce01a876f5f2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Wed, 29 Sep 2021 11:09:11 +0200 Subject: [PATCH] =?utf8?q?convert=5Finvoice.t:=20Test=20f=C3=BCr=20=C3=84n?= =?utf8?q?derung=20von=20Attributen=20bei=20Konvertierung?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- t/db_helper/convert_invoice.t | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/t/db_helper/convert_invoice.t b/t/db_helper/convert_invoice.t index 7260e0784..62adec4c5 100644 --- a/t/db_helper/convert_invoice.t +++ b/t/db_helper/convert_invoice.t @@ -1,4 +1,4 @@ -use Test::More tests => 73; +use Test::More tests => 75; use strict; @@ -127,7 +127,8 @@ my $do1 = create_sales_delivery_order( transdate => '06.03.2015', unit => $unit->name, ) - ] + ], + transaction_description => 'Liefervorgang', ); @@ -149,7 +150,7 @@ is (SL::DB::Manager::DeliveryOrderItem->get_all_count(where => [ delivery_order_ # convert this do to invoice -my $invoice = $do1->convert_to_invoice(transdate => $transdate); +my $invoice = $do1->convert_to_invoice(transdate => $transdate, attributes => {transaction_description => 'Rechnungsvorgang'}); sleep (300) if $VISUAL_TEST; # we can do a real visual test via gui login # test invoice afterwards @@ -165,6 +166,7 @@ is($invoice->payment_terms->description, "14Tage 2%Skonto, 30Tage netto", 'payme $invoice->load; is($invoice->cusordnumber , 'b84da' , 'cusordnumber check'); +is($invoice->transaction_description, 'Rechnungsvorgang', 'transaction description (changed on conversion) check'); is($invoice->department->description , "Test Department" , 'department description ok'); is($invoice->amount , '1354.20000' , 'amount check'); is($invoice->marge_percent , '50.88666' , 'marge percent check'); @@ -276,7 +278,8 @@ my $o1 = create_sales_order( transdate => '06.03.2015', unit => $unit->name, ) - ] + ], + transaction_description => 'Auftragsvorgang', ); @@ -286,7 +289,7 @@ my $o1_item1 = $o1->orderitems->[0]; my $o1_item2 = $o1->orderitems->[1]; # convert this order to invoice -$invoice = $o1->convert_to_invoice(transdate => $transdate); +$invoice = $o1->convert_to_invoice(transdate => $transdate, attributes => {transaction_description => 'Rechnungsvorgang'}); $invoice->load; # test invoice afterwards @@ -297,12 +300,13 @@ ok ($invoice->notes eq '