Index: /lib/wpsg_calculation.class.php
===================================================================
--- /lib/wpsg_calculation.class.php	(revision 8172)
+++ /lib/wpsg_calculation.class.php	(revision 8173)
@@ -510,10 +510,10 @@
 							
                 	if (!is_array($cr['set'])) $cr['set'] = [$cr['set']];
-                	
+                						
                 	$brutto = 0;
                 	$netto = 0;
 
 					$country_id = $this->getTargetCountry()['id'];
-					
+					 
                 	foreach ($cr['set'] as $set) {
 		
@@ -644,5 +644,5 @@
 								//wpsg_debug('2: '.$set_netto.":".$set_brutto);
 							}
-							 																									
+														 																									
 						}
 						
@@ -651,5 +651,5 @@
 														
 					}
-						 
+					 
 					$cr['set'] = array_values($cr['set'])[0];
 						
@@ -700,5 +700,5 @@
 						
 					}
-						
+
 					$this->arCalculation['tax'][$cr['tax_key']]['netto'] += $netto;
 					$this->arCalculation['tax'][$cr['tax_key']]['brutto'] += $brutto;
@@ -729,5 +729,4 @@
 					wpsg_addSet($this->arCalculation['sum'][$cr['type'].'_netto_calculated'],$netto_calculated_single * $cr['amount']);
 					wpsg_addSet($this->arCalculation['sum'][$cr['type'].'_brutto_calculated'],$brutto_calculated_single * $cr['amount']);
-					
 					wpsg_addSet($this->arCalculation['sum'][$cr['type'].'_tax'],$tax);
 					
@@ -757,6 +756,6 @@
 						
 					}
-		
-				}
+					
+                }
 				
 				$this->arCalculation['sum']['topay_netto'] = $this->arCalculation['sum']['netto'];
@@ -1593,9 +1592,4 @@
 						if ($this->tax_mode === self::TAXMODE_SMALLBUSINESS) $brutto = $netto;
 						
-						//wpsg_debug($sum_netto.'('.$sum_brutto.')'.":".$val);
-						
-						//if ($sum_netto + $netto < 0) $netto = -1 * $sum_netto;
-						//if ($sum_brutto + $brutto < 0) $brutto = -1 * $sum_brutto;
-						 
 						$ret_netto += $netto;
 						$ret_brutto += $brutto;
@@ -1604,6 +1598,6 @@
 							
 							//if ($this->getTargetCountry()['tax_mode'] == '1') $brutto = $netto;
-							if ($this->tax_mode === self::TAXMODE_B2B) $brutto = $netto;
-							
+//!							//if ($this->tax_mode === self::TAXMODE_B2B) $brutto = $netto;
+							 
 							$this->arCalculation['tax'][$tax_key2]['netto'] += $netto;
 							$this->arCalculation['tax'][$tax_key2]['brutto'] += $brutto;
Index: /mods/wpsg_mod_rechnungen.class.php
===================================================================
--- /mods/wpsg_mod_rechnungen.class.php	(revision 8172)
+++ /mods/wpsg_mod_rechnungen.class.php	(revision 8173)
@@ -8,5 +8,5 @@
 		var $lizenz = 1;
 		var $id = 1400;		
-		var $version = "4.3.8";
+		var $version = "9.9.9";
 		var $hilfeURL = 'http://wpshopgermany.de/?p=718';
 		var $free = false;
