Merge branch '636-fix-timing-of-vat-computation' into 'master-fix'

Fix response for vat ex price . #636

See merge request jankstudio/resq!748
This commit is contained in:
Kendrick Chan 2021-10-28 02:12:23 +00:00
commit 07f7457937

View file

@ -1158,7 +1158,7 @@ class APIController extends Controller implements LoggedController
// make invoice json data
$invoice_data = [
'total_price' => $invoice->getTotalPrice(),
'vat_ex_price' => $invoice->getVATExclusivePrice(),
'vat_ex_price' => (float) $invoice->getVATExclusivePrice(),
'vat' => $invoice->getVAT(),
'discount' => $invoice->getDiscount(),
'trade_in' => $invoice->getTradeIn(),
@ -3073,7 +3073,7 @@ class APIController extends Controller implements LoggedController
// make invoice json data
$invoice_data = [
'total_price' => $invoice->getTotalPrice(),
'vat_ex_price' => $invoice->getVATExclusivePrice(),
'vat_ex_price' => (float) $invoice->getVATExclusivePrice(),
'vat' => $invoice->getVAT(),
'discount' => $invoice->getDiscount(),
'trade_in' => $invoice->getTradeIn(),