update migrations and create base migration. set discount and tax to sale invoices
This commit is contained in:
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user