feat(statistics): implement top alert stocks, top last sales, top supplier debts, and top selling products endpoints with SQL queries

This commit is contained in:
2026-01-04 13:45:26 +03:30
parent eb6e0e7a0d
commit a2db2daa70
72 changed files with 11934 additions and 2559 deletions
+153 -29
View File
@@ -252,9 +252,10 @@ export type SalesInvoiceWhereInput = {
updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null
posAccountId?: Prisma.IntFilter<"SalesInvoice"> | number
items?: Prisma.SalesInvoiceItemListRelationFilter
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
posAccount?: Prisma.XOR<Prisma.PosAccountScalarRelationFilter, Prisma.PosAccountWhereInput>
items?: Prisma.SalesInvoiceItemListRelationFilter
salesInvoicePayments?: Prisma.SalesInvoicePaymentListRelationFilter
}
export type SalesInvoiceOrderByWithRelationInput = {
@@ -266,9 +267,10 @@ export type SalesInvoiceOrderByWithRelationInput = {
updatedAt?: Prisma.SortOrder
customerId?: Prisma.SortOrderInput | Prisma.SortOrder
posAccountId?: Prisma.SortOrder
items?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput
customer?: Prisma.CustomerOrderByWithRelationInput
posAccount?: Prisma.PosAccountOrderByWithRelationInput
items?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput
salesInvoicePayments?: Prisma.SalesInvoicePaymentOrderByRelationAggregateInput
_relevance?: Prisma.SalesInvoiceOrderByRelevanceInput
}
@@ -284,9 +286,10 @@ export type SalesInvoiceWhereUniqueInput = Prisma.AtLeast<{
updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null
posAccountId?: Prisma.IntFilter<"SalesInvoice"> | number
items?: Prisma.SalesInvoiceItemListRelationFilter
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
posAccount?: Prisma.XOR<Prisma.PosAccountScalarRelationFilter, Prisma.PosAccountWhereInput>
items?: Prisma.SalesInvoiceItemListRelationFilter
salesInvoicePayments?: Prisma.SalesInvoicePaymentListRelationFilter
}, "id" | "code">
export type SalesInvoiceOrderByWithAggregationInput = {
@@ -325,9 +328,10 @@ export type SalesInvoiceCreateInput = {
description?: string | null
createdAt?: Date | string
updatedAt?: Date | string
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
salesInvoicePayments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
}
export type SalesInvoiceUncheckedCreateInput = {
@@ -340,6 +344,7 @@ export type SalesInvoiceUncheckedCreateInput = {
customerId?: number | null
posAccountId: number
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
}
export type SalesInvoiceUpdateInput = {
@@ -348,9 +353,10 @@ export type SalesInvoiceUpdateInput = {
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
salesInvoicePayments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
}
export type SalesInvoiceUncheckedUpdateInput = {
@@ -363,6 +369,7 @@ export type SalesInvoiceUncheckedUpdateInput = {
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
}
export type SalesInvoiceCreateManyInput = {
@@ -547,14 +554,6 @@ export type SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput = {
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
}
export type NullableIntFieldUpdateOperationsInput = {
set?: number | null
increment?: number
decrement?: number
multiply?: number
divide?: number
}
export type SalesInvoiceCreateNestedOneWithoutItemsInput = {
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutItemsInput, Prisma.SalesInvoiceUncheckedCreateWithoutItemsInput>
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutItemsInput
@@ -569,14 +568,29 @@ export type SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput = {
update?: Prisma.XOR<Prisma.XOR<Prisma.SalesInvoiceUpdateToOneWithWhereWithoutItemsInput, Prisma.SalesInvoiceUpdateWithoutItemsInput>, Prisma.SalesInvoiceUncheckedUpdateWithoutItemsInput>
}
export type SalesInvoiceCreateNestedOneWithoutSalesInvoicePaymentsInput = {
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutSalesInvoicePaymentsInput, Prisma.SalesInvoiceUncheckedCreateWithoutSalesInvoicePaymentsInput>
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutSalesInvoicePaymentsInput
connect?: Prisma.SalesInvoiceWhereUniqueInput
}
export type SalesInvoiceUpdateOneRequiredWithoutSalesInvoicePaymentsNestedInput = {
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutSalesInvoicePaymentsInput, Prisma.SalesInvoiceUncheckedCreateWithoutSalesInvoicePaymentsInput>
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutSalesInvoicePaymentsInput
upsert?: Prisma.SalesInvoiceUpsertWithoutSalesInvoicePaymentsInput
connect?: Prisma.SalesInvoiceWhereUniqueInput
update?: Prisma.XOR<Prisma.XOR<Prisma.SalesInvoiceUpdateToOneWithWhereWithoutSalesInvoicePaymentsInput, Prisma.SalesInvoiceUpdateWithoutSalesInvoicePaymentsInput>, Prisma.SalesInvoiceUncheckedUpdateWithoutSalesInvoicePaymentsInput>
}
export type SalesInvoiceCreateWithoutPosAccountInput = {
code: string
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
description?: string | null
createdAt?: Date | string
updatedAt?: Date | string
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
salesInvoicePayments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
}
export type SalesInvoiceUncheckedCreateWithoutPosAccountInput = {
@@ -588,6 +602,7 @@ export type SalesInvoiceUncheckedCreateWithoutPosAccountInput = {
updatedAt?: Date | string
customerId?: number | null
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
}
export type SalesInvoiceCreateOrConnectWithoutPosAccountInput = {
@@ -636,8 +651,9 @@ export type SalesInvoiceCreateWithoutCustomerInput = {
description?: string | null
createdAt?: Date | string
updatedAt?: Date | string
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
salesInvoicePayments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
}
export type SalesInvoiceUncheckedCreateWithoutCustomerInput = {
@@ -649,6 +665,7 @@ export type SalesInvoiceUncheckedCreateWithoutCustomerInput = {
updatedAt?: Date | string
posAccountId: number
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
}
export type SalesInvoiceCreateOrConnectWithoutCustomerInput = {
@@ -685,6 +702,7 @@ export type SalesInvoiceCreateWithoutItemsInput = {
updatedAt?: Date | string
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
salesInvoicePayments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
}
export type SalesInvoiceUncheckedCreateWithoutItemsInput = {
@@ -696,6 +714,7 @@ export type SalesInvoiceUncheckedCreateWithoutItemsInput = {
updatedAt?: Date | string
customerId?: number | null
posAccountId: number
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
}
export type SalesInvoiceCreateOrConnectWithoutItemsInput = {
@@ -722,6 +741,7 @@ export type SalesInvoiceUpdateWithoutItemsInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
salesInvoicePayments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
}
export type SalesInvoiceUncheckedUpdateWithoutItemsInput = {
@@ -733,6 +753,69 @@ export type SalesInvoiceUncheckedUpdateWithoutItemsInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
}
export type SalesInvoiceCreateWithoutSalesInvoicePaymentsInput = {
code: string
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
description?: string | null
createdAt?: Date | string
updatedAt?: Date | string
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
}
export type SalesInvoiceUncheckedCreateWithoutSalesInvoicePaymentsInput = {
id?: number
code: string
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
description?: string | null
createdAt?: Date | string
updatedAt?: Date | string
customerId?: number | null
posAccountId: number
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
}
export type SalesInvoiceCreateOrConnectWithoutSalesInvoicePaymentsInput = {
where: Prisma.SalesInvoiceWhereUniqueInput
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutSalesInvoicePaymentsInput, Prisma.SalesInvoiceUncheckedCreateWithoutSalesInvoicePaymentsInput>
}
export type SalesInvoiceUpsertWithoutSalesInvoicePaymentsInput = {
update: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutSalesInvoicePaymentsInput, Prisma.SalesInvoiceUncheckedUpdateWithoutSalesInvoicePaymentsInput>
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutSalesInvoicePaymentsInput, Prisma.SalesInvoiceUncheckedCreateWithoutSalesInvoicePaymentsInput>
where?: Prisma.SalesInvoiceWhereInput
}
export type SalesInvoiceUpdateToOneWithWhereWithoutSalesInvoicePaymentsInput = {
where?: Prisma.SalesInvoiceWhereInput
data: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutSalesInvoicePaymentsInput, Prisma.SalesInvoiceUncheckedUpdateWithoutSalesInvoicePaymentsInput>
}
export type SalesInvoiceUpdateWithoutSalesInvoicePaymentsInput = {
code?: Prisma.StringFieldUpdateOperationsInput | string
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
}
export type SalesInvoiceUncheckedUpdateWithoutSalesInvoicePaymentsInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
code?: Prisma.StringFieldUpdateOperationsInput | string
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
}
export type SalesInvoiceCreateManyPosAccountInput = {
@@ -751,8 +834,9 @@ export type SalesInvoiceUpdateWithoutPosAccountInput = {
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
salesInvoicePayments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
}
export type SalesInvoiceUncheckedUpdateWithoutPosAccountInput = {
@@ -764,6 +848,7 @@ export type SalesInvoiceUncheckedUpdateWithoutPosAccountInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
}
export type SalesInvoiceUncheckedUpdateManyWithoutPosAccountInput = {
@@ -792,8 +877,9 @@ export type SalesInvoiceUpdateWithoutCustomerInput = {
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
salesInvoicePayments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
}
export type SalesInvoiceUncheckedUpdateWithoutCustomerInput = {
@@ -805,6 +891,7 @@ export type SalesInvoiceUncheckedUpdateWithoutCustomerInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
}
export type SalesInvoiceUncheckedUpdateManyWithoutCustomerInput = {
@@ -824,10 +911,12 @@ export type SalesInvoiceUncheckedUpdateManyWithoutCustomerInput = {
export type SalesInvoiceCountOutputType = {
items: number
salesInvoicePayments: number
}
export type SalesInvoiceCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
items?: boolean | SalesInvoiceCountOutputTypeCountItemsArgs
salesInvoicePayments?: boolean | SalesInvoiceCountOutputTypeCountSalesInvoicePaymentsArgs
}
/**
@@ -847,6 +936,13 @@ export type SalesInvoiceCountOutputTypeCountItemsArgs<ExtArgs extends runtime.Ty
where?: Prisma.SalesInvoiceItemWhereInput
}
/**
* SalesInvoiceCountOutputType without action
*/
export type SalesInvoiceCountOutputTypeCountSalesInvoicePaymentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.SalesInvoicePaymentWhereInput
}
export type SalesInvoiceSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
@@ -857,9 +953,10 @@ export type SalesInvoiceSelect<ExtArgs extends runtime.Types.Extensions.Internal
updatedAt?: boolean
customerId?: boolean
posAccountId?: boolean
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs>
posAccount?: boolean | Prisma.PosAccountDefaultArgs<ExtArgs>
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
salesInvoicePayments?: boolean | Prisma.SalesInvoice$salesInvoicePaymentsArgs<ExtArgs>
_count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["salesInvoice"]>
@@ -878,18 +975,20 @@ export type SalesInvoiceSelectScalar = {
export type SalesInvoiceOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "code" | "totalAmount" | "description" | "createdAt" | "updatedAt" | "customerId" | "posAccountId", ExtArgs["result"]["salesInvoice"]>
export type SalesInvoiceInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs>
posAccount?: boolean | Prisma.PosAccountDefaultArgs<ExtArgs>
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
salesInvoicePayments?: boolean | Prisma.SalesInvoice$salesInvoicePaymentsArgs<ExtArgs>
_count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs>
}
export type $SalesInvoicePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
name: "SalesInvoice"
objects: {
items: Prisma.$SalesInvoiceItemPayload<ExtArgs>[]
customer: Prisma.$CustomerPayload<ExtArgs> | null
posAccount: Prisma.$PosAccountPayload<ExtArgs>
items: Prisma.$SalesInvoiceItemPayload<ExtArgs>[]
salesInvoicePayments: Prisma.$SalesInvoicePaymentPayload<ExtArgs>[]
}
scalars: runtime.Types.Extensions.GetPayloadResult<{
id: number
@@ -1240,9 +1339,10 @@ readonly fields: SalesInvoiceFieldRefs;
*/
export interface Prisma__SalesInvoiceClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
items<T extends Prisma.SalesInvoice$itemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$itemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoiceItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
customer<T extends Prisma.SalesInvoice$customerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$customerArgs<ExtArgs>>): Prisma.Prisma__CustomerClient<runtime.Types.Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
posAccount<T extends Prisma.PosAccountDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PosAccountDefaultArgs<ExtArgs>>): Prisma.Prisma__PosAccountClient<runtime.Types.Result.GetResult<Prisma.$PosAccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
items<T extends Prisma.SalesInvoice$itemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$itemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoiceItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
salesInvoicePayments<T extends Prisma.SalesInvoice$salesInvoicePaymentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$salesInvoicePaymentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePaymentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
@@ -1622,6 +1722,25 @@ export type SalesInvoiceDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.
limit?: number
}
/**
* SalesInvoice.customer
*/
export type SalesInvoice$customerArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Customer
*/
select?: Prisma.CustomerSelect<ExtArgs> | null
/**
* Omit specific fields from the Customer
*/
omit?: Prisma.CustomerOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.CustomerInclude<ExtArgs> | null
where?: Prisma.CustomerWhereInput
}
/**
* SalesInvoice.items
*/
@@ -1647,22 +1766,27 @@ export type SalesInvoice$itemsArgs<ExtArgs extends runtime.Types.Extensions.Inte
}
/**
* SalesInvoice.customer
* SalesInvoice.salesInvoicePayments
*/
export type SalesInvoice$customerArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
export type SalesInvoice$salesInvoicePaymentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Customer
* Select specific fields to fetch from the SalesInvoicePayment
*/
select?: Prisma.CustomerSelect<ExtArgs> | null
select?: Prisma.SalesInvoicePaymentSelect<ExtArgs> | null
/**
* Omit specific fields from the Customer
* Omit specific fields from the SalesInvoicePayment
*/
omit?: Prisma.CustomerOmit<ExtArgs> | null
omit?: Prisma.SalesInvoicePaymentOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.CustomerInclude<ExtArgs> | null
where?: Prisma.CustomerWhereInput
include?: Prisma.SalesInvoicePaymentInclude<ExtArgs> | null
where?: Prisma.SalesInvoicePaymentWhereInput
orderBy?: Prisma.SalesInvoicePaymentOrderByWithRelationInput | Prisma.SalesInvoicePaymentOrderByWithRelationInput[]
cursor?: Prisma.SalesInvoicePaymentWhereUniqueInput
take?: number
skip?: number
distinct?: Prisma.SalesInvoicePaymentScalarFieldEnum | Prisma.SalesInvoicePaymentScalarFieldEnum[]
}
/**