Revert VAT tax computation. #636

This commit is contained in:
Korina Cordero 2021-11-02 04:46:30 +00:00
parent 07f7457937
commit 0dce53beaa

View file

@ -363,7 +363,7 @@ class ResqInvoiceGenerator implements InvoiceGeneratorInterface
$this->processBatteries($total, $con_batts, $invoice); $this->processBatteries($total, $con_batts, $invoice);
$this->processTradeIns($total, $con_tis, $invoice); $this->processTradeIns($total, $con_tis, $invoice);
$this->processVAT($total); // $this->processVAT($total);
} }
protected function processBatteries(&$total, $con_batts, Invoice $invoice) protected function processBatteries(&$total, $con_batts, Invoice $invoice)
@ -375,13 +375,12 @@ class ResqInvoiceGenerator implements InvoiceGeneratorInterface
$qty = $con_data['qty']; $qty = $con_data['qty'];
$sell_price = $batt->getSellingPrice(); $sell_price = $batt->getSellingPrice();
// comment out the getting of tax amount $vat = $this->getTaxAmount($sell_price);
// $vat = $this->getTaxAmount($sell_price); $vat_ex_price = $this->getTaxExclusivePrice($sell_price);
// $vat_ex_price = $this->getTaxExclusivePrice($sell_price);
$total['sell_price'] += $sell_price * $qty; $total['sell_price'] += $sell_price * $qty;
// $total['vat'] += $vat * $qty; $total['vat'] += $vat * $qty;
// $total['vat_ex_price'] += ($sell_price - $vat) * $qty; $total['vat_ex_price'] += ($sell_price - $vat) * $qty;
$total['total_price'] += $sell_price * $qty; $total['total_price'] += $sell_price * $qty;
@ -819,6 +818,8 @@ class ResqInvoiceGenerator implements InvoiceGeneratorInterface
return $cust_tag_info; return $cust_tag_info;
} }
// commenting this out since not used. Reverting back to the old VAT computation
/*
protected function processVAT(&$total) protected function processVAT(&$total)
{ {
// total trade in amount to deduct from SRP before we compute VAT // total trade in amount to deduct from SRP before we compute VAT
@ -840,4 +841,5 @@ class ResqInvoiceGenerator implements InvoiceGeneratorInterface
$total['vat'] = $total_vat; $total['vat'] = $total_vat;
$total['vat_ex_price'] = $total_vat_ex_price; $total['vat_ex_price'] = $total_vat_ex_price;
} }
*/
} }