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:
@@ -3,6 +3,7 @@ import { PrismaMariaDb } from '@prisma/adapter-mariadb'
|
||||
import 'dotenv/config'
|
||||
import { env } from 'prisma/config'
|
||||
import { PrismaClient } from '../generated/prisma/client'
|
||||
import { getPrismaOptions } from './prisma-config.service'
|
||||
|
||||
@Injectable()
|
||||
export class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy {
|
||||
@@ -13,9 +14,11 @@ export class PrismaService extends PrismaClient implements OnModuleInit, OnModul
|
||||
password: env('DATABASE_PASSWORD'),
|
||||
database: env('DATABASE_NAME'),
|
||||
port: env('DATABASE_PORT') ? Number(env('DATABASE_PORT')) : 3306,
|
||||
connectionLimit: 5,
|
||||
connectionLimit: 50,
|
||||
})
|
||||
super({ adapter })
|
||||
|
||||
const prismaOptions = getPrismaOptions()
|
||||
super({ ...prismaOptions, adapter })
|
||||
}
|
||||
|
||||
async onModuleInit() {
|
||||
|
||||
Reference in New Issue
Block a user