refactor: restructure suppliers module and update DTOs

- Removed old supplier DTOs and controller, replacing them with new implementations.
- Introduced new CreateSupplierDto and UpdateSupplierDto in the index directory.
- Updated SuppliersController to handle new routes and methods.
- Implemented SuppliersService with updated logic for creating, finding, updating, and removing suppliers.
- Added new invoices module with corresponding controller and service for handling invoice-related operations.
- Created new DTOs for handling receipt payments and updated the service to manage payment creation and retrieval.
- Updated Prisma migrations to reflect changes in the database schema, including dropping unnecessary columns.
This commit is contained in:
2025-12-27 20:34:00 +03:30
parent d98507fc1f
commit af9695e23c
27 changed files with 636 additions and 575 deletions
@@ -0,0 +1,14 @@
/*
Warnings:
- You are about to drop the column `inventoryId` on the `Purchase_Receipt_Payments` table. All the data in the column will be lost.
*/
-- DropForeignKey
ALTER TABLE `Purchase_Receipt_Payments` DROP FOREIGN KEY `Purchase_Receipt_Payments_inventoryId_bankAccountId_fkey`;
-- DropIndex
DROP INDEX `Purchase_Receipt_Payments_inventoryId_bankAccountId_fkey` ON `Purchase_Receipt_Payments`;
-- AlterTable
ALTER TABLE `Purchase_Receipt_Payments` DROP COLUMN `inventoryId`;
+3 -4
View File
@@ -24,10 +24,9 @@ model InventoryBankAccount {
inventoryId Int inventoryId Int
bankAccountId Int bankAccountId Int
inventory Inventory @relation(fields: [inventoryId], references: [id]) inventory Inventory @relation(fields: [inventoryId], references: [id])
bankAccount BankAccount @relation(fields: [bankAccountId], references: [id]) bankAccount BankAccount @relation(fields: [bankAccountId], references: [id])
posAccounts PosAccount[] posAccounts PosAccount[]
purchaseReceiptPayments PurchaseReceiptPayments[]
@@id([inventoryId, bankAccountId]) @@id([inventoryId, bankAccountId])
@@index([bankAccountId]) @@index([bankAccountId])
+5 -6
View File
@@ -24,10 +24,10 @@ model PurchaseReceiptItem {
count Decimal @db.Decimal(10, 0) count Decimal @db.Decimal(10, 0)
fee Decimal @db.Decimal(15, 2) fee Decimal @db.Decimal(15, 2)
total Decimal @db.Decimal(15, 2) total Decimal @db.Decimal(15, 2)
description String? @db.Text
createdAt DateTime @default(now()) @db.Timestamp(0)
receiptId Int receiptId Int
productId Int productId Int
description String? @db.Text
createdAt DateTime @default(now()) @db.Timestamp(0)
product Product @relation("Product_PurchaseReceiptItems", fields: [productId], references: [id]) product Product @relation("Product_PurchaseReceiptItems", fields: [productId], references: [id])
receipt PurchaseReceipt @relation("PurchaseReceipt_Items", fields: [receiptId], references: [id]) receipt PurchaseReceipt @relation("PurchaseReceipt_Items", fields: [receiptId], references: [id])
@@ -43,13 +43,12 @@ model PurchaseReceiptPayments {
type PaymentType type PaymentType
bankAccountId Int bankAccountId Int
inventoryId Int inventoryId Int
description String? @db.Text
payedAt DateTime @db.Timestamp(0)
receiptId Int receiptId Int
payedAt DateTime @db.Timestamp(0)
description String? @db.Text
createdAt DateTime @default(now()) @db.Timestamp(0) createdAt DateTime @default(now()) @db.Timestamp(0)
purchaseReceipt PurchaseReceipt @relation(fields: [receiptId], references: [id]) receipt PurchaseReceipt @relation(fields: [receiptId], references: [id])
inventoryBankAccount InventoryBankAccount @relation(fields: [inventoryId, bankAccountId], references: [inventoryId, bankAccountId])
@@index([receiptId], map: "Purchase_Receipt_Payments_receiptId_fkey") @@index([receiptId], map: "Purchase_Receipt_Payments_receiptId_fkey")
@@map("Purchase_Receipt_Payments") @@map("Purchase_Receipt_Payments")
+15 -5
View File
@@ -7,6 +7,7 @@
-- Table: Inventory_Transfer_Items -- Table: Inventory_Transfer_Items
-- ------------------------------------------ -- ------------------------------------------
DROP TRIGGER IF EXISTS `trg_transfer_item_after_insert`; DROP TRIGGER IF EXISTS `trg_transfer_item_after_insert`;
CREATE DEFINER=`pos`@`%` TRIGGER `trg_transfer_item_after_insert` AFTER INSERT ON `Inventory_Transfer_Items` FOR EACH ROW begin CREATE DEFINER=`pos`@`%` TRIGGER `trg_transfer_item_after_insert` AFTER INSERT ON `Inventory_Transfer_Items` FOR EACH ROW begin
DECLARE fromInv INT; DECLARE fromInv INT;
@@ -44,6 +45,7 @@ end;
-- Table: Purchase_Receipt_Items -- Table: Purchase_Receipt_Items
-- ------------------------------------------ -- ------------------------------------------
DROP TRIGGER IF EXISTS `trg_purchase_receipt_item_after_insert`; DROP TRIGGER IF EXISTS `trg_purchase_receipt_item_after_insert`;
CREATE DEFINER=`pos`@`%` TRIGGER `trg_purchase_receipt_item_after_insert` AFTER INSERT ON `Purchase_Receipt_Items` FOR EACH ROW BEGIN DECLARE latestQuantity DECIMAL(10, 2) DEFAULT 0; CREATE DEFINER=`pos`@`%` TRIGGER `trg_purchase_receipt_item_after_insert` AFTER INSERT ON `Purchase_Receipt_Items` FOR EACH ROW BEGIN DECLARE latestQuantity DECIMAL(10, 2) DEFAULT 0;
DECLARE invId INT; DECLARE invId INT;
@@ -106,6 +108,7 @@ END;
-- Table: Purchase_Receipt_Payments -- Table: Purchase_Receipt_Payments
-- ------------------------------------------ -- ------------------------------------------
DROP TRIGGER IF EXISTS `trg_pr_payment_before_insert`; DROP TRIGGER IF EXISTS `trg_pr_payment_before_insert`;
CREATE DEFINER=`pos`@`%` TRIGGER `trg_pr_payment_before_insert` BEFORE INSERT ON `Purchase_Receipt_Payments` FOR EACH ROW BEGIN CREATE DEFINER=`pos`@`%` TRIGGER `trg_pr_payment_before_insert` BEFORE INSERT ON `Purchase_Receipt_Payments` FOR EACH ROW BEGIN
DECLARE receiptTotal DECIMAL(14,2); DECLARE receiptTotal DECIMAL(14,2);
DECLARE paid DECIMAL(14,2); DECLARE paid DECIMAL(14,2);
@@ -128,14 +131,15 @@ END;
-- Table: Purchase_Receipt_Payments -- Table: Purchase_Receipt_Payments
-- ------------------------------------------ -- ------------------------------------------
DROP TRIGGER IF EXISTS `trg_pr_payment_after_insert`; DROP TRIGGER IF EXISTS `trg_pr_payment_after_insert`;
CREATE DEFINER=`pos`@`%` TRIGGER `trg_pr_payment_after_insert` AFTER INSERT ON `Purchase_Receipt_Payments` FOR EACH ROW BEGIN CREATE DEFINER=`pos`@`%` TRIGGER `trg_pr_payment_after_insert` AFTER INSERT ON `Purchase_Receipt_Payments` FOR EACH ROW BEGIN
DECLARE receiptTotal DECIMAL(14,2); DECLARE receiptTotal DECIMAL(14,2) DEFAULT 0;
DECLARE newPaid DECIMAL(14,2); DECLARE newPaid DECIMAL(14,2) DEFAULT 0;
DECLARE supplierId INT; DECLARE supplierId INT;
DECLARE lastBalance DECIMAL(14,2); DECLARE lastBalance DECIMAL(14,2) DEFAULT 0;
-- Lock receipt row -- Lock receipt row
SELECT totalAmount, paidAmount, supplierId SELECT COALESCE(totalAmount, 0), COALESCE(paidAmount, 0), supplierId
INTO receiptTotal, newPaid, supplierId INTO receiptTotal, newPaid, supplierId
FROM Purchase_Receipts FROM Purchase_Receipts
WHERE id = NEW.receiptId WHERE id = NEW.receiptId
@@ -199,6 +203,7 @@ END;
-- Table: Purchase_Receipt_Payments -- Table: Purchase_Receipt_Payments
-- ------------------------------------------ -- ------------------------------------------
DROP TRIGGER IF EXISTS `trg_pr_payment_after_delete`; DROP TRIGGER IF EXISTS `trg_pr_payment_after_delete`;
CREATE DEFINER=`pos`@`%` TRIGGER `trg_pr_payment_after_delete` AFTER DELETE ON `Purchase_Receipt_Payments` FOR EACH ROW BEGIN CREATE DEFINER=`pos`@`%` TRIGGER `trg_pr_payment_after_delete` AFTER DELETE ON `Purchase_Receipt_Payments` FOR EACH ROW BEGIN
DECLARE receiptTotal DECIMAL(14,2); DECLARE receiptTotal DECIMAL(14,2);
DECLARE newPaid DECIMAL(14,2); DECLARE newPaid DECIMAL(14,2);
@@ -233,6 +238,7 @@ END;
-- Table: Purchase_Receipts -- Table: Purchase_Receipts
-- ------------------------------------------ -- ------------------------------------------
DROP TRIGGER IF EXISTS `trg_purchase_receipt_after_insert`; DROP TRIGGER IF EXISTS `trg_purchase_receipt_after_insert`;
CREATE DEFINER=`pos`@`%` TRIGGER `trg_purchase_receipt_after_insert` AFTER INSERT ON `Purchase_Receipts` FOR EACH ROW BEGIN CREATE DEFINER=`pos`@`%` TRIGGER `trg_purchase_receipt_after_insert` AFTER INSERT ON `Purchase_Receipts` FOR EACH ROW BEGIN
DECLARE lastBalance DECIMAL(14,2) DEFAULT 0; DECLARE lastBalance DECIMAL(14,2) DEFAULT 0;
@@ -271,6 +277,7 @@ END;
-- Table: Sales_Invoice_Items -- Table: Sales_Invoice_Items
-- ------------------------------------------ -- ------------------------------------------
DROP TRIGGER IF EXISTS `trg_sales_invoice_items_before_insert`; DROP TRIGGER IF EXISTS `trg_sales_invoice_items_before_insert`;
CREATE DEFINER=`pos`@`%` TRIGGER `trg_sales_invoice_items_before_insert` BEFORE INSERT ON `Sales_Invoice_Items` FOR EACH ROW begin DECLARE current_stock DECIMAL(10, 2); CREATE DEFINER=`pos`@`%` TRIGGER `trg_sales_invoice_items_before_insert` BEFORE INSERT ON `Sales_Invoice_Items` FOR EACH ROW begin DECLARE current_stock DECIMAL(10, 2);
DECLARE inventory_id INT; DECLARE inventory_id INT;
@@ -300,6 +307,7 @@ end;
-- Table: Sales_Invoice_Items -- Table: Sales_Invoice_Items
-- ------------------------------------------ -- ------------------------------------------
DROP TRIGGER IF EXISTS `trg_sales_invoice_items_after_insert`; DROP TRIGGER IF EXISTS `trg_sales_invoice_items_after_insert`;
CREATE DEFINER=`pos`@`%` TRIGGER `trg_sales_invoice_items_after_insert` AFTER INSERT ON `Sales_Invoice_Items` FOR EACH ROW begin DECLARE current_stock DECIMAL(10, 2); CREATE DEFINER=`pos`@`%` TRIGGER `trg_sales_invoice_items_after_insert` AFTER INSERT ON `Sales_Invoice_Items` FOR EACH ROW begin DECLARE current_stock DECIMAL(10, 2);
DECLARE inventory_id INT; DECLARE inventory_id INT;
@@ -360,6 +368,7 @@ END;
-- Table: Stock_Movements -- Table: Stock_Movements
-- ------------------------------------------ -- ------------------------------------------
DROP TRIGGER IF EXISTS `trg_stock_transfer`; DROP TRIGGER IF EXISTS `trg_stock_transfer`;
CREATE DEFINER=`pos`@`%` TRIGGER `trg_stock_transfer` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'INVENTORY_TRANSFER' THEN IF NEW.type = 'IN' THEN CREATE DEFINER=`pos`@`%` TRIGGER `trg_stock_transfer` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'INVENTORY_TRANSFER' THEN IF NEW.type = 'IN' THEN
INSERT INTO INSERT INTO
Stock_Balance ( Stock_Balance (
@@ -442,6 +451,7 @@ END;
-- Table: Stock_Movements -- Table: Stock_Movements
-- ------------------------------------------ -- ------------------------------------------
DROP TRIGGER IF EXISTS `trg_stock_purchase_insert`; DROP TRIGGER IF EXISTS `trg_stock_purchase_insert`;
CREATE DEFINER=`pos`@`%` TRIGGER `trg_stock_purchase_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'PURCHASE' THEN CREATE DEFINER=`pos`@`%` TRIGGER `trg_stock_purchase_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'PURCHASE' THEN
INSERT INTO INSERT INTO
@@ -476,6 +486,7 @@ END;
-- Table: Stock_Movements -- Table: Stock_Movements
-- ------------------------------------------ -- ------------------------------------------
DROP TRIGGER IF EXISTS `trg_stock_sale_insert`; DROP TRIGGER IF EXISTS `trg_stock_sale_insert`;
CREATE DEFINER=`pos`@`%` TRIGGER `trg_stock_sale_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'SALES' THEN CREATE DEFINER=`pos`@`%` TRIGGER `trg_stock_sale_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'SALES' THEN
INSERT INTO INSERT INTO
@@ -503,4 +514,3 @@ ON DUPLICATE KEY UPDATE
END IF; END IF;
END; END;
+3 -1
View File
@@ -11,6 +11,8 @@ import { BanksModule } from './modules/banks/banks.module'
import { CardexModule } from './modules/cardex/cardex.module' import { CardexModule } from './modules/cardex/cardex.module'
import { InventoriesModule } from './modules/inventories/inventories.module' import { InventoriesModule } from './modules/inventories/inventories.module'
import { PosModule } from './modules/pos/pos.module' import { PosModule } from './modules/pos/pos.module'
import { PurchaseReceiptPaymentsModule } from './modules/purchase-receipt-payments/purchase-receipt-payments.module'
import { SuppliersModule } from './modules/suppliers/suppliers.module'
import { PrismaModule } from './prisma/prisma.module' import { PrismaModule } from './prisma/prisma.module'
import { ProductBrandsModule } from './product-brands/product-brands.module' import { ProductBrandsModule } from './product-brands/product-brands.module'
import { ProductCategoriesModule } from './product-categories/product-categories.module' import { ProductCategoriesModule } from './product-categories/product-categories.module'
@@ -24,7 +26,6 @@ import { SalesInvoicesModule } from './sales-invoices/sales-invoices.module'
import { StockAdjustmentsModule } from './stock-adjustments/stock-adjustments.module' import { StockAdjustmentsModule } from './stock-adjustments/stock-adjustments.module'
import { StockBalanceModule } from './stock-balance/stock-balance.module' import { StockBalanceModule } from './stock-balance/stock-balance.module'
import { StockMovementsModule } from './stock-movements/stock-movements.module' import { StockMovementsModule } from './stock-movements/stock-movements.module'
import { SuppliersModule } from './suppliers/suppliers.module'
import { UsersModule } from './users/users.module' import { UsersModule } from './users/users.module'
@Module({ @Module({
@@ -42,6 +43,7 @@ import { UsersModule } from './users/users.module'
InventoriesModule, InventoriesModule,
PurchaseReceiptsModule, PurchaseReceiptsModule,
PurchaseReceiptItemsModule, PurchaseReceiptItemsModule,
PurchaseReceiptPaymentsModule,
SalesInvoicesModule, SalesInvoicesModule,
SalesInvoiceItemsModule, SalesInvoiceItemsModule,
InventoryTransfersModule, InventoryTransfersModule,
File diff suppressed because one or more lines are too long
@@ -2695,10 +2695,10 @@ export const PurchaseReceiptItemScalarFieldEnum = {
count: 'count', count: 'count',
fee: 'fee', fee: 'fee',
total: 'total', total: 'total',
description: 'description',
createdAt: 'createdAt',
receiptId: 'receiptId', receiptId: 'receiptId',
productId: 'productId' productId: 'productId',
description: 'description',
createdAt: 'createdAt'
} as const } as const
export type PurchaseReceiptItemScalarFieldEnum = (typeof PurchaseReceiptItemScalarFieldEnum)[keyof typeof PurchaseReceiptItemScalarFieldEnum] export type PurchaseReceiptItemScalarFieldEnum = (typeof PurchaseReceiptItemScalarFieldEnum)[keyof typeof PurchaseReceiptItemScalarFieldEnum]
@@ -2710,10 +2710,9 @@ export const PurchaseReceiptPaymentsScalarFieldEnum = {
paymentMethod: 'paymentMethod', paymentMethod: 'paymentMethod',
type: 'type', type: 'type',
bankAccountId: 'bankAccountId', bankAccountId: 'bankAccountId',
inventoryId: 'inventoryId',
description: 'description',
payedAt: 'payedAt',
receiptId: 'receiptId', receiptId: 'receiptId',
payedAt: 'payedAt',
description: 'description',
createdAt: 'createdAt' createdAt: 'createdAt'
} as const } as const
@@ -408,10 +408,10 @@ export const PurchaseReceiptItemScalarFieldEnum = {
count: 'count', count: 'count',
fee: 'fee', fee: 'fee',
total: 'total', total: 'total',
description: 'description',
createdAt: 'createdAt',
receiptId: 'receiptId', receiptId: 'receiptId',
productId: 'productId' productId: 'productId',
description: 'description',
createdAt: 'createdAt'
} as const } as const
export type PurchaseReceiptItemScalarFieldEnum = (typeof PurchaseReceiptItemScalarFieldEnum)[keyof typeof PurchaseReceiptItemScalarFieldEnum] export type PurchaseReceiptItemScalarFieldEnum = (typeof PurchaseReceiptItemScalarFieldEnum)[keyof typeof PurchaseReceiptItemScalarFieldEnum]
@@ -423,10 +423,9 @@ export const PurchaseReceiptPaymentsScalarFieldEnum = {
paymentMethod: 'paymentMethod', paymentMethod: 'paymentMethod',
type: 'type', type: 'type',
bankAccountId: 'bankAccountId', bankAccountId: 'bankAccountId',
inventoryId: 'inventoryId',
description: 'description',
payedAt: 'payedAt',
receiptId: 'receiptId', receiptId: 'receiptId',
payedAt: 'payedAt',
description: 'description',
createdAt: 'createdAt' createdAt: 'createdAt'
} as const } as const
@@ -199,7 +199,6 @@ export type InventoryBankAccountWhereInput = {
inventory?: Prisma.XOR<Prisma.InventoryScalarRelationFilter, Prisma.InventoryWhereInput> inventory?: Prisma.XOR<Prisma.InventoryScalarRelationFilter, Prisma.InventoryWhereInput>
bankAccount?: Prisma.XOR<Prisma.BankAccountScalarRelationFilter, Prisma.BankAccountWhereInput> bankAccount?: Prisma.XOR<Prisma.BankAccountScalarRelationFilter, Prisma.BankAccountWhereInput>
posAccounts?: Prisma.PosAccountListRelationFilter posAccounts?: Prisma.PosAccountListRelationFilter
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsListRelationFilter
} }
export type InventoryBankAccountOrderByWithRelationInput = { export type InventoryBankAccountOrderByWithRelationInput = {
@@ -208,7 +207,6 @@ export type InventoryBankAccountOrderByWithRelationInput = {
inventory?: Prisma.InventoryOrderByWithRelationInput inventory?: Prisma.InventoryOrderByWithRelationInput
bankAccount?: Prisma.BankAccountOrderByWithRelationInput bankAccount?: Prisma.BankAccountOrderByWithRelationInput
posAccounts?: Prisma.PosAccountOrderByRelationAggregateInput posAccounts?: Prisma.PosAccountOrderByRelationAggregateInput
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsOrderByRelationAggregateInput
} }
export type InventoryBankAccountWhereUniqueInput = Prisma.AtLeast<{ export type InventoryBankAccountWhereUniqueInput = Prisma.AtLeast<{
@@ -221,7 +219,6 @@ export type InventoryBankAccountWhereUniqueInput = Prisma.AtLeast<{
inventory?: Prisma.XOR<Prisma.InventoryScalarRelationFilter, Prisma.InventoryWhereInput> inventory?: Prisma.XOR<Prisma.InventoryScalarRelationFilter, Prisma.InventoryWhereInput>
bankAccount?: Prisma.XOR<Prisma.BankAccountScalarRelationFilter, Prisma.BankAccountWhereInput> bankAccount?: Prisma.XOR<Prisma.BankAccountScalarRelationFilter, Prisma.BankAccountWhereInput>
posAccounts?: Prisma.PosAccountListRelationFilter posAccounts?: Prisma.PosAccountListRelationFilter
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsListRelationFilter
}, "inventoryId_bankAccountId"> }, "inventoryId_bankAccountId">
export type InventoryBankAccountOrderByWithAggregationInput = { export type InventoryBankAccountOrderByWithAggregationInput = {
@@ -246,28 +243,24 @@ export type InventoryBankAccountCreateInput = {
inventory: Prisma.InventoryCreateNestedOneWithoutInventoryBankAccountsInput inventory: Prisma.InventoryCreateNestedOneWithoutInventoryBankAccountsInput
bankAccount: Prisma.BankAccountCreateNestedOneWithoutInventoryBankAccountsInput bankAccount: Prisma.BankAccountCreateNestedOneWithoutInventoryBankAccountsInput
posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryBankAccountInput posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryBankAccountInput
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutInventoryBankAccountInput
} }
export type InventoryBankAccountUncheckedCreateInput = { export type InventoryBankAccountUncheckedCreateInput = {
inventoryId: number inventoryId: number
bankAccountId: number bankAccountId: number
posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryBankAccountInput posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryBankAccountInput
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutInventoryBankAccountInput
} }
export type InventoryBankAccountUpdateInput = { export type InventoryBankAccountUpdateInput = {
inventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryBankAccountsNestedInput inventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryBankAccountsNestedInput
bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutInventoryBankAccountsNestedInput bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutInventoryBankAccountsNestedInput
posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryBankAccountNestedInput posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryBankAccountNestedInput
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutInventoryBankAccountNestedInput
} }
export type InventoryBankAccountUncheckedUpdateInput = { export type InventoryBankAccountUncheckedUpdateInput = {
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number
posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryBankAccountNestedInput posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryBankAccountNestedInput
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutInventoryBankAccountNestedInput
} }
export type InventoryBankAccountCreateManyInput = { export type InventoryBankAccountCreateManyInput = {
@@ -427,30 +420,14 @@ export type InventoryBankAccountUpdateOneRequiredWithoutPosAccountsNestedInput =
update?: Prisma.XOR<Prisma.XOR<Prisma.InventoryBankAccountUpdateToOneWithWhereWithoutPosAccountsInput, Prisma.InventoryBankAccountUpdateWithoutPosAccountsInput>, Prisma.InventoryBankAccountUncheckedUpdateWithoutPosAccountsInput> update?: Prisma.XOR<Prisma.XOR<Prisma.InventoryBankAccountUpdateToOneWithWhereWithoutPosAccountsInput, Prisma.InventoryBankAccountUpdateWithoutPosAccountsInput>, Prisma.InventoryBankAccountUncheckedUpdateWithoutPosAccountsInput>
} }
export type InventoryBankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput = {
create?: Prisma.XOR<Prisma.InventoryBankAccountCreateWithoutPurchaseReceiptPaymentsInput, Prisma.InventoryBankAccountUncheckedCreateWithoutPurchaseReceiptPaymentsInput>
connectOrCreate?: Prisma.InventoryBankAccountCreateOrConnectWithoutPurchaseReceiptPaymentsInput
connect?: Prisma.InventoryBankAccountWhereUniqueInput
}
export type InventoryBankAccountUpdateOneRequiredWithoutPurchaseReceiptPaymentsNestedInput = {
create?: Prisma.XOR<Prisma.InventoryBankAccountCreateWithoutPurchaseReceiptPaymentsInput, Prisma.InventoryBankAccountUncheckedCreateWithoutPurchaseReceiptPaymentsInput>
connectOrCreate?: Prisma.InventoryBankAccountCreateOrConnectWithoutPurchaseReceiptPaymentsInput
upsert?: Prisma.InventoryBankAccountUpsertWithoutPurchaseReceiptPaymentsInput
connect?: Prisma.InventoryBankAccountWhereUniqueInput
update?: Prisma.XOR<Prisma.XOR<Prisma.InventoryBankAccountUpdateToOneWithWhereWithoutPurchaseReceiptPaymentsInput, Prisma.InventoryBankAccountUpdateWithoutPurchaseReceiptPaymentsInput>, Prisma.InventoryBankAccountUncheckedUpdateWithoutPurchaseReceiptPaymentsInput>
}
export type InventoryBankAccountCreateWithoutBankAccountInput = { export type InventoryBankAccountCreateWithoutBankAccountInput = {
inventory: Prisma.InventoryCreateNestedOneWithoutInventoryBankAccountsInput inventory: Prisma.InventoryCreateNestedOneWithoutInventoryBankAccountsInput
posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryBankAccountInput posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryBankAccountInput
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutInventoryBankAccountInput
} }
export type InventoryBankAccountUncheckedCreateWithoutBankAccountInput = { export type InventoryBankAccountUncheckedCreateWithoutBankAccountInput = {
inventoryId: number inventoryId: number
posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryBankAccountInput posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryBankAccountInput
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutInventoryBankAccountInput
} }
export type InventoryBankAccountCreateOrConnectWithoutBankAccountInput = { export type InventoryBankAccountCreateOrConnectWithoutBankAccountInput = {
@@ -490,13 +467,11 @@ export type InventoryBankAccountScalarWhereInput = {
export type InventoryBankAccountCreateWithoutInventoryInput = { export type InventoryBankAccountCreateWithoutInventoryInput = {
bankAccount: Prisma.BankAccountCreateNestedOneWithoutInventoryBankAccountsInput bankAccount: Prisma.BankAccountCreateNestedOneWithoutInventoryBankAccountsInput
posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryBankAccountInput posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryBankAccountInput
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutInventoryBankAccountInput
} }
export type InventoryBankAccountUncheckedCreateWithoutInventoryInput = { export type InventoryBankAccountUncheckedCreateWithoutInventoryInput = {
bankAccountId: number bankAccountId: number
posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryBankAccountInput posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryBankAccountInput
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutInventoryBankAccountInput
} }
export type InventoryBankAccountCreateOrConnectWithoutInventoryInput = { export type InventoryBankAccountCreateOrConnectWithoutInventoryInput = {
@@ -528,13 +503,11 @@ export type InventoryBankAccountUpdateManyWithWhereWithoutInventoryInput = {
export type InventoryBankAccountCreateWithoutPosAccountsInput = { export type InventoryBankAccountCreateWithoutPosAccountsInput = {
inventory: Prisma.InventoryCreateNestedOneWithoutInventoryBankAccountsInput inventory: Prisma.InventoryCreateNestedOneWithoutInventoryBankAccountsInput
bankAccount: Prisma.BankAccountCreateNestedOneWithoutInventoryBankAccountsInput bankAccount: Prisma.BankAccountCreateNestedOneWithoutInventoryBankAccountsInput
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutInventoryBankAccountInput
} }
export type InventoryBankAccountUncheckedCreateWithoutPosAccountsInput = { export type InventoryBankAccountUncheckedCreateWithoutPosAccountsInput = {
inventoryId: number inventoryId: number
bankAccountId: number bankAccountId: number
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutInventoryBankAccountInput
} }
export type InventoryBankAccountCreateOrConnectWithoutPosAccountsInput = { export type InventoryBankAccountCreateOrConnectWithoutPosAccountsInput = {
@@ -556,53 +529,11 @@ export type InventoryBankAccountUpdateToOneWithWhereWithoutPosAccountsInput = {
export type InventoryBankAccountUpdateWithoutPosAccountsInput = { export type InventoryBankAccountUpdateWithoutPosAccountsInput = {
inventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryBankAccountsNestedInput inventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryBankAccountsNestedInput
bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutInventoryBankAccountsNestedInput bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutInventoryBankAccountsNestedInput
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutInventoryBankAccountNestedInput
} }
export type InventoryBankAccountUncheckedUpdateWithoutPosAccountsInput = { export type InventoryBankAccountUncheckedUpdateWithoutPosAccountsInput = {
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutInventoryBankAccountNestedInput
}
export type InventoryBankAccountCreateWithoutPurchaseReceiptPaymentsInput = {
inventory: Prisma.InventoryCreateNestedOneWithoutInventoryBankAccountsInput
bankAccount: Prisma.BankAccountCreateNestedOneWithoutInventoryBankAccountsInput
posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryBankAccountInput
}
export type InventoryBankAccountUncheckedCreateWithoutPurchaseReceiptPaymentsInput = {
inventoryId: number
bankAccountId: number
posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryBankAccountInput
}
export type InventoryBankAccountCreateOrConnectWithoutPurchaseReceiptPaymentsInput = {
where: Prisma.InventoryBankAccountWhereUniqueInput
create: Prisma.XOR<Prisma.InventoryBankAccountCreateWithoutPurchaseReceiptPaymentsInput, Prisma.InventoryBankAccountUncheckedCreateWithoutPurchaseReceiptPaymentsInput>
}
export type InventoryBankAccountUpsertWithoutPurchaseReceiptPaymentsInput = {
update: Prisma.XOR<Prisma.InventoryBankAccountUpdateWithoutPurchaseReceiptPaymentsInput, Prisma.InventoryBankAccountUncheckedUpdateWithoutPurchaseReceiptPaymentsInput>
create: Prisma.XOR<Prisma.InventoryBankAccountCreateWithoutPurchaseReceiptPaymentsInput, Prisma.InventoryBankAccountUncheckedCreateWithoutPurchaseReceiptPaymentsInput>
where?: Prisma.InventoryBankAccountWhereInput
}
export type InventoryBankAccountUpdateToOneWithWhereWithoutPurchaseReceiptPaymentsInput = {
where?: Prisma.InventoryBankAccountWhereInput
data: Prisma.XOR<Prisma.InventoryBankAccountUpdateWithoutPurchaseReceiptPaymentsInput, Prisma.InventoryBankAccountUncheckedUpdateWithoutPurchaseReceiptPaymentsInput>
}
export type InventoryBankAccountUpdateWithoutPurchaseReceiptPaymentsInput = {
inventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryBankAccountsNestedInput
bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutInventoryBankAccountsNestedInput
posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryBankAccountNestedInput
}
export type InventoryBankAccountUncheckedUpdateWithoutPurchaseReceiptPaymentsInput = {
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number
posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryBankAccountNestedInput
} }
export type InventoryBankAccountCreateManyBankAccountInput = { export type InventoryBankAccountCreateManyBankAccountInput = {
@@ -612,13 +543,11 @@ export type InventoryBankAccountCreateManyBankAccountInput = {
export type InventoryBankAccountUpdateWithoutBankAccountInput = { export type InventoryBankAccountUpdateWithoutBankAccountInput = {
inventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryBankAccountsNestedInput inventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryBankAccountsNestedInput
posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryBankAccountNestedInput posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryBankAccountNestedInput
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutInventoryBankAccountNestedInput
} }
export type InventoryBankAccountUncheckedUpdateWithoutBankAccountInput = { export type InventoryBankAccountUncheckedUpdateWithoutBankAccountInput = {
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryBankAccountNestedInput posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryBankAccountNestedInput
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutInventoryBankAccountNestedInput
} }
export type InventoryBankAccountUncheckedUpdateManyWithoutBankAccountInput = { export type InventoryBankAccountUncheckedUpdateManyWithoutBankAccountInput = {
@@ -632,13 +561,11 @@ export type InventoryBankAccountCreateManyInventoryInput = {
export type InventoryBankAccountUpdateWithoutInventoryInput = { export type InventoryBankAccountUpdateWithoutInventoryInput = {
bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutInventoryBankAccountsNestedInput bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutInventoryBankAccountsNestedInput
posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryBankAccountNestedInput posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryBankAccountNestedInput
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutInventoryBankAccountNestedInput
} }
export type InventoryBankAccountUncheckedUpdateWithoutInventoryInput = { export type InventoryBankAccountUncheckedUpdateWithoutInventoryInput = {
bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number
posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryBankAccountNestedInput posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryBankAccountNestedInput
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutInventoryBankAccountNestedInput
} }
export type InventoryBankAccountUncheckedUpdateManyWithoutInventoryInput = { export type InventoryBankAccountUncheckedUpdateManyWithoutInventoryInput = {
@@ -652,12 +579,10 @@ export type InventoryBankAccountUncheckedUpdateManyWithoutInventoryInput = {
export type InventoryBankAccountCountOutputType = { export type InventoryBankAccountCountOutputType = {
posAccounts: number posAccounts: number
purchaseReceiptPayments: number
} }
export type InventoryBankAccountCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = { export type InventoryBankAccountCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
posAccounts?: boolean | InventoryBankAccountCountOutputTypeCountPosAccountsArgs posAccounts?: boolean | InventoryBankAccountCountOutputTypeCountPosAccountsArgs
purchaseReceiptPayments?: boolean | InventoryBankAccountCountOutputTypeCountPurchaseReceiptPaymentsArgs
} }
/** /**
@@ -677,13 +602,6 @@ export type InventoryBankAccountCountOutputTypeCountPosAccountsArgs<ExtArgs exte
where?: Prisma.PosAccountWhereInput where?: Prisma.PosAccountWhereInput
} }
/**
* InventoryBankAccountCountOutputType without action
*/
export type InventoryBankAccountCountOutputTypeCountPurchaseReceiptPaymentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.PurchaseReceiptPaymentsWhereInput
}
export type InventoryBankAccountSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{ export type InventoryBankAccountSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
inventoryId?: boolean inventoryId?: boolean
@@ -691,7 +609,6 @@ export type InventoryBankAccountSelect<ExtArgs extends runtime.Types.Extensions.
inventory?: boolean | Prisma.InventoryDefaultArgs<ExtArgs> inventory?: boolean | Prisma.InventoryDefaultArgs<ExtArgs>
bankAccount?: boolean | Prisma.BankAccountDefaultArgs<ExtArgs> bankAccount?: boolean | Prisma.BankAccountDefaultArgs<ExtArgs>
posAccounts?: boolean | Prisma.InventoryBankAccount$posAccountsArgs<ExtArgs> posAccounts?: boolean | Prisma.InventoryBankAccount$posAccountsArgs<ExtArgs>
purchaseReceiptPayments?: boolean | Prisma.InventoryBankAccount$purchaseReceiptPaymentsArgs<ExtArgs>
_count?: boolean | Prisma.InventoryBankAccountCountOutputTypeDefaultArgs<ExtArgs> _count?: boolean | Prisma.InventoryBankAccountCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["inventoryBankAccount"]> }, ExtArgs["result"]["inventoryBankAccount"]>
@@ -707,7 +624,6 @@ export type InventoryBankAccountInclude<ExtArgs extends runtime.Types.Extensions
inventory?: boolean | Prisma.InventoryDefaultArgs<ExtArgs> inventory?: boolean | Prisma.InventoryDefaultArgs<ExtArgs>
bankAccount?: boolean | Prisma.BankAccountDefaultArgs<ExtArgs> bankAccount?: boolean | Prisma.BankAccountDefaultArgs<ExtArgs>
posAccounts?: boolean | Prisma.InventoryBankAccount$posAccountsArgs<ExtArgs> posAccounts?: boolean | Prisma.InventoryBankAccount$posAccountsArgs<ExtArgs>
purchaseReceiptPayments?: boolean | Prisma.InventoryBankAccount$purchaseReceiptPaymentsArgs<ExtArgs>
_count?: boolean | Prisma.InventoryBankAccountCountOutputTypeDefaultArgs<ExtArgs> _count?: boolean | Prisma.InventoryBankAccountCountOutputTypeDefaultArgs<ExtArgs>
} }
@@ -717,7 +633,6 @@ export type $InventoryBankAccountPayload<ExtArgs extends runtime.Types.Extension
inventory: Prisma.$InventoryPayload<ExtArgs> inventory: Prisma.$InventoryPayload<ExtArgs>
bankAccount: Prisma.$BankAccountPayload<ExtArgs> bankAccount: Prisma.$BankAccountPayload<ExtArgs>
posAccounts: Prisma.$PosAccountPayload<ExtArgs>[] posAccounts: Prisma.$PosAccountPayload<ExtArgs>[]
purchaseReceiptPayments: Prisma.$PurchaseReceiptPaymentsPayload<ExtArgs>[]
} }
scalars: runtime.Types.Extensions.GetPayloadResult<{ scalars: runtime.Types.Extensions.GetPayloadResult<{
inventoryId: number inventoryId: number
@@ -1065,7 +980,6 @@ export interface Prisma__InventoryBankAccountClient<T, Null = never, ExtArgs ext
inventory<T extends Prisma.InventoryDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.InventoryDefaultArgs<ExtArgs>>): Prisma.Prisma__InventoryClient<runtime.Types.Result.GetResult<Prisma.$InventoryPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> inventory<T extends Prisma.InventoryDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.InventoryDefaultArgs<ExtArgs>>): Prisma.Prisma__InventoryClient<runtime.Types.Result.GetResult<Prisma.$InventoryPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
bankAccount<T extends Prisma.BankAccountDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BankAccountDefaultArgs<ExtArgs>>): Prisma.Prisma__BankAccountClient<runtime.Types.Result.GetResult<Prisma.$BankAccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> bankAccount<T extends Prisma.BankAccountDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BankAccountDefaultArgs<ExtArgs>>): Prisma.Prisma__BankAccountClient<runtime.Types.Result.GetResult<Prisma.$BankAccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
posAccounts<T extends Prisma.InventoryBankAccount$posAccountsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.InventoryBankAccount$posAccountsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PosAccountPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null> posAccounts<T extends Prisma.InventoryBankAccount$posAccountsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.InventoryBankAccount$posAccountsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PosAccountPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
purchaseReceiptPayments<T extends Prisma.InventoryBankAccount$purchaseReceiptPaymentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.InventoryBankAccount$purchaseReceiptPaymentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PurchaseReceiptPaymentsPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
/** /**
* Attaches callbacks for the resolution and/or rejection of the Promise. * Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved. * @param onfulfilled The callback to execute when the Promise is resolved.
@@ -1463,30 +1377,6 @@ export type InventoryBankAccount$posAccountsArgs<ExtArgs extends runtime.Types.E
distinct?: Prisma.PosAccountScalarFieldEnum | Prisma.PosAccountScalarFieldEnum[] distinct?: Prisma.PosAccountScalarFieldEnum | Prisma.PosAccountScalarFieldEnum[]
} }
/**
* InventoryBankAccount.purchaseReceiptPayments
*/
export type InventoryBankAccount$purchaseReceiptPaymentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the PurchaseReceiptPayments
*/
select?: Prisma.PurchaseReceiptPaymentsSelect<ExtArgs> | null
/**
* Omit specific fields from the PurchaseReceiptPayments
*/
omit?: Prisma.PurchaseReceiptPaymentsOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.PurchaseReceiptPaymentsInclude<ExtArgs> | null
where?: Prisma.PurchaseReceiptPaymentsWhereInput
orderBy?: Prisma.PurchaseReceiptPaymentsOrderByWithRelationInput | Prisma.PurchaseReceiptPaymentsOrderByWithRelationInput[]
cursor?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput
take?: number
skip?: number
distinct?: Prisma.PurchaseReceiptPaymentsScalarFieldEnum | Prisma.PurchaseReceiptPaymentsScalarFieldEnum[]
}
/** /**
* InventoryBankAccount without action * InventoryBankAccount without action
*/ */
+16 -16
View File
@@ -361,7 +361,7 @@ export type PurchaseReceiptCreateInput = {
items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput
inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput
supplier: Prisma.SupplierCreateNestedOneWithoutReceiptsInput supplier: Prisma.SupplierCreateNestedOneWithoutReceiptsInput
payments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutPurchaseReceiptInput payments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutReceiptInput
} }
export type PurchaseReceiptUncheckedCreateInput = { export type PurchaseReceiptUncheckedCreateInput = {
@@ -376,7 +376,7 @@ export type PurchaseReceiptUncheckedCreateInput = {
supplierId: number supplierId: number
inventoryId: number inventoryId: number
items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput
payments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutPurchaseReceiptInput payments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutReceiptInput
} }
export type PurchaseReceiptUpdateInput = { export type PurchaseReceiptUpdateInput = {
@@ -390,7 +390,7 @@ export type PurchaseReceiptUpdateInput = {
items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput
inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput
supplier?: Prisma.SupplierUpdateOneRequiredWithoutReceiptsNestedInput supplier?: Prisma.SupplierUpdateOneRequiredWithoutReceiptsNestedInput
payments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutPurchaseReceiptNestedInput payments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutReceiptNestedInput
} }
export type PurchaseReceiptUncheckedUpdateInput = { export type PurchaseReceiptUncheckedUpdateInput = {
@@ -405,7 +405,7 @@ export type PurchaseReceiptUncheckedUpdateInput = {
supplierId?: Prisma.IntFieldUpdateOperationsInput | number supplierId?: Prisma.IntFieldUpdateOperationsInput | number
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput
payments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutPurchaseReceiptNestedInput payments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutReceiptNestedInput
} }
export type PurchaseReceiptCreateManyInput = { export type PurchaseReceiptCreateManyInput = {
@@ -646,7 +646,7 @@ export type PurchaseReceiptCreateWithoutInventoryInput = {
status?: $Enums.PurchaseReceiptStatus status?: $Enums.PurchaseReceiptStatus
items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput
supplier: Prisma.SupplierCreateNestedOneWithoutReceiptsInput supplier: Prisma.SupplierCreateNestedOneWithoutReceiptsInput
payments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutPurchaseReceiptInput payments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutReceiptInput
} }
export type PurchaseReceiptUncheckedCreateWithoutInventoryInput = { export type PurchaseReceiptUncheckedCreateWithoutInventoryInput = {
@@ -660,7 +660,7 @@ export type PurchaseReceiptUncheckedCreateWithoutInventoryInput = {
status?: $Enums.PurchaseReceiptStatus status?: $Enums.PurchaseReceiptStatus
supplierId: number supplierId: number
items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput
payments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutPurchaseReceiptInput payments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutReceiptInput
} }
export type PurchaseReceiptCreateOrConnectWithoutInventoryInput = { export type PurchaseReceiptCreateOrConnectWithoutInventoryInput = {
@@ -715,7 +715,7 @@ export type PurchaseReceiptCreateWithoutItemsInput = {
status?: $Enums.PurchaseReceiptStatus status?: $Enums.PurchaseReceiptStatus
inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput
supplier: Prisma.SupplierCreateNestedOneWithoutReceiptsInput supplier: Prisma.SupplierCreateNestedOneWithoutReceiptsInput
payments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutPurchaseReceiptInput payments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutReceiptInput
} }
export type PurchaseReceiptUncheckedCreateWithoutItemsInput = { export type PurchaseReceiptUncheckedCreateWithoutItemsInput = {
@@ -729,7 +729,7 @@ export type PurchaseReceiptUncheckedCreateWithoutItemsInput = {
status?: $Enums.PurchaseReceiptStatus status?: $Enums.PurchaseReceiptStatus
supplierId: number supplierId: number
inventoryId: number inventoryId: number
payments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutPurchaseReceiptInput payments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutReceiptInput
} }
export type PurchaseReceiptCreateOrConnectWithoutItemsInput = { export type PurchaseReceiptCreateOrConnectWithoutItemsInput = {
@@ -758,7 +758,7 @@ export type PurchaseReceiptUpdateWithoutItemsInput = {
status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus
inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput
supplier?: Prisma.SupplierUpdateOneRequiredWithoutReceiptsNestedInput supplier?: Prisma.SupplierUpdateOneRequiredWithoutReceiptsNestedInput
payments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutPurchaseReceiptNestedInput payments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutReceiptNestedInput
} }
export type PurchaseReceiptUncheckedUpdateWithoutItemsInput = { export type PurchaseReceiptUncheckedUpdateWithoutItemsInput = {
@@ -772,7 +772,7 @@ export type PurchaseReceiptUncheckedUpdateWithoutItemsInput = {
status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus
supplierId?: Prisma.IntFieldUpdateOperationsInput | number supplierId?: Prisma.IntFieldUpdateOperationsInput | number
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
payments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutPurchaseReceiptNestedInput payments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutReceiptNestedInput
} }
export type PurchaseReceiptCreateWithoutPaymentsInput = { export type PurchaseReceiptCreateWithoutPaymentsInput = {
@@ -855,7 +855,7 @@ export type PurchaseReceiptCreateWithoutSupplierInput = {
status?: $Enums.PurchaseReceiptStatus status?: $Enums.PurchaseReceiptStatus
items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput
inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput
payments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutPurchaseReceiptInput payments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutReceiptInput
} }
export type PurchaseReceiptUncheckedCreateWithoutSupplierInput = { export type PurchaseReceiptUncheckedCreateWithoutSupplierInput = {
@@ -869,7 +869,7 @@ export type PurchaseReceiptUncheckedCreateWithoutSupplierInput = {
status?: $Enums.PurchaseReceiptStatus status?: $Enums.PurchaseReceiptStatus
inventoryId: number inventoryId: number
items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput
payments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutPurchaseReceiptInput payments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutReceiptInput
} }
export type PurchaseReceiptCreateOrConnectWithoutSupplierInput = { export type PurchaseReceiptCreateOrConnectWithoutSupplierInput = {
@@ -920,7 +920,7 @@ export type PurchaseReceiptUpdateWithoutInventoryInput = {
status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus
items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput
supplier?: Prisma.SupplierUpdateOneRequiredWithoutReceiptsNestedInput supplier?: Prisma.SupplierUpdateOneRequiredWithoutReceiptsNestedInput
payments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutPurchaseReceiptNestedInput payments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutReceiptNestedInput
} }
export type PurchaseReceiptUncheckedUpdateWithoutInventoryInput = { export type PurchaseReceiptUncheckedUpdateWithoutInventoryInput = {
@@ -934,7 +934,7 @@ export type PurchaseReceiptUncheckedUpdateWithoutInventoryInput = {
status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus
supplierId?: Prisma.IntFieldUpdateOperationsInput | number supplierId?: Prisma.IntFieldUpdateOperationsInput | number
items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput
payments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutPurchaseReceiptNestedInput payments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutReceiptNestedInput
} }
export type PurchaseReceiptUncheckedUpdateManyWithoutInventoryInput = { export type PurchaseReceiptUncheckedUpdateManyWithoutInventoryInput = {
@@ -971,7 +971,7 @@ export type PurchaseReceiptUpdateWithoutSupplierInput = {
status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus
items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput
inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput
payments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutPurchaseReceiptNestedInput payments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutReceiptNestedInput
} }
export type PurchaseReceiptUncheckedUpdateWithoutSupplierInput = { export type PurchaseReceiptUncheckedUpdateWithoutSupplierInput = {
@@ -985,7 +985,7 @@ export type PurchaseReceiptUncheckedUpdateWithoutSupplierInput = {
status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput
payments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutPurchaseReceiptNestedInput payments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutReceiptNestedInput
} }
export type PurchaseReceiptUncheckedUpdateManyWithoutSupplierInput = { export type PurchaseReceiptUncheckedUpdateManyWithoutSupplierInput = {
@@ -49,10 +49,10 @@ export type PurchaseReceiptItemMinAggregateOutputType = {
count: runtime.Decimal | null count: runtime.Decimal | null
fee: runtime.Decimal | null fee: runtime.Decimal | null
total: runtime.Decimal | null total: runtime.Decimal | null
description: string | null
createdAt: Date | null
receiptId: number | null receiptId: number | null
productId: number | null productId: number | null
description: string | null
createdAt: Date | null
} }
export type PurchaseReceiptItemMaxAggregateOutputType = { export type PurchaseReceiptItemMaxAggregateOutputType = {
@@ -60,10 +60,10 @@ export type PurchaseReceiptItemMaxAggregateOutputType = {
count: runtime.Decimal | null count: runtime.Decimal | null
fee: runtime.Decimal | null fee: runtime.Decimal | null
total: runtime.Decimal | null total: runtime.Decimal | null
description: string | null
createdAt: Date | null
receiptId: number | null receiptId: number | null
productId: number | null productId: number | null
description: string | null
createdAt: Date | null
} }
export type PurchaseReceiptItemCountAggregateOutputType = { export type PurchaseReceiptItemCountAggregateOutputType = {
@@ -71,10 +71,10 @@ export type PurchaseReceiptItemCountAggregateOutputType = {
count: number count: number
fee: number fee: number
total: number total: number
description: number
createdAt: number
receiptId: number receiptId: number
productId: number productId: number
description: number
createdAt: number
_all: number _all: number
} }
@@ -102,10 +102,10 @@ export type PurchaseReceiptItemMinAggregateInputType = {
count?: true count?: true
fee?: true fee?: true
total?: true total?: true
description?: true
createdAt?: true
receiptId?: true receiptId?: true
productId?: true productId?: true
description?: true
createdAt?: true
} }
export type PurchaseReceiptItemMaxAggregateInputType = { export type PurchaseReceiptItemMaxAggregateInputType = {
@@ -113,10 +113,10 @@ export type PurchaseReceiptItemMaxAggregateInputType = {
count?: true count?: true
fee?: true fee?: true
total?: true total?: true
description?: true
createdAt?: true
receiptId?: true receiptId?: true
productId?: true productId?: true
description?: true
createdAt?: true
} }
export type PurchaseReceiptItemCountAggregateInputType = { export type PurchaseReceiptItemCountAggregateInputType = {
@@ -124,10 +124,10 @@ export type PurchaseReceiptItemCountAggregateInputType = {
count?: true count?: true
fee?: true fee?: true
total?: true total?: true
description?: true
createdAt?: true
receiptId?: true receiptId?: true
productId?: true productId?: true
description?: true
createdAt?: true
_all?: true _all?: true
} }
@@ -222,10 +222,10 @@ export type PurchaseReceiptItemGroupByOutputType = {
count: runtime.Decimal count: runtime.Decimal
fee: runtime.Decimal fee: runtime.Decimal
total: runtime.Decimal total: runtime.Decimal
description: string | null
createdAt: Date
receiptId: number receiptId: number
productId: number productId: number
description: string | null
createdAt: Date
_count: PurchaseReceiptItemCountAggregateOutputType | null _count: PurchaseReceiptItemCountAggregateOutputType | null
_avg: PurchaseReceiptItemAvgAggregateOutputType | null _avg: PurchaseReceiptItemAvgAggregateOutputType | null
_sum: PurchaseReceiptItemSumAggregateOutputType | null _sum: PurchaseReceiptItemSumAggregateOutputType | null
@@ -256,10 +256,10 @@ export type PurchaseReceiptItemWhereInput = {
count?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string count?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
fee?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string fee?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
total?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string total?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
description?: Prisma.StringNullableFilter<"PurchaseReceiptItem"> | string | null
createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptItem"> | Date | string
receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
description?: Prisma.StringNullableFilter<"PurchaseReceiptItem"> | string | null
createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptItem"> | Date | string
product?: Prisma.XOR<Prisma.ProductScalarRelationFilter, Prisma.ProductWhereInput> product?: Prisma.XOR<Prisma.ProductScalarRelationFilter, Prisma.ProductWhereInput>
receipt?: Prisma.XOR<Prisma.PurchaseReceiptScalarRelationFilter, Prisma.PurchaseReceiptWhereInput> receipt?: Prisma.XOR<Prisma.PurchaseReceiptScalarRelationFilter, Prisma.PurchaseReceiptWhereInput>
} }
@@ -269,10 +269,10 @@ export type PurchaseReceiptItemOrderByWithRelationInput = {
count?: Prisma.SortOrder count?: Prisma.SortOrder
fee?: Prisma.SortOrder fee?: Prisma.SortOrder
total?: Prisma.SortOrder total?: Prisma.SortOrder
description?: Prisma.SortOrderInput | Prisma.SortOrder
createdAt?: Prisma.SortOrder
receiptId?: Prisma.SortOrder receiptId?: Prisma.SortOrder
productId?: Prisma.SortOrder productId?: Prisma.SortOrder
description?: Prisma.SortOrderInput | Prisma.SortOrder
createdAt?: Prisma.SortOrder
product?: Prisma.ProductOrderByWithRelationInput product?: Prisma.ProductOrderByWithRelationInput
receipt?: Prisma.PurchaseReceiptOrderByWithRelationInput receipt?: Prisma.PurchaseReceiptOrderByWithRelationInput
_relevance?: Prisma.PurchaseReceiptItemOrderByRelevanceInput _relevance?: Prisma.PurchaseReceiptItemOrderByRelevanceInput
@@ -286,10 +286,10 @@ export type PurchaseReceiptItemWhereUniqueInput = Prisma.AtLeast<{
count?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string count?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
fee?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string fee?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
total?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string total?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
description?: Prisma.StringNullableFilter<"PurchaseReceiptItem"> | string | null
createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptItem"> | Date | string
receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
description?: Prisma.StringNullableFilter<"PurchaseReceiptItem"> | string | null
createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptItem"> | Date | string
product?: Prisma.XOR<Prisma.ProductScalarRelationFilter, Prisma.ProductWhereInput> product?: Prisma.XOR<Prisma.ProductScalarRelationFilter, Prisma.ProductWhereInput>
receipt?: Prisma.XOR<Prisma.PurchaseReceiptScalarRelationFilter, Prisma.PurchaseReceiptWhereInput> receipt?: Prisma.XOR<Prisma.PurchaseReceiptScalarRelationFilter, Prisma.PurchaseReceiptWhereInput>
}, "id"> }, "id">
@@ -299,10 +299,10 @@ export type PurchaseReceiptItemOrderByWithAggregationInput = {
count?: Prisma.SortOrder count?: Prisma.SortOrder
fee?: Prisma.SortOrder fee?: Prisma.SortOrder
total?: Prisma.SortOrder total?: Prisma.SortOrder
description?: Prisma.SortOrderInput | Prisma.SortOrder
createdAt?: Prisma.SortOrder
receiptId?: Prisma.SortOrder receiptId?: Prisma.SortOrder
productId?: Prisma.SortOrder productId?: Prisma.SortOrder
description?: Prisma.SortOrderInput | Prisma.SortOrder
createdAt?: Prisma.SortOrder
_count?: Prisma.PurchaseReceiptItemCountOrderByAggregateInput _count?: Prisma.PurchaseReceiptItemCountOrderByAggregateInput
_avg?: Prisma.PurchaseReceiptItemAvgOrderByAggregateInput _avg?: Prisma.PurchaseReceiptItemAvgOrderByAggregateInput
_max?: Prisma.PurchaseReceiptItemMaxOrderByAggregateInput _max?: Prisma.PurchaseReceiptItemMaxOrderByAggregateInput
@@ -318,10 +318,10 @@ export type PurchaseReceiptItemScalarWhereWithAggregatesInput = {
count?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string count?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
fee?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string fee?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
total?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string total?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
description?: Prisma.StringNullableWithAggregatesFilter<"PurchaseReceiptItem"> | string | null
createdAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceiptItem"> | Date | string
receiptId?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptItem"> | number receiptId?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptItem"> | number
productId?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptItem"> | number productId?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptItem"> | number
description?: Prisma.StringNullableWithAggregatesFilter<"PurchaseReceiptItem"> | string | null
createdAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceiptItem"> | Date | string
} }
export type PurchaseReceiptItemCreateInput = { export type PurchaseReceiptItemCreateInput = {
@@ -339,10 +339,10 @@ export type PurchaseReceiptItemUncheckedCreateInput = {
count: runtime.Decimal | runtime.DecimalJsLike | number | string count: runtime.Decimal | runtime.DecimalJsLike | number | string
fee: runtime.Decimal | runtime.DecimalJsLike | number | string fee: runtime.Decimal | runtime.DecimalJsLike | number | string
total: runtime.Decimal | runtime.DecimalJsLike | number | string total: runtime.Decimal | runtime.DecimalJsLike | number | string
description?: string | null
createdAt?: Date | string
receiptId: number receiptId: number
productId: number productId: number
description?: string | null
createdAt?: Date | string
} }
export type PurchaseReceiptItemUpdateInput = { export type PurchaseReceiptItemUpdateInput = {
@@ -360,10 +360,10 @@ export type PurchaseReceiptItemUncheckedUpdateInput = {
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
receiptId?: Prisma.IntFieldUpdateOperationsInput | number receiptId?: Prisma.IntFieldUpdateOperationsInput | number
productId?: Prisma.IntFieldUpdateOperationsInput | number productId?: Prisma.IntFieldUpdateOperationsInput | number
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
} }
export type PurchaseReceiptItemCreateManyInput = { export type PurchaseReceiptItemCreateManyInput = {
@@ -371,10 +371,10 @@ export type PurchaseReceiptItemCreateManyInput = {
count: runtime.Decimal | runtime.DecimalJsLike | number | string count: runtime.Decimal | runtime.DecimalJsLike | number | string
fee: runtime.Decimal | runtime.DecimalJsLike | number | string fee: runtime.Decimal | runtime.DecimalJsLike | number | string
total: runtime.Decimal | runtime.DecimalJsLike | number | string total: runtime.Decimal | runtime.DecimalJsLike | number | string
description?: string | null
createdAt?: Date | string
receiptId: number receiptId: number
productId: number productId: number
description?: string | null
createdAt?: Date | string
} }
export type PurchaseReceiptItemUpdateManyMutationInput = { export type PurchaseReceiptItemUpdateManyMutationInput = {
@@ -390,10 +390,10 @@ export type PurchaseReceiptItemUncheckedUpdateManyInput = {
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
receiptId?: Prisma.IntFieldUpdateOperationsInput | number receiptId?: Prisma.IntFieldUpdateOperationsInput | number
productId?: Prisma.IntFieldUpdateOperationsInput | number productId?: Prisma.IntFieldUpdateOperationsInput | number
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
} }
export type PurchaseReceiptItemListRelationFilter = { export type PurchaseReceiptItemListRelationFilter = {
@@ -417,10 +417,10 @@ export type PurchaseReceiptItemCountOrderByAggregateInput = {
count?: Prisma.SortOrder count?: Prisma.SortOrder
fee?: Prisma.SortOrder fee?: Prisma.SortOrder
total?: Prisma.SortOrder total?: Prisma.SortOrder
description?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
receiptId?: Prisma.SortOrder receiptId?: Prisma.SortOrder
productId?: Prisma.SortOrder productId?: Prisma.SortOrder
description?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
} }
export type PurchaseReceiptItemAvgOrderByAggregateInput = { export type PurchaseReceiptItemAvgOrderByAggregateInput = {
@@ -437,10 +437,10 @@ export type PurchaseReceiptItemMaxOrderByAggregateInput = {
count?: Prisma.SortOrder count?: Prisma.SortOrder
fee?: Prisma.SortOrder fee?: Prisma.SortOrder
total?: Prisma.SortOrder total?: Prisma.SortOrder
description?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
receiptId?: Prisma.SortOrder receiptId?: Prisma.SortOrder
productId?: Prisma.SortOrder productId?: Prisma.SortOrder
description?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
} }
export type PurchaseReceiptItemMinOrderByAggregateInput = { export type PurchaseReceiptItemMinOrderByAggregateInput = {
@@ -448,10 +448,10 @@ export type PurchaseReceiptItemMinOrderByAggregateInput = {
count?: Prisma.SortOrder count?: Prisma.SortOrder
fee?: Prisma.SortOrder fee?: Prisma.SortOrder
total?: Prisma.SortOrder total?: Prisma.SortOrder
description?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
receiptId?: Prisma.SortOrder receiptId?: Prisma.SortOrder
productId?: Prisma.SortOrder productId?: Prisma.SortOrder
description?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
} }
export type PurchaseReceiptItemSumOrderByAggregateInput = { export type PurchaseReceiptItemSumOrderByAggregateInput = {
@@ -561,9 +561,9 @@ export type PurchaseReceiptItemUncheckedCreateWithoutProductInput = {
count: runtime.Decimal | runtime.DecimalJsLike | number | string count: runtime.Decimal | runtime.DecimalJsLike | number | string
fee: runtime.Decimal | runtime.DecimalJsLike | number | string fee: runtime.Decimal | runtime.DecimalJsLike | number | string
total: runtime.Decimal | runtime.DecimalJsLike | number | string total: runtime.Decimal | runtime.DecimalJsLike | number | string
receiptId: number
description?: string | null description?: string | null
createdAt?: Date | string createdAt?: Date | string
receiptId: number
} }
export type PurchaseReceiptItemCreateOrConnectWithoutProductInput = { export type PurchaseReceiptItemCreateOrConnectWithoutProductInput = {
@@ -600,10 +600,10 @@ export type PurchaseReceiptItemScalarWhereInput = {
count?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string count?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
fee?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string fee?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
total?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string total?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
description?: Prisma.StringNullableFilter<"PurchaseReceiptItem"> | string | null
createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptItem"> | Date | string
receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
description?: Prisma.StringNullableFilter<"PurchaseReceiptItem"> | string | null
createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptItem"> | Date | string
} }
export type PurchaseReceiptItemCreateWithoutReceiptInput = { export type PurchaseReceiptItemCreateWithoutReceiptInput = {
@@ -620,9 +620,9 @@ export type PurchaseReceiptItemUncheckedCreateWithoutReceiptInput = {
count: runtime.Decimal | runtime.DecimalJsLike | number | string count: runtime.Decimal | runtime.DecimalJsLike | number | string
fee: runtime.Decimal | runtime.DecimalJsLike | number | string fee: runtime.Decimal | runtime.DecimalJsLike | number | string
total: runtime.Decimal | runtime.DecimalJsLike | number | string total: runtime.Decimal | runtime.DecimalJsLike | number | string
productId: number
description?: string | null description?: string | null
createdAt?: Date | string createdAt?: Date | string
productId: number
} }
export type PurchaseReceiptItemCreateOrConnectWithoutReceiptInput = { export type PurchaseReceiptItemCreateOrConnectWithoutReceiptInput = {
@@ -656,9 +656,9 @@ export type PurchaseReceiptItemCreateManyProductInput = {
count: runtime.Decimal | runtime.DecimalJsLike | number | string count: runtime.Decimal | runtime.DecimalJsLike | number | string
fee: runtime.Decimal | runtime.DecimalJsLike | number | string fee: runtime.Decimal | runtime.DecimalJsLike | number | string
total: runtime.Decimal | runtime.DecimalJsLike | number | string total: runtime.Decimal | runtime.DecimalJsLike | number | string
receiptId: number
description?: string | null description?: string | null
createdAt?: Date | string createdAt?: Date | string
receiptId: number
} }
export type PurchaseReceiptItemUpdateWithoutProductInput = { export type PurchaseReceiptItemUpdateWithoutProductInput = {
@@ -675,9 +675,9 @@ export type PurchaseReceiptItemUncheckedUpdateWithoutProductInput = {
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
receiptId?: Prisma.IntFieldUpdateOperationsInput | number
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
receiptId?: Prisma.IntFieldUpdateOperationsInput | number
} }
export type PurchaseReceiptItemUncheckedUpdateManyWithoutProductInput = { export type PurchaseReceiptItemUncheckedUpdateManyWithoutProductInput = {
@@ -685,9 +685,9 @@ export type PurchaseReceiptItemUncheckedUpdateManyWithoutProductInput = {
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
receiptId?: Prisma.IntFieldUpdateOperationsInput | number
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
receiptId?: Prisma.IntFieldUpdateOperationsInput | number
} }
export type PurchaseReceiptItemCreateManyReceiptInput = { export type PurchaseReceiptItemCreateManyReceiptInput = {
@@ -695,9 +695,9 @@ export type PurchaseReceiptItemCreateManyReceiptInput = {
count: runtime.Decimal | runtime.DecimalJsLike | number | string count: runtime.Decimal | runtime.DecimalJsLike | number | string
fee: runtime.Decimal | runtime.DecimalJsLike | number | string fee: runtime.Decimal | runtime.DecimalJsLike | number | string
total: runtime.Decimal | runtime.DecimalJsLike | number | string total: runtime.Decimal | runtime.DecimalJsLike | number | string
productId: number
description?: string | null description?: string | null
createdAt?: Date | string createdAt?: Date | string
productId: number
} }
export type PurchaseReceiptItemUpdateWithoutReceiptInput = { export type PurchaseReceiptItemUpdateWithoutReceiptInput = {
@@ -714,9 +714,9 @@ export type PurchaseReceiptItemUncheckedUpdateWithoutReceiptInput = {
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
productId?: Prisma.IntFieldUpdateOperationsInput | number
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
productId?: Prisma.IntFieldUpdateOperationsInput | number
} }
export type PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptInput = { export type PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptInput = {
@@ -724,9 +724,9 @@ export type PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptInput = {
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
productId?: Prisma.IntFieldUpdateOperationsInput | number
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
productId?: Prisma.IntFieldUpdateOperationsInput | number
} }
@@ -736,10 +736,10 @@ export type PurchaseReceiptItemSelect<ExtArgs extends runtime.Types.Extensions.I
count?: boolean count?: boolean
fee?: boolean fee?: boolean
total?: boolean total?: boolean
description?: boolean
createdAt?: boolean
receiptId?: boolean receiptId?: boolean
productId?: boolean productId?: boolean
description?: boolean
createdAt?: boolean
product?: boolean | Prisma.ProductDefaultArgs<ExtArgs> product?: boolean | Prisma.ProductDefaultArgs<ExtArgs>
receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs<ExtArgs> receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs<ExtArgs>
}, ExtArgs["result"]["purchaseReceiptItem"]> }, ExtArgs["result"]["purchaseReceiptItem"]>
@@ -751,13 +751,13 @@ export type PurchaseReceiptItemSelectScalar = {
count?: boolean count?: boolean
fee?: boolean fee?: boolean
total?: boolean total?: boolean
description?: boolean
createdAt?: boolean
receiptId?: boolean receiptId?: boolean
productId?: boolean productId?: boolean
description?: boolean
createdAt?: boolean
} }
export type PurchaseReceiptItemOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "count" | "fee" | "total" | "description" | "createdAt" | "receiptId" | "productId", ExtArgs["result"]["purchaseReceiptItem"]> export type PurchaseReceiptItemOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "count" | "fee" | "total" | "receiptId" | "productId" | "description" | "createdAt", ExtArgs["result"]["purchaseReceiptItem"]>
export type PurchaseReceiptItemInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = { export type PurchaseReceiptItemInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
product?: boolean | Prisma.ProductDefaultArgs<ExtArgs> product?: boolean | Prisma.ProductDefaultArgs<ExtArgs>
receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs<ExtArgs> receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs<ExtArgs>
@@ -774,10 +774,10 @@ export type $PurchaseReceiptItemPayload<ExtArgs extends runtime.Types.Extensions
count: runtime.Decimal count: runtime.Decimal
fee: runtime.Decimal fee: runtime.Decimal
total: runtime.Decimal total: runtime.Decimal
description: string | null
createdAt: Date
receiptId: number receiptId: number
productId: number productId: number
description: string | null
createdAt: Date
}, ExtArgs["result"]["purchaseReceiptItem"]> }, ExtArgs["result"]["purchaseReceiptItem"]>
composites: {} composites: {}
} }
@@ -1153,10 +1153,10 @@ export interface PurchaseReceiptItemFieldRefs {
readonly count: Prisma.FieldRef<"PurchaseReceiptItem", 'Decimal'> readonly count: Prisma.FieldRef<"PurchaseReceiptItem", 'Decimal'>
readonly fee: Prisma.FieldRef<"PurchaseReceiptItem", 'Decimal'> readonly fee: Prisma.FieldRef<"PurchaseReceiptItem", 'Decimal'>
readonly total: Prisma.FieldRef<"PurchaseReceiptItem", 'Decimal'> readonly total: Prisma.FieldRef<"PurchaseReceiptItem", 'Decimal'>
readonly description: Prisma.FieldRef<"PurchaseReceiptItem", 'String'>
readonly createdAt: Prisma.FieldRef<"PurchaseReceiptItem", 'DateTime'>
readonly receiptId: Prisma.FieldRef<"PurchaseReceiptItem", 'Int'> readonly receiptId: Prisma.FieldRef<"PurchaseReceiptItem", 'Int'>
readonly productId: Prisma.FieldRef<"PurchaseReceiptItem", 'Int'> readonly productId: Prisma.FieldRef<"PurchaseReceiptItem", 'Int'>
readonly description: Prisma.FieldRef<"PurchaseReceiptItem", 'String'>
readonly createdAt: Prisma.FieldRef<"PurchaseReceiptItem", 'DateTime'>
} }
@@ -30,7 +30,6 @@ export type PurchaseReceiptPaymentsAvgAggregateOutputType = {
id: number | null id: number | null
amount: runtime.Decimal | null amount: runtime.Decimal | null
bankAccountId: number | null bankAccountId: number | null
inventoryId: number | null
receiptId: number | null receiptId: number | null
} }
@@ -38,7 +37,6 @@ export type PurchaseReceiptPaymentsSumAggregateOutputType = {
id: number | null id: number | null
amount: runtime.Decimal | null amount: runtime.Decimal | null
bankAccountId: number | null bankAccountId: number | null
inventoryId: number | null
receiptId: number | null receiptId: number | null
} }
@@ -48,10 +46,9 @@ export type PurchaseReceiptPaymentsMinAggregateOutputType = {
paymentMethod: $Enums.PaymentMethodType | null paymentMethod: $Enums.PaymentMethodType | null
type: $Enums.PaymentType | null type: $Enums.PaymentType | null
bankAccountId: number | null bankAccountId: number | null
inventoryId: number | null
description: string | null
payedAt: Date | null
receiptId: number | null receiptId: number | null
payedAt: Date | null
description: string | null
createdAt: Date | null createdAt: Date | null
} }
@@ -61,10 +58,9 @@ export type PurchaseReceiptPaymentsMaxAggregateOutputType = {
paymentMethod: $Enums.PaymentMethodType | null paymentMethod: $Enums.PaymentMethodType | null
type: $Enums.PaymentType | null type: $Enums.PaymentType | null
bankAccountId: number | null bankAccountId: number | null
inventoryId: number | null
description: string | null
payedAt: Date | null
receiptId: number | null receiptId: number | null
payedAt: Date | null
description: string | null
createdAt: Date | null createdAt: Date | null
} }
@@ -74,10 +70,9 @@ export type PurchaseReceiptPaymentsCountAggregateOutputType = {
paymentMethod: number paymentMethod: number
type: number type: number
bankAccountId: number bankAccountId: number
inventoryId: number
description: number
payedAt: number
receiptId: number receiptId: number
payedAt: number
description: number
createdAt: number createdAt: number
_all: number _all: number
} }
@@ -87,7 +82,6 @@ export type PurchaseReceiptPaymentsAvgAggregateInputType = {
id?: true id?: true
amount?: true amount?: true
bankAccountId?: true bankAccountId?: true
inventoryId?: true
receiptId?: true receiptId?: true
} }
@@ -95,7 +89,6 @@ export type PurchaseReceiptPaymentsSumAggregateInputType = {
id?: true id?: true
amount?: true amount?: true
bankAccountId?: true bankAccountId?: true
inventoryId?: true
receiptId?: true receiptId?: true
} }
@@ -105,10 +98,9 @@ export type PurchaseReceiptPaymentsMinAggregateInputType = {
paymentMethod?: true paymentMethod?: true
type?: true type?: true
bankAccountId?: true bankAccountId?: true
inventoryId?: true
description?: true
payedAt?: true
receiptId?: true receiptId?: true
payedAt?: true
description?: true
createdAt?: true createdAt?: true
} }
@@ -118,10 +110,9 @@ export type PurchaseReceiptPaymentsMaxAggregateInputType = {
paymentMethod?: true paymentMethod?: true
type?: true type?: true
bankAccountId?: true bankAccountId?: true
inventoryId?: true
description?: true
payedAt?: true
receiptId?: true receiptId?: true
payedAt?: true
description?: true
createdAt?: true createdAt?: true
} }
@@ -131,10 +122,9 @@ export type PurchaseReceiptPaymentsCountAggregateInputType = {
paymentMethod?: true paymentMethod?: true
type?: true type?: true
bankAccountId?: true bankAccountId?: true
inventoryId?: true
description?: true
payedAt?: true
receiptId?: true receiptId?: true
payedAt?: true
description?: true
createdAt?: true createdAt?: true
_all?: true _all?: true
} }
@@ -231,10 +221,9 @@ export type PurchaseReceiptPaymentsGroupByOutputType = {
paymentMethod: $Enums.PaymentMethodType paymentMethod: $Enums.PaymentMethodType
type: $Enums.PaymentType type: $Enums.PaymentType
bankAccountId: number bankAccountId: number
inventoryId: number
description: string | null
payedAt: Date
receiptId: number receiptId: number
payedAt: Date
description: string | null
createdAt: Date createdAt: Date
_count: PurchaseReceiptPaymentsCountAggregateOutputType | null _count: PurchaseReceiptPaymentsCountAggregateOutputType | null
_avg: PurchaseReceiptPaymentsAvgAggregateOutputType | null _avg: PurchaseReceiptPaymentsAvgAggregateOutputType | null
@@ -267,13 +256,11 @@ export type PurchaseReceiptPaymentsWhereInput = {
paymentMethod?: Prisma.EnumPaymentMethodTypeFilter<"PurchaseReceiptPayments"> | $Enums.PaymentMethodType paymentMethod?: Prisma.EnumPaymentMethodTypeFilter<"PurchaseReceiptPayments"> | $Enums.PaymentMethodType
type?: Prisma.EnumPaymentTypeFilter<"PurchaseReceiptPayments"> | $Enums.PaymentType type?: Prisma.EnumPaymentTypeFilter<"PurchaseReceiptPayments"> | $Enums.PaymentType
bankAccountId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number bankAccountId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number
inventoryId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number
description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null
payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string
receiptId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number receiptId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number
payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string
description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null
createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string
purchaseReceipt?: Prisma.XOR<Prisma.PurchaseReceiptScalarRelationFilter, Prisma.PurchaseReceiptWhereInput> receipt?: Prisma.XOR<Prisma.PurchaseReceiptScalarRelationFilter, Prisma.PurchaseReceiptWhereInput>
inventoryBankAccount?: Prisma.XOR<Prisma.InventoryBankAccountScalarRelationFilter, Prisma.InventoryBankAccountWhereInput>
} }
export type PurchaseReceiptPaymentsOrderByWithRelationInput = { export type PurchaseReceiptPaymentsOrderByWithRelationInput = {
@@ -282,13 +269,11 @@ export type PurchaseReceiptPaymentsOrderByWithRelationInput = {
paymentMethod?: Prisma.SortOrder paymentMethod?: Prisma.SortOrder
type?: Prisma.SortOrder type?: Prisma.SortOrder
bankAccountId?: Prisma.SortOrder bankAccountId?: Prisma.SortOrder
inventoryId?: Prisma.SortOrder
description?: Prisma.SortOrderInput | Prisma.SortOrder
payedAt?: Prisma.SortOrder
receiptId?: Prisma.SortOrder receiptId?: Prisma.SortOrder
payedAt?: Prisma.SortOrder
description?: Prisma.SortOrderInput | Prisma.SortOrder
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
purchaseReceipt?: Prisma.PurchaseReceiptOrderByWithRelationInput receipt?: Prisma.PurchaseReceiptOrderByWithRelationInput
inventoryBankAccount?: Prisma.InventoryBankAccountOrderByWithRelationInput
_relevance?: Prisma.PurchaseReceiptPaymentsOrderByRelevanceInput _relevance?: Prisma.PurchaseReceiptPaymentsOrderByRelevanceInput
} }
@@ -301,13 +286,11 @@ export type PurchaseReceiptPaymentsWhereUniqueInput = Prisma.AtLeast<{
paymentMethod?: Prisma.EnumPaymentMethodTypeFilter<"PurchaseReceiptPayments"> | $Enums.PaymentMethodType paymentMethod?: Prisma.EnumPaymentMethodTypeFilter<"PurchaseReceiptPayments"> | $Enums.PaymentMethodType
type?: Prisma.EnumPaymentTypeFilter<"PurchaseReceiptPayments"> | $Enums.PaymentType type?: Prisma.EnumPaymentTypeFilter<"PurchaseReceiptPayments"> | $Enums.PaymentType
bankAccountId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number bankAccountId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number
inventoryId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number
description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null
payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string
receiptId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number receiptId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number
payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string
description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null
createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string
purchaseReceipt?: Prisma.XOR<Prisma.PurchaseReceiptScalarRelationFilter, Prisma.PurchaseReceiptWhereInput> receipt?: Prisma.XOR<Prisma.PurchaseReceiptScalarRelationFilter, Prisma.PurchaseReceiptWhereInput>
inventoryBankAccount?: Prisma.XOR<Prisma.InventoryBankAccountScalarRelationFilter, Prisma.InventoryBankAccountWhereInput>
}, "id"> }, "id">
export type PurchaseReceiptPaymentsOrderByWithAggregationInput = { export type PurchaseReceiptPaymentsOrderByWithAggregationInput = {
@@ -316,10 +299,9 @@ export type PurchaseReceiptPaymentsOrderByWithAggregationInput = {
paymentMethod?: Prisma.SortOrder paymentMethod?: Prisma.SortOrder
type?: Prisma.SortOrder type?: Prisma.SortOrder
bankAccountId?: Prisma.SortOrder bankAccountId?: Prisma.SortOrder
inventoryId?: Prisma.SortOrder
description?: Prisma.SortOrderInput | Prisma.SortOrder
payedAt?: Prisma.SortOrder
receiptId?: Prisma.SortOrder receiptId?: Prisma.SortOrder
payedAt?: Prisma.SortOrder
description?: Prisma.SortOrderInput | Prisma.SortOrder
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
_count?: Prisma.PurchaseReceiptPaymentsCountOrderByAggregateInput _count?: Prisma.PurchaseReceiptPaymentsCountOrderByAggregateInput
_avg?: Prisma.PurchaseReceiptPaymentsAvgOrderByAggregateInput _avg?: Prisma.PurchaseReceiptPaymentsAvgOrderByAggregateInput
@@ -337,10 +319,9 @@ export type PurchaseReceiptPaymentsScalarWhereWithAggregatesInput = {
paymentMethod?: Prisma.EnumPaymentMethodTypeWithAggregatesFilter<"PurchaseReceiptPayments"> | $Enums.PaymentMethodType paymentMethod?: Prisma.EnumPaymentMethodTypeWithAggregatesFilter<"PurchaseReceiptPayments"> | $Enums.PaymentMethodType
type?: Prisma.EnumPaymentTypeWithAggregatesFilter<"PurchaseReceiptPayments"> | $Enums.PaymentType type?: Prisma.EnumPaymentTypeWithAggregatesFilter<"PurchaseReceiptPayments"> | $Enums.PaymentType
bankAccountId?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptPayments"> | number bankAccountId?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptPayments"> | number
inventoryId?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptPayments"> | number
description?: Prisma.StringNullableWithAggregatesFilter<"PurchaseReceiptPayments"> | string | null
payedAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceiptPayments"> | Date | string
receiptId?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptPayments"> | number receiptId?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptPayments"> | number
payedAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceiptPayments"> | Date | string
description?: Prisma.StringNullableWithAggregatesFilter<"PurchaseReceiptPayments"> | string | null
createdAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceiptPayments"> | Date | string createdAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceiptPayments"> | Date | string
} }
@@ -348,11 +329,11 @@ export type PurchaseReceiptPaymentsCreateInput = {
amount: runtime.Decimal | runtime.DecimalJsLike | number | string amount: runtime.Decimal | runtime.DecimalJsLike | number | string
paymentMethod: $Enums.PaymentMethodType paymentMethod: $Enums.PaymentMethodType
type: $Enums.PaymentType type: $Enums.PaymentType
description?: string | null bankAccountId: number
payedAt: Date | string payedAt: Date | string
description?: string | null
createdAt?: Date | string createdAt?: Date | string
purchaseReceipt: Prisma.PurchaseReceiptCreateNestedOneWithoutPaymentsInput receipt: Prisma.PurchaseReceiptCreateNestedOneWithoutPaymentsInput
inventoryBankAccount: Prisma.InventoryBankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput
} }
export type PurchaseReceiptPaymentsUncheckedCreateInput = { export type PurchaseReceiptPaymentsUncheckedCreateInput = {
@@ -361,10 +342,9 @@ export type PurchaseReceiptPaymentsUncheckedCreateInput = {
paymentMethod: $Enums.PaymentMethodType paymentMethod: $Enums.PaymentMethodType
type: $Enums.PaymentType type: $Enums.PaymentType
bankAccountId: number bankAccountId: number
inventoryId: number
description?: string | null
payedAt: Date | string
receiptId: number receiptId: number
payedAt: Date | string
description?: string | null
createdAt?: Date | string createdAt?: Date | string
} }
@@ -372,11 +352,11 @@ export type PurchaseReceiptPaymentsUpdateInput = {
amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
purchaseReceipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutPaymentsNestedInput receipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutPaymentsNestedInput
inventoryBankAccount?: Prisma.InventoryBankAccountUpdateOneRequiredWithoutPurchaseReceiptPaymentsNestedInput
} }
export type PurchaseReceiptPaymentsUncheckedUpdateInput = { export type PurchaseReceiptPaymentsUncheckedUpdateInput = {
@@ -385,10 +365,9 @@ export type PurchaseReceiptPaymentsUncheckedUpdateInput = {
paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType
bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
receiptId?: Prisma.IntFieldUpdateOperationsInput | number receiptId?: Prisma.IntFieldUpdateOperationsInput | number
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
} }
@@ -398,10 +377,9 @@ export type PurchaseReceiptPaymentsCreateManyInput = {
paymentMethod: $Enums.PaymentMethodType paymentMethod: $Enums.PaymentMethodType
type: $Enums.PaymentType type: $Enums.PaymentType
bankAccountId: number bankAccountId: number
inventoryId: number
description?: string | null
payedAt: Date | string
receiptId: number receiptId: number
payedAt: Date | string
description?: string | null
createdAt?: Date | string createdAt?: Date | string
} }
@@ -409,8 +387,9 @@ export type PurchaseReceiptPaymentsUpdateManyMutationInput = {
amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
} }
@@ -420,10 +399,9 @@ export type PurchaseReceiptPaymentsUncheckedUpdateManyInput = {
paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType
bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
receiptId?: Prisma.IntFieldUpdateOperationsInput | number receiptId?: Prisma.IntFieldUpdateOperationsInput | number
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
} }
@@ -449,10 +427,9 @@ export type PurchaseReceiptPaymentsCountOrderByAggregateInput = {
paymentMethod?: Prisma.SortOrder paymentMethod?: Prisma.SortOrder
type?: Prisma.SortOrder type?: Prisma.SortOrder
bankAccountId?: Prisma.SortOrder bankAccountId?: Prisma.SortOrder
inventoryId?: Prisma.SortOrder
description?: Prisma.SortOrder
payedAt?: Prisma.SortOrder
receiptId?: Prisma.SortOrder receiptId?: Prisma.SortOrder
payedAt?: Prisma.SortOrder
description?: Prisma.SortOrder
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
} }
@@ -460,7 +437,6 @@ export type PurchaseReceiptPaymentsAvgOrderByAggregateInput = {
id?: Prisma.SortOrder id?: Prisma.SortOrder
amount?: Prisma.SortOrder amount?: Prisma.SortOrder
bankAccountId?: Prisma.SortOrder bankAccountId?: Prisma.SortOrder
inventoryId?: Prisma.SortOrder
receiptId?: Prisma.SortOrder receiptId?: Prisma.SortOrder
} }
@@ -470,10 +446,9 @@ export type PurchaseReceiptPaymentsMaxOrderByAggregateInput = {
paymentMethod?: Prisma.SortOrder paymentMethod?: Prisma.SortOrder
type?: Prisma.SortOrder type?: Prisma.SortOrder
bankAccountId?: Prisma.SortOrder bankAccountId?: Prisma.SortOrder
inventoryId?: Prisma.SortOrder
description?: Prisma.SortOrder
payedAt?: Prisma.SortOrder
receiptId?: Prisma.SortOrder receiptId?: Prisma.SortOrder
payedAt?: Prisma.SortOrder
description?: Prisma.SortOrder
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
} }
@@ -483,10 +458,9 @@ export type PurchaseReceiptPaymentsMinOrderByAggregateInput = {
paymentMethod?: Prisma.SortOrder paymentMethod?: Prisma.SortOrder
type?: Prisma.SortOrder type?: Prisma.SortOrder
bankAccountId?: Prisma.SortOrder bankAccountId?: Prisma.SortOrder
inventoryId?: Prisma.SortOrder
description?: Prisma.SortOrder
payedAt?: Prisma.SortOrder
receiptId?: Prisma.SortOrder receiptId?: Prisma.SortOrder
payedAt?: Prisma.SortOrder
description?: Prisma.SortOrder
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
} }
@@ -494,91 +468,48 @@ export type PurchaseReceiptPaymentsSumOrderByAggregateInput = {
id?: Prisma.SortOrder id?: Prisma.SortOrder
amount?: Prisma.SortOrder amount?: Prisma.SortOrder
bankAccountId?: Prisma.SortOrder bankAccountId?: Prisma.SortOrder
inventoryId?: Prisma.SortOrder
receiptId?: Prisma.SortOrder receiptId?: Prisma.SortOrder
} }
export type PurchaseReceiptPaymentsCreateNestedManyWithoutInventoryBankAccountInput = { export type PurchaseReceiptPaymentsCreateNestedManyWithoutReceiptInput = {
create?: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput> | Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput[] create?: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutReceiptInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput> | Prisma.PurchaseReceiptPaymentsCreateWithoutReceiptInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput[]
connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput[] connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput[]
createMany?: Prisma.PurchaseReceiptPaymentsCreateManyInventoryBankAccountInputEnvelope createMany?: Prisma.PurchaseReceiptPaymentsCreateManyReceiptInputEnvelope
connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
} }
export type PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutInventoryBankAccountInput = { export type PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutReceiptInput = {
create?: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput> | Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput[] create?: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutReceiptInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput> | Prisma.PurchaseReceiptPaymentsCreateWithoutReceiptInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput[]
connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput[] connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput[]
createMany?: Prisma.PurchaseReceiptPaymentsCreateManyInventoryBankAccountInputEnvelope createMany?: Prisma.PurchaseReceiptPaymentsCreateManyReceiptInputEnvelope
connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
} }
export type PurchaseReceiptPaymentsUpdateManyWithoutInventoryBankAccountNestedInput = { export type PurchaseReceiptPaymentsUpdateManyWithoutReceiptNestedInput = {
create?: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput> | Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput[] create?: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutReceiptInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput> | Prisma.PurchaseReceiptPaymentsCreateWithoutReceiptInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput[]
connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput[] connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput[]
upsert?: Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutInventoryBankAccountInput[] upsert?: Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutReceiptInput[]
createMany?: Prisma.PurchaseReceiptPaymentsCreateManyInventoryBankAccountInputEnvelope createMany?: Prisma.PurchaseReceiptPaymentsCreateManyReceiptInputEnvelope
set?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] set?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
disconnect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] disconnect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
delete?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] delete?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
update?: Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutInventoryBankAccountInput[] update?: Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutReceiptInput[]
updateMany?: Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutInventoryBankAccountInput[] updateMany?: Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutReceiptInput[]
deleteMany?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[] deleteMany?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[]
} }
export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutInventoryBankAccountNestedInput = { export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutReceiptNestedInput = {
create?: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput> | Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput[] create?: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutReceiptInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput> | Prisma.PurchaseReceiptPaymentsCreateWithoutReceiptInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput[]
connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput[] connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput[]
upsert?: Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutInventoryBankAccountInput[] upsert?: Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutReceiptInput[]
createMany?: Prisma.PurchaseReceiptPaymentsCreateManyInventoryBankAccountInputEnvelope createMany?: Prisma.PurchaseReceiptPaymentsCreateManyReceiptInputEnvelope
set?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] set?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
disconnect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] disconnect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
delete?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] delete?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
update?: Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutInventoryBankAccountInput[] update?: Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutReceiptInput[]
updateMany?: Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutInventoryBankAccountInput[] updateMany?: Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutReceiptInput[]
deleteMany?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[]
}
export type PurchaseReceiptPaymentsCreateNestedManyWithoutPurchaseReceiptInput = {
create?: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutPurchaseReceiptInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutPurchaseReceiptInput> | Prisma.PurchaseReceiptPaymentsCreateWithoutPurchaseReceiptInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutPurchaseReceiptInput[]
connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutPurchaseReceiptInput[]
createMany?: Prisma.PurchaseReceiptPaymentsCreateManyPurchaseReceiptInputEnvelope
connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
}
export type PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutPurchaseReceiptInput = {
create?: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutPurchaseReceiptInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutPurchaseReceiptInput> | Prisma.PurchaseReceiptPaymentsCreateWithoutPurchaseReceiptInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutPurchaseReceiptInput[]
connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutPurchaseReceiptInput[]
createMany?: Prisma.PurchaseReceiptPaymentsCreateManyPurchaseReceiptInputEnvelope
connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
}
export type PurchaseReceiptPaymentsUpdateManyWithoutPurchaseReceiptNestedInput = {
create?: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutPurchaseReceiptInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutPurchaseReceiptInput> | Prisma.PurchaseReceiptPaymentsCreateWithoutPurchaseReceiptInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutPurchaseReceiptInput[]
connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutPurchaseReceiptInput[]
upsert?: Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutPurchaseReceiptInput[]
createMany?: Prisma.PurchaseReceiptPaymentsCreateManyPurchaseReceiptInputEnvelope
set?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
disconnect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
delete?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
update?: Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutPurchaseReceiptInput[]
updateMany?: Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutPurchaseReceiptInput[]
deleteMany?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[]
}
export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutPurchaseReceiptNestedInput = {
create?: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutPurchaseReceiptInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutPurchaseReceiptInput> | Prisma.PurchaseReceiptPaymentsCreateWithoutPurchaseReceiptInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutPurchaseReceiptInput[]
connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutPurchaseReceiptInput[]
upsert?: Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutPurchaseReceiptInput[]
createMany?: Prisma.PurchaseReceiptPaymentsCreateManyPurchaseReceiptInputEnvelope
set?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
disconnect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
delete?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
update?: Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutPurchaseReceiptInput[]
updateMany?: Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutPurchaseReceiptInput[]
deleteMany?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[] deleteMany?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[]
} }
@@ -586,51 +517,51 @@ export type EnumPaymentTypeFieldUpdateOperationsInput = {
set?: $Enums.PaymentType set?: $Enums.PaymentType
} }
export type PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput = { export type PurchaseReceiptPaymentsCreateWithoutReceiptInput = {
amount: runtime.Decimal | runtime.DecimalJsLike | number | string amount: runtime.Decimal | runtime.DecimalJsLike | number | string
paymentMethod: $Enums.PaymentMethodType paymentMethod: $Enums.PaymentMethodType
type: $Enums.PaymentType type: $Enums.PaymentType
description?: string | null bankAccountId: number
payedAt: Date | string payedAt: Date | string
description?: string | null
createdAt?: Date | string createdAt?: Date | string
purchaseReceipt: Prisma.PurchaseReceiptCreateNestedOneWithoutPaymentsInput
} }
export type PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput = { export type PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput = {
id?: number id?: number
amount: runtime.Decimal | runtime.DecimalJsLike | number | string amount: runtime.Decimal | runtime.DecimalJsLike | number | string
paymentMethod: $Enums.PaymentMethodType paymentMethod: $Enums.PaymentMethodType
type: $Enums.PaymentType type: $Enums.PaymentType
description?: string | null bankAccountId: number
payedAt: Date | string payedAt: Date | string
receiptId: number description?: string | null
createdAt?: Date | string createdAt?: Date | string
} }
export type PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput = { export type PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput = {
where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput
create: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput> create: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutReceiptInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput>
} }
export type PurchaseReceiptPaymentsCreateManyInventoryBankAccountInputEnvelope = { export type PurchaseReceiptPaymentsCreateManyReceiptInputEnvelope = {
data: Prisma.PurchaseReceiptPaymentsCreateManyInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsCreateManyInventoryBankAccountInput[] data: Prisma.PurchaseReceiptPaymentsCreateManyReceiptInput | Prisma.PurchaseReceiptPaymentsCreateManyReceiptInput[]
skipDuplicates?: boolean skipDuplicates?: boolean
} }
export type PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutInventoryBankAccountInput = { export type PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutReceiptInput = {
where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput
update: Prisma.XOR<Prisma.PurchaseReceiptPaymentsUpdateWithoutInventoryBankAccountInput, Prisma.PurchaseReceiptPaymentsUncheckedUpdateWithoutInventoryBankAccountInput> update: Prisma.XOR<Prisma.PurchaseReceiptPaymentsUpdateWithoutReceiptInput, Prisma.PurchaseReceiptPaymentsUncheckedUpdateWithoutReceiptInput>
create: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput> create: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutReceiptInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput>
} }
export type PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutInventoryBankAccountInput = { export type PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutReceiptInput = {
where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput
data: Prisma.XOR<Prisma.PurchaseReceiptPaymentsUpdateWithoutInventoryBankAccountInput, Prisma.PurchaseReceiptPaymentsUncheckedUpdateWithoutInventoryBankAccountInput> data: Prisma.XOR<Prisma.PurchaseReceiptPaymentsUpdateWithoutReceiptInput, Prisma.PurchaseReceiptPaymentsUncheckedUpdateWithoutReceiptInput>
} }
export type PurchaseReceiptPaymentsUpdateManyWithWhereWithoutInventoryBankAccountInput = { export type PurchaseReceiptPaymentsUpdateManyWithWhereWithoutReceiptInput = {
where: Prisma.PurchaseReceiptPaymentsScalarWhereInput where: Prisma.PurchaseReceiptPaymentsScalarWhereInput
data: Prisma.XOR<Prisma.PurchaseReceiptPaymentsUpdateManyMutationInput, Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutInventoryBankAccountInput> data: Prisma.XOR<Prisma.PurchaseReceiptPaymentsUpdateManyMutationInput, Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutReceiptInput>
} }
export type PurchaseReceiptPaymentsScalarWhereInput = { export type PurchaseReceiptPaymentsScalarWhereInput = {
@@ -642,147 +573,52 @@ export type PurchaseReceiptPaymentsScalarWhereInput = {
paymentMethod?: Prisma.EnumPaymentMethodTypeFilter<"PurchaseReceiptPayments"> | $Enums.PaymentMethodType paymentMethod?: Prisma.EnumPaymentMethodTypeFilter<"PurchaseReceiptPayments"> | $Enums.PaymentMethodType
type?: Prisma.EnumPaymentTypeFilter<"PurchaseReceiptPayments"> | $Enums.PaymentType type?: Prisma.EnumPaymentTypeFilter<"PurchaseReceiptPayments"> | $Enums.PaymentType
bankAccountId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number bankAccountId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number
inventoryId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number
description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null
payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string
receiptId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number receiptId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number
payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string
description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null
createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string
} }
export type PurchaseReceiptPaymentsCreateWithoutPurchaseReceiptInput = { export type PurchaseReceiptPaymentsCreateManyReceiptInput = {
amount: runtime.Decimal | runtime.DecimalJsLike | number | string
paymentMethod: $Enums.PaymentMethodType
type: $Enums.PaymentType
description?: string | null
payedAt: Date | string
createdAt?: Date | string
inventoryBankAccount: Prisma.InventoryBankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput
}
export type PurchaseReceiptPaymentsUncheckedCreateWithoutPurchaseReceiptInput = {
id?: number id?: number
amount: runtime.Decimal | runtime.DecimalJsLike | number | string amount: runtime.Decimal | runtime.DecimalJsLike | number | string
paymentMethod: $Enums.PaymentMethodType paymentMethod: $Enums.PaymentMethodType
type: $Enums.PaymentType type: $Enums.PaymentType
bankAccountId: number bankAccountId: number
inventoryId: number
description?: string | null
payedAt: Date | string payedAt: Date | string
description?: string | null
createdAt?: Date | string createdAt?: Date | string
} }
export type PurchaseReceiptPaymentsCreateOrConnectWithoutPurchaseReceiptInput = { export type PurchaseReceiptPaymentsUpdateWithoutReceiptInput = {
where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput
create: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutPurchaseReceiptInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutPurchaseReceiptInput>
}
export type PurchaseReceiptPaymentsCreateManyPurchaseReceiptInputEnvelope = {
data: Prisma.PurchaseReceiptPaymentsCreateManyPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsCreateManyPurchaseReceiptInput[]
skipDuplicates?: boolean
}
export type PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutPurchaseReceiptInput = {
where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput
update: Prisma.XOR<Prisma.PurchaseReceiptPaymentsUpdateWithoutPurchaseReceiptInput, Prisma.PurchaseReceiptPaymentsUncheckedUpdateWithoutPurchaseReceiptInput>
create: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutPurchaseReceiptInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutPurchaseReceiptInput>
}
export type PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutPurchaseReceiptInput = {
where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput
data: Prisma.XOR<Prisma.PurchaseReceiptPaymentsUpdateWithoutPurchaseReceiptInput, Prisma.PurchaseReceiptPaymentsUncheckedUpdateWithoutPurchaseReceiptInput>
}
export type PurchaseReceiptPaymentsUpdateManyWithWhereWithoutPurchaseReceiptInput = {
where: Prisma.PurchaseReceiptPaymentsScalarWhereInput
data: Prisma.XOR<Prisma.PurchaseReceiptPaymentsUpdateManyMutationInput, Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutPurchaseReceiptInput>
}
export type PurchaseReceiptPaymentsCreateManyInventoryBankAccountInput = {
id?: number
amount: runtime.Decimal | runtime.DecimalJsLike | number | string
paymentMethod: $Enums.PaymentMethodType
type: $Enums.PaymentType
description?: string | null
payedAt: Date | string
receiptId: number
createdAt?: Date | string
}
export type PurchaseReceiptPaymentsUpdateWithoutInventoryBankAccountInput = {
amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
purchaseReceipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutPaymentsNestedInput
}
export type PurchaseReceiptPaymentsUncheckedUpdateWithoutInventoryBankAccountInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
receiptId?: Prisma.IntFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
} }
export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutInventoryBankAccountInput = { export type PurchaseReceiptPaymentsUncheckedUpdateWithoutReceiptInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
receiptId?: Prisma.IntFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type PurchaseReceiptPaymentsCreateManyPurchaseReceiptInput = {
id?: number
amount: runtime.Decimal | runtime.DecimalJsLike | number | string
paymentMethod: $Enums.PaymentMethodType
type: $Enums.PaymentType
bankAccountId: number
inventoryId: number
description?: string | null
payedAt: Date | string
createdAt?: Date | string
}
export type PurchaseReceiptPaymentsUpdateWithoutPurchaseReceiptInput = {
amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inventoryBankAccount?: Prisma.InventoryBankAccountUpdateOneRequiredWithoutPurchaseReceiptPaymentsNestedInput
}
export type PurchaseReceiptPaymentsUncheckedUpdateWithoutPurchaseReceiptInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number id?: Prisma.IntFieldUpdateOperationsInput | number
amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType
bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
} }
export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutPurchaseReceiptInput = { export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutReceiptInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number id?: Prisma.IntFieldUpdateOperationsInput | number
amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType
bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
} }
@@ -794,13 +630,11 @@ export type PurchaseReceiptPaymentsSelect<ExtArgs extends runtime.Types.Extensio
paymentMethod?: boolean paymentMethod?: boolean
type?: boolean type?: boolean
bankAccountId?: boolean bankAccountId?: boolean
inventoryId?: boolean
description?: boolean
payedAt?: boolean
receiptId?: boolean receiptId?: boolean
payedAt?: boolean
description?: boolean
createdAt?: boolean createdAt?: boolean
purchaseReceipt?: boolean | Prisma.PurchaseReceiptDefaultArgs<ExtArgs> receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs<ExtArgs>
inventoryBankAccount?: boolean | Prisma.InventoryBankAccountDefaultArgs<ExtArgs>
}, ExtArgs["result"]["purchaseReceiptPayments"]> }, ExtArgs["result"]["purchaseReceiptPayments"]>
@@ -811,24 +645,21 @@ export type PurchaseReceiptPaymentsSelectScalar = {
paymentMethod?: boolean paymentMethod?: boolean
type?: boolean type?: boolean
bankAccountId?: boolean bankAccountId?: boolean
inventoryId?: boolean
description?: boolean
payedAt?: boolean
receiptId?: boolean receiptId?: boolean
payedAt?: boolean
description?: boolean
createdAt?: boolean createdAt?: boolean
} }
export type PurchaseReceiptPaymentsOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "amount" | "paymentMethod" | "type" | "bankAccountId" | "inventoryId" | "description" | "payedAt" | "receiptId" | "createdAt", ExtArgs["result"]["purchaseReceiptPayments"]> export type PurchaseReceiptPaymentsOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "amount" | "paymentMethod" | "type" | "bankAccountId" | "receiptId" | "payedAt" | "description" | "createdAt", ExtArgs["result"]["purchaseReceiptPayments"]>
export type PurchaseReceiptPaymentsInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = { export type PurchaseReceiptPaymentsInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
purchaseReceipt?: boolean | Prisma.PurchaseReceiptDefaultArgs<ExtArgs> receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs<ExtArgs>
inventoryBankAccount?: boolean | Prisma.InventoryBankAccountDefaultArgs<ExtArgs>
} }
export type $PurchaseReceiptPaymentsPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = { export type $PurchaseReceiptPaymentsPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
name: "PurchaseReceiptPayments" name: "PurchaseReceiptPayments"
objects: { objects: {
purchaseReceipt: Prisma.$PurchaseReceiptPayload<ExtArgs> receipt: Prisma.$PurchaseReceiptPayload<ExtArgs>
inventoryBankAccount: Prisma.$InventoryBankAccountPayload<ExtArgs>
} }
scalars: runtime.Types.Extensions.GetPayloadResult<{ scalars: runtime.Types.Extensions.GetPayloadResult<{
id: number id: number
@@ -836,10 +667,9 @@ export type $PurchaseReceiptPaymentsPayload<ExtArgs extends runtime.Types.Extens
paymentMethod: $Enums.PaymentMethodType paymentMethod: $Enums.PaymentMethodType
type: $Enums.PaymentType type: $Enums.PaymentType
bankAccountId: number bankAccountId: number
inventoryId: number
description: string | null
payedAt: Date
receiptId: number receiptId: number
payedAt: Date
description: string | null
createdAt: Date createdAt: Date
}, ExtArgs["result"]["purchaseReceiptPayments"]> }, ExtArgs["result"]["purchaseReceiptPayments"]>
composites: {} composites: {}
@@ -1181,8 +1011,7 @@ readonly fields: PurchaseReceiptPaymentsFieldRefs;
*/ */
export interface Prisma__PurchaseReceiptPaymentsClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> { export interface Prisma__PurchaseReceiptPaymentsClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise" readonly [Symbol.toStringTag]: "PrismaPromise"
purchaseReceipt<T extends Prisma.PurchaseReceiptDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PurchaseReceiptDefaultArgs<ExtArgs>>): Prisma.Prisma__PurchaseReceiptClient<runtime.Types.Result.GetResult<Prisma.$PurchaseReceiptPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> receipt<T extends Prisma.PurchaseReceiptDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PurchaseReceiptDefaultArgs<ExtArgs>>): Prisma.Prisma__PurchaseReceiptClient<runtime.Types.Result.GetResult<Prisma.$PurchaseReceiptPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
inventoryBankAccount<T extends Prisma.InventoryBankAccountDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.InventoryBankAccountDefaultArgs<ExtArgs>>): Prisma.Prisma__InventoryBankAccountClient<runtime.Types.Result.GetResult<Prisma.$InventoryBankAccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
/** /**
* Attaches callbacks for the resolution and/or rejection of the Promise. * Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved. * @param onfulfilled The callback to execute when the Promise is resolved.
@@ -1217,10 +1046,9 @@ export interface PurchaseReceiptPaymentsFieldRefs {
readonly paymentMethod: Prisma.FieldRef<"PurchaseReceiptPayments", 'PaymentMethodType'> readonly paymentMethod: Prisma.FieldRef<"PurchaseReceiptPayments", 'PaymentMethodType'>
readonly type: Prisma.FieldRef<"PurchaseReceiptPayments", 'PaymentType'> readonly type: Prisma.FieldRef<"PurchaseReceiptPayments", 'PaymentType'>
readonly bankAccountId: Prisma.FieldRef<"PurchaseReceiptPayments", 'Int'> readonly bankAccountId: Prisma.FieldRef<"PurchaseReceiptPayments", 'Int'>
readonly inventoryId: Prisma.FieldRef<"PurchaseReceiptPayments", 'Int'>
readonly description: Prisma.FieldRef<"PurchaseReceiptPayments", 'String'>
readonly payedAt: Prisma.FieldRef<"PurchaseReceiptPayments", 'DateTime'>
readonly receiptId: Prisma.FieldRef<"PurchaseReceiptPayments", 'Int'> readonly receiptId: Prisma.FieldRef<"PurchaseReceiptPayments", 'Int'>
readonly payedAt: Prisma.FieldRef<"PurchaseReceiptPayments", 'DateTime'>
readonly description: Prisma.FieldRef<"PurchaseReceiptPayments", 'String'>
readonly createdAt: Prisma.FieldRef<"PurchaseReceiptPayments", 'DateTime'> readonly createdAt: Prisma.FieldRef<"PurchaseReceiptPayments", 'DateTime'>
} }
@@ -0,0 +1,30 @@
import { IsEnum, IsInt, IsNumber, IsOptional, IsString } from 'class-validator'
import { PaymentMethodType, PaymentType } from '../../../generated/prisma/enums'
export class CreatePurchaseReceiptPaymentDto {
@IsNumber()
amount: number
@IsEnum(PaymentMethodType)
paymentMethod: PaymentMethodType
@IsEnum(PaymentType)
type: PaymentType
@IsInt()
bankAccountId: number
@IsInt()
receiptId: number
@IsString()
payedAt: string
@IsOptional()
@IsString()
description?: string
@IsOptional()
@IsString()
createdAt?: string
}
@@ -0,0 +1,6 @@
import { PartialType } from '@nestjs/swagger'
import { CreatePurchaseReceiptPaymentDto } from './create-purchase-receipt-payment.dto'
export class UpdatePurchaseReceiptPaymentDto extends PartialType(
CreatePurchaseReceiptPaymentDto,
) {}
@@ -0,0 +1,36 @@
import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common'
import { CreatePurchaseReceiptPaymentDto } from './dto/create-purchase-receipt-payment.dto'
import { UpdatePurchaseReceiptPaymentDto } from './dto/update-purchase-receipt-payment.dto'
import { PurchaseReceiptPaymentsService } from './purchase-receipt-payments.service'
@Controller('purchase-receipt-payments')
export class PurchaseReceiptPaymentsController {
constructor(
private readonly purchaseReceiptPaymentsService: PurchaseReceiptPaymentsService,
) {}
@Post()
create(@Body() dto: CreatePurchaseReceiptPaymentDto) {
return this.purchaseReceiptPaymentsService.create(dto)
}
@Get()
findAll() {
return this.purchaseReceiptPaymentsService.findAll()
}
@Get(':id')
findOne(@Param('id') id: string) {
return this.purchaseReceiptPaymentsService.findOne(Number(id))
}
@Patch(':id')
update(@Param('id') id: string, @Body() dto: UpdatePurchaseReceiptPaymentDto) {
return this.purchaseReceiptPaymentsService.update(Number(id), dto)
}
@Delete(':id')
remove(@Param('id') id: string) {
return this.purchaseReceiptPaymentsService.remove(Number(id))
}
}
@@ -0,0 +1,12 @@
import { Module } from '@nestjs/common'
import { PrismaModule } from '../../prisma/prisma.module'
import { PurchaseReceiptPaymentsController } from './purchase-receipt-payments.controller'
import { PurchaseReceiptPaymentsService } from './purchase-receipt-payments.service'
@Module({
imports: [PrismaModule],
controllers: [PurchaseReceiptPaymentsController],
providers: [PurchaseReceiptPaymentsService],
})
export class PurchaseReceiptPaymentsModule {}
@@ -0,0 +1,65 @@
import { Injectable } from '@nestjs/common'
import { ResponseMapper } from '../../common/response/response-mapper'
import { PrismaService } from '../../prisma/prisma.service'
@Injectable()
export class PurchaseReceiptPaymentsService {
constructor(private prisma: PrismaService) {}
async create(data: any) {
const item = await this.prisma.purchaseReceiptPayments.create({ data })
return ResponseMapper.create(item)
}
async findAll() {
const items = await this.prisma.purchaseReceiptPayments.findMany({
include: {
receipt: {
select: {
id: true,
code: true,
totalAmount: true,
paidAmount: true,
status: true,
supplier: {
select: { id: true, firstName: true, lastName: true },
},
},
},
},
})
return ResponseMapper.list(items)
}
async findOne(id: number) {
const item = await this.prisma.purchaseReceiptPayments.findUnique({
where: { id },
include: {
receipt: {
select: {
id: true,
code: true,
totalAmount: true,
paidAmount: true,
status: true,
supplier: {
select: { id: true, firstName: true, lastName: true },
},
},
},
},
})
if (!item) return null
return ResponseMapper.single(item)
}
async update(id: number, data: any) {
const item = await this.prisma.purchaseReceiptPayments.update({ where: { id }, data })
return ResponseMapper.update(item)
}
async remove(id: number) {
const item = await this.prisma.purchaseReceiptPayments.delete({ where: { id } })
return ResponseMapper.single(item)
}
}
@@ -22,17 +22,9 @@ export class SuppliersController {
return this.suppliersService.findOne(Number(supplierId)) return this.suppliersService.findOne(Number(supplierId))
} }
@Get(':supplierId/invoices') @Get(':supplierId/ledger')
getInvoices(@Param('supplierId') supplierId: string) { getLedger(@Param('supplierId') supplierId: string) {
return this.suppliersService.getInvoices(Number(supplierId)) return this.suppliersService.getLedger(Number(supplierId))
}
@Get(':supplierId/invoices/:invoiceId')
getInvoice(
@Param('supplierId') supplierId: string,
@Param('invoiceId') invoiceId: string,
) {
return this.suppliersService.getInvoice(Number(supplierId), Number(invoiceId))
} }
@Patch(':id') @Patch(':id')
@@ -1,6 +1,6 @@
import { Injectable } from '@nestjs/common' import { Injectable } from '@nestjs/common'
import { ResponseMapper } from '../common/response/response-mapper' import { ResponseMapper } from '../../../common/response/response-mapper'
import { PrismaService } from '../prisma/prisma.service' import { PrismaService } from '../../../prisma/prisma.service'
@Injectable() @Injectable()
export class SuppliersService { export class SuppliersService {
@@ -37,71 +37,18 @@ export class SuppliersService {
}) })
} }
async getInvoices(supplierId: number) { async getLedger(supplierId: number) {
const items = await this.prisma.purchaseReceipt.findMany({ const items = await this.prisma.supplierLedger.findMany({
where: { where: {
supplierId, supplierId,
}, },
include: {
inventory: {
select: {
id: true,
name: true,
},
},
items: {
select: {
id: true,
count: true,
fee: true,
total: true,
product: {
select: {
id: true,
name: true,
sku: true,
},
},
},
},
payments: {
select: {
id: true,
amount: true,
},
},
},
omit: { omit: {
inventoryId: true,
supplierId: true, supplierId: true,
}, },
}) })
return ResponseMapper.list(items) return ResponseMapper.list(items)
} }
async getInvoice(supplierId: number, invoiceId: number) {
const invoice = await this.prisma.purchaseReceipt.findUnique({
where: {
id: invoiceId,
supplierId,
},
include: {
inventory: {
select: {
id: true,
name: true,
},
},
items: true,
},
omit: {
inventoryId: true,
supplierId: true,
},
})
return ResponseMapper.single(invoice)
}
async update(id: number, data: any) { async update(id: number, data: any) {
const item = await this.prisma.supplier.update({ where: { id }, data }) const item = await this.prisma.supplier.update({ where: { id }, data })
return ResponseMapper.update(item) return ResponseMapper.update(item)
@@ -0,0 +1,34 @@
import {
IsDateString,
IsEnum,
IsInt,
IsNumber,
IsOptional,
IsString,
} from 'class-validator'
import { PaymentMethodType, PaymentType } from '../../../../generated/prisma/enums'
export class CreateReceiptPaymentDto {
@IsNumber()
amount: number
@IsEnum(PaymentMethodType)
paymentMethod: PaymentMethodType
@IsEnum(PaymentType)
type: PaymentType
@IsInt()
bankAccountId: number
@IsDateString()
payedAt: string
@IsOptional()
@IsString()
description?: string
@IsOptional()
@IsString()
createdAt?: string
}
@@ -0,0 +1,42 @@
import { Body, Controller, Get, Param, Post } from '@nestjs/common'
import { CreateReceiptPaymentDto } from './dto/create-receipt-payment.dto'
import { SupplierInvoicesService } from './invoices.service'
@Controller('suppliers/:supplierId/invoices')
export class SupplierInvoicesController {
constructor(private readonly supplierInvoicesService: SupplierInvoicesService) {}
@Get()
getInvoices(@Param('supplierId') supplierId: string) {
return this.supplierInvoicesService.findAll(Number(supplierId))
}
@Get(':invoiceId')
getInvoice(
@Param('supplierId') supplierId: string,
@Param('invoiceId') invoiceId: string,
) {
return this.supplierInvoicesService.findOne(Number(supplierId), Number(invoiceId))
}
@Post(':invoiceId/pay')
createPayment(
@Param('invoiceId') invoiceId: string,
@Body() data: CreateReceiptPaymentDto,
) {
return this.supplierInvoicesService.createPayment(Number(invoiceId), data)
}
@Get(':invoiceId/payments')
getInvoicePayments(
@Param('supplierId') supplierId: string,
@Param('invoiceId') invoiceId: string,
) {
return this.supplierInvoicesService.findPayments(Number(invoiceId))
}
@Get('payments')
getPayments(@Param('supplierId') supplierId: string) {
return this.supplierInvoicesService.findPayments(Number(supplierId))
}
}
@@ -0,0 +1,11 @@
import { Module } from '@nestjs/common'
import { PrismaModule } from '../../../prisma/prisma.module'
import { SupplierInvoicesController } from './invoices.controller'
import { SupplierInvoicesService } from './invoices.service'
@Module({
imports: [PrismaModule],
controllers: [SupplierInvoicesController],
providers: [SupplierInvoicesService],
})
export class SupplierInvoicesModule {}
@@ -0,0 +1,145 @@
import { Injectable } from '@nestjs/common'
import { ResponseMapper } from '../../../common/response/response-mapper'
import { PrismaService } from '../../../prisma/prisma.service'
import { CreateReceiptPaymentDto } from './dto/create-receipt-payment.dto'
@Injectable()
export class SupplierInvoicesService {
constructor(private prisma: PrismaService) {}
async findAll(supplierId: number) {
const items = await this.prisma.purchaseReceipt.findMany({
where: {
supplierId,
},
include: {
inventory: {
select: {
id: true,
name: true,
},
},
items: {
select: {
id: true,
count: true,
fee: true,
total: true,
product: {
select: {
id: true,
name: true,
sku: true,
},
},
},
},
payments: {
select: {
id: true,
amount: true,
},
},
},
omit: {
inventoryId: true,
supplierId: true,
},
})
return ResponseMapper.list(items)
}
async findOne(supplierId: number, invoiceId: number) {
const invoice = await this.prisma.purchaseReceipt.findUnique({
where: {
id: invoiceId,
supplierId,
},
include: {
inventory: {
select: {
id: true,
name: true,
},
},
items: true,
},
omit: {
inventoryId: true,
supplierId: true,
},
})
return ResponseMapper.single(invoice)
}
async findPayments(invoiceId: number) {
const items = await this.prisma.purchaseReceiptPayments.findMany({
where: {
receipt: {
id: invoiceId,
},
},
include: {
receipt: {
include: {
inventory: {
select: {
id: true,
name: true,
},
},
},
},
},
omit: {
receiptId: true,
},
})
return ResponseMapper.list(items)
}
async findAllPayments(supplierId: number) {
const items = await this.prisma.purchaseReceiptPayments.findMany({
where: {
receipt: {
supplierId,
},
},
include: {
receipt: {
select: {
id: true,
totalAmount: true,
status: true,
paidAmount: true,
},
},
},
omit: {
receiptId: true,
},
})
return ResponseMapper.list(items)
}
async createPayment(invoiceId: number, data: CreateReceiptPaymentDto) {
const payment = await this.prisma.purchaseReceiptPayments.create({
data: {
...data,
payedAt: new Date(data.payedAt),
receipt: {
connect: {
id: invoiceId,
},
},
},
include: {
receipt: true,
},
omit: {
receiptId: true,
},
})
return ResponseMapper.create(payment)
}
}
+12
View File
@@ -0,0 +1,12 @@
import { Module } from '@nestjs/common'
import { PrismaModule } from '../../prisma/prisma.module'
import { SuppliersController } from './index/suppliers.controller'
import { SuppliersService } from './index/suppliers.service'
import { SupplierInvoicesModule } from './invoices/invoices.module'
@Module({
imports: [PrismaModule, SupplierInvoicesModule],
controllers: [SuppliersController],
providers: [SuppliersService],
})
export class SuppliersModule {}
-11
View File
@@ -1,11 +0,0 @@
import { Module } from '@nestjs/common'
import { PrismaModule } from '../prisma/prisma.module'
import { SuppliersController } from './suppliers.controller'
import { SuppliersService } from './suppliers.service'
@Module({
imports: [PrismaModule],
controllers: [SuppliersController],
providers: [SuppliersService],
})
export class SuppliersModule {}