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,3 +1,4 @@
|
||||
import { translateEnumValue } from '@/common/utils'
|
||||
import { PasswordUtil } from '@/common/utils/password.util'
|
||||
import { AccountStatus, AccountType } from '@/generated/prisma/enums'
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
@@ -16,6 +17,22 @@ export class AccountsService {
|
||||
id: true,
|
||||
role: true,
|
||||
created_at: true,
|
||||
pos: {
|
||||
select: {
|
||||
id: true,
|
||||
name: true,
|
||||
complex: {
|
||||
select: {
|
||||
name: true,
|
||||
business_activity: {
|
||||
select: {
|
||||
name: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
account: {
|
||||
select: {
|
||||
username: true,
|
||||
@@ -24,7 +41,15 @@ export class AccountsService {
|
||||
},
|
||||
},
|
||||
})
|
||||
return ResponseMapper.list(accounts)
|
||||
|
||||
const mappedAccounts = accounts.map(account => {
|
||||
return {
|
||||
...account,
|
||||
role: translateEnumValue('ConsumerRole', account.role),
|
||||
status: translateEnumValue('AccountStatus', account.account.status),
|
||||
}
|
||||
})
|
||||
return ResponseMapper.list(mappedAccounts)
|
||||
}
|
||||
|
||||
async findOne(id: string) {
|
||||
|
||||
@@ -17,6 +17,9 @@ export class BusinessActivitiesService {
|
||||
},
|
||||
id: true,
|
||||
name: true,
|
||||
economic_code: true,
|
||||
fiscal_id: true,
|
||||
partner_token: true,
|
||||
created_at: true,
|
||||
} as BusinessActivitySelect
|
||||
|
||||
|
||||
Reference in New Issue
Block a user