feat: add DTOs and services for tax switch integration

- Created SendBulkSaleInvoicesDto for handling bulk sale invoice requests.
- Implemented TaxSwitchSendPayloadDto and related DTOs for tax switch item payloads and results.
- Developed SalesInvoiceTaxSwitchService to manage tax switch operations, including sending and retrieving tax information.
- Added SalesInvoiceTaxService for handling sales invoice tax logic, including bulk sending and persistence of results.
- Introduced NamaTaxSwitchAdapter to interact with the tax switch service, simulating external API responses.
- Created SendBulkSalesInvoicesDto for POS module to handle bulk sales invoice requests.
This commit is contained in:
2026-04-27 22:11:05 +03:30
parent dee96b6e91
commit 58a7c359d8
68 changed files with 7896 additions and 3534 deletions
@@ -31,9 +31,10 @@ export class PartnerConsumersService {
defaultSelect: ConsumerSelect = {
id: true,
...QUERY_CONSTANTS.CONSUMER.infoSelect,
status: true,
created_at: true,
...QUERY_CONSTANTS.CONSUMER.infoSelect,
...QUERY_CONSTANTS.CONSUMER.activeBusinessCount,
}
private defaultWhere = (partner_id: string): ConsumerWhereInput => ({
@@ -119,8 +120,7 @@ export class PartnerConsumersService {
throw new BadRequestException(`تعداد لایسنس‌های فعلی شما به پایان رسیده است.`)
}
const { username, password, customer, ...rest } = data
const { individual, legal } = customer
const { username, password, individual, legal, ...rest } = data
const createConsumerData: ConsumerCreateInput = {
...rest,
@@ -228,7 +228,15 @@ export class PartnerConsumersService {
...(this.defaultWhere(partner_id) as any),
id,
},
data,
data: {
status: data.status,
legal: {
update: data.legal,
},
individual: {
update: data.individual,
},
},
})
}
}