fix: status change not work as expected

This commit is contained in:
Methapon Metanipat 2024-11-01 10:45:41 +07:00
parent c8146ae8f1
commit e33e0bc9f7

View file

@ -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: {