Index: /system/tests/wpsg_calculationTestTest.php
===================================================================
--- /system/tests/wpsg_calculationTestTest.php	(revision 7179)
+++ /system/tests/wpsg_calculationTestTest.php	(revision 7180)
@@ -6,80 +6,183 @@
      * Time: 13:29
      */
-           
-    class wpsg_calculationTestTest extends \PHPUnit_Framework_TestCase {
-
-        /**
-         * @beforeClass
-         */
-        public function setupSomeFixtures()
-        {
-
-            session_start();
-
-            error_reporting(E_ERROR);
-            ini_set("display_errors", "1");
-
-            require_once(dirname(__FILE__).'/../../../../../wp-load.php');
-            require_once(dirname(__FILE__).'/../../wpshopgermany.php');
-            
-        }
-        
-        /** 
-         * @runInSeparateProcess
-         */
-        public function testBasket1Test() {
-
-            
-            
-            $b = new \wpsg\wpsg_calculation();
-            
-            $b->setCountry(\wpsg_country::getInstance(1));
-            
-            $b->addProduct('1', 0, '100', '1','c');
-            $b->addProduct('1', 1, '100', '1','b');
-            $b->setShipping('1', '100', '0');
-            $b->setPayment('1', '100', 'c_1');
-            
-            $ar = $b->getCalculationArray();
-            
-            $this->assertEquals(
-                400,
-                $ar['sum']['sum_netto']                
-            );
-
-            $this->assertEquals(
-                460,
-                $ar['sum']['sum_brutto']                
-            );
-            
-        }
-
-        /**  
-         * @runInSeparateProcess
-         */
-        public function testBasket2Test() {
- 
-            $b = new \wpsg\wpsg_calculation();
-
-            $b->setCountry(\wpsg_country::getInstance(1));
-
-            $b->addProduct('1', 0, '100', '1','c');
-            $b->addProduct('1', 1, '100', '1','b');
-            $b->setShipping('1', '100', '0');
-            $b->setPayment('1', '100', 'c_1');
-
-            $ar = $b->getCalculationArray();
-
-            $this->assertEquals(
-                400,
-                $ar['sum']['sum_netto']
-            );
-
-            $this->assertEquals(
-                460,
-                $ar['sum']['sum_brutto']
-            );
-
-        }
-
+	
+	use PHPUnit\Framework\TestCase;
+    
+    class wpsg_calculationTestTest extends TestCase {
+	
+    	public function test2() {
+		
+			$b = new \wpsg\wpsg_calculation();
+		
+			$b->setCountry(\wpsg_country::getInstance(1));
+		
+			$b->addProduct('1', 0, 1260.5, '1','c');
+			$b->setShipping('1', '0', '0');
+			$b->setPayment('1', '0', '0');
+		
+			$ar = $b->getCalculationArray();
+		
+			$this->assertTrue($this->compareArray($ar, [
+				'sum' => [
+					'product_netto' => 1260.5,
+					'tax' => 239.49,
+					'brutto' => 1499.99,
+				]
+			]));
+			
+		}
+    	
+		public function test1() {
+			
+			$b = new \wpsg\wpsg_calculation();
+			
+			$b->setCountry(\wpsg_country::getInstance(1));
+			
+			$b->addProduct('1', 0, '100', '1','c');
+			$b->addProduct('1', 1, '100', '1','b');
+			$b->setShipping('1', '100', '0');
+			$b->setPayment('1', '100', 'c_1');
+			
+			$ar = $b->getCalculationArray();
+			 
+			$this->assertTrue($this->compareArray($ar, array (
+				'land' =>
+					array (
+						'id' => '1',
+						'name' => 'Deutschland',
+						'kuerzel' => 'DE',
+						'vz' => '1',
+						'mwst' => '0',
+						'mwst_a' => '0.0000',
+						'mwst_b' => '7.0000',
+						'mwst_c' => '19.0000',
+						'mwst_d' => '0.0000',
+					),
+				'products' =>
+					array (
+						0 =>
+							array (
+								'product_key' => '1',
+								'product_id' => '1',
+								'product_index' => 0,
+								'netto' => '100',
+								'amount' => '1',
+								'tax_key' => 'c_1',
+								'order_product_id' => false,
+								'brutto' => 119.0,
+								'sum_tax' => 19.0,
+							),
+						1 =>
+							array (
+								'product_key' => '1',
+								'product_id' => '1',
+								'product_index' => 1,
+								'netto' => '100',
+								'amount' => '1',
+								'tax_key' => 'b_1',
+								'order_product_id' => false,
+								'brutto' => 107.0,
+								'sum_tax' => 7.0,
+							),
+					),
+				'discount' =>
+					array (
+					),
+				'sum' =>
+					array (
+						'product_netto' => 200, // Netto Preis der Produkte mit Gutschein
+						'product_brutto' => 226.0, // Brutto Preis der Produkte mit Gutschein
+						'prediscount_netto' => 400, // Netto vor der Anwendung der Rabatte
+						'prediscount_brutto' => 460.0, // Brutto vor der Anwendung der Rabatte
+						'netto' => 400,	// Netto Summe
+						'brutto' => 460.0,	// Brutto Summe
+						'tax' => 60.0,	// Steur Summe
+						'discount_netto' => 0,	// Angewendeter Rabatt Netto
+						'discount_brutto' => 0,	// Angewendeter Rabatt Brutto
+						'prevoucher_netto' => 200,	 // Prduktpreis vor Gutschein Netto
+						'prevoucher_brutto' => 226.0,	// Produktpreis vor Gutschein Brutto
+						'voucher_netto' => 0,	// Gutschein Netto
+						'voucher_brutto' => 0,	// Gutschein Brutto
+					),
+				'tax' =>
+					array (
+						'c_1' =>
+							array (
+								'key' => 'c_1',
+								'netto' => 266.66666666666663,
+								'brutto' => 195.66666666666663,
+								'tax_value' => '19.0000',
+								'sum_tax' => 47.99999999999998,
+								'part' => 0.6666666666666666,
+							),
+						'b_1' =>
+							array (
+								'key' => 'b_1',
+								'netto' => 133.33333333333331,
+								'brutto' => 38.33333333333332,
+								'tax_value' => '7.0000',
+								'sum_tax' => 11.99999999999999,
+								'part' => 0.3333333333333333,
+							),
+						0 =>
+							array (
+								'key' => '0',
+								'netto' => 100,
+								'brutto' => 114.99999999999997,
+								'tax_value' => 0,
+								'sum_tax' => 14.999999999999972,
+								'part' => 0,
+							),
+					),
+				'shipping' =>
+					array (
+						'key' => '1',
+						'netto' => '100',
+						'brutto' => 114.99999999999997,
+						'tax_key' => '0',
+						'sum_tax' => 14.999999999999972,
+					),
+				'payment' =>
+					array (
+						'key' => '1',
+						'netto' => '100',
+						'brutto' => 119.0,
+						'tax_key' => 'c_1',
+						'sum_tax' => 19.0,
+					),
+				'voucher' => NULL,
+			)));
+			
+		}
+		
+		private function compareArray($a, $b_check, $key = '') {
+			
+			if (is_array($b_check)) {
+				
+				foreach ($b_check as $k => $v) {
+										
+					$bReturn = false;
+					
+					$b = $this->compareArray($a[$k], $b_check[$k], $key.'/'.$k);
+					if (!$b) $bReturn = false;
+					
+				}
+				
+				return true;
+				
+			} else {
+				
+				if (round(wpsg_tf($a), 2, PHP_ROUND_HALF_DOWN) !== round(wpsg_tf($b_check),2, PHP_ROUND_HALF_DOWN)) {
+					
+					echo "Fehler in ".$key." SOLL: ".$b_check." / IST: ".$a." \r\n";
+					
+					return false;
+					
+				}
+				else return true;
+				
+			}
+			
+		}
+    	
     }
Index: /system/tests/wpsg_calculation_autoload.php
===================================================================
--- /system/tests/wpsg_calculation_autoload.php	(revision 7180)
+++ /system/tests/wpsg_calculation_autoload.php	(revision 7180)
@@ -0,0 +1,16 @@
+<?php
+	
+	/**
+	 * User: Daschmi (daschmi@daschmi.de)
+	 * Date: 05.10.2018
+	 * Time: 10:59
+	 */
+	
+	session_start();
+	
+	error_reporting(E_ERROR);
+	ini_set("display_errors", "1");
+	
+	require_once(dirname(__FILE__).'/../../../../../wp-load.php');
+	require_once(dirname(__FILE__).'/../../wpshopgermany.php');
+            
Index: /views/mods/mod_orderupload/order_view_row.phtml
===================================================================
--- /views/mods/mod_orderupload/order_view_row.phtml	(revision 7179)
+++ /views/mods/mod_orderupload/order_view_row.phtml	(revision 7180)
@@ -1,16 +1,17 @@
 <?php
+	
+	/**
+	 * Template fÃŒr die Integration des Produktuploads in die Bestellverwaltung Reiter "Bestelldaten"
+	 */
+	
+	$view = $this->view['wpsg_mod_orderupload'];
 
-    /**
-     * Template fÃŒr die Integration des Produktuploads in die Bestellverwaltung Reiter "Bestelldaten"
-     */
-
-    $view = $this->view['wpsg_mod_orderupload'];
-    
 ?>
 <tr class="wpsg_<?php echo (($view['i'] == 0)?'odd':'even'); ?>">
-    <td align="left" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'5':'4'); ?>">
-        <label>
-            <?php echo wpsg_translate(__('Produktuploads: #1#', 'wpsg'), implode(', ', $view['arFileDownloadLinks'])); ?>
-        </label>
-    </td>
+	<td><?php echo __('Produktuploads', 'wpsg'); ?>:</td>
+	<td align="left" colspan="<?php echo ((sizeof($this->view['arCalculation']['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'4':'3'); ?>">
+		<label>
+			<?php echo implode(', ', $view['arFileDownloadLinks']); ?>
+		</label>
+	</td>
 </tr>
