fix: empty payment data on full payment
This commit is contained in:
parent
b4fb53cdcf
commit
2c90c0c143
1 changed files with 24 additions and 18 deletions
|
|
@ -466,11 +466,14 @@ export class QuotationController extends Controller {
|
||||||
...rest,
|
...rest,
|
||||||
...price,
|
...price,
|
||||||
quotationPaymentData: {
|
quotationPaymentData: {
|
||||||
create: rest.paySplit?.map((v) => ({
|
create:
|
||||||
|
rest.payCondition === "BillSplit" || rest.payCondition === "Split"
|
||||||
|
? rest.paySplit?.map((v) => ({
|
||||||
paymentStatus: "PaymentWait",
|
paymentStatus: "PaymentWait",
|
||||||
amount: v.amount,
|
amount: v.amount,
|
||||||
date: v.date,
|
date: v.date,
|
||||||
})) || {
|
}))
|
||||||
|
: {
|
||||||
paymentStatus: "PaymentWait",
|
paymentStatus: "PaymentWait",
|
||||||
amount: price.finalPrice,
|
amount: price.finalPrice,
|
||||||
date: new Date(),
|
date: new Date(),
|
||||||
|
|
@ -721,11 +724,14 @@ export class QuotationController extends Controller {
|
||||||
price && record.quotationStatus === "PaymentPending"
|
price && record.quotationStatus === "PaymentPending"
|
||||||
? {
|
? {
|
||||||
deleteMany: {},
|
deleteMany: {},
|
||||||
create: rest.paySplit?.map((v) => ({
|
create:
|
||||||
|
rest.payCondition === "BillSplit" || rest.payCondition === "Split"
|
||||||
|
? rest.paySplit?.map((v) => ({
|
||||||
paymentStatus: "PaymentWait",
|
paymentStatus: "PaymentWait",
|
||||||
amount: v.amount,
|
amount: v.amount,
|
||||||
date: v.date,
|
date: v.date,
|
||||||
})) || {
|
}))
|
||||||
|
: {
|
||||||
paymentStatus: "PaymentWait",
|
paymentStatus: "PaymentWait",
|
||||||
amount: price.finalPrice,
|
amount: price.finalPrice,
|
||||||
date: new Date(),
|
date: new Date(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue