feat: add DTOs and services for tax switch integration
- Created SendBulkSaleInvoicesDto for handling bulk sale invoice requests. - Implemented TaxSwitchSendPayloadDto and related DTOs for tax switch item payloads and results. - Developed SalesInvoiceTaxSwitchService to manage tax switch operations, including sending and retrieving tax information. - Added SalesInvoiceTaxService for handling sales invoice tax logic, including bulk sending and persistence of results. - Introduced NamaTaxSwitchAdapter to interact with the tax switch service, simulating external API responses. - Created SendBulkSalesInvoicesDto for POS module to handle bulk sales invoice requests.
This commit is contained in:
@@ -36,29 +36,29 @@ export type SalesInvoicePaymentSumAggregateOutputType = {
|
||||
|
||||
export type SalesInvoicePaymentMinAggregateOutputType = {
|
||||
id: string | null
|
||||
invoice_id: string | null
|
||||
amount: runtime.Decimal | null
|
||||
payment_method: $Enums.PaymentMethodType | null
|
||||
paid_at: Date | null
|
||||
created_at: Date | null
|
||||
invoice_id: string | null
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentMaxAggregateOutputType = {
|
||||
id: string | null
|
||||
invoice_id: string | null
|
||||
amount: runtime.Decimal | null
|
||||
payment_method: $Enums.PaymentMethodType | null
|
||||
paid_at: Date | null
|
||||
created_at: Date | null
|
||||
invoice_id: string | null
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentCountAggregateOutputType = {
|
||||
id: number
|
||||
invoice_id: number
|
||||
amount: number
|
||||
payment_method: number
|
||||
paid_at: number
|
||||
created_at: number
|
||||
invoice_id: number
|
||||
_all: number
|
||||
}
|
||||
|
||||
@@ -73,29 +73,29 @@ export type SalesInvoicePaymentSumAggregateInputType = {
|
||||
|
||||
export type SalesInvoicePaymentMinAggregateInputType = {
|
||||
id?: true
|
||||
invoice_id?: true
|
||||
amount?: true
|
||||
payment_method?: true
|
||||
paid_at?: true
|
||||
created_at?: true
|
||||
invoice_id?: true
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentMaxAggregateInputType = {
|
||||
id?: true
|
||||
invoice_id?: true
|
||||
amount?: true
|
||||
payment_method?: true
|
||||
paid_at?: true
|
||||
created_at?: true
|
||||
invoice_id?: true
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentCountAggregateInputType = {
|
||||
id?: true
|
||||
invoice_id?: true
|
||||
amount?: true
|
||||
payment_method?: true
|
||||
paid_at?: true
|
||||
created_at?: true
|
||||
invoice_id?: true
|
||||
_all?: true
|
||||
}
|
||||
|
||||
@@ -187,11 +187,11 @@ export type SalesInvoicePaymentGroupByArgs<ExtArgs extends runtime.Types.Extensi
|
||||
|
||||
export type SalesInvoicePaymentGroupByOutputType = {
|
||||
id: string
|
||||
invoice_id: string
|
||||
amount: runtime.Decimal
|
||||
payment_method: $Enums.PaymentMethodType
|
||||
paid_at: Date
|
||||
created_at: Date
|
||||
invoice_id: string
|
||||
_count: SalesInvoicePaymentCountAggregateOutputType | null
|
||||
_avg: SalesInvoicePaymentAvgAggregateOutputType | null
|
||||
_sum: SalesInvoicePaymentSumAggregateOutputType | null
|
||||
@@ -219,21 +219,21 @@ export type SalesInvoicePaymentWhereInput = {
|
||||
OR?: Prisma.SalesInvoicePaymentWhereInput[]
|
||||
NOT?: Prisma.SalesInvoicePaymentWhereInput | Prisma.SalesInvoicePaymentWhereInput[]
|
||||
id?: Prisma.StringFilter<"SalesInvoicePayment"> | string
|
||||
invoice_id?: Prisma.StringFilter<"SalesInvoicePayment"> | string
|
||||
amount?: Prisma.DecimalFilter<"SalesInvoicePayment"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
payment_method?: Prisma.EnumPaymentMethodTypeFilter<"SalesInvoicePayment"> | $Enums.PaymentMethodType
|
||||
paid_at?: Prisma.DateTimeFilter<"SalesInvoicePayment"> | Date | string
|
||||
created_at?: Prisma.DateTimeFilter<"SalesInvoicePayment"> | Date | string
|
||||
invoice_id?: Prisma.StringFilter<"SalesInvoicePayment"> | string
|
||||
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentOrderByWithRelationInput = {
|
||||
id?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
amount?: Prisma.SortOrder
|
||||
payment_method?: Prisma.SortOrder
|
||||
paid_at?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
invoice?: Prisma.SalesInvoiceOrderByWithRelationInput
|
||||
_relevance?: Prisma.SalesInvoicePaymentOrderByRelevanceInput
|
||||
}
|
||||
@@ -243,21 +243,21 @@ export type SalesInvoicePaymentWhereUniqueInput = Prisma.AtLeast<{
|
||||
AND?: Prisma.SalesInvoicePaymentWhereInput | Prisma.SalesInvoicePaymentWhereInput[]
|
||||
OR?: Prisma.SalesInvoicePaymentWhereInput[]
|
||||
NOT?: Prisma.SalesInvoicePaymentWhereInput | Prisma.SalesInvoicePaymentWhereInput[]
|
||||
invoice_id?: Prisma.StringFilter<"SalesInvoicePayment"> | string
|
||||
amount?: Prisma.DecimalFilter<"SalesInvoicePayment"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
payment_method?: Prisma.EnumPaymentMethodTypeFilter<"SalesInvoicePayment"> | $Enums.PaymentMethodType
|
||||
paid_at?: Prisma.DateTimeFilter<"SalesInvoicePayment"> | Date | string
|
||||
created_at?: Prisma.DateTimeFilter<"SalesInvoicePayment"> | Date | string
|
||||
invoice_id?: Prisma.StringFilter<"SalesInvoicePayment"> | string
|
||||
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
||||
}, "id">
|
||||
|
||||
export type SalesInvoicePaymentOrderByWithAggregationInput = {
|
||||
id?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
amount?: Prisma.SortOrder
|
||||
payment_method?: Prisma.SortOrder
|
||||
paid_at?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
_count?: Prisma.SalesInvoicePaymentCountOrderByAggregateInput
|
||||
_avg?: Prisma.SalesInvoicePaymentAvgOrderByAggregateInput
|
||||
_max?: Prisma.SalesInvoicePaymentMaxOrderByAggregateInput
|
||||
@@ -270,11 +270,11 @@ export type SalesInvoicePaymentScalarWhereWithAggregatesInput = {
|
||||
OR?: Prisma.SalesInvoicePaymentScalarWhereWithAggregatesInput[]
|
||||
NOT?: Prisma.SalesInvoicePaymentScalarWhereWithAggregatesInput | Prisma.SalesInvoicePaymentScalarWhereWithAggregatesInput[]
|
||||
id?: Prisma.StringWithAggregatesFilter<"SalesInvoicePayment"> | string
|
||||
invoice_id?: Prisma.StringWithAggregatesFilter<"SalesInvoicePayment"> | string
|
||||
amount?: Prisma.DecimalWithAggregatesFilter<"SalesInvoicePayment"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
payment_method?: Prisma.EnumPaymentMethodTypeWithAggregatesFilter<"SalesInvoicePayment"> | $Enums.PaymentMethodType
|
||||
paid_at?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoicePayment"> | Date | string
|
||||
created_at?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoicePayment"> | Date | string
|
||||
invoice_id?: Prisma.StringWithAggregatesFilter<"SalesInvoicePayment"> | string
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentCreateInput = {
|
||||
@@ -288,11 +288,11 @@ export type SalesInvoicePaymentCreateInput = {
|
||||
|
||||
export type SalesInvoicePaymentUncheckedCreateInput = {
|
||||
id?: string
|
||||
invoice_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 SalesInvoicePaymentUpdateInput = {
|
||||
@@ -306,20 +306,20 @@ export type SalesInvoicePaymentUpdateInput = {
|
||||
|
||||
export type SalesInvoicePaymentUncheckedUpdateInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
invoice_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 SalesInvoicePaymentCreateManyInput = {
|
||||
id?: string
|
||||
invoice_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 SalesInvoicePaymentUpdateManyMutationInput = {
|
||||
@@ -332,11 +332,11 @@ export type SalesInvoicePaymentUpdateManyMutationInput = {
|
||||
|
||||
export type SalesInvoicePaymentUncheckedUpdateManyInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
invoice_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 SalesInvoicePaymentListRelationFilter = {
|
||||
@@ -357,11 +357,11 @@ export type SalesInvoicePaymentOrderByRelevanceInput = {
|
||||
|
||||
export type SalesInvoicePaymentCountOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
amount?: Prisma.SortOrder
|
||||
payment_method?: Prisma.SortOrder
|
||||
paid_at?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentAvgOrderByAggregateInput = {
|
||||
@@ -370,20 +370,20 @@ export type SalesInvoicePaymentAvgOrderByAggregateInput = {
|
||||
|
||||
export type SalesInvoicePaymentMaxOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
amount?: Prisma.SortOrder
|
||||
payment_method?: Prisma.SortOrder
|
||||
paid_at?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentMinOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
amount?: Prisma.SortOrder
|
||||
payment_method?: Prisma.SortOrder
|
||||
paid_at?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentSumOrderByAggregateInput = {
|
||||
@@ -483,11 +483,11 @@ export type SalesInvoicePaymentScalarWhereInput = {
|
||||
OR?: Prisma.SalesInvoicePaymentScalarWhereInput[]
|
||||
NOT?: Prisma.SalesInvoicePaymentScalarWhereInput | Prisma.SalesInvoicePaymentScalarWhereInput[]
|
||||
id?: Prisma.StringFilter<"SalesInvoicePayment"> | string
|
||||
invoice_id?: Prisma.StringFilter<"SalesInvoicePayment"> | string
|
||||
amount?: Prisma.DecimalFilter<"SalesInvoicePayment"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
payment_method?: Prisma.EnumPaymentMethodTypeFilter<"SalesInvoicePayment"> | $Enums.PaymentMethodType
|
||||
paid_at?: Prisma.DateTimeFilter<"SalesInvoicePayment"> | Date | string
|
||||
created_at?: Prisma.DateTimeFilter<"SalesInvoicePayment"> | Date | string
|
||||
invoice_id?: Prisma.StringFilter<"SalesInvoicePayment"> | string
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentCreateManyInvoiceInput = {
|
||||
@@ -526,11 +526,11 @@ export type SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceInput = {
|
||||
|
||||
export type SalesInvoicePaymentSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
invoice_id?: boolean
|
||||
amount?: boolean
|
||||
payment_method?: boolean
|
||||
paid_at?: boolean
|
||||
created_at?: boolean
|
||||
invoice_id?: boolean
|
||||
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["salesInvoicePayment"]>
|
||||
|
||||
@@ -538,14 +538,14 @@ export type SalesInvoicePaymentSelect<ExtArgs extends runtime.Types.Extensions.I
|
||||
|
||||
export type SalesInvoicePaymentSelectScalar = {
|
||||
id?: boolean
|
||||
invoice_id?: boolean
|
||||
amount?: boolean
|
||||
payment_method?: boolean
|
||||
paid_at?: boolean
|
||||
created_at?: boolean
|
||||
invoice_id?: boolean
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "invoice_id" | "amount" | "payment_method" | "paid_at" | "created_at", ExtArgs["result"]["salesInvoicePayment"]>
|
||||
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>
|
||||
}
|
||||
@@ -557,11 +557,11 @@ export type $SalesInvoicePaymentPayload<ExtArgs extends runtime.Types.Extensions
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
invoice_id: string
|
||||
amount: runtime.Decimal
|
||||
payment_method: $Enums.PaymentMethodType
|
||||
paid_at: Date
|
||||
created_at: Date
|
||||
invoice_id: string
|
||||
}, ExtArgs["result"]["salesInvoicePayment"]>
|
||||
composites: {}
|
||||
}
|
||||
@@ -933,11 +933,11 @@ export interface Prisma__SalesInvoicePaymentClient<T, Null = never, ExtArgs exte
|
||||
*/
|
||||
export interface SalesInvoicePaymentFieldRefs {
|
||||
readonly id: Prisma.FieldRef<"SalesInvoicePayment", 'String'>
|
||||
readonly invoice_id: Prisma.FieldRef<"SalesInvoicePayment", 'String'>
|
||||
readonly amount: Prisma.FieldRef<"SalesInvoicePayment", 'Decimal'>
|
||||
readonly payment_method: Prisma.FieldRef<"SalesInvoicePayment", 'PaymentMethodType'>
|
||||
readonly paid_at: Prisma.FieldRef<"SalesInvoicePayment", 'DateTime'>
|
||||
readonly created_at: Prisma.FieldRef<"SalesInvoicePayment", 'DateTime'>
|
||||
readonly invoice_id: Prisma.FieldRef<"SalesInvoicePayment", 'String'>
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user