feat: prevent from change after completed

This commit is contained in:
Methapon Metanipat 2024-11-14 13:10:08 +07:00
parent e77aa8faf4
commit e655bf282c

View file

@ -127,6 +127,8 @@ export class QuotationPayment extends Controller {
if (!record) throw notFoundError("Payment");
if (record.paymentStatus === "PaymentSuccess") return record;
return await prisma.$transaction(async (tx) => {
const current = new Date();
const year = `${current.getFullYear()}`.slice(-2).padStart(2, "0");