feat: payment data pull date from split data

This commit is contained in:
Methapon Metanipat 2024-10-18 11:55:28 +07:00
parent 1268922fe1
commit 8d085ced4d

View file

@ -465,11 +465,11 @@ export class QuotationController extends Controller {
create: rest.paySplit?.map((v) => ({
paymentStatus: "PaymentWait",
amount: v.amount,
date: new Date(),
date: v.date,
})) || {
paymentStatus: "PaymentWait",
amount: price.finalPrice,
date: new Date(),
date: v.date,
},
},
statusOrder: +(rest.status === "INACTIVE"),
@ -720,7 +720,7 @@ export class QuotationController extends Controller {
create: rest.paySplit?.map((v) => ({
paymentStatus: "PaymentWait",
amount: v.amount,
date: new Date(),
date: v.date,
})) || {
paymentStatus: "PaymentWait",
amount: price.finalPrice,