فهرست منبع

Fix bug with tax being rounded

Alan Lam 5 سال پیش
والد
کامیت
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;
         $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() {
     public function getTotalIncTax() {