X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=t%2Fdb_helper%2Fconvert_invoice.t;h=62adec4c5b94ef24bebed3f1a9b8ab9f1c0625b7;hb=991369b17d679e2855f4d5086d0b9769dc2ae1aa;hp=7260e0784bad7b4d27cec87223e5e335a0152288;hpb=b2d1924891db6a6387cb8665d737c76d4bd6bb6e;p=kivitendo-erp.git 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 '