update migrations and create base migration. set discount and tax to sale invoices

This commit is contained in:
2026-05-28 18:27:21 +03:30
parent a975f9d02a
commit 7ae027633b
7 changed files with 114 additions and 45 deletions
+22 -4
View File
@@ -13,7 +13,8 @@ import {
IsObject,
IsOptional,
IsString,
ValidateNested,
Min,
ValidateNested
} from 'class-validator'
import {
CustomerInfoDto,
@@ -45,12 +46,18 @@ export class TspProviderOriginalItemPayloadDto {
@ApiProperty()
@IsNumber()
@Min(0)
total_amount: number
@ApiProperty()
@IsOptional()
@IsString()
discount: string
@IsNumber()
@Min(0)
discount_amount: number
@ApiProperty()
@IsNumber()
@Min(0)
tax_amount: number
@ApiProperty({ required: true })
@IsString()
@@ -116,8 +123,19 @@ export class TspProviderOriginalSendPayloadDto {
@ApiProperty()
@IsNumber()
@Min(0)
total_amount: number
@ApiProperty()
@IsNumber()
@Min(0)
discount_amount: number
@ApiProperty()
@IsNumber()
@Min(0)
tax_amount: number
@ApiProperty({ type: [TspProviderOriginalItemPayloadDto] })
@IsArray()
@ValidateNested({ each: true })