set invoke in nama

This commit is contained in:
2026-05-04 11:21:49 +03:30
parent a486127ade
commit 6a48f203a9
17 changed files with 711 additions and 240 deletions
@@ -5,6 +5,7 @@ import {
IsArray,
IsEnum,
IsNumber,
IsObject,
IsOptional,
IsString,
Min,
@@ -46,11 +47,14 @@ export class NamaProviderPaymentInfoDto {
}
export class NamaProviderBodyItemDto {
@ApiProperty()
@ApiProperty({ required: true, description: 'شناسه کالا / خدمت' })
@IsString()
sstid: string
@ApiProperty()
@ApiProperty({
required: true,
description: `نرخ مالیات بر ارزش افزوده`,
})
@IsString()
vra: string
@@ -58,45 +62,63 @@ export class NamaProviderBodyItemDto {
// @IsString()
// sstt: string
@ApiProperty()
@ApiProperty({
required: true,
description: 'مبلغ واحد',
})
@IsString()
fee: string
@ApiProperty()
@ApiProperty({
required: true,
description: 'مبلغ تخفیف',
})
@IsString()
dis: string
@ApiProperty()
@ApiProperty({
required: true,
description: 'واحد اندازه گیری',
})
@IsString()
mu: string
@ApiProperty()
@ApiProperty({
required: true,
description: 'تعداد / مقدار',
})
@IsString()
am: string
@ApiProperty()
@ApiProperty({
description: ' اجرت ساخت (طلا)',
})
@IsString()
consfee: string
@ApiProperty()
@ApiProperty({
description: 'حق العمل',
})
@IsString()
bros: string
@ApiProperty()
@ApiProperty({
description: 'سود فروشنده',
})
@IsString()
spro: string
}
export class NamaProviderHeaderDto {
@ApiProperty({ required: true })
@ApiProperty({ required: true, description: 'موضوع صورتحساب' })
@IsString()
ins: string
@ApiProperty()
@ApiProperty({ required: true, description: 'الگوی صورتحساب' })
@IsString()
inp: string
@ApiProperty({ required: true })
@ApiProperty({ required: true, description: 'نوع صورتحساب' })
@IsString()
inty: string
@@ -104,41 +126,46 @@ export class NamaProviderHeaderDto {
// @IsString()
// unique_tax_code: string
@ApiProperty({ required: true })
@ApiProperty({ required: true, description: 'سریال صورتحساب داخلی حافظه مالیاتی' })
@IsString()
inno: string
@ApiProperty({ required: true })
@IsString()
tins: string
// @ApiProperty({ required: true })
// @IsString()
// tins: string
@ApiProperty({ required: true })
@ApiProperty({
required: true,
description: 'تاریخ و زمان صدور صورتحساب به صورت timestamp',
})
@IsString()
indatim: string
@ApiProperty({ required: true })
@ApiProperty({ required: true, description: 'نام مشتری' })
@IsString()
name: string
@ApiProperty({ required: true })
@ApiProperty({ required: true, description: 'نوع شخصیت خریدار' })
@IsString()
tob: string
@ApiProperty()
@ApiProperty({ description: 'آدرس' })
@IsOptional()
@IsString()
address?: string
@ApiProperty()
@ApiProperty({ description: 'شماره موبایل' })
@IsOptional()
@IsString()
mobile?: string
@ApiProperty()
@ApiProperty({
description: `شماره ملی / شناسه ملی / شناسه مشارکت مدنی / کد فراگیر خریدار`,
})
@IsString()
bid: string
@ApiProperty({ required: true })
@ApiProperty({ required: true, description: 'روش تسویه' })
@IsString()
setm: string
}
@@ -259,3 +286,90 @@ export class NamaProviderGetResponseDto {
@IsString()
tsp_update_time: string
}
export class NamaProviderRevokeHeaderDto {
@ApiProperty({ required: true, description: 'موضوع صورتحساب' })
@IsString()
ins: string
@ApiProperty({ required: true, description: 'سریال صورتحساب داخلی حافظه مالیاتی' })
@IsString()
inno: string
@ApiProperty({
required: true,
description: 'آخرین شماره مالیاتی دریافت شده مربوط به فاکتور',
})
@IsString()
irtaxid: string
}
export class NamaProviderRevokeRequestDto {
// @ApiProperty({ type: [NamaProviderBodyItemDto] })
// @IsArray()
// @ValidateNested({ each: true })
// @Type(() => NamaProviderBodyItemDto)
// body: NamaProviderBodyItemDto[]
// @ApiProperty({ type: [NamaProviderPaymentInfoDto] })
// @IsArray()
// @ValidateNested({ each: true })
// @Type(() => NamaProviderPaymentInfoDto)
// payment: NamaProviderPaymentInfoDto[]
@ApiProperty({ type: Object, required: true })
@IsObject()
body: {}
@ApiProperty({ type: NamaProviderRevokeHeaderDto })
@ValidateNested()
@Type(() => NamaProviderRevokeHeaderDto)
header: NamaProviderRevokeHeaderDto
@ApiProperty()
@IsString()
uuid: string
@ApiProperty()
@IsString()
economic_code: string
@ApiProperty()
@IsString()
fiscal_id: string
}
export class NamaProviderRevokeResponseDto {
@ApiProperty()
@IsString()
uuid: string
@ApiProperty()
@IsString()
message: string
@ApiProperty()
@IsString()
status: NamaProviderResponseStatus
@ApiProperty()
@IsString()
tax_id: string
@ApiProperty()
@IsString()
inno: string
@ApiProperty({ required: true })
@IsString()
reference_number: string
@ApiProperty({ type: () => NamaProviderApiErrorResponseDto, required: false })
@IsOptional()
@ValidateNested()
@Type(() => NamaProviderApiErrorResponseDto)
tax_api_response?: NamaProviderApiErrorResponseDto
@ApiProperty({ required: false })
@IsOptional()
@IsString()
tsp_update_time: string
}