a68a7f594d
- Add DTOs for tax switch operations including payloads and results. - Create SalesInvoiceFiscalSwitchService to handle sending and retrieving tax data. - Implement SalesInvoiceFiscalService for managing invoice tax submissions and results persistence. - Develop NamaTaxSwitchAdapter for interfacing with the external tax service. - Introduce NamaTaxRequestDto and related classes for structured tax requests.
50 lines
1.1 KiB
TypeScript
50 lines
1.1 KiB
TypeScript
import { PartnerFiscalSwitchType, PartnerStatus } from '@/generated/prisma/enums'
|
|
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
|
import { IsEnum, IsNumber, IsOptional, IsString } from 'class-validator'
|
|
|
|
export class CreatePartnerDto {
|
|
@IsString()
|
|
@ApiProperty({ required: true })
|
|
name: string
|
|
|
|
@IsString()
|
|
@ApiProperty({ required: true })
|
|
code: string
|
|
|
|
@IsEnum(PartnerFiscalSwitchType)
|
|
@ApiProperty({ required: true })
|
|
fiscal_switch_type: PartnerFiscalSwitchType
|
|
|
|
// @IsOptional()
|
|
// @IsNumber()
|
|
// @ApiProperty({ required: true })
|
|
// license_quota?: number
|
|
|
|
@IsString()
|
|
@ApiProperty({ required: true })
|
|
username: string
|
|
|
|
@IsString()
|
|
@ApiProperty({ required: true })
|
|
password: string
|
|
|
|
@IsOptional()
|
|
@ApiProperty({ required: false, type: 'string', format: 'binary' })
|
|
logo?: any
|
|
}
|
|
|
|
export class UpdatePartnerDto extends PartialType(CreatePartnerDto) {
|
|
@IsEnum(PartnerStatus)
|
|
@ApiProperty({ enum: PartnerStatus })
|
|
status: PartnerStatus
|
|
}
|
|
|
|
export class LicenseChargeDto {
|
|
@IsNumber()
|
|
@ApiProperty({
|
|
required: true,
|
|
minimum: 0,
|
|
})
|
|
count: number
|
|
}
|