fix: calc vat
This commit is contained in:
parent
fd3366262f
commit
ee113b3820
1 changed files with 1 additions and 1 deletions
|
|
@ -625,7 +625,7 @@ export class QuotationController extends Controller {
|
||||||
const list = body.productServiceList?.map((v, i) => {
|
const list = body.productServiceList?.map((v, i) => {
|
||||||
const p = product.find((p) => p.id === v.productId)!;
|
const p = product.find((p) => p.id === v.productId)!;
|
||||||
const price = record.agentPrice ? p.agentPrice : p.price;
|
const price = record.agentPrice ? p.agentPrice : p.price;
|
||||||
const pricePerUnit = p.vatIncluded ? precisionRound(price / 1 + VAT_DEFAULT) : price;
|
const pricePerUnit = p.vatIncluded ? precisionRound(price / (1 + VAT_DEFAULT)) : price;
|
||||||
const vat = p.calcVat
|
const vat = p.calcVat
|
||||||
? precisionRound((pricePerUnit * v.amount - (v.discount || 0)) * VAT_DEFAULT)
|
? precisionRound((pricePerUnit * v.amount - (v.discount || 0)) * VAT_DEFAULT)
|
||||||
: 0;
|
: 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue