Merge branch '636-fix-timing-of-vat-computation' into 'master-fix'
Revert VAT tax computation. #636 See merge request jankstudio/resq!749
This commit is contained in:
commit
4d66345ae3
1 changed files with 9 additions and 7 deletions
|
|
@ -363,7 +363,7 @@ class ResqInvoiceGenerator implements InvoiceGeneratorInterface
|
|||
|
||||
$this->processBatteries($total, $con_batts, $invoice);
|
||||
$this->processTradeIns($total, $con_tis, $invoice);
|
||||
$this->processVAT($total);
|
||||
// $this->processVAT($total);
|
||||
}
|
||||
|
||||
protected function processBatteries(&$total, $con_batts, Invoice $invoice)
|
||||
|
|
@ -375,13 +375,12 @@ class ResqInvoiceGenerator implements InvoiceGeneratorInterface
|
|||
$qty = $con_data['qty'];
|
||||
|
||||
$sell_price = $batt->getSellingPrice();
|
||||
// comment out the getting of tax amount
|
||||
// $vat = $this->getTaxAmount($sell_price);
|
||||
// $vat_ex_price = $this->getTaxExclusivePrice($sell_price);
|
||||
$vat = $this->getTaxAmount($sell_price);
|
||||
$vat_ex_price = $this->getTaxExclusivePrice($sell_price);
|
||||
|
||||
$total['sell_price'] += $sell_price * $qty;
|
||||
// $total['vat'] += $vat * $qty;
|
||||
// $total['vat_ex_price'] += ($sell_price - $vat) * $qty;
|
||||
$total['vat'] += $vat * $qty;
|
||||
$total['vat_ex_price'] += ($sell_price - $vat) * $qty;
|
||||
|
||||
$total['total_price'] += $sell_price * $qty;
|
||||
|
||||
|
|
@ -819,6 +818,8 @@ class ResqInvoiceGenerator implements InvoiceGeneratorInterface
|
|||
return $cust_tag_info;
|
||||
}
|
||||
|
||||
// commenting this out since not used. Reverting back to the old VAT computation
|
||||
/*
|
||||
protected function processVAT(&$total)
|
||||
{
|
||||
// total trade in amount to deduct from SRP before we compute VAT
|
||||
|
|
@ -839,5 +840,6 @@ class ResqInvoiceGenerator implements InvoiceGeneratorInterface
|
|||
|
||||
$total['vat'] = $total_vat;
|
||||
$total['vat_ex_price'] = $total_vat_ex_price;
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue