diff --git a/backend/src/classes/Invoice.ts b/backend/src/classes/Invoice.ts index 21f2a8c..a6dc9d0 100644 --- a/backend/src/classes/Invoice.ts +++ b/backend/src/classes/Invoice.ts @@ -111,6 +111,9 @@ class Invoice { } }) + // 更新收据后缀 + this.suffixCode = maxSuffix ? maxSuffix.invoice_suffix_code + 1 : 1 + // 在数据库中创建新收据 const newInvoice = await prisma.invoice.create({ data: {