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:
@@ -225,6 +225,7 @@ export type SalesInvoicePaymentWhereInput = {
|
||||
created_at?: Prisma.DateTimeFilter<"SalesInvoicePayment"> | Date | string
|
||||
invoice_id?: Prisma.StringFilter<"SalesInvoicePayment"> | string
|
||||
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
||||
terminal_info?: Prisma.XOR<Prisma.SalesInvoicePaymentTerminalInfoNullableScalarRelationFilter, Prisma.SalesInvoicePaymentTerminalInfoWhereInput> | null
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentOrderByWithRelationInput = {
|
||||
@@ -235,6 +236,7 @@ export type SalesInvoicePaymentOrderByWithRelationInput = {
|
||||
created_at?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
invoice?: Prisma.SalesInvoiceOrderByWithRelationInput
|
||||
terminal_info?: Prisma.SalesInvoicePaymentTerminalInfoOrderByWithRelationInput
|
||||
_relevance?: Prisma.SalesInvoicePaymentOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -249,6 +251,7 @@ export type SalesInvoicePaymentWhereUniqueInput = Prisma.AtLeast<{
|
||||
created_at?: Prisma.DateTimeFilter<"SalesInvoicePayment"> | Date | string
|
||||
invoice_id?: Prisma.StringFilter<"SalesInvoicePayment"> | string
|
||||
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
||||
terminal_info?: Prisma.XOR<Prisma.SalesInvoicePaymentTerminalInfoNullableScalarRelationFilter, Prisma.SalesInvoicePaymentTerminalInfoWhereInput> | null
|
||||
}, "id">
|
||||
|
||||
export type SalesInvoicePaymentOrderByWithAggregationInput = {
|
||||
@@ -284,6 +287,7 @@ export type SalesInvoicePaymentCreateInput = {
|
||||
paid_at: Date | string
|
||||
created_at?: Date | string
|
||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutPaymentsInput
|
||||
terminal_info?: Prisma.SalesInvoicePaymentTerminalInfoCreateNestedOneWithoutPaymentInput
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentUncheckedCreateInput = {
|
||||
@@ -293,6 +297,7 @@ export type SalesInvoicePaymentUncheckedCreateInput = {
|
||||
paid_at: Date | string
|
||||
created_at?: Date | string
|
||||
invoice_id: string
|
||||
terminal_info?: Prisma.SalesInvoicePaymentTerminalInfoUncheckedCreateNestedOneWithoutPaymentInput
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentUpdateInput = {
|
||||
@@ -302,6 +307,7 @@ export type SalesInvoicePaymentUpdateInput = {
|
||||
paid_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutPaymentsNestedInput
|
||||
terminal_info?: Prisma.SalesInvoicePaymentTerminalInfoUpdateOneWithoutPaymentNestedInput
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentUncheckedUpdateInput = {
|
||||
@@ -311,6 +317,7 @@ export type SalesInvoicePaymentUncheckedUpdateInput = {
|
||||
paid_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
terminal_info?: Prisma.SalesInvoicePaymentTerminalInfoUncheckedUpdateOneWithoutPaymentNestedInput
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentCreateManyInput = {
|
||||
@@ -390,6 +397,11 @@ export type SalesInvoicePaymentSumOrderByAggregateInput = {
|
||||
amount?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentScalarRelationFilter = {
|
||||
is?: Prisma.SalesInvoicePaymentWhereInput
|
||||
isNot?: Prisma.SalesInvoicePaymentWhereInput
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoicePaymentCreateWithoutInvoiceInput, Prisma.SalesInvoicePaymentUncheckedCreateWithoutInvoiceInput> | Prisma.SalesInvoicePaymentCreateWithoutInvoiceInput[] | Prisma.SalesInvoicePaymentUncheckedCreateWithoutInvoiceInput[]
|
||||
connectOrCreate?: Prisma.SalesInvoicePaymentCreateOrConnectWithoutInvoiceInput | Prisma.SalesInvoicePaymentCreateOrConnectWithoutInvoiceInput[]
|
||||
@@ -436,12 +448,27 @@ export type EnumPaymentMethodTypeFieldUpdateOperationsInput = {
|
||||
set?: $Enums.PaymentMethodType
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentCreateNestedOneWithoutTerminal_infoInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoicePaymentCreateWithoutTerminal_infoInput, Prisma.SalesInvoicePaymentUncheckedCreateWithoutTerminal_infoInput>
|
||||
connectOrCreate?: Prisma.SalesInvoicePaymentCreateOrConnectWithoutTerminal_infoInput
|
||||
connect?: Prisma.SalesInvoicePaymentWhereUniqueInput
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentUpdateOneRequiredWithoutTerminal_infoNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoicePaymentCreateWithoutTerminal_infoInput, Prisma.SalesInvoicePaymentUncheckedCreateWithoutTerminal_infoInput>
|
||||
connectOrCreate?: Prisma.SalesInvoicePaymentCreateOrConnectWithoutTerminal_infoInput
|
||||
upsert?: Prisma.SalesInvoicePaymentUpsertWithoutTerminal_infoInput
|
||||
connect?: Prisma.SalesInvoicePaymentWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.SalesInvoicePaymentUpdateToOneWithWhereWithoutTerminal_infoInput, Prisma.SalesInvoicePaymentUpdateWithoutTerminal_infoInput>, Prisma.SalesInvoicePaymentUncheckedUpdateWithoutTerminal_infoInput>
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentCreateWithoutInvoiceInput = {
|
||||
id?: string
|
||||
amount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
payment_method: $Enums.PaymentMethodType
|
||||
paid_at: Date | string
|
||||
created_at?: Date | string
|
||||
terminal_info?: Prisma.SalesInvoicePaymentTerminalInfoCreateNestedOneWithoutPaymentInput
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentUncheckedCreateWithoutInvoiceInput = {
|
||||
@@ -450,6 +477,7 @@ export type SalesInvoicePaymentUncheckedCreateWithoutInvoiceInput = {
|
||||
payment_method: $Enums.PaymentMethodType
|
||||
paid_at: Date | string
|
||||
created_at?: Date | string
|
||||
terminal_info?: Prisma.SalesInvoicePaymentTerminalInfoUncheckedCreateNestedOneWithoutPaymentInput
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentCreateOrConnectWithoutInvoiceInput = {
|
||||
@@ -490,6 +518,58 @@ export type SalesInvoicePaymentScalarWhereInput = {
|
||||
invoice_id?: Prisma.StringFilter<"SalesInvoicePayment"> | string
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentCreateWithoutTerminal_infoInput = {
|
||||
id?: string
|
||||
amount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
payment_method: $Enums.PaymentMethodType
|
||||
paid_at: Date | string
|
||||
created_at?: Date | string
|
||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutPaymentsInput
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentUncheckedCreateWithoutTerminal_infoInput = {
|
||||
id?: string
|
||||
amount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
payment_method: $Enums.PaymentMethodType
|
||||
paid_at: Date | string
|
||||
created_at?: Date | string
|
||||
invoice_id: string
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentCreateOrConnectWithoutTerminal_infoInput = {
|
||||
where: Prisma.SalesInvoicePaymentWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.SalesInvoicePaymentCreateWithoutTerminal_infoInput, Prisma.SalesInvoicePaymentUncheckedCreateWithoutTerminal_infoInput>
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentUpsertWithoutTerminal_infoInput = {
|
||||
update: Prisma.XOR<Prisma.SalesInvoicePaymentUpdateWithoutTerminal_infoInput, Prisma.SalesInvoicePaymentUncheckedUpdateWithoutTerminal_infoInput>
|
||||
create: Prisma.XOR<Prisma.SalesInvoicePaymentCreateWithoutTerminal_infoInput, Prisma.SalesInvoicePaymentUncheckedCreateWithoutTerminal_infoInput>
|
||||
where?: Prisma.SalesInvoicePaymentWhereInput
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentUpdateToOneWithWhereWithoutTerminal_infoInput = {
|
||||
where?: Prisma.SalesInvoicePaymentWhereInput
|
||||
data: Prisma.XOR<Prisma.SalesInvoicePaymentUpdateWithoutTerminal_infoInput, Prisma.SalesInvoicePaymentUncheckedUpdateWithoutTerminal_infoInput>
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentUpdateWithoutTerminal_infoInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
payment_method?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
|
||||
paid_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutPaymentsNestedInput
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentUncheckedUpdateWithoutTerminal_infoInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
payment_method?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
|
||||
paid_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentCreateManyInvoiceInput = {
|
||||
id?: string
|
||||
amount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
@@ -504,6 +584,7 @@ export type SalesInvoicePaymentUpdateWithoutInvoiceInput = {
|
||||
payment_method?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
|
||||
paid_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
terminal_info?: Prisma.SalesInvoicePaymentTerminalInfoUpdateOneWithoutPaymentNestedInput
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentUncheckedUpdateWithoutInvoiceInput = {
|
||||
@@ -512,6 +593,7 @@ export type SalesInvoicePaymentUncheckedUpdateWithoutInvoiceInput = {
|
||||
payment_method?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
|
||||
paid_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
terminal_info?: Prisma.SalesInvoicePaymentTerminalInfoUncheckedUpdateOneWithoutPaymentNestedInput
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceInput = {
|
||||
@@ -532,6 +614,7 @@ export type SalesInvoicePaymentSelect<ExtArgs extends runtime.Types.Extensions.I
|
||||
created_at?: boolean
|
||||
invoice_id?: boolean
|
||||
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
||||
terminal_info?: boolean | Prisma.SalesInvoicePayment$terminal_infoArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["salesInvoicePayment"]>
|
||||
|
||||
|
||||
@@ -548,12 +631,14 @@ export type SalesInvoicePaymentSelectScalar = {
|
||||
export type SalesInvoicePaymentOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "amount" | "payment_method" | "paid_at" | "created_at" | "invoice_id", ExtArgs["result"]["salesInvoicePayment"]>
|
||||
export type SalesInvoicePaymentInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
||||
terminal_info?: boolean | Prisma.SalesInvoicePayment$terminal_infoArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $SalesInvoicePaymentPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "SalesInvoicePayment"
|
||||
objects: {
|
||||
invoice: Prisma.$SalesInvoicePayload<ExtArgs>
|
||||
terminal_info: Prisma.$SalesInvoicePaymentTerminalInfoPayload<ExtArgs> | null
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -903,6 +988,7 @@ readonly fields: SalesInvoicePaymentFieldRefs;
|
||||
export interface Prisma__SalesInvoicePaymentClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
invoice<T extends Prisma.SalesInvoiceDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoiceDefaultArgs<ExtArgs>>): Prisma.Prisma__SalesInvoiceClient<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
terminal_info<T extends Prisma.SalesInvoicePayment$terminal_infoArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoicePayment$terminal_infoArgs<ExtArgs>>): Prisma.Prisma__SalesInvoicePaymentTerminalInfoClient<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePaymentTerminalInfoPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -1285,6 +1371,25 @@ export type SalesInvoicePaymentDeleteManyArgs<ExtArgs extends runtime.Types.Exte
|
||||
limit?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* SalesInvoicePayment.terminal_info
|
||||
*/
|
||||
export type SalesInvoicePayment$terminal_infoArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the SalesInvoicePaymentTerminalInfo
|
||||
*/
|
||||
select?: Prisma.SalesInvoicePaymentTerminalInfoSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the SalesInvoicePaymentTerminalInfo
|
||||
*/
|
||||
omit?: Prisma.SalesInvoicePaymentTerminalInfoOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.SalesInvoicePaymentTerminalInfoInclude<ExtArgs> | null
|
||||
where?: Prisma.SalesInvoicePaymentTerminalInfoWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* SalesInvoicePayment without action
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user