From 8d085ced4de229050ea4e38ebfc2dfc7ba8c8049 Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Fri, 18 Oct 2024 11:55:28 +0700 Subject: [PATCH] feat: payment data pull date from split data --- src/controllers/05-quotation-controller.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/05-quotation-controller.ts b/src/controllers/05-quotation-controller.ts index 39649b8..053b678 100644 --- a/src/controllers/05-quotation-controller.ts +++ b/src/controllers/05-quotation-controller.ts @@ -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,