diff --git a/src/controllers/05-payment-controller.ts b/src/controllers/05-payment-controller.ts index cb23c17..1365e27 100644 --- a/src/controllers/05-payment-controller.ts +++ b/src/controllers/05-payment-controller.ts @@ -145,6 +145,10 @@ export class QuotationPayment extends Controller { }, }); + if (body.paymentStatus === "PaymentSuccess") { + paymentSum._sum.amount = (paymentSum._sum.amount || 0) + payment.amount; + } + await tx.quotation.update({ where: { id: quotation.id }, data: {