fix: wrong price per unit
This commit is contained in:
parent
1b84f345e7
commit
3885d9d359
1 changed files with 2 additions and 7 deletions
|
|
@ -357,9 +357,7 @@ export class QuotationController extends Controller {
|
|||
productId: v.productId,
|
||||
workId: v.workId,
|
||||
serviceId: v.serviceId,
|
||||
pricePerUnit:
|
||||
product.find((p) => p.id === v.productId)?.[body.agentPrice ? "agentPrice" : "price"] ||
|
||||
0,
|
||||
pricePerUnit,
|
||||
amount: v.amount,
|
||||
discount: v.discount || 0,
|
||||
vat,
|
||||
|
|
@ -563,10 +561,7 @@ export class QuotationController extends Controller {
|
|||
productId: v.productId,
|
||||
workId: v.workId,
|
||||
serviceId: v.serviceId,
|
||||
pricePerUnit:
|
||||
product.find((p) => p.id === v.productId)?.[
|
||||
record.agentPrice ? "agentPrice" : "price"
|
||||
] || 0,
|
||||
pricePerUnit,
|
||||
amount: v.amount,
|
||||
discount: v.discount || 0,
|
||||
vat,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue