|
|
@@ -518,8 +518,10 @@ EOF';
|
|
|
}
|
|
|
|
|
|
public static function nettoOdBrutto($brutto = 0, $vat = "23") {
|
|
|
+ if ($vat < 0) throw new Exception("Stawka VAT nie może być liczbą ujemną!");
|
|
|
$netto = round($brutto/(1+$vat/100),2);
|
|
|
if (round($netto*(1+$vat/100),2) > $brutto) $netto -= 0.01;
|
|
|
return $netto;
|
|
|
}
|
|
|
+
|
|
|
}
|