ok(($do1->closed) , 'Delivery Order is closed after conversion');
is($invoice->payment_terms->description, "14Tage 2%Skonto, 30Tage netto", 'payment term description check');
-# some test data from original client invoice console (!)
-# my $invoice3 = SL::DB::Manager::Invoice->find_by( ordnumber => 'A16399' );
-# which will fail due to PTC Calculation differs from GUI-Calculation, see issue: http://redmine.kivitendo-premium.de/issues/82
-# pp $invoice3
-# values from gui should be:
-#ok($invoice->amount == 1354.20000, 'amount check');
-#ok($invoice->marge_percent == 50.88666, 'marge percent check');
-#ok($invoice->marge_total == 579.08000, 'marge total check');
-#ok($invoice->netamount == 1137.98000, 'netamount check');
-
-
-# the values change if one reloads the object
-# without reloading we get this failures
-#not ok 17 - amount check
-# Failed test 'amount check'
-# at t/db_helper/convert_invoice.t line 272.
-# got: '1354.17'
-# expected: '1354.17000'
-#not ok 18 - marge percent check
-# Failed test 'marge percent check'
-# at t/db_helper/convert_invoice.t line 273.
-# got: '50.8857956342929'
-# expected: '50.88580'
-#not ok 19 - marge total check
-# Failed test 'marge total check'
-# at t/db_helper/convert_invoice.t line 274.
-# got: '579.06'
-# expected: '579.06000'
-#not ok 20 - netamount check
-# Failed test 'netamount check'
-# at t/db_helper/convert_invoice.t line 275.
-# got: '1137.96'
-# expected: '1137.96000'
-
$invoice->load;
is($invoice->cusordnumber , 'b84da' , 'cusordnumber check');
is($invoice->department->description , "Test Department" , 'department description ok');
-is($invoice->amount , '1354.17000' , 'amount check');
-is($invoice->marge_percent , '50.88580' , 'marge percent check');
-is($invoice->marge_total , '579.06000' , 'marge total check');
-is($invoice->netamount , '1137.96000' , 'netamount check');
+is($invoice->amount , '1354.20000' , 'amount check');
+is($invoice->marge_percent , '50.88666' , 'marge percent check');
+is($invoice->marge_total , '579.08000' , 'marge total check');
+is($invoice->netamount , '1137.98000' , 'netamount check');
# some item checks
is($invoice->items_sorted->[0]->parts_id , $parts[0]->id , 'invoiceitem 1 linked with part');
clear_up();
1;
+
+
+# vim: ft=perl
+# set emacs to perl mode
+# Local Variables:
+# mode: perl
+# End: