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:
@@ -426,6 +426,7 @@ export const ModelName = {
|
||||
SaleInvoiceFiscals: 'SaleInvoiceFiscals',
|
||||
SaleInvoiceFiscalAttempts: 'SaleInvoiceFiscalAttempts',
|
||||
SalesInvoicePayment: 'SalesInvoicePayment',
|
||||
SalesInvoicePaymentTerminalInfo: 'SalesInvoicePaymentTerminalInfo',
|
||||
Service: 'Service',
|
||||
ServiceCategory: 'ServiceCategory'
|
||||
} as const
|
||||
@@ -443,7 +444,7 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
omit: GlobalOmitOptions
|
||||
}
|
||||
meta: {
|
||||
modelProps: "adminAccount" | "admin" | "account" | "deviceBrand" | "device" | "licenseChargeTransaction" | "license" | "licenseActivation" | "licenseRenewChargeTransaction" | "licenseRenew" | "partnerAccountQuotaChargeTransaction" | "partnerAccountQuotaCredit" | "licenseAccountAllocation" | "partnerAccount" | "partner" | "permissionConsumer" | "permissionPos" | "permissionComplex" | "permissionBusiness" | "providerAccount" | "provider" | "consumerDevices" | "applicationReleasedInfo" | "consumerAccount" | "consumer" | "consumerIndividual" | "consumerLegal" | "businessActivity" | "complex" | "pos" | "triggerLog" | "customer" | "customerIndividual" | "customerLegal" | "good" | "goodCategory" | "guild" | "salesInvoice" | "salesInvoiceItem" | "saleInvoiceFiscals" | "saleInvoiceFiscalAttempts" | "salesInvoicePayment" | "service" | "serviceCategory"
|
||||
modelProps: "adminAccount" | "admin" | "account" | "deviceBrand" | "device" | "licenseChargeTransaction" | "license" | "licenseActivation" | "licenseRenewChargeTransaction" | "licenseRenew" | "partnerAccountQuotaChargeTransaction" | "partnerAccountQuotaCredit" | "licenseAccountAllocation" | "partnerAccount" | "partner" | "permissionConsumer" | "permissionPos" | "permissionComplex" | "permissionBusiness" | "providerAccount" | "provider" | "consumerDevices" | "applicationReleasedInfo" | "consumerAccount" | "consumer" | "consumerIndividual" | "consumerLegal" | "businessActivity" | "complex" | "pos" | "triggerLog" | "customer" | "customerIndividual" | "customerLegal" | "good" | "goodCategory" | "guild" | "salesInvoice" | "salesInvoiceItem" | "saleInvoiceFiscals" | "saleInvoiceFiscalAttempts" | "salesInvoicePayment" | "salesInvoicePaymentTerminalInfo" | "service" | "serviceCategory"
|
||||
txIsolationLevel: TransactionIsolationLevel
|
||||
}
|
||||
model: {
|
||||
@@ -3219,6 +3220,72 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
}
|
||||
}
|
||||
}
|
||||
SalesInvoicePaymentTerminalInfo: {
|
||||
payload: Prisma.$SalesInvoicePaymentTerminalInfoPayload<ExtArgs>
|
||||
fields: Prisma.SalesInvoicePaymentTerminalInfoFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.SalesInvoicePaymentTerminalInfoFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SalesInvoicePaymentTerminalInfoPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.SalesInvoicePaymentTerminalInfoFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SalesInvoicePaymentTerminalInfoPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.SalesInvoicePaymentTerminalInfoFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SalesInvoicePaymentTerminalInfoPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.SalesInvoicePaymentTerminalInfoFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SalesInvoicePaymentTerminalInfoPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.SalesInvoicePaymentTerminalInfoFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SalesInvoicePaymentTerminalInfoPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.SalesInvoicePaymentTerminalInfoCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SalesInvoicePaymentTerminalInfoPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.SalesInvoicePaymentTerminalInfoCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.SalesInvoicePaymentTerminalInfoDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SalesInvoicePaymentTerminalInfoPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.SalesInvoicePaymentTerminalInfoUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SalesInvoicePaymentTerminalInfoPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.SalesInvoicePaymentTerminalInfoDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.SalesInvoicePaymentTerminalInfoUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.SalesInvoicePaymentTerminalInfoUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SalesInvoicePaymentTerminalInfoPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.SalesInvoicePaymentTerminalInfoAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateSalesInvoicePaymentTerminalInfo>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.SalesInvoicePaymentTerminalInfoGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.SalesInvoicePaymentTerminalInfoGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.SalesInvoicePaymentTerminalInfoCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.SalesInvoicePaymentTerminalInfoCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
Service: {
|
||||
payload: Prisma.$ServicePayload<ExtArgs>
|
||||
fields: Prisma.ServiceFieldRefs
|
||||
@@ -3561,6 +3628,7 @@ export const PartnerScalarFieldEnum = {
|
||||
name: 'name',
|
||||
code: 'code',
|
||||
status: 'status',
|
||||
fiscal_switch_type: 'fiscal_switch_type',
|
||||
logo_url: 'logo_url',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at'
|
||||
@@ -3940,6 +4008,21 @@ export const SalesInvoicePaymentScalarFieldEnum = {
|
||||
export type SalesInvoicePaymentScalarFieldEnum = (typeof SalesInvoicePaymentScalarFieldEnum)[keyof typeof SalesInvoicePaymentScalarFieldEnum]
|
||||
|
||||
|
||||
export const SalesInvoicePaymentTerminalInfoScalarFieldEnum = {
|
||||
id: 'id',
|
||||
terminal_id: 'terminal_id',
|
||||
stan: 'stan',
|
||||
rrn: 'rrn',
|
||||
transaction_date_time: 'transaction_date_time',
|
||||
customer_card_no: 'customer_card_no',
|
||||
description: 'description',
|
||||
created_at: 'created_at',
|
||||
payment_id: 'payment_id'
|
||||
} as const
|
||||
|
||||
export type SalesInvoicePaymentTerminalInfoScalarFieldEnum = (typeof SalesInvoicePaymentTerminalInfoScalarFieldEnum)[keyof typeof SalesInvoicePaymentTerminalInfoScalarFieldEnum]
|
||||
|
||||
|
||||
export const ServiceScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
@@ -4437,6 +4520,19 @@ export const SalesInvoicePaymentOrderByRelevanceFieldEnum = {
|
||||
export type SalesInvoicePaymentOrderByRelevanceFieldEnum = (typeof SalesInvoicePaymentOrderByRelevanceFieldEnum)[keyof typeof SalesInvoicePaymentOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const SalesInvoicePaymentTerminalInfoOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
terminal_id: 'terminal_id',
|
||||
stan: 'stan',
|
||||
rrn: 'rrn',
|
||||
customer_card_no: 'customer_card_no',
|
||||
description: 'description',
|
||||
payment_id: 'payment_id'
|
||||
} as const
|
||||
|
||||
export type SalesInvoicePaymentTerminalInfoOrderByRelevanceFieldEnum = (typeof SalesInvoicePaymentTerminalInfoOrderByRelevanceFieldEnum)[keyof typeof SalesInvoicePaymentTerminalInfoOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const ServiceOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
@@ -4519,6 +4615,13 @@ export type EnumPartnerStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$Pr
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'PartnerFiscalSwitchType'
|
||||
*/
|
||||
export type EnumPartnerFiscalSwitchTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PartnerFiscalSwitchType'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'POSRole'
|
||||
*/
|
||||
@@ -4802,6 +4905,7 @@ export type GlobalOmitConfig = {
|
||||
saleInvoiceFiscals?: Prisma.SaleInvoiceFiscalsOmit
|
||||
saleInvoiceFiscalAttempts?: Prisma.SaleInvoiceFiscalAttemptsOmit
|
||||
salesInvoicePayment?: Prisma.SalesInvoicePaymentOmit
|
||||
salesInvoicePaymentTerminalInfo?: Prisma.SalesInvoicePaymentTerminalInfoOmit
|
||||
service?: Prisma.ServiceOmit
|
||||
serviceCategory?: Prisma.ServiceCategoryOmit
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user