t/db_helper/convert_invoice.t: Zahlen nach Rundungs-Patch f. PTC angepasst.
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Wed, 12 Dec 2018 18:05:56 +0000 (19:05 +0100)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Wed, 12 Dec 2018 18:05:56 +0000 (19:05 +0100)
Neue Zahlen mit (zahlengleichen) Beispielen an der Oberfläche ermittelt.

t/db_helper/convert_invoice.t

index b1ac4c2..5622961 100644 (file)
@@ -157,48 +157,14 @@ ok ($invoice->notes eq '<ul><li><strong>fett</strong></li><li><strong>und</stron
 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');
@@ -267,3 +233,10 @@ foreach ( $do1_item1->id, $do1_item2->id ) {
 clear_up();
 
 1;
+
+
+# vim: ft=perl
+# set emacs to perl mode
+# Local Variables:
+# mode: perl
+# End: