refactor: store value of product that excluded vat instead
This commit is contained in:
parent
7ae7f47c94
commit
a1b78e117e
1 changed files with 1 additions and 3 deletions
|
|
@ -512,9 +512,7 @@ export class QuotationController extends Controller {
|
|||
a.vat = precisionRound(a.vat + c.vat);
|
||||
a.vatExcluded =
|
||||
c.vat === 0
|
||||
? precisionRound(
|
||||
a.vatExcluded + (c.pricePerUnit * c.amount - (c.discount || 0)) * VAT_DEFAULT,
|
||||
)
|
||||
? precisionRound(a.vatExcluded + (c.pricePerUnit * c.amount - (c.discount || 0)))
|
||||
: a.vatExcluded;
|
||||
a.finalPrice = precisionRound(
|
||||
Math.max(a.totalPrice - a.totalDiscount + a.vat - (body.discount || 0), 0),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue