Просмотр исходного кода

Fix bug with tax being rounded

Alan Lam 5 лет назад
Родитель
Сommit
5da656f94a
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      engine/invoice.php

+ 2 - 2
engine/invoice.php

@@ -43,8 +43,8 @@ class Invoice {
         $this->taxRate = $tax_rate;
     }
 
-    public function getTax() {
-        return round($this->getTotal() * $this->taxRate);
+    public function getTax(): float {
+        return round($this->getTotal() * $this->taxRate, 2);
     }
 
     public function getTotalIncTax() {