This commit is contained in:
2026-02-21 12:59:15 +03:30
parent 986f852457
commit a636598683
4 changed files with 12 additions and 2 deletions
@@ -72,6 +72,12 @@ export class CreateInvoiceDto {
@IsString()
paymentMethod?: string
@IsOptional()
@IsString()
@ApiPropertyOptional()
description?: string;
// @IsArray()
// @Type(() => IAttachment)
// @ApiProperty({ type: [IAttachment] })
@@ -96,4 +96,7 @@ export class Invoice extends BaseEntity {
@Property({ type: 'string', nullable: true })
paymentMethod?: string;
@Property({ type: 'text', nullable: true })
description?: string;
}
+1 -1
View File
@@ -56,7 +56,7 @@ export class InvoiceController {
@Get('admin/invoice/:id')
@UseGuards(AdminAuthGuard)
@ApiOperation({ summary: 'Get one invoice by id' })
@ApiOperation({ summary: 'Get one invoice by id (admin)' })
findOneAsAdmin(@Param('id') id: string) {
return this.invoiceService.findOneAsAdmin(id);
}
+2 -1
View File
@@ -60,7 +60,8 @@ export class InvoiceService {
balance: 0,
attachments: [],
paymentMethod: dto.paymentMethod,
invoiceNumber:20
invoiceNumber: 20,
description: dto.description
});
em.persist(invoice);