fix: wrong code

This commit is contained in:
Methapon Metanipat 2024-11-07 10:38:04 +07:00
parent cf151951b8
commit c8b8b58484
2 changed files with 2 additions and 2 deletions

View file

@ -170,7 +170,7 @@ export class QuotationPayment extends Controller {
await tx.quotation.update({
where: { id: quotation.id },
data: {
code: last ? `RE${year}${month}${last.toString().padStart(6, "0")}` : undefined,
code: last ? `RE${year}${month}${last.value.toString().padStart(6, "0")}` : undefined,
quotationStatus:
paymentSum._sum.amount || 0 >= quotation.finalPrice
? "PaymentSuccess"