fix: wrong code
This commit is contained in:
parent
cf151951b8
commit
c8b8b58484
2 changed files with 2 additions and 2 deletions
|
|
@ -137,7 +137,7 @@ export class InvoiceController extends Controller {
|
|||
return await tx.invoice.create({
|
||||
data: {
|
||||
quotationId: body.quotationId,
|
||||
code: `IV${year}${month}${last.toString().padStart(6, "0")}`,
|
||||
code: `IV${year}${month}${last.value.toString().padStart(6, "0")}`,
|
||||
amount: body.amount,
|
||||
installments: {
|
||||
connect: record.paySplit.map((v) => ({ id: v.id })),
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue