Ver Fonte

Fix bug with tax being rounded

Alan Lam há 5 anos atrás
pai
commit
5da656f94a
1 ficheiros alterados com 2 adições e 2 exclusões
  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() {