feat: add more metadata for payment
This commit is contained in:
parent
4042cbcea4
commit
710382d544
2 changed files with 14 additions and 3 deletions
|
|
@ -1524,8 +1524,11 @@ model Payment {
|
|||
|
||||
paymentStatus PaymentStatus
|
||||
|
||||
amount Float
|
||||
date DateTime?
|
||||
amount Float
|
||||
date DateTime?
|
||||
channel String?
|
||||
account String?
|
||||
reference String?
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
createdBy User? @relation(name: "PaymentCreatedByUser", fields: [createdByUserId], references: [id], onDelete: SetNull)
|
||||
|
|
|
|||
|
|
@ -113,7 +113,15 @@ export class QuotationPayment extends Controller {
|
|||
@Security("keycloak", MANAGE_ROLES.concat(["head_of_sale", "sale"]))
|
||||
async updatePayment(
|
||||
@Path() paymentId: string,
|
||||
@Body() body: { amount?: number; date?: Date; paymentStatus?: PaymentStatus },
|
||||
@Body()
|
||||
body: {
|
||||
amount?: number;
|
||||
date?: Date;
|
||||
paymentStatus?: PaymentStatus;
|
||||
channel?: string | null;
|
||||
account?: string | null;
|
||||
reference?: string | null;
|
||||
},
|
||||
@Request() req: RequestWithUser,
|
||||
) {
|
||||
const record = await prisma.payment.findUnique({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue