feat: update invoice suffix code generation logic to ensure unique suffix for new invoices
This commit is contained in:
parent
cd1766db0f
commit
2905983bfd
|
@ -111,6 +111,9 @@ class Invoice {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 更新收据后缀
|
||||||
|
this.suffixCode = maxSuffix ? maxSuffix.invoice_suffix_code + 1 : 1
|
||||||
|
|
||||||
// 在数据库中创建新收据
|
// 在数据库中创建新收据
|
||||||
const newInvoice = await prisma.invoice.create({
|
const newInvoice = await prisma.invoice.create({
|
||||||
data: {
|
data: {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user