Revert "fix: price is different by 0.01"

This reverts commit 5dcbcf881c.
This commit is contained in:
Methapon2001 2024-12-10 13:08:11 +07:00
parent 80d7f1d0e5
commit 7f39308696

View file

@ -419,7 +419,7 @@ export class QuotationController extends Controller {
const price = body.agentPrice ? p.agentPrice : p.price;
const pricePerUnit = p.vatIncluded ? precisionRound(price / (1 + VAT_DEFAULT)) : price;
const vat = p.calcVat
? precisionRound((pricePerUnit - (v.discount || 0)) * VAT_DEFAULT) * v.amount
? precisionRound((pricePerUnit * v.amount - (v.discount || 0)) * VAT_DEFAULT)
: 0;
return {
@ -667,7 +667,7 @@ export class QuotationController extends Controller {
const price = record.agentPrice ? p.agentPrice : p.price;
const pricePerUnit = p.vatIncluded ? precisionRound(price / (1 + VAT_DEFAULT)) : price;
const vat = p.calcVat
? precisionRound((pricePerUnit - (v.discount || 0)) * VAT_DEFAULT) * v.amount
? precisionRound((pricePerUnit * v.amount - (v.discount || 0)) * VAT_DEFAULT)
: 0;
return {
order: i + 1,