feat: implement tax switch functionality with Nama adapter
- 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.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { PartnerStatus } from '@/generated/prisma/enums'
|
||||
import { PartnerFiscalSwitchType, PartnerStatus } from '@/generated/prisma/enums'
|
||||
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
||||
import { IsEnum, IsNumber, IsOptional, IsString } from 'class-validator'
|
||||
|
||||
@@ -11,10 +11,14 @@ export class CreatePartnerDto {
|
||||
@ApiProperty({ required: true })
|
||||
code: string
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
@IsEnum(PartnerFiscalSwitchType)
|
||||
@ApiProperty({ required: true })
|
||||
license_quota?: number
|
||||
fiscal_switch_type: PartnerFiscalSwitchType
|
||||
|
||||
// @IsOptional()
|
||||
// @IsNumber()
|
||||
// @ApiProperty({ required: true })
|
||||
// license_quota?: number
|
||||
|
||||
@IsString()
|
||||
@ApiProperty({ required: true })
|
||||
|
||||
@@ -27,6 +27,7 @@ export class PartnersService {
|
||||
code: true,
|
||||
status: true,
|
||||
logo_url: true,
|
||||
fiscal_switch_type: true,
|
||||
created_at: true,
|
||||
license_charge_transactions: {
|
||||
select: {
|
||||
|
||||
Reference in New Issue
Block a user