feat: add payback date
This commit is contained in:
parent
f1312b586f
commit
bc6863517c
2 changed files with 2 additions and 0 deletions
|
|
@ -1612,6 +1612,7 @@ model CreditNote {
|
||||||
paybackAccount String?
|
paybackAccount String?
|
||||||
paybackAccountName String?
|
paybackAccountName String?
|
||||||
paybackStatus PaybackStatus @default(Pending)
|
paybackStatus PaybackStatus @default(Pending)
|
||||||
|
paybackDate DateTime?
|
||||||
|
|
||||||
quotation Quotation @relation(fields: [quotationId], references: [id], onDelete: Cascade)
|
quotation Quotation @relation(fields: [quotationId], references: [id], onDelete: Cascade)
|
||||||
quotationId String
|
quotationId String
|
||||||
|
|
|
||||||
|
|
@ -557,6 +557,7 @@ export class CreditNoteActionController extends Controller {
|
||||||
creditNoteStatus:
|
creditNoteStatus:
|
||||||
body.paybackStatus === PaybackStatus.Done ? CreditNoteStatus.Success : undefined,
|
body.paybackStatus === PaybackStatus.Done ? CreditNoteStatus.Success : undefined,
|
||||||
paybackStatus: body.paybackStatus,
|
paybackStatus: body.paybackStatus,
|
||||||
|
paybackDate: body.paybackStatus === PaybackStatus.Done ? new Date() : undefined,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue