feat: add response DTOs for various services across modules
- Created response DTOs for ConfigService, AppService, AuthService, CatalogsService, AccountsService, BusinessActivityComplexesService, ComplexPosesService, SalesInvoicesService, BusinessActivitiesService, ConsumerBusinessActivityGoodsService, and others. - Implemented Create, FindAll, FindOne, and Update response types for services in consumer, partners, and POS modules. - Added request DTOs for creating and updating goods in the consumer business activities module. - Introduced filtering DTO for partner licenses. - Enhanced response mapping for partner license activations.
This commit is contained in:
@@ -42,7 +42,7 @@ export class SalesInvoicesService {
|
||||
async create(data: CreateSalesInvoiceDto, posInfo: IPosPayload) {
|
||||
data.invoice_date = new Date(data.invoice_date).toISOString() as any
|
||||
|
||||
const { complex_id, pos_id, consumer_account_id } = posInfo
|
||||
const { business_id, pos_id, consumer_account_id } = posInfo
|
||||
|
||||
const salesInvoice = await this.prisma.$transaction(async $tx => {
|
||||
const payments = Object.entries(data.payments)
|
||||
@@ -71,8 +71,8 @@ export class SalesInvoicesService {
|
||||
const customer_individual = customer.customer_individual
|
||||
const customerIndividual = await $tx.customerIndividual.upsert({
|
||||
where: {
|
||||
complex_id_national_id: {
|
||||
complex_id,
|
||||
business_activity_id_national_id: {
|
||||
business_activity_id: business_id,
|
||||
national_id: customer_individual.national_id,
|
||||
},
|
||||
},
|
||||
@@ -83,9 +83,9 @@ export class SalesInvoicesService {
|
||||
type: CustomerType.INDIVIDUAL,
|
||||
},
|
||||
},
|
||||
complex: {
|
||||
business_activity: {
|
||||
connect: {
|
||||
id: complex_id,
|
||||
id: business_id,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -104,9 +104,9 @@ export class SalesInvoicesService {
|
||||
|
||||
const customerLegal = await $tx.customerLegal.upsert({
|
||||
where: {
|
||||
complex_id_registration_number: {
|
||||
complex_id,
|
||||
registration_number: customer_legal.registration_number,
|
||||
business_activity_id_economic_code: {
|
||||
business_activity_id: business_id,
|
||||
economic_code: customer_legal.economic_code,
|
||||
},
|
||||
},
|
||||
create: {
|
||||
@@ -116,9 +116,9 @@ export class SalesInvoicesService {
|
||||
type: CustomerType.LEGAL,
|
||||
},
|
||||
},
|
||||
complex: {
|
||||
business_activity: {
|
||||
connect: {
|
||||
id: complex_id,
|
||||
id: business_id,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user