refactor: remove SalesInvoiceItemsService and update sales invoice handling
- Deleted SalesInvoiceItemsService as it was not implemented. - Changed variable declaration from `const` to `let` in SalesInvoicesService for sales invoice creation. - Updated response handling after sending to TSP provider in SalesInvoicesService. - Renamed payload properties in TspProvider DTOs for clarity. - Enhanced error handling in SalesInvoiceTspSwitchService for unsupported providers. - Refactored SalesInvoiceTspService to utilize utility functions for payload building and sending. - Updated PrismaService to increase connection limit and utilize dynamic options. - Added new migration scripts to update database schema for sale_invoice_tsp_attempts. - Introduced utility functions for building payloads and handling responses in sales invoice processing.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { QUERY_CONSTANTS } from '@/common/queryConstants'
|
||||
import { SalesInvoiceCreateInput } from '@/generated/prisma/models'
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { BadRequestException, Injectable } from '@nestjs/common'
|
||||
@@ -84,6 +85,7 @@ export class SharedSaleInvoiceCreateService {
|
||||
|
||||
const salesInvoice = await $tx.salesInvoice.create({
|
||||
data: salesInvoiceData,
|
||||
select: { ...QUERY_CONSTANTS.SALE_INVOICE.select },
|
||||
})
|
||||
|
||||
await this.createPayments(
|
||||
|
||||
Reference in New Issue
Block a user