From: Bernd Bleßmann Date: Wed, 29 Sep 2021 09:09:11 +0000 (+0200) Subject: convert_invoice.t: Test für Änderung von Attributen bei Konvertierung X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~334 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=a906b00887d0330dbcfb3a4f8ee9ce01a876f5f2;p=kivitendo-erp.git convert_invoice.t: Test für Änderung von Attributen bei Konvertierung --- 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 '