Parcourir la source

Fix bug with tax being rounded

Alan Lam il y a 5 ans
Parent
commit
5da656f94a
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  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() {