Resolve "Resq 1.5 changes" #1556

Merged
korina.cordero merged 30 commits from 632-resq-1-5-changes into master-fix 2021-12-03 05:54:22 +00:00
Showing only changes of commit acf5d964cf - Show all commits

View file

@ -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;
}
}
*/
}