feat(inventories): add cardex retrieval for inventory and product

feat(pos): update sale invoice creation to include customer and item details
feat(pos): enhance POS account service to include today's sales information
feat(pos): refactor order DTO to create sale invoice with detailed item structure
feat(products): add minimum stock alert level to product creation and update DTOs
fix(triggers): implement stock validation and movement logging for sales invoice items
refactor(database): update sales invoices schema to include posAccountId and remove inventoryId
This commit is contained in:
2025-12-30 21:04:01 +03:30
parent 1bb206a608
commit eb6e0e7a0d
30 changed files with 1265 additions and 648 deletions
+91
View File
@@ -0,0 +1,91 @@
-- Corrected triggers for sales invoice items
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);
DECLARE inventory_id INT;
SELECT pa.inventoryId INTO inventory_id
FROM Pos_Accounts pa
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
WHERE si.id = NEW.invoiceId;
SELECT COALESCE(quantity, 0) INTO current_stock
FROM Stock_Balance sb
WHERE productId = NEW.productId AND sb.inventoryId = inventory_id
LIMIT 1;
IF NEW.count > current_stock THEN
SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = 'Not enough stock to complete sale.';
END IF;
end;
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);
DECLARE inventory_id INT;
DECLARE customer_id INT;
DECLARE pos_id INT;
INSERT INTO Trigger_Logs (name , message) VALUES ('pos_id', 'init');
SELECT posAccountId, customerId INTO pos_id, customer_id
FROM Sales_Invoices si
WHERE si.id = NEW.invoiceId
LIMIT 1;
INSERT INTO Trigger_Logs (name , message) VALUES ('pos_id', pos_id);
INSERT INTO Trigger_Logs (name , message) VALUES ('customer_id', customer_id);
SELECT pa.inventoryId INTO inventory_id
FROM Pos_Accounts pa
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
WHERE si.id = NEW.invoiceId;
SELECT COALESCE(quantity, 0) INTO current_stock
FROM Stock_Balance sb
WHERE productId = NEW.productId AND sb.inventoryId = inventory_id
LIMIT 1;
INSERT INTO Trigger_Logs (name , message) VALUES ('invId', inventory_id);
INSERT INTO Stock_Movements (
type,
quantity,
fee,
totalCost,
referenceType,
referenceId,
productId,
inventoryId,
avgCost,
remainedInStock,
customerId,
createdAt
)
VALUES (
'OUT',
NEW.count,
NEW.fee,
NEW.total,
'SALES',
NEW.invoiceId,
NEW.productId,
inventory_id,
CASE
WHEN NEW.count = 0 THEN 0
ELSE NEW.total / NEW.count
END,
current_stock - NEW.count,
customer_id,
NOW()
);
END
+2 -2
View File
@@ -7,7 +7,6 @@
"@nestjs/platform-express": "^11.0.1", "@nestjs/platform-express": "^11.0.1",
"@nestjs/swagger": "^11.2.3", "@nestjs/swagger": "^11.2.3",
"@prisma/adapter-mariadb": "^7.1.0", "@prisma/adapter-mariadb": "^7.1.0",
"@prisma/client": "^7.1.0",
"class-transformer": "^0.5.1", "class-transformer": "^0.5.1",
"class-validator": "^0.14.3", "class-validator": "^0.14.3",
"dayjs": "^1.11.19", "dayjs": "^1.11.19",
@@ -25,6 +24,7 @@
"@nestjs/cli": "^11.0.0", "@nestjs/cli": "^11.0.0",
"@nestjs/schematics": "^11.0.0", "@nestjs/schematics": "^11.0.0",
"@nestjs/testing": "^11.0.1", "@nestjs/testing": "^11.0.1",
"@prisma/client": "^7.2.0",
"@types/express": "^5.0.0", "@types/express": "^5.0.0",
"@types/jest": "^30.0.0", "@types/jest": "^30.0.0",
"@types/node": "^22.10.7", "@types/node": "^22.10.7",
@@ -36,7 +36,7 @@
"jest": "^30.0.0", "jest": "^30.0.0",
"prettier": "^3.4.2", "prettier": "^3.4.2",
"prettier-plugin-prisma": "^5.0.0", "prettier-plugin-prisma": "^5.0.0",
"prisma": "^7.1.0", "prisma": "^7.2.0",
"source-map-support": "^0.5.21", "source-map-support": "^0.5.21",
"supertest": "^7.0.0", "supertest": "^7.0.0",
"ts-jest": "^29.2.5", "ts-jest": "^29.2.5",
+54 -49
View File
@@ -26,9 +26,6 @@ importers:
'@prisma/adapter-mariadb': '@prisma/adapter-mariadb':
specifier: ^7.1.0 specifier: ^7.1.0
version: 7.1.0 version: 7.1.0
'@prisma/client':
specifier: ^7.1.0
version: 7.1.0(prisma@7.1.0(@types/react@19.2.7)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.9.3))(typescript@5.9.3)
class-transformer: class-transformer:
specifier: ^0.5.1 specifier: ^0.5.1
version: 0.5.1 version: 0.5.1
@@ -72,6 +69,9 @@ importers:
'@nestjs/testing': '@nestjs/testing':
specifier: ^11.0.1 specifier: ^11.0.1
version: 11.1.9(@nestjs/common@11.1.9(class-transformer@0.5.1)(class-validator@0.14.3)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.9)(@nestjs/platform-express@11.1.9) version: 11.1.9(@nestjs/common@11.1.9(class-transformer@0.5.1)(class-validator@0.14.3)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.9)(@nestjs/platform-express@11.1.9)
'@prisma/client':
specifier: ^7.2.0
version: 7.2.0(prisma@7.2.0(@types/react@19.2.7)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.9.3))(typescript@5.9.3)
'@types/express': '@types/express':
specifier: ^5.0.0 specifier: ^5.0.0
version: 5.0.6 version: 5.0.6
@@ -106,8 +106,8 @@ importers:
specifier: ^5.0.0 specifier: ^5.0.0
version: 5.0.0(prettier@3.7.4) version: 5.0.0(prettier@3.7.4)
prisma: prisma:
specifier: ^7.1.0 specifier: ^7.2.0
version: 7.1.0(@types/react@19.2.7)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.9.3) version: 7.2.0(@types/react@19.2.7)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.9.3)
source-map-support: source-map-support:
specifier: ^0.5.21 specifier: ^0.5.21
version: 0.5.21 version: 0.5.21
@@ -1003,11 +1003,11 @@ packages:
'@prisma/adapter-mariadb@7.1.0': '@prisma/adapter-mariadb@7.1.0':
resolution: {integrity: sha512-my5vKT6J4zRi5nNmLxosMafdQCk7tZgQHZ11mfaeFKh8xrJSEjFn0TFa1py8khHvFMvnadKUWdctjPpoJuxSBQ==} resolution: {integrity: sha512-my5vKT6J4zRi5nNmLxosMafdQCk7tZgQHZ11mfaeFKh8xrJSEjFn0TFa1py8khHvFMvnadKUWdctjPpoJuxSBQ==}
'@prisma/client-runtime-utils@7.1.0': '@prisma/client-runtime-utils@7.2.0':
resolution: {integrity: sha512-39xmeBrNTN40FzF34aJMjfX1PowVCqoT3UKUWBBSP3aXV05NRqGBC3x2wCDs96ti6ZgdiVzqnRDHtbzU8X+lPQ==} resolution: {integrity: sha512-dn7oB53v0tqkB0wBdMuTNFNPdEbfICEUe82Tn9FoKAhJCUkDH+fmyEp0ClciGh+9Hp2Tuu2K52kth2MTLstvmA==}
'@prisma/client@7.1.0': '@prisma/client@7.2.0':
resolution: {integrity: sha512-qf7GPYHmS/xybNiSOpzv9wBo+UwqfL2PeyX+08v+KVHDI0AlSCQIh5bBySkH3alu06NX9wy98JEnckhMHoMFfA==} resolution: {integrity: sha512-JdLF8lWZ+LjKGKpBqyAlenxd/kXjd1Abf/xK+6vUA7R7L2Suo6AFTHFRpPSdAKCan9wzdFApsUpSa/F6+t1AtA==}
engines: {node: ^20.19 || ^22.12 || >=24.0} engines: {node: ^20.19 || ^22.12 || >=24.0}
peerDependencies: peerDependencies:
prisma: '*' prisma: '*'
@@ -1018,8 +1018,8 @@ packages:
typescript: typescript:
optional: true optional: true
'@prisma/config@7.1.0': '@prisma/config@7.2.0':
resolution: {integrity: sha512-Uz+I43Wn1RYNHtuYtOhOnUcNMWp2Pd3GUDDKs37xlHptCGpzEG3MRR9L+8Y2ISMsMI24z/Ni+ww6OB/OO8M0sQ==} resolution: {integrity: sha512-qmvSnfQ6l/srBW1S7RZGfjTQhc44Yl3ldvU6y3pgmuLM+83SBDs6UQVgMtQuMRe9J3gGqB0RF8wER6RlXEr6jQ==}
'@prisma/debug@6.8.2': '@prisma/debug@6.8.2':
resolution: {integrity: sha512-4muBSSUwJJ9BYth5N8tqts8JtiLT8QI/RSAzEogwEfpbYGFo9mYsInsVo8dqXdPO2+Rm5OG5q0qWDDE3nyUbVg==} resolution: {integrity: sha512-4muBSSUwJJ9BYth5N8tqts8JtiLT8QI/RSAzEogwEfpbYGFo9mYsInsVo8dqXdPO2+Rm5OG5q0qWDDE3nyUbVg==}
@@ -1027,26 +1027,29 @@ packages:
'@prisma/debug@7.1.0': '@prisma/debug@7.1.0':
resolution: {integrity: sha512-pPAckG6etgAsEBusmZiFwM9bldLSNkn++YuC4jCTJACdK5hLOVnOzX7eSL2FgaU6Gomd6wIw21snUX2dYroMZQ==} resolution: {integrity: sha512-pPAckG6etgAsEBusmZiFwM9bldLSNkn++YuC4jCTJACdK5hLOVnOzX7eSL2FgaU6Gomd6wIw21snUX2dYroMZQ==}
'@prisma/dev@0.15.0': '@prisma/debug@7.2.0':
resolution: {integrity: sha512-KhWaipnFlS/fWEs6I6Oqjcy2S08vKGmxJ5LexqUl/3Ve0EgLUsZwdKF0MvqPM5F5ttw8GtfZarjM5y7VLwv9Ow==} resolution: {integrity: sha512-YSGTiSlBAVJPzX4ONZmMotL+ozJwQjRmZweQNIq/ER0tQJKJynNkRB3kyvt37eOfsbMCXk3gnLF6J9OJ4QWftw==}
'@prisma/dev@0.17.0':
resolution: {integrity: sha512-6sGebe5jxX+FEsQTpjHLzvOGPn6ypFQprcs3jcuIWv1Xp/5v6P/rjfdvAwTkP2iF6pDx2tCd8vGLNWcsWzImTA==}
'@prisma/driver-adapter-utils@7.1.0': '@prisma/driver-adapter-utils@7.1.0':
resolution: {integrity: sha512-AlVLzeXkw81+47MvQ9M8DvTiHkRfJ8xzklTbYjpskb0cTTDVHboTI/OVwT6Wcep/bNvfLKJYO0nylBiM5rxgww==} resolution: {integrity: sha512-AlVLzeXkw81+47MvQ9M8DvTiHkRfJ8xzklTbYjpskb0cTTDVHboTI/OVwT6Wcep/bNvfLKJYO0nylBiM5rxgww==}
'@prisma/engines-version@7.1.0-6.ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba': '@prisma/engines-version@7.2.0-4.0c8ef2ce45c83248ab3df073180d5eda9e8be7a3':
resolution: {integrity: sha512-qZUevUh+yPhGT28rDQnV8V2kLnFjirzhVD67elRPIJHRsUV/mkII10HSrJrhK/U2GYgAxXR2VEREtq7AsfS8qw==} resolution: {integrity: sha512-KezsjCZDsbjNR7SzIiVlUsn9PnLePI7r5uxABlwL+xoerurZTfgQVbIjvjF2sVr3Uc0ZcsnREw3F84HvbggGdA==}
'@prisma/engines@7.1.0': '@prisma/engines@7.2.0':
resolution: {integrity: sha512-KQlraOybdHAzVv45KWKJzpR9mJLkib7/TyApQpqrsL7FUHfgjIcy8jrVGt3iNfG6/GDDl+LNlJ84JSQwIfdzxA==} resolution: {integrity: sha512-HUeOI/SvCDsHrR9QZn24cxxZcujOjcS3w1oW/XVhnSATAli5SRMOfp/WkG3TtT5rCxDA4xOnlJkW7xkho4nURA==}
'@prisma/fetch-engine@7.1.0': '@prisma/fetch-engine@7.2.0':
resolution: {integrity: sha512-GZYF5Q8kweXWGfn87hTu17kw7x1DgnehgKoE4Zg1BmHYF3y1Uu0QRY/qtSE4veH3g+LW8f9HKqA0tARG66bxxQ==} resolution: {integrity: sha512-Z5XZztJ8Ap+wovpjPD2lQKnB8nWFGNouCrglaNFjxIWAGWz0oeHXwUJRiclIoSSXN/ptcs9/behptSk8d0Yy6w==}
'@prisma/get-platform@6.8.2': '@prisma/get-platform@6.8.2':
resolution: {integrity: sha512-vXSxyUgX3vm1Q70QwzwkjeYfRryIvKno1SXbIqwSptKwqKzskINnDUcx85oX+ys6ooN2ATGSD0xN2UTfg6Zcow==} resolution: {integrity: sha512-vXSxyUgX3vm1Q70QwzwkjeYfRryIvKno1SXbIqwSptKwqKzskINnDUcx85oX+ys6ooN2ATGSD0xN2UTfg6Zcow==}
'@prisma/get-platform@7.1.0': '@prisma/get-platform@7.2.0':
resolution: {integrity: sha512-lq8hMdjKiZftuT5SssYB3EtQj8+YjL24/ZTLflQqzFquArKxBcyp6Xrblto+4lzIKJqnpOjfMiBjMvl7YuD7+Q==} resolution: {integrity: sha512-k1V0l0Td1732EHpAfi2eySTezyllok9dXb6UQanajkJQzPUGi3vO2z7jdkz67SypFTdmbnyGYxvEvYZdZsMAVA==}
'@prisma/prisma-schema-wasm@4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f1991584': '@prisma/prisma-schema-wasm@4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f1991584':
resolution: {integrity: sha512-JFdsnSgBPN8reDTLOI9Vh/6ccCb2aD1LbY/LWQnkcIgNo6IdpzvuM+qRVbBuA6IZP2SdqQI8Lu6RL2P8EFBQUA==} resolution: {integrity: sha512-JFdsnSgBPN8reDTLOI9Vh/6ccCb2aD1LbY/LWQnkcIgNo6IdpzvuM+qRVbBuA6IZP2SdqQI8Lu6RL2P8EFBQUA==}
@@ -1054,8 +1057,8 @@ packages:
'@prisma/query-plan-executor@6.18.0': '@prisma/query-plan-executor@6.18.0':
resolution: {integrity: sha512-jZ8cfzFgL0jReE1R10gT8JLHtQxjWYLiQ//wHmVYZ2rVkFHoh0DT8IXsxcKcFlfKN7ak7k6j0XMNn2xVNyr5cA==} resolution: {integrity: sha512-jZ8cfzFgL0jReE1R10gT8JLHtQxjWYLiQ//wHmVYZ2rVkFHoh0DT8IXsxcKcFlfKN7ak7k6j0XMNn2xVNyr5cA==}
'@prisma/studio-core@0.8.2': '@prisma/studio-core@0.9.0':
resolution: {integrity: sha512-/iAEWEUpTja+7gVMu1LtR2pPlvDmveAwMHdTWbDeGlT7yiv0ZTCPpmeAGdq/Y9aJ9Zj1cEGBXGRbmmNPj022PQ==} resolution: {integrity: sha512-xA2zoR/ADu/NCSQuriBKTh6Ps4XjU0bErkEcgMfnSGh346K1VI7iWKnoq1l2DoxUqiddPHIEWwtxJ6xCHG6W7g==}
peerDependencies: peerDependencies:
'@types/react': ^18.0.0 || ^19.0.0 '@types/react': ^18.0.0 || ^19.0.0
react: ^18.0.0 || ^19.0.0 react: ^18.0.0 || ^19.0.0
@@ -2992,8 +2995,8 @@ packages:
resolution: {integrity: sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==} resolution: {integrity: sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==}
engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0}
prisma@7.1.0: prisma@7.2.0:
resolution: {integrity: sha512-dy/3urE4JjhdiW5b09pGjVhGI7kPESK2VlCDrCqeYK5m5SslAtG5FCGnZWP7E8Sdg+Ow1wV2mhJH5RTFL5gEsw==} resolution: {integrity: sha512-jSdHWgWOgFF24+nRyyNRVBIgGDQEsMEF8KPHvhBBg3jWyR9fUAK0Nq9ThUmiGlNgq2FA7vSk/ZoCvefod+a8qg==}
engines: {node: ^20.19 || ^22.12 || >=24.0} engines: {node: ^20.19 || ^22.12 || >=24.0}
hasBin: true hasBin: true
peerDependencies: peerDependencies:
@@ -4575,16 +4578,16 @@ snapshots:
'@prisma/driver-adapter-utils': 7.1.0 '@prisma/driver-adapter-utils': 7.1.0
mariadb: 3.4.5 mariadb: 3.4.5
'@prisma/client-runtime-utils@7.1.0': {} '@prisma/client-runtime-utils@7.2.0': {}
'@prisma/client@7.1.0(prisma@7.1.0(@types/react@19.2.7)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.9.3))(typescript@5.9.3)': '@prisma/client@7.2.0(prisma@7.2.0(@types/react@19.2.7)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.9.3))(typescript@5.9.3)':
dependencies: dependencies:
'@prisma/client-runtime-utils': 7.1.0 '@prisma/client-runtime-utils': 7.2.0
optionalDependencies: optionalDependencies:
prisma: 7.1.0(@types/react@19.2.7)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.9.3) prisma: 7.2.0(@types/react@19.2.7)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.9.3)
typescript: 5.9.3 typescript: 5.9.3
'@prisma/config@7.1.0': '@prisma/config@7.2.0':
dependencies: dependencies:
c12: 3.1.0 c12: 3.1.0
deepmerge-ts: 7.1.5 deepmerge-ts: 7.1.5
@@ -4597,7 +4600,9 @@ snapshots:
'@prisma/debug@7.1.0': {} '@prisma/debug@7.1.0': {}
'@prisma/dev@0.15.0(typescript@5.9.3)': '@prisma/debug@7.2.0': {}
'@prisma/dev@0.17.0(typescript@5.9.3)':
dependencies: dependencies:
'@electric-sql/pglite': 0.3.2 '@electric-sql/pglite': 0.3.2
'@electric-sql/pglite-socket': 0.0.6(@electric-sql/pglite@0.3.2) '@electric-sql/pglite-socket': 0.0.6(@electric-sql/pglite@0.3.2)
@@ -4623,34 +4628,34 @@ snapshots:
dependencies: dependencies:
'@prisma/debug': 7.1.0 '@prisma/debug': 7.1.0
'@prisma/engines-version@7.1.0-6.ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba': {} '@prisma/engines-version@7.2.0-4.0c8ef2ce45c83248ab3df073180d5eda9e8be7a3': {}
'@prisma/engines@7.1.0': '@prisma/engines@7.2.0':
dependencies: dependencies:
'@prisma/debug': 7.1.0 '@prisma/debug': 7.2.0
'@prisma/engines-version': 7.1.0-6.ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba '@prisma/engines-version': 7.2.0-4.0c8ef2ce45c83248ab3df073180d5eda9e8be7a3
'@prisma/fetch-engine': 7.1.0 '@prisma/fetch-engine': 7.2.0
'@prisma/get-platform': 7.1.0 '@prisma/get-platform': 7.2.0
'@prisma/fetch-engine@7.1.0': '@prisma/fetch-engine@7.2.0':
dependencies: dependencies:
'@prisma/debug': 7.1.0 '@prisma/debug': 7.2.0
'@prisma/engines-version': 7.1.0-6.ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba '@prisma/engines-version': 7.2.0-4.0c8ef2ce45c83248ab3df073180d5eda9e8be7a3
'@prisma/get-platform': 7.1.0 '@prisma/get-platform': 7.2.0
'@prisma/get-platform@6.8.2': '@prisma/get-platform@6.8.2':
dependencies: dependencies:
'@prisma/debug': 6.8.2 '@prisma/debug': 6.8.2
'@prisma/get-platform@7.1.0': '@prisma/get-platform@7.2.0':
dependencies: dependencies:
'@prisma/debug': 7.1.0 '@prisma/debug': 7.2.0
'@prisma/prisma-schema-wasm@4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f1991584': {} '@prisma/prisma-schema-wasm@4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f1991584': {}
'@prisma/query-plan-executor@6.18.0': {} '@prisma/query-plan-executor@6.18.0': {}
'@prisma/studio-core@0.8.2(@types/react@19.2.7)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)': '@prisma/studio-core@0.9.0(@types/react@19.2.7)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)':
dependencies: dependencies:
'@types/react': 19.2.7 '@types/react': 19.2.7
react: 19.2.1 react: 19.2.1
@@ -6815,12 +6820,12 @@ snapshots:
ansi-styles: 5.2.0 ansi-styles: 5.2.0
react-is: 18.3.1 react-is: 18.3.1
prisma@7.1.0(@types/react@19.2.7)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.9.3): prisma@7.2.0(@types/react@19.2.7)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.9.3):
dependencies: dependencies:
'@prisma/config': 7.1.0 '@prisma/config': 7.2.0
'@prisma/dev': 0.15.0(typescript@5.9.3) '@prisma/dev': 0.17.0(typescript@5.9.3)
'@prisma/engines': 7.1.0 '@prisma/engines': 7.2.0
'@prisma/studio-core': 0.8.2(@types/react@19.2.7)(react-dom@19.2.1(react@19.2.1))(react@19.2.1) '@prisma/studio-core': 0.9.0(@types/react@19.2.7)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)
mysql2: 3.15.3 mysql2: 3.15.3
postgres: 3.4.7 postgres: 3.4.7
optionalDependencies: optionalDependencies:
@@ -0,0 +1,50 @@
/*
Warnings:
- You are about to drop the column `inventoryId` on the `Sales_Invoices` table. All the data in the column will be lost.
- Added the required column `posAccountId` to the `Sales_Invoices` table without a default value. This is not possible if the table is not empty.
*/
-- DropForeignKey
ALTER TABLE `Sales_Invoices` DROP FOREIGN KEY `Sales_Invoices_inventoryId_fkey`;
-- DropIndex
DROP INDEX `Sales_Invoices_inventoryId_fkey` ON `Sales_Invoices`;
-- AlterTable
ALTER TABLE `Purchase_Receipt_Payments` ADD COLUMN `inventoryBankAccountBankAccountId` INTEGER NULL,
ADD COLUMN `inventoryBankAccountInventoryId` INTEGER NULL;
-- AlterTable
ALTER TABLE `Sales_Invoices` DROP COLUMN `inventoryId`,
ADD COLUMN `posAccountId` INTEGER NOT NULL;
-- CreateIndex
CREATE INDEX `Sales_Invoices_posAccountId_idx` ON `Sales_Invoices`(`posAccountId`);
-- AddForeignKey
ALTER TABLE `Sales_Invoices` ADD CONSTRAINT `Sales_Invoices_posAccountId_fkey` FOREIGN KEY (`posAccountId`) REFERENCES `Pos_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE `Purchase_Receipt_Payments` ADD CONSTRAINT `Purchase_Receipt_Payments_inventoryBankAccountInventoryId_i_fkey` FOREIGN KEY (`inventoryBankAccountInventoryId`, `inventoryBankAccountBankAccountId`) REFERENCES `Inventory_Bank_Accounts`(`inventoryId`, `bankAccountId`) ON DELETE SET NULL ON UPDATE CASCADE;
-- RenameIndex
ALTER TABLE `Orders` RENAME INDEX `Orders_customerId_fkey` TO `Orders_customerId_idx`;
-- RenameIndex
ALTER TABLE `Product_Variants` RENAME INDEX `products_barcode_unique` TO `Product_Variants_barcode_key`;
-- RenameIndex
ALTER TABLE `Products` RENAME INDEX `products_barcode_unique` TO `Products_barcode_key`;
-- RenameIndex
ALTER TABLE `Products` RENAME INDEX `products_sku_unique` TO `Products_sku_key`;
-- RenameIndex
ALTER TABLE `Sales_Invoice_Items` RENAME INDEX `Sales_Invoice_Items_invoiceId_fkey` TO `Sales_Invoice_Items_invoiceId_idx`;
-- RenameIndex
ALTER TABLE `Sales_Invoice_Items` RENAME INDEX `Sales_Invoice_Items_productId_fkey` TO `Sales_Invoice_Items_productId_idx`;
-- RenameIndex
ALTER TABLE `Sales_Invoices` RENAME INDEX `Sales_Invoices_customerId_fkey` TO `Sales_Invoices_customerId_idx`;
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE `Products` ADD COLUMN `minimumStockAlertLevel` DECIMAL(10, 0) NOT NULL DEFAULT 1.00;
+2 -1
View File
@@ -10,7 +10,6 @@ model Inventory {
inventoryTransfersFrom InventoryTransfer[] @relation("Inventory_From") inventoryTransfersFrom InventoryTransfer[] @relation("Inventory_From")
inventoryTransfersTo InventoryTransfer[] @relation("Inventory_To") inventoryTransfersTo InventoryTransfer[] @relation("Inventory_To")
purchaseReceipts PurchaseReceipt[] purchaseReceipts PurchaseReceipt[]
salesInvoices SalesInvoice[] @relation("Inventory_SalesInvoices")
stockAdjustments StockAdjustment[] @relation("Inventory_Stock_Adjustments") stockAdjustments StockAdjustment[] @relation("Inventory_Stock_Adjustments")
stockBalances StockBalance[] @relation("StockBalance_inventory") stockBalances StockBalance[] @relation("StockBalance_inventory")
counterStockMovements StockMovement[] @relation("StockMovement_CounterInventory") counterStockMovements StockMovement[] @relation("StockMovement_CounterInventory")
@@ -27,6 +26,7 @@ model InventoryBankAccount {
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])
@@ -45,6 +45,7 @@ model PosAccount {
deletedAt DateTime? @db.Timestamp(0) deletedAt DateTime? @db.Timestamp(0)
inventoryBankAccount InventoryBankAccount @relation(fields: [inventoryId, bankAccountId], references: [inventoryId, bankAccountId]) inventoryBankAccount InventoryBankAccount @relation(fields: [inventoryId, bankAccountId], references: [inventoryId, bankAccountId])
salesInvoices SalesInvoice[]
@@index([inventoryId]) @@index([inventoryId])
@@map("Pos_Accounts") @@map("Pos_Accounts")
+15 -15
View File
@@ -12,9 +12,9 @@ model Customer {
createdAt DateTime @default(now()) @db.Timestamp(0) createdAt DateTime @default(now()) @db.Timestamp(0)
updatedAt DateTime @updatedAt @db.Timestamp(0) updatedAt DateTime @updatedAt @db.Timestamp(0)
deletedAt DateTime? @db.Timestamp(0) deletedAt DateTime? @db.Timestamp(0)
orders Order[] @relation("Customer_Orders") orders Order[] @relation()
salesInvoices SalesInvoice[] @relation("Customer_Sales_Invoices") stockMovements StockMovement[] @relation()
stockMovements StockMovement[] @relation("StockMovement_Customer") salesInvoices SalesInvoice[]
@@map("Customers") @@map("Customers")
} }
@@ -30,9 +30,9 @@ model Order {
updatedAt DateTime @updatedAt @db.Timestamp(0) updatedAt DateTime @updatedAt @db.Timestamp(0)
deletedAt DateTime? @db.Timestamp(0) deletedAt DateTime? @db.Timestamp(0)
customerId Int customerId Int
customer Customer @relation("Customer_Orders", fields: [customerId], references: [id], onUpdate: NoAction) customer Customer @relation(fields: [customerId], references: [id], onUpdate: NoAction)
@@index([customerId], map: "Orders_customerId_fkey") @@index([customerId])
@@map("Orders") @@map("Orders")
} }
@@ -44,13 +44,13 @@ model SalesInvoice {
createdAt DateTime @default(now()) @db.Timestamp(0) createdAt DateTime @default(now()) @db.Timestamp(0)
updatedAt DateTime @updatedAt @db.Timestamp(0) updatedAt DateTime @updatedAt @db.Timestamp(0)
customerId Int? customerId Int?
inventoryId Int posAccountId Int
items SalesInvoiceItem[] @relation("SalesInvoice_Items") items SalesInvoiceItem[]
customer Customer? @relation("Customer_Sales_Invoices", fields: [customerId], references: [id]) customer Customer? @relation(fields: [customerId], references: [id])
inventory Inventory @relation("Inventory_SalesInvoices", fields: [inventoryId], references: [id]) posAccount PosAccount @relation(fields: [posAccountId], references: [id])
@@index([inventoryId], map: "Sales_Invoices_inventoryId_fkey") @@index([customerId])
@@index([customerId], map: "Sales_Invoices_customerId_fkey") @@index([posAccountId])
@@map("Sales_Invoices") @@map("Sales_Invoices")
} }
@@ -62,11 +62,11 @@ model SalesInvoiceItem {
createdAt DateTime @default(now()) @db.Timestamp(0) createdAt DateTime @default(now()) @db.Timestamp(0)
invoiceId Int invoiceId Int
productId Int productId Int
invoice SalesInvoice @relation("SalesInvoice_Items", fields: [invoiceId], references: [id]) invoice SalesInvoice @relation(fields: [invoiceId], references: [id])
product Product @relation("Product_SalesInvoiceItems", fields: [productId], references: [id]) product Product @relation(fields: [productId], references: [id])
@@index([invoiceId], map: "Sales_Invoice_Items_invoiceId_fkey") @@index([invoiceId])
@@index([productId], map: "Sales_Invoice_Items_productId_fkey") @@index([productId])
@@map("Sales_Invoice_Items") @@map("Sales_Invoice_Items")
} }
+5 -5
View File
@@ -4,7 +4,7 @@ model ProductVariant {
basePrice Decimal @db.Decimal(15, 2) basePrice Decimal @db.Decimal(15, 2)
salePrice Decimal @db.Decimal(15, 2) salePrice Decimal @db.Decimal(15, 2)
description String? @db.Text description String? @db.Text
barcode String? @unique(map: "products_barcode_unique") @db.VarChar(100) barcode String? @unique() @db.VarChar(100)
imageUrl String? @db.VarChar(255) imageUrl String? @db.VarChar(255)
unit String? @db.VarChar(10) unit String? @db.VarChar(10)
quantity Decimal? @default(0.00) @db.Decimal(10, 0) quantity Decimal? @default(0.00) @db.Decimal(10, 0)
@@ -25,24 +25,24 @@ model Product {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
name String @db.VarChar(255) name String @db.VarChar(255)
description String? @db.Text description String? @db.Text
sku String? @unique(map: "products_sku_unique") @db.VarChar(100) sku String? @unique() @db.VarChar(100)
barcode String? @unique(map: "products_barcode_unique") @db.VarChar(100) barcode String? @unique() @db.VarChar(100)
createdAt DateTime @default(now()) @db.Timestamp(0) createdAt DateTime @default(now()) @db.Timestamp(0)
updatedAt DateTime @updatedAt @db.Timestamp(0) updatedAt DateTime @updatedAt @db.Timestamp(0)
deletedAt DateTime? @db.Timestamp(0) deletedAt DateTime? @db.Timestamp(0)
brandId Int? brandId Int?
categoryId Int? categoryId Int?
salePrice Decimal @default(0.00) @db.Decimal(15, 0) salePrice Decimal @default(0.00) @db.Decimal(15, 0)
minimumStockAlertLevel Decimal @default(1.00) @db.Decimal(10, 0)
inventoryTransferItems InventoryTransferItem[] @relation("InventoryTransferItem_Product") inventoryTransferItems InventoryTransferItem[] @relation("InventoryTransferItem_Product")
// productCharges ProductCharge[] @relation("Product_Charges")
variants ProductVariant[] @relation("Product_Variant") variants ProductVariant[] @relation("Product_Variant")
brand ProductBrand? @relation("Product_Brand", fields: [brandId], references: [id], onUpdate: NoAction) brand ProductBrand? @relation("Product_Brand", fields: [brandId], references: [id], onUpdate: NoAction)
category ProductCategory? @relation("Product_Category", fields: [categoryId], references: [id], onUpdate: NoAction) category ProductCategory? @relation("Product_Category", fields: [categoryId], references: [id], onUpdate: NoAction)
purchaseReceiptItems PurchaseReceiptItem[] @relation("Product_PurchaseReceiptItems") purchaseReceiptItems PurchaseReceiptItem[] @relation("Product_PurchaseReceiptItems")
salesInvoiceItems SalesInvoiceItem[] @relation("Product_SalesInvoiceItems")
stockAdjustments StockAdjustment[] @relation("Product_Stock_Adjustments") stockAdjustments StockAdjustment[] @relation("Product_Stock_Adjustments")
stockBalances StockBalance[] @relation("StockBalance_Product") stockBalances StockBalance[] @relation("StockBalance_Product")
stockMovements StockMovement[] @relation("StockMovement_Product") stockMovements StockMovement[] @relation("StockMovement_Product")
salesInvoiceItems SalesInvoiceItem[]
@@index([brandId], map: "Products_brandId_fkey") @@index([brandId], map: "Products_brandId_fkey")
@@index([categoryId], map: "Products_categoryId_fkey") @@index([categoryId], map: "Products_categoryId_fkey")
+3
View File
@@ -49,6 +49,9 @@ model PurchaseReceiptPayments {
receipt PurchaseReceipt @relation(fields: [receiptId], references: [id]) receipt PurchaseReceipt @relation(fields: [receiptId], references: [id])
bankAccount BankAccount @relation(fields: [bankAccountId], references: [id]) bankAccount BankAccount @relation(fields: [bankAccountId], references: [id])
inventoryBankAccount InventoryBankAccount? @relation(fields: [inventoryBankAccountInventoryId, inventoryBankAccountBankAccountId], references: [inventoryId, bankAccountId])
inventoryBankAccountInventoryId Int?
inventoryBankAccountBankAccountId Int?
@@index([receiptId], map: "Purchase_Receipt_Payments_receiptId_fkey") @@index([receiptId], map: "Purchase_Receipt_Payments_receiptId_fkey")
@@map("Purchase_Receipt_Payments") @@map("Purchase_Receipt_Payments")
+1 -1
View File
@@ -15,7 +15,7 @@ model StockMovement {
counterInventoryId Int? counterInventoryId Int?
customerId Int? customerId Int?
counterInventory Inventory? @relation("StockMovement_CounterInventory", fields: [counterInventoryId], references: [id]) counterInventory Inventory? @relation("StockMovement_CounterInventory", fields: [counterInventoryId], references: [id])
customer Customer? @relation("StockMovement_Customer", fields: [customerId], references: [id]) customer Customer? @relation(fields: [customerId], references: [id])
inventory Inventory @relation("StockMovement_Inventory", fields: [inventoryId], references: [id]) inventory Inventory @relation("StockMovement_Inventory", fields: [inventoryId], references: [id])
product Product @relation("StockMovement_Product", fields: [productId], references: [id]) product Product @relation("StockMovement_Product", fields: [productId], references: [id])
supplier Supplier? @relation("StockMovement_Supplier", fields: [supplierId], references: [id]) supplier Supplier? @relation("StockMovement_Supplier", fields: [supplierId], references: [id])
+37 -28
View File
@@ -1,5 +1,5 @@
-- AUTO-GENERATED MYSQL TRIGGER DUMP -- AUTO-GENERATED MYSQL TRIGGER DUMP
-- Generated at: 2025-12-26T18:34:53.930Z -- Generated at: 2025-12-30T15:42:45.224Z
-- ------------------------------------------ -- ------------------------------------------
-- Trigger: trg_transfer_item_after_insert -- Trigger: trg_transfer_item_after_insert
@@ -7,7 +7,6 @@
-- 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;
@@ -45,13 +44,12 @@ 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;
DECLARE suppId INT; DECLARE suppId INT;
-- Get inventory & supplier from receipt -- Get inventory & supplier from
SELECT inventoryId, supplierId SELECT inventoryId, supplierId
INTO invId, suppId INTO invId, suppId
FROM Purchase_Receipts FROM Purchase_Receipts
@@ -108,11 +106,12 @@ 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);
INSERT INTO Trigger_Logs (name , message) VALUES ('trigger' , 'started');
SELECT totalAmount, paidAmount SELECT totalAmount, paidAmount
INTO receiptTotal, paid INTO receiptTotal, paid
FROM Purchase_Receipts FROM Purchase_Receipts
@@ -131,20 +130,21 @@ 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) DEFAULT 0; DECLARE receiptTotal DECIMAL(14,2) Default 0;
DECLARE newPaid DECIMAL(14,2) DEFAULT 0; DECLARE newPaid DECIMAL(14,2) Default 0;
DECLARE supplierId INT; DECLARE _supplierId INT;
DECLARE lastBalance DECIMAL(14,2) DEFAULT 0; DECLARE lastBalance DECIMAL(14,2)Default 0;
-- Lock receipt row -- Lock receipt row
SELECT COALESCE(totalAmount, 0), COALESCE(paidAmount, 0), 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
FOR UPDATE; FOR UPDATE;
INSERT INTO Trigger_Logs (name, message) VALUES ('supplierId', _supplierId);
-- Apply payment or refund -- Apply payment or refund
IF NEW.type = 'PAYMENT' THEN IF NEW.type = 'PAYMENT' THEN
SET newPaid = newPaid + NEW.amount; SET newPaid = newPaid + NEW.amount;
@@ -168,7 +168,7 @@ CREATE DEFINER=`pos`@`%` TRIGGER `trg_pr_payment_after_insert` AFTER INSERT ON `
SELECT IFNULL(balance, 0) SELECT IFNULL(balance, 0)
INTO lastBalance INTO lastBalance
FROM Supplier_Ledger FROM Supplier_Ledger
WHERE supplierId = supplierId WHERE supplierId = _supplierId
ORDER BY id DESC ORDER BY id DESC
LIMIT 1; LIMIT 1;
@@ -185,13 +185,13 @@ CREATE DEFINER=`pos`@`%` TRIGGER `trg_pr_payment_after_insert` AFTER INSERT ON `
) )
VALUES VALUES
( (
supplierId, _supplierId,
IF(NEW.type = 'REFUND', NEW.amount, 0), IF(NEW.type = 'REFUND', NEW.amount, 0),
IF(NEW.type = 'PAYMENT', NEW.amount, 0), IF(NEW.type = 'PAYMENT', NEW.amount, 0),
lastBalance lastBalance
+ IF(NEW.type = 'PAYMENT', NEW.amount, 0) + IF(NEW.type = 'PAYMENT', NEW.amount, 0)
- IF(NEW.type = 'REFUND', NEW.amount, 0), - IF(NEW.type = 'REFUND', NEW.amount, 0),
'PURCHASE_PAYMENT', 'PAYMENT',
NEW.id, NEW.id,
NOW() NOW()
); );
@@ -203,7 +203,6 @@ 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);
@@ -238,7 +237,6 @@ 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;
@@ -277,16 +275,18 @@ 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
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 current_stock DECIMAL(10, 2);
DECLARE inventory_id INT; DECLARE inventory_id INT;
SELECT inventoryId INTO inventory_id
FROM Sales_Invoices si SELECT pa.inventoryId INTO inventory_id
WHERE si.id = NEW.invoiceId FROM Pos_Accounts pa
LIMIT 1; INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
WHERE si.id = NEW.invoiceId;
SELECT COALESCE(quantity, 0) INTO current_stock SELECT COALESCE(quantity, 0) INTO current_stock
FROM Stock_Balance sb FROM Stock_Balance sb
@@ -307,17 +307,28 @@ 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;
DECLARE customer_id INT; DECLARE customer_id INT;
DECLARE pos_id INT;
SELECT inventoryId , customerId INTO inventory_id, customer_id
SELECT posAccountId, customerId INTO pos_id, customer_id
FROM Sales_Invoices si FROM Sales_Invoices si
WHERE si.id = NEW.invoiceId WHERE si.id = NEW.invoiceId
LIMIT 1; LIMIT 1;
INSERT INTO Trigger_Logs (name , message) VALUES ('pos_id', pos_id);
INSERT INTO Trigger_Logs (name , message) VALUES ('customer_id', customer_id);
SELECT pa.inventoryId INTO inventory_id
FROM Pos_Accounts pa
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
WHERE si.id = NEW.invoiceId;
SELECT COALESCE(quantity, 0) INTO current_stock SELECT COALESCE(quantity, 0) INTO current_stock
FROM Stock_Balance sb FROM Stock_Balance sb
@@ -354,7 +365,7 @@ DECLARE customer_id INT;
WHEN NEW.count = 0 THEN 0 WHEN NEW.count = 0 THEN 0
ELSE NEW.total / NEW.count ELSE NEW.total / NEW.count
END, END,
current_stock + NEW.count, current_stock - NEW.count,
customer_id, customer_id,
NOW() NOW()
); );
@@ -368,7 +379,6 @@ 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 (
@@ -451,7 +461,6 @@ 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
@@ -486,7 +495,6 @@ 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
@@ -514,3 +522,4 @@ ON DUPLICATE KEY UPDATE
END IF; END IF;
END; END;
File diff suppressed because one or more lines are too long
@@ -80,12 +80,12 @@ export type PrismaVersion = {
} }
/** /**
* Prisma Client JS version: 7.1.0 * Prisma Client JS version: 7.2.0
* Query Engine version: ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba * Query Engine version: 0c8ef2ce45c83248ab3df073180d5eda9e8be7a3
*/ */
export const prismaVersion: PrismaVersion = { export const prismaVersion: PrismaVersion = {
client: "7.1.0", client: "7.2.0",
engine: "ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba" engine: "0c8ef2ce45c83248ab3df073180d5eda9e8be7a3"
} }
/** /**
@@ -2580,7 +2580,7 @@ export const SalesInvoiceScalarFieldEnum = {
createdAt: 'createdAt', createdAt: 'createdAt',
updatedAt: 'updatedAt', updatedAt: 'updatedAt',
customerId: 'customerId', customerId: 'customerId',
inventoryId: 'inventoryId' posAccountId: 'posAccountId'
} as const } as const
export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum] export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum]
@@ -2642,7 +2642,8 @@ export const ProductScalarFieldEnum = {
deletedAt: 'deletedAt', deletedAt: 'deletedAt',
brandId: 'brandId', brandId: 'brandId',
categoryId: 'categoryId', categoryId: 'categoryId',
salePrice: 'salePrice' salePrice: 'salePrice',
minimumStockAlertLevel: 'minimumStockAlertLevel'
} as const } as const
export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum] export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum]
@@ -2713,7 +2714,9 @@ export const PurchaseReceiptPaymentsScalarFieldEnum = {
receiptId: 'receiptId', receiptId: 'receiptId',
payedAt: 'payedAt', payedAt: 'payedAt',
description: 'description', description: 'description',
createdAt: 'createdAt' createdAt: 'createdAt',
inventoryBankAccountInventoryId: 'inventoryBankAccountInventoryId',
inventoryBankAccountBankAccountId: 'inventoryBankAccountBankAccountId'
} as const } as const
export type PurchaseReceiptPaymentsScalarFieldEnum = (typeof PurchaseReceiptPaymentsScalarFieldEnum)[keyof typeof PurchaseReceiptPaymentsScalarFieldEnum] export type PurchaseReceiptPaymentsScalarFieldEnum = (typeof PurchaseReceiptPaymentsScalarFieldEnum)[keyof typeof PurchaseReceiptPaymentsScalarFieldEnum]
@@ -293,7 +293,7 @@ export const SalesInvoiceScalarFieldEnum = {
createdAt: 'createdAt', createdAt: 'createdAt',
updatedAt: 'updatedAt', updatedAt: 'updatedAt',
customerId: 'customerId', customerId: 'customerId',
inventoryId: 'inventoryId' posAccountId: 'posAccountId'
} as const } as const
export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum] export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum]
@@ -355,7 +355,8 @@ export const ProductScalarFieldEnum = {
deletedAt: 'deletedAt', deletedAt: 'deletedAt',
brandId: 'brandId', brandId: 'brandId',
categoryId: 'categoryId', categoryId: 'categoryId',
salePrice: 'salePrice' salePrice: 'salePrice',
minimumStockAlertLevel: 'minimumStockAlertLevel'
} as const } as const
export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum] export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum]
@@ -426,7 +427,9 @@ export const PurchaseReceiptPaymentsScalarFieldEnum = {
receiptId: 'receiptId', receiptId: 'receiptId',
payedAt: 'payedAt', payedAt: 'payedAt',
description: 'description', description: 'description',
createdAt: 'createdAt' createdAt: 'createdAt',
inventoryBankAccountInventoryId: 'inventoryBankAccountInventoryId',
inventoryBankAccountBankAccountId: 'inventoryBankAccountBankAccountId'
} as const } as const
export type PurchaseReceiptPaymentsScalarFieldEnum = (typeof PurchaseReceiptPaymentsScalarFieldEnum)[keyof typeof PurchaseReceiptPaymentsScalarFieldEnum] export type PurchaseReceiptPaymentsScalarFieldEnum = (typeof PurchaseReceiptPaymentsScalarFieldEnum)[keyof typeof PurchaseReceiptPaymentsScalarFieldEnum]
+45 -45
View File
@@ -281,8 +281,8 @@ export type CustomerWhereInput = {
updatedAt?: Prisma.DateTimeFilter<"Customer"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Customer"> | Date | string
deletedAt?: Prisma.DateTimeNullableFilter<"Customer"> | Date | string | null deletedAt?: Prisma.DateTimeNullableFilter<"Customer"> | Date | string | null
orders?: Prisma.OrderListRelationFilter orders?: Prisma.OrderListRelationFilter
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
stockMovements?: Prisma.StockMovementListRelationFilter stockMovements?: Prisma.StockMovementListRelationFilter
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
} }
export type CustomerOrderByWithRelationInput = { export type CustomerOrderByWithRelationInput = {
@@ -300,8 +300,8 @@ export type CustomerOrderByWithRelationInput = {
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
orders?: Prisma.OrderOrderByRelationAggregateInput orders?: Prisma.OrderOrderByRelationAggregateInput
salesInvoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput
stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput
salesInvoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput
_relevance?: Prisma.CustomerOrderByRelevanceInput _relevance?: Prisma.CustomerOrderByRelevanceInput
} }
@@ -323,8 +323,8 @@ export type CustomerWhereUniqueInput = Prisma.AtLeast<{
updatedAt?: Prisma.DateTimeFilter<"Customer"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Customer"> | Date | string
deletedAt?: Prisma.DateTimeNullableFilter<"Customer"> | Date | string | null deletedAt?: Prisma.DateTimeNullableFilter<"Customer"> | Date | string | null
orders?: Prisma.OrderListRelationFilter orders?: Prisma.OrderListRelationFilter
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
stockMovements?: Prisma.StockMovementListRelationFilter stockMovements?: Prisma.StockMovementListRelationFilter
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
}, "id" | "mobileNumber"> }, "id" | "mobileNumber">
export type CustomerOrderByWithAggregationInput = { export type CustomerOrderByWithAggregationInput = {
@@ -381,8 +381,8 @@ export type CustomerCreateInput = {
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
orders?: Prisma.OrderCreateNestedManyWithoutCustomerInput orders?: Prisma.OrderCreateNestedManyWithoutCustomerInput
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutCustomerInput stockMovements?: Prisma.StockMovementCreateNestedManyWithoutCustomerInput
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput
} }
export type CustomerUncheckedCreateInput = { export type CustomerUncheckedCreateInput = {
@@ -400,8 +400,8 @@ export type CustomerUncheckedCreateInput = {
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
orders?: Prisma.OrderUncheckedCreateNestedManyWithoutCustomerInput orders?: Prisma.OrderUncheckedCreateNestedManyWithoutCustomerInput
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCustomerInput stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCustomerInput
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput
} }
export type CustomerUpdateInput = { export type CustomerUpdateInput = {
@@ -418,8 +418,8 @@ export type CustomerUpdateInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
orders?: Prisma.OrderUpdateManyWithoutCustomerNestedInput orders?: Prisma.OrderUpdateManyWithoutCustomerNestedInput
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput
stockMovements?: Prisma.StockMovementUpdateManyWithoutCustomerNestedInput stockMovements?: Prisma.StockMovementUpdateManyWithoutCustomerNestedInput
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput
} }
export type CustomerUncheckedUpdateInput = { export type CustomerUncheckedUpdateInput = {
@@ -437,8 +437,8 @@ export type CustomerUncheckedUpdateInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
orders?: Prisma.OrderUncheckedUpdateManyWithoutCustomerNestedInput orders?: Prisma.OrderUncheckedUpdateManyWithoutCustomerNestedInput
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCustomerNestedInput stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCustomerNestedInput
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput
} }
export type CustomerCreateManyInput = { export type CustomerCreateManyInput = {
@@ -619,8 +619,8 @@ export type CustomerCreateWithoutOrdersInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutCustomerInput stockMovements?: Prisma.StockMovementCreateNestedManyWithoutCustomerInput
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput
} }
export type CustomerUncheckedCreateWithoutOrdersInput = { export type CustomerUncheckedCreateWithoutOrdersInput = {
@@ -637,8 +637,8 @@ export type CustomerUncheckedCreateWithoutOrdersInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCustomerInput stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCustomerInput
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput
} }
export type CustomerCreateOrConnectWithoutOrdersInput = { export type CustomerCreateOrConnectWithoutOrdersInput = {
@@ -670,8 +670,8 @@ export type CustomerUpdateWithoutOrdersInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput
stockMovements?: Prisma.StockMovementUpdateManyWithoutCustomerNestedInput stockMovements?: Prisma.StockMovementUpdateManyWithoutCustomerNestedInput
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput
} }
export type CustomerUncheckedUpdateWithoutOrdersInput = { export type CustomerUncheckedUpdateWithoutOrdersInput = {
@@ -688,8 +688,8 @@ export type CustomerUncheckedUpdateWithoutOrdersInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCustomerNestedInput stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCustomerNestedInput
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput
} }
export type CustomerCreateWithoutSalesInvoicesInput = { export type CustomerCreateWithoutSalesInvoicesInput = {
@@ -871,14 +871,14 @@ export type CustomerUncheckedUpdateWithoutStockMovementsInput = {
export type CustomerCountOutputType = { export type CustomerCountOutputType = {
orders: number orders: number
salesInvoices: number
stockMovements: number stockMovements: number
salesInvoices: number
} }
export type CustomerCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = { export type CustomerCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
orders?: boolean | CustomerCountOutputTypeCountOrdersArgs orders?: boolean | CustomerCountOutputTypeCountOrdersArgs
salesInvoices?: boolean | CustomerCountOutputTypeCountSalesInvoicesArgs
stockMovements?: boolean | CustomerCountOutputTypeCountStockMovementsArgs stockMovements?: boolean | CustomerCountOutputTypeCountStockMovementsArgs
salesInvoices?: boolean | CustomerCountOutputTypeCountSalesInvoicesArgs
} }
/** /**
@@ -901,15 +901,15 @@ export type CustomerCountOutputTypeCountOrdersArgs<ExtArgs extends runtime.Types
/** /**
* CustomerCountOutputType without action * CustomerCountOutputType without action
*/ */
export type CustomerCountOutputTypeCountSalesInvoicesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = { export type CustomerCountOutputTypeCountStockMovementsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.SalesInvoiceWhereInput where?: Prisma.StockMovementWhereInput
} }
/** /**
* CustomerCountOutputType without action * CustomerCountOutputType without action
*/ */
export type CustomerCountOutputTypeCountStockMovementsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = { export type CustomerCountOutputTypeCountSalesInvoicesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.StockMovementWhereInput where?: Prisma.SalesInvoiceWhereInput
} }
@@ -928,8 +928,8 @@ export type CustomerSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
updatedAt?: boolean updatedAt?: boolean
deletedAt?: boolean deletedAt?: boolean
orders?: boolean | Prisma.Customer$ordersArgs<ExtArgs> orders?: boolean | Prisma.Customer$ordersArgs<ExtArgs>
salesInvoices?: boolean | Prisma.Customer$salesInvoicesArgs<ExtArgs>
stockMovements?: boolean | Prisma.Customer$stockMovementsArgs<ExtArgs> stockMovements?: boolean | Prisma.Customer$stockMovementsArgs<ExtArgs>
salesInvoices?: boolean | Prisma.Customer$salesInvoicesArgs<ExtArgs>
_count?: boolean | Prisma.CustomerCountOutputTypeDefaultArgs<ExtArgs> _count?: boolean | Prisma.CustomerCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["customer"]> }, ExtArgs["result"]["customer"]>
@@ -954,8 +954,8 @@ export type CustomerSelectScalar = {
export type CustomerOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "firstName" | "lastName" | "email" | "mobileNumber" | "address" | "city" | "state" | "country" | "isActive" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["customer"]> export type CustomerOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "firstName" | "lastName" | "email" | "mobileNumber" | "address" | "city" | "state" | "country" | "isActive" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["customer"]>
export type CustomerInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = { export type CustomerInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
orders?: boolean | Prisma.Customer$ordersArgs<ExtArgs> orders?: boolean | Prisma.Customer$ordersArgs<ExtArgs>
salesInvoices?: boolean | Prisma.Customer$salesInvoicesArgs<ExtArgs>
stockMovements?: boolean | Prisma.Customer$stockMovementsArgs<ExtArgs> stockMovements?: boolean | Prisma.Customer$stockMovementsArgs<ExtArgs>
salesInvoices?: boolean | Prisma.Customer$salesInvoicesArgs<ExtArgs>
_count?: boolean | Prisma.CustomerCountOutputTypeDefaultArgs<ExtArgs> _count?: boolean | Prisma.CustomerCountOutputTypeDefaultArgs<ExtArgs>
} }
@@ -963,8 +963,8 @@ export type $CustomerPayload<ExtArgs extends runtime.Types.Extensions.InternalAr
name: "Customer" name: "Customer"
objects: { objects: {
orders: Prisma.$OrderPayload<ExtArgs>[] orders: Prisma.$OrderPayload<ExtArgs>[]
salesInvoices: Prisma.$SalesInvoicePayload<ExtArgs>[]
stockMovements: Prisma.$StockMovementPayload<ExtArgs>[] stockMovements: Prisma.$StockMovementPayload<ExtArgs>[]
salesInvoices: Prisma.$SalesInvoicePayload<ExtArgs>[]
} }
scalars: runtime.Types.Extensions.GetPayloadResult<{ scalars: runtime.Types.Extensions.GetPayloadResult<{
id: number id: number
@@ -1321,8 +1321,8 @@ readonly fields: CustomerFieldRefs;
export interface Prisma__CustomerClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> { export interface Prisma__CustomerClient<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"
orders<T extends Prisma.Customer$ordersArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Customer$ordersArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$OrderPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null> orders<T extends Prisma.Customer$ordersArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Customer$ordersArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$OrderPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
salesInvoices<T extends Prisma.Customer$salesInvoicesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Customer$salesInvoicesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
stockMovements<T extends Prisma.Customer$stockMovementsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Customer$stockMovementsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockMovementPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null> stockMovements<T extends Prisma.Customer$stockMovementsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Customer$stockMovementsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockMovementPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
salesInvoices<T extends Prisma.Customer$salesInvoicesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Customer$salesInvoicesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePayload<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.
@@ -1731,30 +1731,6 @@ export type Customer$ordersArgs<ExtArgs extends runtime.Types.Extensions.Interna
distinct?: Prisma.OrderScalarFieldEnum | Prisma.OrderScalarFieldEnum[] distinct?: Prisma.OrderScalarFieldEnum | Prisma.OrderScalarFieldEnum[]
} }
/**
* Customer.salesInvoices
*/
export type Customer$salesInvoicesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the SalesInvoice
*/
select?: Prisma.SalesInvoiceSelect<ExtArgs> | null
/**
* Omit specific fields from the SalesInvoice
*/
omit?: Prisma.SalesInvoiceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.SalesInvoiceInclude<ExtArgs> | null
where?: Prisma.SalesInvoiceWhereInput
orderBy?: Prisma.SalesInvoiceOrderByWithRelationInput | Prisma.SalesInvoiceOrderByWithRelationInput[]
cursor?: Prisma.SalesInvoiceWhereUniqueInput
take?: number
skip?: number
distinct?: Prisma.SalesInvoiceScalarFieldEnum | Prisma.SalesInvoiceScalarFieldEnum[]
}
/** /**
* Customer.stockMovements * Customer.stockMovements
*/ */
@@ -1779,6 +1755,30 @@ export type Customer$stockMovementsArgs<ExtArgs extends runtime.Types.Extensions
distinct?: Prisma.StockMovementScalarFieldEnum | Prisma.StockMovementScalarFieldEnum[] distinct?: Prisma.StockMovementScalarFieldEnum | Prisma.StockMovementScalarFieldEnum[]
} }
/**
* Customer.salesInvoices
*/
export type Customer$salesInvoicesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the SalesInvoice
*/
select?: Prisma.SalesInvoiceSelect<ExtArgs> | null
/**
* Omit specific fields from the SalesInvoice
*/
omit?: Prisma.SalesInvoiceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.SalesInvoiceInclude<ExtArgs> | null
where?: Prisma.SalesInvoiceWhereInput
orderBy?: Prisma.SalesInvoiceOrderByWithRelationInput | Prisma.SalesInvoiceOrderByWithRelationInput[]
cursor?: Prisma.SalesInvoiceWhereUniqueInput
take?: number
skip?: number
distinct?: Prisma.SalesInvoiceScalarFieldEnum | Prisma.SalesInvoiceScalarFieldEnum[]
}
/** /**
* Customer without action * Customer without action
*/ */
-180
View File
@@ -243,7 +243,6 @@ export type InventoryWhereInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferListRelationFilter inventoryTransfersFrom?: Prisma.InventoryTransferListRelationFilter
inventoryTransfersTo?: Prisma.InventoryTransferListRelationFilter inventoryTransfersTo?: Prisma.InventoryTransferListRelationFilter
purchaseReceipts?: Prisma.PurchaseReceiptListRelationFilter purchaseReceipts?: Prisma.PurchaseReceiptListRelationFilter
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
stockAdjustments?: Prisma.StockAdjustmentListRelationFilter stockAdjustments?: Prisma.StockAdjustmentListRelationFilter
stockBalances?: Prisma.StockBalanceListRelationFilter stockBalances?: Prisma.StockBalanceListRelationFilter
counterStockMovements?: Prisma.StockMovementListRelationFilter counterStockMovements?: Prisma.StockMovementListRelationFilter
@@ -263,7 +262,6 @@ export type InventoryOrderByWithRelationInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferOrderByRelationAggregateInput inventoryTransfersFrom?: Prisma.InventoryTransferOrderByRelationAggregateInput
inventoryTransfersTo?: Prisma.InventoryTransferOrderByRelationAggregateInput inventoryTransfersTo?: Prisma.InventoryTransferOrderByRelationAggregateInput
purchaseReceipts?: Prisma.PurchaseReceiptOrderByRelationAggregateInput purchaseReceipts?: Prisma.PurchaseReceiptOrderByRelationAggregateInput
salesInvoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput
stockAdjustments?: Prisma.StockAdjustmentOrderByRelationAggregateInput stockAdjustments?: Prisma.StockAdjustmentOrderByRelationAggregateInput
stockBalances?: Prisma.StockBalanceOrderByRelationAggregateInput stockBalances?: Prisma.StockBalanceOrderByRelationAggregateInput
counterStockMovements?: Prisma.StockMovementOrderByRelationAggregateInput counterStockMovements?: Prisma.StockMovementOrderByRelationAggregateInput
@@ -287,7 +285,6 @@ export type InventoryWhereUniqueInput = Prisma.AtLeast<{
inventoryTransfersFrom?: Prisma.InventoryTransferListRelationFilter inventoryTransfersFrom?: Prisma.InventoryTransferListRelationFilter
inventoryTransfersTo?: Prisma.InventoryTransferListRelationFilter inventoryTransfersTo?: Prisma.InventoryTransferListRelationFilter
purchaseReceipts?: Prisma.PurchaseReceiptListRelationFilter purchaseReceipts?: Prisma.PurchaseReceiptListRelationFilter
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
stockAdjustments?: Prisma.StockAdjustmentListRelationFilter stockAdjustments?: Prisma.StockAdjustmentListRelationFilter
stockBalances?: Prisma.StockBalanceListRelationFilter stockBalances?: Prisma.StockBalanceListRelationFilter
counterStockMovements?: Prisma.StockMovementListRelationFilter counterStockMovements?: Prisma.StockMovementListRelationFilter
@@ -336,7 +333,6 @@ export type InventoryCreateInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput
inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
@@ -356,7 +352,6 @@ export type InventoryUncheckedCreateInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
@@ -375,7 +370,6 @@ export type InventoryUpdateInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput
inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
@@ -395,7 +389,6 @@ export type InventoryUncheckedUpdateInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
@@ -534,20 +527,6 @@ export type InventoryUpdateOneRequiredWithoutInventoryTransfersToNestedInput = {
update?: Prisma.XOR<Prisma.XOR<Prisma.InventoryUpdateToOneWithWhereWithoutInventoryTransfersToInput, Prisma.InventoryUpdateWithoutInventoryTransfersToInput>, Prisma.InventoryUncheckedUpdateWithoutInventoryTransfersToInput> update?: Prisma.XOR<Prisma.XOR<Prisma.InventoryUpdateToOneWithWhereWithoutInventoryTransfersToInput, Prisma.InventoryUpdateWithoutInventoryTransfersToInput>, Prisma.InventoryUncheckedUpdateWithoutInventoryTransfersToInput>
} }
export type InventoryCreateNestedOneWithoutSalesInvoicesInput = {
create?: Prisma.XOR<Prisma.InventoryCreateWithoutSalesInvoicesInput, Prisma.InventoryUncheckedCreateWithoutSalesInvoicesInput>
connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutSalesInvoicesInput
connect?: Prisma.InventoryWhereUniqueInput
}
export type InventoryUpdateOneRequiredWithoutSalesInvoicesNestedInput = {
create?: Prisma.XOR<Prisma.InventoryCreateWithoutSalesInvoicesInput, Prisma.InventoryUncheckedCreateWithoutSalesInvoicesInput>
connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutSalesInvoicesInput
upsert?: Prisma.InventoryUpsertWithoutSalesInvoicesInput
connect?: Prisma.InventoryWhereUniqueInput
update?: Prisma.XOR<Prisma.XOR<Prisma.InventoryUpdateToOneWithWhereWithoutSalesInvoicesInput, Prisma.InventoryUpdateWithoutSalesInvoicesInput>, Prisma.InventoryUncheckedUpdateWithoutSalesInvoicesInput>
}
export type InventoryCreateNestedOneWithoutPurchaseReceiptsInput = { export type InventoryCreateNestedOneWithoutPurchaseReceiptsInput = {
create?: Prisma.XOR<Prisma.InventoryCreateWithoutPurchaseReceiptsInput, Prisma.InventoryUncheckedCreateWithoutPurchaseReceiptsInput> create?: Prisma.XOR<Prisma.InventoryCreateWithoutPurchaseReceiptsInput, Prisma.InventoryUncheckedCreateWithoutPurchaseReceiptsInput>
connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutPurchaseReceiptsInput connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutPurchaseReceiptsInput
@@ -631,7 +610,6 @@ export type InventoryCreateWithoutInventoryBankAccountsInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput
inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
@@ -650,7 +628,6 @@ export type InventoryUncheckedCreateWithoutInventoryBankAccountsInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
@@ -684,7 +661,6 @@ export type InventoryUpdateWithoutInventoryBankAccountsInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput
inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
@@ -703,7 +679,6 @@ export type InventoryUncheckedUpdateWithoutInventoryBankAccountsInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
@@ -720,7 +695,6 @@ export type InventoryCreateWithoutInventoryTransfersFromInput = {
isPointOfSale?: boolean isPointOfSale?: boolean
inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
@@ -739,7 +713,6 @@ export type InventoryUncheckedCreateWithoutInventoryTransfersFromInput = {
isPointOfSale?: boolean isPointOfSale?: boolean
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
@@ -762,7 +735,6 @@ export type InventoryCreateWithoutInventoryTransfersToInput = {
isPointOfSale?: boolean isPointOfSale?: boolean
inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
@@ -781,7 +753,6 @@ export type InventoryUncheckedCreateWithoutInventoryTransfersToInput = {
isPointOfSale?: boolean isPointOfSale?: boolean
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
@@ -815,7 +786,6 @@ export type InventoryUpdateWithoutInventoryTransfersFromInput = {
isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean
inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
@@ -834,7 +804,6 @@ export type InventoryUncheckedUpdateWithoutInventoryTransfersFromInput = {
isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
@@ -863,7 +832,6 @@ export type InventoryUpdateWithoutInventoryTransfersToInput = {
isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean
inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
@@ -882,97 +850,6 @@ export type InventoryUncheckedUpdateWithoutInventoryTransfersToInput = {
isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput
}
export type InventoryCreateWithoutSalesInvoicesInput = {
name: string
location?: string | null
isActive?: boolean
createdAt?: Date | string
updatedAt?: Date | string
deletedAt?: Date | string | null
isPointOfSale?: boolean
inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput
inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput
}
export type InventoryUncheckedCreateWithoutSalesInvoicesInput = {
id?: number
name: string
location?: string | null
isActive?: boolean
createdAt?: Date | string
updatedAt?: Date | string
deletedAt?: Date | string | null
isPointOfSale?: boolean
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput
}
export type InventoryCreateOrConnectWithoutSalesInvoicesInput = {
where: Prisma.InventoryWhereUniqueInput
create: Prisma.XOR<Prisma.InventoryCreateWithoutSalesInvoicesInput, Prisma.InventoryUncheckedCreateWithoutSalesInvoicesInput>
}
export type InventoryUpsertWithoutSalesInvoicesInput = {
update: Prisma.XOR<Prisma.InventoryUpdateWithoutSalesInvoicesInput, Prisma.InventoryUncheckedUpdateWithoutSalesInvoicesInput>
create: Prisma.XOR<Prisma.InventoryCreateWithoutSalesInvoicesInput, Prisma.InventoryUncheckedCreateWithoutSalesInvoicesInput>
where?: Prisma.InventoryWhereInput
}
export type InventoryUpdateToOneWithWhereWithoutSalesInvoicesInput = {
where?: Prisma.InventoryWhereInput
data: Prisma.XOR<Prisma.InventoryUpdateWithoutSalesInvoicesInput, Prisma.InventoryUncheckedUpdateWithoutSalesInvoicesInput>
}
export type InventoryUpdateWithoutSalesInvoicesInput = {
name?: Prisma.StringFieldUpdateOperationsInput | string
location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean
inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput
inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput
}
export type InventoryUncheckedUpdateWithoutSalesInvoicesInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
name?: Prisma.StringFieldUpdateOperationsInput | string
location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
@@ -990,7 +867,6 @@ export type InventoryCreateWithoutPurchaseReceiptsInput = {
isPointOfSale?: boolean isPointOfSale?: boolean
inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput
inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
@@ -1009,7 +885,6 @@ export type InventoryUncheckedCreateWithoutPurchaseReceiptsInput = {
isPointOfSale?: boolean isPointOfSale?: boolean
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
@@ -1043,7 +918,6 @@ export type InventoryUpdateWithoutPurchaseReceiptsInput = {
isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean
inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput
inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
@@ -1062,7 +936,6 @@ export type InventoryUncheckedUpdateWithoutPurchaseReceiptsInput = {
isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
@@ -1081,7 +954,6 @@ export type InventoryCreateWithoutCounterStockMovementsInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput
inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
@@ -1100,7 +972,6 @@ export type InventoryUncheckedCreateWithoutCounterStockMovementsInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
@@ -1123,7 +994,6 @@ export type InventoryCreateWithoutStockMovementsInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput
inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
@@ -1142,7 +1012,6 @@ export type InventoryUncheckedCreateWithoutStockMovementsInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
@@ -1176,7 +1045,6 @@ export type InventoryUpdateWithoutCounterStockMovementsInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput
inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
@@ -1195,7 +1063,6 @@ export type InventoryUncheckedUpdateWithoutCounterStockMovementsInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
@@ -1224,7 +1091,6 @@ export type InventoryUpdateWithoutStockMovementsInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput
inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
@@ -1243,7 +1109,6 @@ export type InventoryUncheckedUpdateWithoutStockMovementsInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
@@ -1261,7 +1126,6 @@ export type InventoryCreateWithoutStockBalancesInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput
inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
@@ -1280,7 +1144,6 @@ export type InventoryUncheckedCreateWithoutStockBalancesInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
@@ -1314,7 +1177,6 @@ export type InventoryUpdateWithoutStockBalancesInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput
inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
@@ -1333,7 +1195,6 @@ export type InventoryUncheckedUpdateWithoutStockBalancesInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
@@ -1351,7 +1212,6 @@ export type InventoryCreateWithoutStockAdjustmentsInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput
inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
@@ -1370,7 +1230,6 @@ export type InventoryUncheckedCreateWithoutStockAdjustmentsInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
@@ -1404,7 +1263,6 @@ export type InventoryUpdateWithoutStockAdjustmentsInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput
inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
@@ -1423,7 +1281,6 @@ export type InventoryUncheckedUpdateWithoutStockAdjustmentsInput = {
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
@@ -1439,7 +1296,6 @@ export type InventoryCountOutputType = {
inventoryTransfersFrom: number inventoryTransfersFrom: number
inventoryTransfersTo: number inventoryTransfersTo: number
purchaseReceipts: number purchaseReceipts: number
salesInvoices: number
stockAdjustments: number stockAdjustments: number
stockBalances: number stockBalances: number
counterStockMovements: number counterStockMovements: number
@@ -1451,7 +1307,6 @@ export type InventoryCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensi
inventoryTransfersFrom?: boolean | InventoryCountOutputTypeCountInventoryTransfersFromArgs inventoryTransfersFrom?: boolean | InventoryCountOutputTypeCountInventoryTransfersFromArgs
inventoryTransfersTo?: boolean | InventoryCountOutputTypeCountInventoryTransfersToArgs inventoryTransfersTo?: boolean | InventoryCountOutputTypeCountInventoryTransfersToArgs
purchaseReceipts?: boolean | InventoryCountOutputTypeCountPurchaseReceiptsArgs purchaseReceipts?: boolean | InventoryCountOutputTypeCountPurchaseReceiptsArgs
salesInvoices?: boolean | InventoryCountOutputTypeCountSalesInvoicesArgs
stockAdjustments?: boolean | InventoryCountOutputTypeCountStockAdjustmentsArgs stockAdjustments?: boolean | InventoryCountOutputTypeCountStockAdjustmentsArgs
stockBalances?: boolean | InventoryCountOutputTypeCountStockBalancesArgs stockBalances?: boolean | InventoryCountOutputTypeCountStockBalancesArgs
counterStockMovements?: boolean | InventoryCountOutputTypeCountCounterStockMovementsArgs counterStockMovements?: boolean | InventoryCountOutputTypeCountCounterStockMovementsArgs
@@ -1490,13 +1345,6 @@ export type InventoryCountOutputTypeCountPurchaseReceiptsArgs<ExtArgs extends ru
where?: Prisma.PurchaseReceiptWhereInput where?: Prisma.PurchaseReceiptWhereInput
} }
/**
* InventoryCountOutputType without action
*/
export type InventoryCountOutputTypeCountSalesInvoicesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.SalesInvoiceWhereInput
}
/** /**
* InventoryCountOutputType without action * InventoryCountOutputType without action
*/ */
@@ -1545,7 +1393,6 @@ export type InventorySelect<ExtArgs extends runtime.Types.Extensions.InternalArg
inventoryTransfersFrom?: boolean | Prisma.Inventory$inventoryTransfersFromArgs<ExtArgs> inventoryTransfersFrom?: boolean | Prisma.Inventory$inventoryTransfersFromArgs<ExtArgs>
inventoryTransfersTo?: boolean | Prisma.Inventory$inventoryTransfersToArgs<ExtArgs> inventoryTransfersTo?: boolean | Prisma.Inventory$inventoryTransfersToArgs<ExtArgs>
purchaseReceipts?: boolean | Prisma.Inventory$purchaseReceiptsArgs<ExtArgs> purchaseReceipts?: boolean | Prisma.Inventory$purchaseReceiptsArgs<ExtArgs>
salesInvoices?: boolean | Prisma.Inventory$salesInvoicesArgs<ExtArgs>
stockAdjustments?: boolean | Prisma.Inventory$stockAdjustmentsArgs<ExtArgs> stockAdjustments?: boolean | Prisma.Inventory$stockAdjustmentsArgs<ExtArgs>
stockBalances?: boolean | Prisma.Inventory$stockBalancesArgs<ExtArgs> stockBalances?: boolean | Prisma.Inventory$stockBalancesArgs<ExtArgs>
counterStockMovements?: boolean | Prisma.Inventory$counterStockMovementsArgs<ExtArgs> counterStockMovements?: boolean | Prisma.Inventory$counterStockMovementsArgs<ExtArgs>
@@ -1572,7 +1419,6 @@ export type InventoryInclude<ExtArgs extends runtime.Types.Extensions.InternalAr
inventoryTransfersFrom?: boolean | Prisma.Inventory$inventoryTransfersFromArgs<ExtArgs> inventoryTransfersFrom?: boolean | Prisma.Inventory$inventoryTransfersFromArgs<ExtArgs>
inventoryTransfersTo?: boolean | Prisma.Inventory$inventoryTransfersToArgs<ExtArgs> inventoryTransfersTo?: boolean | Prisma.Inventory$inventoryTransfersToArgs<ExtArgs>
purchaseReceipts?: boolean | Prisma.Inventory$purchaseReceiptsArgs<ExtArgs> purchaseReceipts?: boolean | Prisma.Inventory$purchaseReceiptsArgs<ExtArgs>
salesInvoices?: boolean | Prisma.Inventory$salesInvoicesArgs<ExtArgs>
stockAdjustments?: boolean | Prisma.Inventory$stockAdjustmentsArgs<ExtArgs> stockAdjustments?: boolean | Prisma.Inventory$stockAdjustmentsArgs<ExtArgs>
stockBalances?: boolean | Prisma.Inventory$stockBalancesArgs<ExtArgs> stockBalances?: boolean | Prisma.Inventory$stockBalancesArgs<ExtArgs>
counterStockMovements?: boolean | Prisma.Inventory$counterStockMovementsArgs<ExtArgs> counterStockMovements?: boolean | Prisma.Inventory$counterStockMovementsArgs<ExtArgs>
@@ -1587,7 +1433,6 @@ export type $InventoryPayload<ExtArgs extends runtime.Types.Extensions.InternalA
inventoryTransfersFrom: Prisma.$InventoryTransferPayload<ExtArgs>[] inventoryTransfersFrom: Prisma.$InventoryTransferPayload<ExtArgs>[]
inventoryTransfersTo: Prisma.$InventoryTransferPayload<ExtArgs>[] inventoryTransfersTo: Prisma.$InventoryTransferPayload<ExtArgs>[]
purchaseReceipts: Prisma.$PurchaseReceiptPayload<ExtArgs>[] purchaseReceipts: Prisma.$PurchaseReceiptPayload<ExtArgs>[]
salesInvoices: Prisma.$SalesInvoicePayload<ExtArgs>[]
stockAdjustments: Prisma.$StockAdjustmentPayload<ExtArgs>[] stockAdjustments: Prisma.$StockAdjustmentPayload<ExtArgs>[]
stockBalances: Prisma.$StockBalancePayload<ExtArgs>[] stockBalances: Prisma.$StockBalancePayload<ExtArgs>[]
counterStockMovements: Prisma.$StockMovementPayload<ExtArgs>[] counterStockMovements: Prisma.$StockMovementPayload<ExtArgs>[]
@@ -1946,7 +1791,6 @@ export interface Prisma__InventoryClient<T, Null = never, ExtArgs extends runtim
inventoryTransfersFrom<T extends Prisma.Inventory$inventoryTransfersFromArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Inventory$inventoryTransfersFromArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$InventoryTransferPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null> inventoryTransfersFrom<T extends Prisma.Inventory$inventoryTransfersFromArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Inventory$inventoryTransfersFromArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$InventoryTransferPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
inventoryTransfersTo<T extends Prisma.Inventory$inventoryTransfersToArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Inventory$inventoryTransfersToArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$InventoryTransferPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null> inventoryTransfersTo<T extends Prisma.Inventory$inventoryTransfersToArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Inventory$inventoryTransfersToArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$InventoryTransferPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
purchaseReceipts<T extends Prisma.Inventory$purchaseReceiptsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Inventory$purchaseReceiptsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PurchaseReceiptPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null> purchaseReceipts<T extends Prisma.Inventory$purchaseReceiptsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Inventory$purchaseReceiptsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PurchaseReceiptPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
salesInvoices<T extends Prisma.Inventory$salesInvoicesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Inventory$salesInvoicesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
stockAdjustments<T extends Prisma.Inventory$stockAdjustmentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Inventory$stockAdjustmentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockAdjustmentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null> stockAdjustments<T extends Prisma.Inventory$stockAdjustmentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Inventory$stockAdjustmentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockAdjustmentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
stockBalances<T extends Prisma.Inventory$stockBalancesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Inventory$stockBalancesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockBalancePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null> stockBalances<T extends Prisma.Inventory$stockBalancesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Inventory$stockBalancesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockBalancePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
counterStockMovements<T extends Prisma.Inventory$counterStockMovementsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Inventory$counterStockMovementsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockMovementPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null> counterStockMovements<T extends Prisma.Inventory$counterStockMovementsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Inventory$counterStockMovementsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockMovementPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
@@ -2403,30 +2247,6 @@ export type Inventory$purchaseReceiptsArgs<ExtArgs extends runtime.Types.Extensi
distinct?: Prisma.PurchaseReceiptScalarFieldEnum | Prisma.PurchaseReceiptScalarFieldEnum[] distinct?: Prisma.PurchaseReceiptScalarFieldEnum | Prisma.PurchaseReceiptScalarFieldEnum[]
} }
/**
* Inventory.salesInvoices
*/
export type Inventory$salesInvoicesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the SalesInvoice
*/
select?: Prisma.SalesInvoiceSelect<ExtArgs> | null
/**
* Omit specific fields from the SalesInvoice
*/
omit?: Prisma.SalesInvoiceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.SalesInvoiceInclude<ExtArgs> | null
where?: Prisma.SalesInvoiceWhereInput
orderBy?: Prisma.SalesInvoiceOrderByWithRelationInput | Prisma.SalesInvoiceOrderByWithRelationInput[]
cursor?: Prisma.SalesInvoiceWhereUniqueInput
take?: number
skip?: number
distinct?: Prisma.SalesInvoiceScalarFieldEnum | Prisma.SalesInvoiceScalarFieldEnum[]
}
/** /**
* Inventory.stockAdjustments * Inventory.stockAdjustments
*/ */
@@ -199,6 +199,7 @@ 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 = {
@@ -207,6 +208,7 @@ 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<{
@@ -219,6 +221,7 @@ 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 = {
@@ -243,24 +246,28 @@ 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 = {
@@ -322,6 +329,11 @@ export type InventoryBankAccountScalarRelationFilter = {
isNot?: Prisma.InventoryBankAccountWhereInput isNot?: Prisma.InventoryBankAccountWhereInput
} }
export type InventoryBankAccountNullableScalarRelationFilter = {
is?: Prisma.InventoryBankAccountWhereInput | null
isNot?: Prisma.InventoryBankAccountWhereInput | null
}
export type InventoryBankAccountCreateNestedManyWithoutBankAccountInput = { export type InventoryBankAccountCreateNestedManyWithoutBankAccountInput = {
create?: Prisma.XOR<Prisma.InventoryBankAccountCreateWithoutBankAccountInput, Prisma.InventoryBankAccountUncheckedCreateWithoutBankAccountInput> | Prisma.InventoryBankAccountCreateWithoutBankAccountInput[] | Prisma.InventoryBankAccountUncheckedCreateWithoutBankAccountInput[] create?: Prisma.XOR<Prisma.InventoryBankAccountCreateWithoutBankAccountInput, Prisma.InventoryBankAccountUncheckedCreateWithoutBankAccountInput> | Prisma.InventoryBankAccountCreateWithoutBankAccountInput[] | Prisma.InventoryBankAccountUncheckedCreateWithoutBankAccountInput[]
connectOrCreate?: Prisma.InventoryBankAccountCreateOrConnectWithoutBankAccountInput | Prisma.InventoryBankAccountCreateOrConnectWithoutBankAccountInput[] connectOrCreate?: Prisma.InventoryBankAccountCreateOrConnectWithoutBankAccountInput | Prisma.InventoryBankAccountCreateOrConnectWithoutBankAccountInput[]
@@ -420,14 +432,32 @@ 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 InventoryBankAccountUpdateOneWithoutPurchaseReceiptPaymentsNestedInput = {
create?: Prisma.XOR<Prisma.InventoryBankAccountCreateWithoutPurchaseReceiptPaymentsInput, Prisma.InventoryBankAccountUncheckedCreateWithoutPurchaseReceiptPaymentsInput>
connectOrCreate?: Prisma.InventoryBankAccountCreateOrConnectWithoutPurchaseReceiptPaymentsInput
upsert?: Prisma.InventoryBankAccountUpsertWithoutPurchaseReceiptPaymentsInput
disconnect?: Prisma.InventoryBankAccountWhereInput | boolean
delete?: Prisma.InventoryBankAccountWhereInput | boolean
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 = {
@@ -467,11 +497,13 @@ 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 = {
@@ -503,11 +535,13 @@ 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 = {
@@ -529,11 +563,53 @@ 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 = {
@@ -543,11 +619,13 @@ 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 = {
@@ -561,11 +639,13 @@ 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 = {
@@ -579,10 +659,12 @@ 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
} }
/** /**
@@ -602,6 +684,13 @@ 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
@@ -609,6 +698,7 @@ 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"]>
@@ -624,6 +714,7 @@ 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>
} }
@@ -633,6 +724,7 @@ 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
@@ -980,6 +1072,7 @@ 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.
@@ -1377,6 +1470,30 @@ 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
*/ */
+149
View File
@@ -257,6 +257,7 @@ export type PosAccountWhereInput = {
updatedAt?: Prisma.DateTimeFilter<"PosAccount"> | Date | string updatedAt?: Prisma.DateTimeFilter<"PosAccount"> | Date | string
deletedAt?: Prisma.DateTimeNullableFilter<"PosAccount"> | Date | string | null deletedAt?: Prisma.DateTimeNullableFilter<"PosAccount"> | Date | string | null
inventoryBankAccount?: Prisma.XOR<Prisma.InventoryBankAccountScalarRelationFilter, Prisma.InventoryBankAccountWhereInput> inventoryBankAccount?: Prisma.XOR<Prisma.InventoryBankAccountScalarRelationFilter, Prisma.InventoryBankAccountWhereInput>
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
} }
export type PosAccountOrderByWithRelationInput = { export type PosAccountOrderByWithRelationInput = {
@@ -270,6 +271,7 @@ export type PosAccountOrderByWithRelationInput = {
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
inventoryBankAccount?: Prisma.InventoryBankAccountOrderByWithRelationInput inventoryBankAccount?: Prisma.InventoryBankAccountOrderByWithRelationInput
salesInvoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput
_relevance?: Prisma.PosAccountOrderByRelevanceInput _relevance?: Prisma.PosAccountOrderByRelevanceInput
} }
@@ -287,6 +289,7 @@ export type PosAccountWhereUniqueInput = Prisma.AtLeast<{
updatedAt?: Prisma.DateTimeFilter<"PosAccount"> | Date | string updatedAt?: Prisma.DateTimeFilter<"PosAccount"> | Date | string
deletedAt?: Prisma.DateTimeNullableFilter<"PosAccount"> | Date | string | null deletedAt?: Prisma.DateTimeNullableFilter<"PosAccount"> | Date | string | null
inventoryBankAccount?: Prisma.XOR<Prisma.InventoryBankAccountScalarRelationFilter, Prisma.InventoryBankAccountWhereInput> inventoryBankAccount?: Prisma.XOR<Prisma.InventoryBankAccountScalarRelationFilter, Prisma.InventoryBankAccountWhereInput>
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
}, "id" | "code"> }, "id" | "code">
export type PosAccountOrderByWithAggregationInput = { export type PosAccountOrderByWithAggregationInput = {
@@ -329,6 +332,7 @@ export type PosAccountCreateInput = {
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
inventoryBankAccount: Prisma.InventoryBankAccountCreateNestedOneWithoutPosAccountsInput inventoryBankAccount: Prisma.InventoryBankAccountCreateNestedOneWithoutPosAccountsInput
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutPosAccountInput
} }
export type PosAccountUncheckedCreateInput = { export type PosAccountUncheckedCreateInput = {
@@ -341,6 +345,7 @@ export type PosAccountUncheckedCreateInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutPosAccountInput
} }
export type PosAccountUpdateInput = { export type PosAccountUpdateInput = {
@@ -351,6 +356,7 @@ export type PosAccountUpdateInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
inventoryBankAccount?: Prisma.InventoryBankAccountUpdateOneRequiredWithoutPosAccountsNestedInput inventoryBankAccount?: Prisma.InventoryBankAccountUpdateOneRequiredWithoutPosAccountsNestedInput
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutPosAccountNestedInput
} }
export type PosAccountUncheckedUpdateInput = { export type PosAccountUncheckedUpdateInput = {
@@ -363,6 +369,7 @@ export type PosAccountUncheckedUpdateInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutPosAccountNestedInput
} }
export type PosAccountCreateManyInput = { export type PosAccountCreateManyInput = {
@@ -462,6 +469,11 @@ export type PosAccountSumOrderByAggregateInput = {
inventoryId?: Prisma.SortOrder inventoryId?: Prisma.SortOrder
} }
export type PosAccountScalarRelationFilter = {
is?: Prisma.PosAccountWhereInput
isNot?: Prisma.PosAccountWhereInput
}
export type PosAccountCreateNestedManyWithoutInventoryBankAccountInput = { export type PosAccountCreateNestedManyWithoutInventoryBankAccountInput = {
create?: Prisma.XOR<Prisma.PosAccountCreateWithoutInventoryBankAccountInput, Prisma.PosAccountUncheckedCreateWithoutInventoryBankAccountInput> | Prisma.PosAccountCreateWithoutInventoryBankAccountInput[] | Prisma.PosAccountUncheckedCreateWithoutInventoryBankAccountInput[] create?: Prisma.XOR<Prisma.PosAccountCreateWithoutInventoryBankAccountInput, Prisma.PosAccountUncheckedCreateWithoutInventoryBankAccountInput> | Prisma.PosAccountCreateWithoutInventoryBankAccountInput[] | Prisma.PosAccountUncheckedCreateWithoutInventoryBankAccountInput[]
connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutInventoryBankAccountInput | Prisma.PosAccountCreateOrConnectWithoutInventoryBankAccountInput[] connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutInventoryBankAccountInput | Prisma.PosAccountCreateOrConnectWithoutInventoryBankAccountInput[]
@@ -504,6 +516,20 @@ export type PosAccountUncheckedUpdateManyWithoutInventoryBankAccountNestedInput
deleteMany?: Prisma.PosAccountScalarWhereInput | Prisma.PosAccountScalarWhereInput[] deleteMany?: Prisma.PosAccountScalarWhereInput | Prisma.PosAccountScalarWhereInput[]
} }
export type PosAccountCreateNestedOneWithoutSalesInvoicesInput = {
create?: Prisma.XOR<Prisma.PosAccountCreateWithoutSalesInvoicesInput, Prisma.PosAccountUncheckedCreateWithoutSalesInvoicesInput>
connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutSalesInvoicesInput
connect?: Prisma.PosAccountWhereUniqueInput
}
export type PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput = {
create?: Prisma.XOR<Prisma.PosAccountCreateWithoutSalesInvoicesInput, Prisma.PosAccountUncheckedCreateWithoutSalesInvoicesInput>
connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutSalesInvoicesInput
upsert?: Prisma.PosAccountUpsertWithoutSalesInvoicesInput
connect?: Prisma.PosAccountWhereUniqueInput
update?: Prisma.XOR<Prisma.XOR<Prisma.PosAccountUpdateToOneWithWhereWithoutSalesInvoicesInput, Prisma.PosAccountUpdateWithoutSalesInvoicesInput>, Prisma.PosAccountUncheckedUpdateWithoutSalesInvoicesInput>
}
export type PosAccountCreateWithoutInventoryBankAccountInput = { export type PosAccountCreateWithoutInventoryBankAccountInput = {
name: string name: string
code: string code: string
@@ -511,6 +537,7 @@ export type PosAccountCreateWithoutInventoryBankAccountInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutPosAccountInput
} }
export type PosAccountUncheckedCreateWithoutInventoryBankAccountInput = { export type PosAccountUncheckedCreateWithoutInventoryBankAccountInput = {
@@ -521,6 +548,7 @@ export type PosAccountUncheckedCreateWithoutInventoryBankAccountInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutPosAccountInput
} }
export type PosAccountCreateOrConnectWithoutInventoryBankAccountInput = { export type PosAccountCreateOrConnectWithoutInventoryBankAccountInput = {
@@ -564,6 +592,66 @@ export type PosAccountScalarWhereInput = {
deletedAt?: Prisma.DateTimeNullableFilter<"PosAccount"> | Date | string | null deletedAt?: Prisma.DateTimeNullableFilter<"PosAccount"> | Date | string | null
} }
export type PosAccountCreateWithoutSalesInvoicesInput = {
name: string
code: string
description?: string | null
createdAt?: Date | string
updatedAt?: Date | string
deletedAt?: Date | string | null
inventoryBankAccount: Prisma.InventoryBankAccountCreateNestedOneWithoutPosAccountsInput
}
export type PosAccountUncheckedCreateWithoutSalesInvoicesInput = {
id?: number
name: string
code: string
description?: string | null
bankAccountId: number
inventoryId: number
createdAt?: Date | string
updatedAt?: Date | string
deletedAt?: Date | string | null
}
export type PosAccountCreateOrConnectWithoutSalesInvoicesInput = {
where: Prisma.PosAccountWhereUniqueInput
create: Prisma.XOR<Prisma.PosAccountCreateWithoutSalesInvoicesInput, Prisma.PosAccountUncheckedCreateWithoutSalesInvoicesInput>
}
export type PosAccountUpsertWithoutSalesInvoicesInput = {
update: Prisma.XOR<Prisma.PosAccountUpdateWithoutSalesInvoicesInput, Prisma.PosAccountUncheckedUpdateWithoutSalesInvoicesInput>
create: Prisma.XOR<Prisma.PosAccountCreateWithoutSalesInvoicesInput, Prisma.PosAccountUncheckedCreateWithoutSalesInvoicesInput>
where?: Prisma.PosAccountWhereInput
}
export type PosAccountUpdateToOneWithWhereWithoutSalesInvoicesInput = {
where?: Prisma.PosAccountWhereInput
data: Prisma.XOR<Prisma.PosAccountUpdateWithoutSalesInvoicesInput, Prisma.PosAccountUncheckedUpdateWithoutSalesInvoicesInput>
}
export type PosAccountUpdateWithoutSalesInvoicesInput = {
name?: Prisma.StringFieldUpdateOperationsInput | string
code?: Prisma.StringFieldUpdateOperationsInput | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
inventoryBankAccount?: Prisma.InventoryBankAccountUpdateOneRequiredWithoutPosAccountsNestedInput
}
export type PosAccountUncheckedUpdateWithoutSalesInvoicesInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
name?: Prisma.StringFieldUpdateOperationsInput | string
code?: Prisma.StringFieldUpdateOperationsInput | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}
export type PosAccountCreateManyInventoryBankAccountInput = { export type PosAccountCreateManyInventoryBankAccountInput = {
id?: number id?: number
name: string name: string
@@ -581,6 +669,7 @@ export type PosAccountUpdateWithoutInventoryBankAccountInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutPosAccountNestedInput
} }
export type PosAccountUncheckedUpdateWithoutInventoryBankAccountInput = { export type PosAccountUncheckedUpdateWithoutInventoryBankAccountInput = {
@@ -591,6 +680,7 @@ export type PosAccountUncheckedUpdateWithoutInventoryBankAccountInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutPosAccountNestedInput
} }
export type PosAccountUncheckedUpdateManyWithoutInventoryBankAccountInput = { export type PosAccountUncheckedUpdateManyWithoutInventoryBankAccountInput = {
@@ -604,6 +694,35 @@ export type PosAccountUncheckedUpdateManyWithoutInventoryBankAccountInput = {
} }
/**
* Count Type PosAccountCountOutputType
*/
export type PosAccountCountOutputType = {
salesInvoices: number
}
export type PosAccountCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
salesInvoices?: boolean | PosAccountCountOutputTypeCountSalesInvoicesArgs
}
/**
* PosAccountCountOutputType without action
*/
export type PosAccountCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the PosAccountCountOutputType
*/
select?: Prisma.PosAccountCountOutputTypeSelect<ExtArgs> | null
}
/**
* PosAccountCountOutputType without action
*/
export type PosAccountCountOutputTypeCountSalesInvoicesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.SalesInvoiceWhereInput
}
export type PosAccountSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{ export type PosAccountSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean id?: boolean
@@ -616,6 +735,8 @@ export type PosAccountSelect<ExtArgs extends runtime.Types.Extensions.InternalAr
updatedAt?: boolean updatedAt?: boolean
deletedAt?: boolean deletedAt?: boolean
inventoryBankAccount?: boolean | Prisma.InventoryBankAccountDefaultArgs<ExtArgs> inventoryBankAccount?: boolean | Prisma.InventoryBankAccountDefaultArgs<ExtArgs>
salesInvoices?: boolean | Prisma.PosAccount$salesInvoicesArgs<ExtArgs>
_count?: boolean | Prisma.PosAccountCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["posAccount"]> }, ExtArgs["result"]["posAccount"]>
@@ -635,12 +756,15 @@ export type PosAccountSelectScalar = {
export type PosAccountOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "code" | "description" | "bankAccountId" | "inventoryId" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["posAccount"]> export type PosAccountOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "code" | "description" | "bankAccountId" | "inventoryId" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["posAccount"]>
export type PosAccountInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = { export type PosAccountInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
inventoryBankAccount?: boolean | Prisma.InventoryBankAccountDefaultArgs<ExtArgs> inventoryBankAccount?: boolean | Prisma.InventoryBankAccountDefaultArgs<ExtArgs>
salesInvoices?: boolean | Prisma.PosAccount$salesInvoicesArgs<ExtArgs>
_count?: boolean | Prisma.PosAccountCountOutputTypeDefaultArgs<ExtArgs>
} }
export type $PosAccountPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = { export type $PosAccountPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
name: "PosAccount" name: "PosAccount"
objects: { objects: {
inventoryBankAccount: Prisma.$InventoryBankAccountPayload<ExtArgs> inventoryBankAccount: Prisma.$InventoryBankAccountPayload<ExtArgs>
salesInvoices: Prisma.$SalesInvoicePayload<ExtArgs>[]
} }
scalars: runtime.Types.Extensions.GetPayloadResult<{ scalars: runtime.Types.Extensions.GetPayloadResult<{
id: number id: number
@@ -993,6 +1117,7 @@ readonly fields: PosAccountFieldRefs;
export interface Prisma__PosAccountClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> { export interface Prisma__PosAccountClient<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"
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> 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>
salesInvoices<T extends Prisma.PosAccount$salesInvoicesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PosAccount$salesInvoicesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePayload<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.
@@ -1373,6 +1498,30 @@ export type PosAccountDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.In
limit?: number limit?: number
} }
/**
* PosAccount.salesInvoices
*/
export type PosAccount$salesInvoicesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the SalesInvoice
*/
select?: Prisma.SalesInvoiceSelect<ExtArgs> | null
/**
* Omit specific fields from the SalesInvoice
*/
omit?: Prisma.SalesInvoiceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.SalesInvoiceInclude<ExtArgs> | null
where?: Prisma.SalesInvoiceWhereInput
orderBy?: Prisma.SalesInvoiceOrderByWithRelationInput | Prisma.SalesInvoiceOrderByWithRelationInput[]
cursor?: Prisma.SalesInvoiceWhereUniqueInput
take?: number
skip?: number
distinct?: Prisma.SalesInvoiceScalarFieldEnum | Prisma.SalesInvoiceScalarFieldEnum[]
}
/** /**
* PosAccount without action * PosAccount without action
*/ */
+150 -77
View File
@@ -31,6 +31,7 @@ export type ProductAvgAggregateOutputType = {
brandId: number | null brandId: number | null
categoryId: number | null categoryId: number | null
salePrice: runtime.Decimal | null salePrice: runtime.Decimal | null
minimumStockAlertLevel: runtime.Decimal | null
} }
export type ProductSumAggregateOutputType = { export type ProductSumAggregateOutputType = {
@@ -38,6 +39,7 @@ export type ProductSumAggregateOutputType = {
brandId: number | null brandId: number | null
categoryId: number | null categoryId: number | null
salePrice: runtime.Decimal | null salePrice: runtime.Decimal | null
minimumStockAlertLevel: runtime.Decimal | null
} }
export type ProductMinAggregateOutputType = { export type ProductMinAggregateOutputType = {
@@ -52,6 +54,7 @@ export type ProductMinAggregateOutputType = {
brandId: number | null brandId: number | null
categoryId: number | null categoryId: number | null
salePrice: runtime.Decimal | null salePrice: runtime.Decimal | null
minimumStockAlertLevel: runtime.Decimal | null
} }
export type ProductMaxAggregateOutputType = { export type ProductMaxAggregateOutputType = {
@@ -66,6 +69,7 @@ export type ProductMaxAggregateOutputType = {
brandId: number | null brandId: number | null
categoryId: number | null categoryId: number | null
salePrice: runtime.Decimal | null salePrice: runtime.Decimal | null
minimumStockAlertLevel: runtime.Decimal | null
} }
export type ProductCountAggregateOutputType = { export type ProductCountAggregateOutputType = {
@@ -80,6 +84,7 @@ export type ProductCountAggregateOutputType = {
brandId: number brandId: number
categoryId: number categoryId: number
salePrice: number salePrice: number
minimumStockAlertLevel: number
_all: number _all: number
} }
@@ -89,6 +94,7 @@ export type ProductAvgAggregateInputType = {
brandId?: true brandId?: true
categoryId?: true categoryId?: true
salePrice?: true salePrice?: true
minimumStockAlertLevel?: true
} }
export type ProductSumAggregateInputType = { export type ProductSumAggregateInputType = {
@@ -96,6 +102,7 @@ export type ProductSumAggregateInputType = {
brandId?: true brandId?: true
categoryId?: true categoryId?: true
salePrice?: true salePrice?: true
minimumStockAlertLevel?: true
} }
export type ProductMinAggregateInputType = { export type ProductMinAggregateInputType = {
@@ -110,6 +117,7 @@ export type ProductMinAggregateInputType = {
brandId?: true brandId?: true
categoryId?: true categoryId?: true
salePrice?: true salePrice?: true
minimumStockAlertLevel?: true
} }
export type ProductMaxAggregateInputType = { export type ProductMaxAggregateInputType = {
@@ -124,6 +132,7 @@ export type ProductMaxAggregateInputType = {
brandId?: true brandId?: true
categoryId?: true categoryId?: true
salePrice?: true salePrice?: true
minimumStockAlertLevel?: true
} }
export type ProductCountAggregateInputType = { export type ProductCountAggregateInputType = {
@@ -138,6 +147,7 @@ export type ProductCountAggregateInputType = {
brandId?: true brandId?: true
categoryId?: true categoryId?: true
salePrice?: true salePrice?: true
minimumStockAlertLevel?: true
_all?: true _all?: true
} }
@@ -239,6 +249,7 @@ export type ProductGroupByOutputType = {
brandId: number | null brandId: number | null
categoryId: number | null categoryId: number | null
salePrice: runtime.Decimal salePrice: runtime.Decimal
minimumStockAlertLevel: runtime.Decimal
_count: ProductCountAggregateOutputType | null _count: ProductCountAggregateOutputType | null
_avg: ProductAvgAggregateOutputType | null _avg: ProductAvgAggregateOutputType | null
_sum: ProductSumAggregateOutputType | null _sum: ProductSumAggregateOutputType | null
@@ -276,15 +287,16 @@ export type ProductWhereInput = {
brandId?: Prisma.IntNullableFilter<"Product"> | number | null brandId?: Prisma.IntNullableFilter<"Product"> | number | null
categoryId?: Prisma.IntNullableFilter<"Product"> | number | null categoryId?: Prisma.IntNullableFilter<"Product"> | number | null
salePrice?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemListRelationFilter inventoryTransferItems?: Prisma.InventoryTransferItemListRelationFilter
variants?: Prisma.ProductVariantListRelationFilter variants?: Prisma.ProductVariantListRelationFilter
brand?: Prisma.XOR<Prisma.ProductBrandNullableScalarRelationFilter, Prisma.ProductBrandWhereInput> | null brand?: Prisma.XOR<Prisma.ProductBrandNullableScalarRelationFilter, Prisma.ProductBrandWhereInput> | null
category?: Prisma.XOR<Prisma.ProductCategoryNullableScalarRelationFilter, Prisma.ProductCategoryWhereInput> | null category?: Prisma.XOR<Prisma.ProductCategoryNullableScalarRelationFilter, Prisma.ProductCategoryWhereInput> | null
purchaseReceiptItems?: Prisma.PurchaseReceiptItemListRelationFilter purchaseReceiptItems?: Prisma.PurchaseReceiptItemListRelationFilter
salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter
stockAdjustments?: Prisma.StockAdjustmentListRelationFilter stockAdjustments?: Prisma.StockAdjustmentListRelationFilter
stockBalances?: Prisma.StockBalanceListRelationFilter stockBalances?: Prisma.StockBalanceListRelationFilter
stockMovements?: Prisma.StockMovementListRelationFilter stockMovements?: Prisma.StockMovementListRelationFilter
salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter
} }
export type ProductOrderByWithRelationInput = { export type ProductOrderByWithRelationInput = {
@@ -299,15 +311,16 @@ export type ProductOrderByWithRelationInput = {
brandId?: Prisma.SortOrderInput | Prisma.SortOrder brandId?: Prisma.SortOrderInput | Prisma.SortOrder
categoryId?: Prisma.SortOrderInput | Prisma.SortOrder categoryId?: Prisma.SortOrderInput | Prisma.SortOrder
salePrice?: Prisma.SortOrder salePrice?: Prisma.SortOrder
minimumStockAlertLevel?: Prisma.SortOrder
inventoryTransferItems?: Prisma.InventoryTransferItemOrderByRelationAggregateInput inventoryTransferItems?: Prisma.InventoryTransferItemOrderByRelationAggregateInput
variants?: Prisma.ProductVariantOrderByRelationAggregateInput variants?: Prisma.ProductVariantOrderByRelationAggregateInput
brand?: Prisma.ProductBrandOrderByWithRelationInput brand?: Prisma.ProductBrandOrderByWithRelationInput
category?: Prisma.ProductCategoryOrderByWithRelationInput category?: Prisma.ProductCategoryOrderByWithRelationInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemOrderByRelationAggregateInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemOrderByRelationAggregateInput
salesInvoiceItems?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput
stockAdjustments?: Prisma.StockAdjustmentOrderByRelationAggregateInput stockAdjustments?: Prisma.StockAdjustmentOrderByRelationAggregateInput
stockBalances?: Prisma.StockBalanceOrderByRelationAggregateInput stockBalances?: Prisma.StockBalanceOrderByRelationAggregateInput
stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput
salesInvoiceItems?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput
_relevance?: Prisma.ProductOrderByRelevanceInput _relevance?: Prisma.ProductOrderByRelevanceInput
} }
@@ -326,15 +339,16 @@ export type ProductWhereUniqueInput = Prisma.AtLeast<{
brandId?: Prisma.IntNullableFilter<"Product"> | number | null brandId?: Prisma.IntNullableFilter<"Product"> | number | null
categoryId?: Prisma.IntNullableFilter<"Product"> | number | null categoryId?: Prisma.IntNullableFilter<"Product"> | number | null
salePrice?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemListRelationFilter inventoryTransferItems?: Prisma.InventoryTransferItemListRelationFilter
variants?: Prisma.ProductVariantListRelationFilter variants?: Prisma.ProductVariantListRelationFilter
brand?: Prisma.XOR<Prisma.ProductBrandNullableScalarRelationFilter, Prisma.ProductBrandWhereInput> | null brand?: Prisma.XOR<Prisma.ProductBrandNullableScalarRelationFilter, Prisma.ProductBrandWhereInput> | null
category?: Prisma.XOR<Prisma.ProductCategoryNullableScalarRelationFilter, Prisma.ProductCategoryWhereInput> | null category?: Prisma.XOR<Prisma.ProductCategoryNullableScalarRelationFilter, Prisma.ProductCategoryWhereInput> | null
purchaseReceiptItems?: Prisma.PurchaseReceiptItemListRelationFilter purchaseReceiptItems?: Prisma.PurchaseReceiptItemListRelationFilter
salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter
stockAdjustments?: Prisma.StockAdjustmentListRelationFilter stockAdjustments?: Prisma.StockAdjustmentListRelationFilter
stockBalances?: Prisma.StockBalanceListRelationFilter stockBalances?: Prisma.StockBalanceListRelationFilter
stockMovements?: Prisma.StockMovementListRelationFilter stockMovements?: Prisma.StockMovementListRelationFilter
salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter
}, "id" | "sku" | "barcode"> }, "id" | "sku" | "barcode">
export type ProductOrderByWithAggregationInput = { export type ProductOrderByWithAggregationInput = {
@@ -349,6 +363,7 @@ export type ProductOrderByWithAggregationInput = {
brandId?: Prisma.SortOrderInput | Prisma.SortOrder brandId?: Prisma.SortOrderInput | Prisma.SortOrder
categoryId?: Prisma.SortOrderInput | Prisma.SortOrder categoryId?: Prisma.SortOrderInput | Prisma.SortOrder
salePrice?: Prisma.SortOrder salePrice?: Prisma.SortOrder
minimumStockAlertLevel?: Prisma.SortOrder
_count?: Prisma.ProductCountOrderByAggregateInput _count?: Prisma.ProductCountOrderByAggregateInput
_avg?: Prisma.ProductAvgOrderByAggregateInput _avg?: Prisma.ProductAvgOrderByAggregateInput
_max?: Prisma.ProductMaxOrderByAggregateInput _max?: Prisma.ProductMaxOrderByAggregateInput
@@ -371,6 +386,7 @@ export type ProductScalarWhereWithAggregatesInput = {
brandId?: Prisma.IntNullableWithAggregatesFilter<"Product"> | number | null brandId?: Prisma.IntNullableWithAggregatesFilter<"Product"> | number | null
categoryId?: Prisma.IntNullableWithAggregatesFilter<"Product"> | number | null categoryId?: Prisma.IntNullableWithAggregatesFilter<"Product"> | number | null
salePrice?: Prisma.DecimalWithAggregatesFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalWithAggregatesFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalWithAggregatesFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string
} }
export type ProductCreateInput = { export type ProductCreateInput = {
@@ -382,15 +398,16 @@ export type ProductCreateInput = {
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput
variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
} }
export type ProductUncheckedCreateInput = { export type ProductUncheckedCreateInput = {
@@ -405,13 +422,14 @@ export type ProductUncheckedCreateInput = {
brandId?: number | null brandId?: number | null
categoryId?: number | null categoryId?: number | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput
variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
} }
export type ProductUpdateInput = { export type ProductUpdateInput = {
@@ -423,15 +441,16 @@ export type ProductUpdateInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput
variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput
brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput
category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
} }
export type ProductUncheckedUpdateInput = { export type ProductUncheckedUpdateInput = {
@@ -446,13 +465,14 @@ export type ProductUncheckedUpdateInput = {
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput
variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
} }
export type ProductCreateManyInput = { export type ProductCreateManyInput = {
@@ -467,6 +487,7 @@ export type ProductCreateManyInput = {
brandId?: number | null brandId?: number | null
categoryId?: number | null categoryId?: number | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
} }
export type ProductUpdateManyMutationInput = { export type ProductUpdateManyMutationInput = {
@@ -478,6 +499,7 @@ export type ProductUpdateManyMutationInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
} }
export type ProductUncheckedUpdateManyInput = { export type ProductUncheckedUpdateManyInput = {
@@ -492,6 +514,7 @@ export type ProductUncheckedUpdateManyInput = {
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
} }
export type ProductScalarRelationFilter = { export type ProductScalarRelationFilter = {
@@ -517,6 +540,7 @@ export type ProductCountOrderByAggregateInput = {
brandId?: Prisma.SortOrder brandId?: Prisma.SortOrder
categoryId?: Prisma.SortOrder categoryId?: Prisma.SortOrder
salePrice?: Prisma.SortOrder salePrice?: Prisma.SortOrder
minimumStockAlertLevel?: Prisma.SortOrder
} }
export type ProductAvgOrderByAggregateInput = { export type ProductAvgOrderByAggregateInput = {
@@ -524,6 +548,7 @@ export type ProductAvgOrderByAggregateInput = {
brandId?: Prisma.SortOrder brandId?: Prisma.SortOrder
categoryId?: Prisma.SortOrder categoryId?: Prisma.SortOrder
salePrice?: Prisma.SortOrder salePrice?: Prisma.SortOrder
minimumStockAlertLevel?: Prisma.SortOrder
} }
export type ProductMaxOrderByAggregateInput = { export type ProductMaxOrderByAggregateInput = {
@@ -538,6 +563,7 @@ export type ProductMaxOrderByAggregateInput = {
brandId?: Prisma.SortOrder brandId?: Prisma.SortOrder
categoryId?: Prisma.SortOrder categoryId?: Prisma.SortOrder
salePrice?: Prisma.SortOrder salePrice?: Prisma.SortOrder
minimumStockAlertLevel?: Prisma.SortOrder
} }
export type ProductMinOrderByAggregateInput = { export type ProductMinOrderByAggregateInput = {
@@ -552,6 +578,7 @@ export type ProductMinOrderByAggregateInput = {
brandId?: Prisma.SortOrder brandId?: Prisma.SortOrder
categoryId?: Prisma.SortOrder categoryId?: Prisma.SortOrder
salePrice?: Prisma.SortOrder salePrice?: Prisma.SortOrder
minimumStockAlertLevel?: Prisma.SortOrder
} }
export type ProductSumOrderByAggregateInput = { export type ProductSumOrderByAggregateInput = {
@@ -559,6 +586,7 @@ export type ProductSumOrderByAggregateInput = {
brandId?: Prisma.SortOrder brandId?: Prisma.SortOrder
categoryId?: Prisma.SortOrder categoryId?: Prisma.SortOrder
salePrice?: Prisma.SortOrder salePrice?: Prisma.SortOrder
minimumStockAlertLevel?: Prisma.SortOrder
} }
export type ProductListRelationFilter = { export type ProductListRelationFilter = {
@@ -762,14 +790,15 @@ export type ProductCreateWithoutInventoryTransferItemsInput = {
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
} }
export type ProductUncheckedCreateWithoutInventoryTransferItemsInput = { export type ProductUncheckedCreateWithoutInventoryTransferItemsInput = {
@@ -784,12 +813,13 @@ export type ProductUncheckedCreateWithoutInventoryTransferItemsInput = {
brandId?: number | null brandId?: number | null
categoryId?: number | null categoryId?: number | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
} }
export type ProductCreateOrConnectWithoutInventoryTransferItemsInput = { export type ProductCreateOrConnectWithoutInventoryTransferItemsInput = {
@@ -817,14 +847,15 @@ export type ProductUpdateWithoutInventoryTransferItemsInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput
brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput
category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
} }
export type ProductUncheckedUpdateWithoutInventoryTransferItemsInput = { export type ProductUncheckedUpdateWithoutInventoryTransferItemsInput = {
@@ -839,12 +870,13 @@ export type ProductUncheckedUpdateWithoutInventoryTransferItemsInput = {
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
} }
export type ProductCreateWithoutSalesInvoiceItemsInput = { export type ProductCreateWithoutSalesInvoiceItemsInput = {
@@ -856,6 +888,7 @@ export type ProductCreateWithoutSalesInvoiceItemsInput = {
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput
variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput
@@ -878,6 +911,7 @@ export type ProductUncheckedCreateWithoutSalesInvoiceItemsInput = {
brandId?: number | null brandId?: number | null
categoryId?: number | null categoryId?: number | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput
variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput
@@ -911,6 +945,7 @@ export type ProductUpdateWithoutSalesInvoiceItemsInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput
variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput
brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput
@@ -933,6 +968,7 @@ export type ProductUncheckedUpdateWithoutSalesInvoiceItemsInput = {
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput
variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput
@@ -950,14 +986,15 @@ export type ProductCreateWithoutVariantsInput = {
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
} }
export type ProductUncheckedCreateWithoutVariantsInput = { export type ProductUncheckedCreateWithoutVariantsInput = {
@@ -972,12 +1009,13 @@ export type ProductUncheckedCreateWithoutVariantsInput = {
brandId?: number | null brandId?: number | null
categoryId?: number | null categoryId?: number | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
} }
export type ProductCreateOrConnectWithoutVariantsInput = { export type ProductCreateOrConnectWithoutVariantsInput = {
@@ -1005,14 +1043,15 @@ export type ProductUpdateWithoutVariantsInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput
brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput
category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
} }
export type ProductUncheckedUpdateWithoutVariantsInput = { export type ProductUncheckedUpdateWithoutVariantsInput = {
@@ -1027,12 +1066,13 @@ export type ProductUncheckedUpdateWithoutVariantsInput = {
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
} }
export type ProductCreateWithoutBrandInput = { export type ProductCreateWithoutBrandInput = {
@@ -1044,14 +1084,15 @@ export type ProductCreateWithoutBrandInput = {
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput
variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
} }
export type ProductUncheckedCreateWithoutBrandInput = { export type ProductUncheckedCreateWithoutBrandInput = {
@@ -1065,13 +1106,14 @@ export type ProductUncheckedCreateWithoutBrandInput = {
deletedAt?: Date | string | null deletedAt?: Date | string | null
categoryId?: number | null categoryId?: number | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput
variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
} }
export type ProductCreateOrConnectWithoutBrandInput = { export type ProductCreateOrConnectWithoutBrandInput = {
@@ -1115,6 +1157,7 @@ export type ProductScalarWhereInput = {
brandId?: Prisma.IntNullableFilter<"Product"> | number | null brandId?: Prisma.IntNullableFilter<"Product"> | number | null
categoryId?: Prisma.IntNullableFilter<"Product"> | number | null categoryId?: Prisma.IntNullableFilter<"Product"> | number | null
salePrice?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string
} }
export type ProductCreateWithoutCategoryInput = { export type ProductCreateWithoutCategoryInput = {
@@ -1126,14 +1169,15 @@ export type ProductCreateWithoutCategoryInput = {
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput
variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
} }
export type ProductUncheckedCreateWithoutCategoryInput = { export type ProductUncheckedCreateWithoutCategoryInput = {
@@ -1147,13 +1191,14 @@ export type ProductUncheckedCreateWithoutCategoryInput = {
deletedAt?: Date | string | null deletedAt?: Date | string | null
brandId?: number | null brandId?: number | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput
variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
} }
export type ProductCreateOrConnectWithoutCategoryInput = { export type ProductCreateOrConnectWithoutCategoryInput = {
@@ -1191,14 +1236,15 @@ export type ProductCreateWithoutPurchaseReceiptItemsInput = {
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput
variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
} }
export type ProductUncheckedCreateWithoutPurchaseReceiptItemsInput = { export type ProductUncheckedCreateWithoutPurchaseReceiptItemsInput = {
@@ -1213,12 +1259,13 @@ export type ProductUncheckedCreateWithoutPurchaseReceiptItemsInput = {
brandId?: number | null brandId?: number | null
categoryId?: number | null categoryId?: number | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput
variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
} }
export type ProductCreateOrConnectWithoutPurchaseReceiptItemsInput = { export type ProductCreateOrConnectWithoutPurchaseReceiptItemsInput = {
@@ -1246,14 +1293,15 @@ export type ProductUpdateWithoutPurchaseReceiptItemsInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput
variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput
brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput
category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
} }
export type ProductUncheckedUpdateWithoutPurchaseReceiptItemsInput = { export type ProductUncheckedUpdateWithoutPurchaseReceiptItemsInput = {
@@ -1268,12 +1316,13 @@ export type ProductUncheckedUpdateWithoutPurchaseReceiptItemsInput = {
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput
variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
} }
export type ProductCreateWithoutStockMovementsInput = { export type ProductCreateWithoutStockMovementsInput = {
@@ -1285,14 +1334,15 @@ export type ProductCreateWithoutStockMovementsInput = {
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput
variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
} }
export type ProductUncheckedCreateWithoutStockMovementsInput = { export type ProductUncheckedCreateWithoutStockMovementsInput = {
@@ -1307,12 +1357,13 @@ export type ProductUncheckedCreateWithoutStockMovementsInput = {
brandId?: number | null brandId?: number | null
categoryId?: number | null categoryId?: number | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput
variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
} }
export type ProductCreateOrConnectWithoutStockMovementsInput = { export type ProductCreateOrConnectWithoutStockMovementsInput = {
@@ -1340,14 +1391,15 @@ export type ProductUpdateWithoutStockMovementsInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput
variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput
brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput
category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
} }
export type ProductUncheckedUpdateWithoutStockMovementsInput = { export type ProductUncheckedUpdateWithoutStockMovementsInput = {
@@ -1362,12 +1414,13 @@ export type ProductUncheckedUpdateWithoutStockMovementsInput = {
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput
variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
} }
export type ProductCreateWithoutStockBalancesInput = { export type ProductCreateWithoutStockBalancesInput = {
@@ -1379,14 +1432,15 @@ export type ProductCreateWithoutStockBalancesInput = {
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput
variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
} }
export type ProductUncheckedCreateWithoutStockBalancesInput = { export type ProductUncheckedCreateWithoutStockBalancesInput = {
@@ -1401,12 +1455,13 @@ export type ProductUncheckedCreateWithoutStockBalancesInput = {
brandId?: number | null brandId?: number | null
categoryId?: number | null categoryId?: number | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput
variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
} }
export type ProductCreateOrConnectWithoutStockBalancesInput = { export type ProductCreateOrConnectWithoutStockBalancesInput = {
@@ -1434,14 +1489,15 @@ export type ProductUpdateWithoutStockBalancesInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput
variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput
brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput
category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
} }
export type ProductUncheckedUpdateWithoutStockBalancesInput = { export type ProductUncheckedUpdateWithoutStockBalancesInput = {
@@ -1456,12 +1512,13 @@ export type ProductUncheckedUpdateWithoutStockBalancesInput = {
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput
variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
} }
export type ProductCreateWithoutStockAdjustmentsInput = { export type ProductCreateWithoutStockAdjustmentsInput = {
@@ -1473,14 +1530,15 @@ export type ProductCreateWithoutStockAdjustmentsInput = {
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput
variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
} }
export type ProductUncheckedCreateWithoutStockAdjustmentsInput = { export type ProductUncheckedCreateWithoutStockAdjustmentsInput = {
@@ -1495,12 +1553,13 @@ export type ProductUncheckedCreateWithoutStockAdjustmentsInput = {
brandId?: number | null brandId?: number | null
categoryId?: number | null categoryId?: number | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput
variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
} }
export type ProductCreateOrConnectWithoutStockAdjustmentsInput = { export type ProductCreateOrConnectWithoutStockAdjustmentsInput = {
@@ -1528,14 +1587,15 @@ export type ProductUpdateWithoutStockAdjustmentsInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput
variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput
brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput
category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
} }
export type ProductUncheckedUpdateWithoutStockAdjustmentsInput = { export type ProductUncheckedUpdateWithoutStockAdjustmentsInput = {
@@ -1550,12 +1610,13 @@ export type ProductUncheckedUpdateWithoutStockAdjustmentsInput = {
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput
variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
} }
export type ProductCreateManyBrandInput = { export type ProductCreateManyBrandInput = {
@@ -1569,6 +1630,7 @@ export type ProductCreateManyBrandInput = {
deletedAt?: Date | string | null deletedAt?: Date | string | null
categoryId?: number | null categoryId?: number | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
} }
export type ProductUpdateWithoutBrandInput = { export type ProductUpdateWithoutBrandInput = {
@@ -1580,14 +1642,15 @@ export type ProductUpdateWithoutBrandInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput
variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput
category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
} }
export type ProductUncheckedUpdateWithoutBrandInput = { export type ProductUncheckedUpdateWithoutBrandInput = {
@@ -1601,13 +1664,14 @@ export type ProductUncheckedUpdateWithoutBrandInput = {
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput
variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
} }
export type ProductUncheckedUpdateManyWithoutBrandInput = { export type ProductUncheckedUpdateManyWithoutBrandInput = {
@@ -1621,6 +1685,7 @@ export type ProductUncheckedUpdateManyWithoutBrandInput = {
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
} }
export type ProductCreateManyCategoryInput = { export type ProductCreateManyCategoryInput = {
@@ -1634,6 +1699,7 @@ export type ProductCreateManyCategoryInput = {
deletedAt?: Date | string | null deletedAt?: Date | string | null
brandId?: number | null brandId?: number | null
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
} }
export type ProductUpdateWithoutCategoryInput = { export type ProductUpdateWithoutCategoryInput = {
@@ -1645,14 +1711,15 @@ export type ProductUpdateWithoutCategoryInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput
variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput
brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
} }
export type ProductUncheckedUpdateWithoutCategoryInput = { export type ProductUncheckedUpdateWithoutCategoryInput = {
@@ -1666,13 +1733,14 @@ export type ProductUncheckedUpdateWithoutCategoryInput = {
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput
variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
} }
export type ProductUncheckedUpdateManyWithoutCategoryInput = { export type ProductUncheckedUpdateManyWithoutCategoryInput = {
@@ -1686,6 +1754,7 @@ export type ProductUncheckedUpdateManyWithoutCategoryInput = {
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
} }
@@ -1697,20 +1766,20 @@ export type ProductCountOutputType = {
inventoryTransferItems: number inventoryTransferItems: number
variants: number variants: number
purchaseReceiptItems: number purchaseReceiptItems: number
salesInvoiceItems: number
stockAdjustments: number stockAdjustments: number
stockBalances: number stockBalances: number
stockMovements: number stockMovements: number
salesInvoiceItems: number
} }
export type ProductCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = { export type ProductCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
inventoryTransferItems?: boolean | ProductCountOutputTypeCountInventoryTransferItemsArgs inventoryTransferItems?: boolean | ProductCountOutputTypeCountInventoryTransferItemsArgs
variants?: boolean | ProductCountOutputTypeCountVariantsArgs variants?: boolean | ProductCountOutputTypeCountVariantsArgs
purchaseReceiptItems?: boolean | ProductCountOutputTypeCountPurchaseReceiptItemsArgs purchaseReceiptItems?: boolean | ProductCountOutputTypeCountPurchaseReceiptItemsArgs
salesInvoiceItems?: boolean | ProductCountOutputTypeCountSalesInvoiceItemsArgs
stockAdjustments?: boolean | ProductCountOutputTypeCountStockAdjustmentsArgs stockAdjustments?: boolean | ProductCountOutputTypeCountStockAdjustmentsArgs
stockBalances?: boolean | ProductCountOutputTypeCountStockBalancesArgs stockBalances?: boolean | ProductCountOutputTypeCountStockBalancesArgs
stockMovements?: boolean | ProductCountOutputTypeCountStockMovementsArgs stockMovements?: boolean | ProductCountOutputTypeCountStockMovementsArgs
salesInvoiceItems?: boolean | ProductCountOutputTypeCountSalesInvoiceItemsArgs
} }
/** /**
@@ -1744,13 +1813,6 @@ export type ProductCountOutputTypeCountPurchaseReceiptItemsArgs<ExtArgs extends
where?: Prisma.PurchaseReceiptItemWhereInput where?: Prisma.PurchaseReceiptItemWhereInput
} }
/**
* ProductCountOutputType without action
*/
export type ProductCountOutputTypeCountSalesInvoiceItemsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.SalesInvoiceItemWhereInput
}
/** /**
* ProductCountOutputType without action * ProductCountOutputType without action
*/ */
@@ -1772,6 +1834,13 @@ export type ProductCountOutputTypeCountStockMovementsArgs<ExtArgs extends runtim
where?: Prisma.StockMovementWhereInput where?: Prisma.StockMovementWhereInput
} }
/**
* ProductCountOutputType without action
*/
export type ProductCountOutputTypeCountSalesInvoiceItemsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.SalesInvoiceItemWhereInput
}
export type ProductSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{ export type ProductSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean id?: boolean
@@ -1785,15 +1854,16 @@ export type ProductSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
brandId?: boolean brandId?: boolean
categoryId?: boolean categoryId?: boolean
salePrice?: boolean salePrice?: boolean
minimumStockAlertLevel?: boolean
inventoryTransferItems?: boolean | Prisma.Product$inventoryTransferItemsArgs<ExtArgs> inventoryTransferItems?: boolean | Prisma.Product$inventoryTransferItemsArgs<ExtArgs>
variants?: boolean | Prisma.Product$variantsArgs<ExtArgs> variants?: boolean | Prisma.Product$variantsArgs<ExtArgs>
brand?: boolean | Prisma.Product$brandArgs<ExtArgs> brand?: boolean | Prisma.Product$brandArgs<ExtArgs>
category?: boolean | Prisma.Product$categoryArgs<ExtArgs> category?: boolean | Prisma.Product$categoryArgs<ExtArgs>
purchaseReceiptItems?: boolean | Prisma.Product$purchaseReceiptItemsArgs<ExtArgs> purchaseReceiptItems?: boolean | Prisma.Product$purchaseReceiptItemsArgs<ExtArgs>
salesInvoiceItems?: boolean | Prisma.Product$salesInvoiceItemsArgs<ExtArgs>
stockAdjustments?: boolean | Prisma.Product$stockAdjustmentsArgs<ExtArgs> stockAdjustments?: boolean | Prisma.Product$stockAdjustmentsArgs<ExtArgs>
stockBalances?: boolean | Prisma.Product$stockBalancesArgs<ExtArgs> stockBalances?: boolean | Prisma.Product$stockBalancesArgs<ExtArgs>
stockMovements?: boolean | Prisma.Product$stockMovementsArgs<ExtArgs> stockMovements?: boolean | Prisma.Product$stockMovementsArgs<ExtArgs>
salesInvoiceItems?: boolean | Prisma.Product$salesInvoiceItemsArgs<ExtArgs>
_count?: boolean | Prisma.ProductCountOutputTypeDefaultArgs<ExtArgs> _count?: boolean | Prisma.ProductCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["product"]> }, ExtArgs["result"]["product"]>
@@ -1811,19 +1881,20 @@ export type ProductSelectScalar = {
brandId?: boolean brandId?: boolean
categoryId?: boolean categoryId?: boolean
salePrice?: boolean salePrice?: boolean
minimumStockAlertLevel?: boolean
} }
export type ProductOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "sku" | "barcode" | "createdAt" | "updatedAt" | "deletedAt" | "brandId" | "categoryId" | "salePrice", ExtArgs["result"]["product"]> export type ProductOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "sku" | "barcode" | "createdAt" | "updatedAt" | "deletedAt" | "brandId" | "categoryId" | "salePrice" | "minimumStockAlertLevel", ExtArgs["result"]["product"]>
export type ProductInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = { export type ProductInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
inventoryTransferItems?: boolean | Prisma.Product$inventoryTransferItemsArgs<ExtArgs> inventoryTransferItems?: boolean | Prisma.Product$inventoryTransferItemsArgs<ExtArgs>
variants?: boolean | Prisma.Product$variantsArgs<ExtArgs> variants?: boolean | Prisma.Product$variantsArgs<ExtArgs>
brand?: boolean | Prisma.Product$brandArgs<ExtArgs> brand?: boolean | Prisma.Product$brandArgs<ExtArgs>
category?: boolean | Prisma.Product$categoryArgs<ExtArgs> category?: boolean | Prisma.Product$categoryArgs<ExtArgs>
purchaseReceiptItems?: boolean | Prisma.Product$purchaseReceiptItemsArgs<ExtArgs> purchaseReceiptItems?: boolean | Prisma.Product$purchaseReceiptItemsArgs<ExtArgs>
salesInvoiceItems?: boolean | Prisma.Product$salesInvoiceItemsArgs<ExtArgs>
stockAdjustments?: boolean | Prisma.Product$stockAdjustmentsArgs<ExtArgs> stockAdjustments?: boolean | Prisma.Product$stockAdjustmentsArgs<ExtArgs>
stockBalances?: boolean | Prisma.Product$stockBalancesArgs<ExtArgs> stockBalances?: boolean | Prisma.Product$stockBalancesArgs<ExtArgs>
stockMovements?: boolean | Prisma.Product$stockMovementsArgs<ExtArgs> stockMovements?: boolean | Prisma.Product$stockMovementsArgs<ExtArgs>
salesInvoiceItems?: boolean | Prisma.Product$salesInvoiceItemsArgs<ExtArgs>
_count?: boolean | Prisma.ProductCountOutputTypeDefaultArgs<ExtArgs> _count?: boolean | Prisma.ProductCountOutputTypeDefaultArgs<ExtArgs>
} }
@@ -1835,10 +1906,10 @@ export type $ProductPayload<ExtArgs extends runtime.Types.Extensions.InternalArg
brand: Prisma.$ProductBrandPayload<ExtArgs> | null brand: Prisma.$ProductBrandPayload<ExtArgs> | null
category: Prisma.$ProductCategoryPayload<ExtArgs> | null category: Prisma.$ProductCategoryPayload<ExtArgs> | null
purchaseReceiptItems: Prisma.$PurchaseReceiptItemPayload<ExtArgs>[] purchaseReceiptItems: Prisma.$PurchaseReceiptItemPayload<ExtArgs>[]
salesInvoiceItems: Prisma.$SalesInvoiceItemPayload<ExtArgs>[]
stockAdjustments: Prisma.$StockAdjustmentPayload<ExtArgs>[] stockAdjustments: Prisma.$StockAdjustmentPayload<ExtArgs>[]
stockBalances: Prisma.$StockBalancePayload<ExtArgs>[] stockBalances: Prisma.$StockBalancePayload<ExtArgs>[]
stockMovements: Prisma.$StockMovementPayload<ExtArgs>[] stockMovements: Prisma.$StockMovementPayload<ExtArgs>[]
salesInvoiceItems: Prisma.$SalesInvoiceItemPayload<ExtArgs>[]
} }
scalars: runtime.Types.Extensions.GetPayloadResult<{ scalars: runtime.Types.Extensions.GetPayloadResult<{
id: number id: number
@@ -1852,6 +1923,7 @@ export type $ProductPayload<ExtArgs extends runtime.Types.Extensions.InternalArg
brandId: number | null brandId: number | null
categoryId: number | null categoryId: number | null
salePrice: runtime.Decimal salePrice: runtime.Decimal
minimumStockAlertLevel: runtime.Decimal
}, ExtArgs["result"]["product"]> }, ExtArgs["result"]["product"]>
composites: {} composites: {}
} }
@@ -2197,10 +2269,10 @@ export interface Prisma__ProductClient<T, Null = never, ExtArgs extends runtime.
brand<T extends Prisma.Product$brandArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$brandArgs<ExtArgs>>): Prisma.Prisma__ProductBrandClient<runtime.Types.Result.GetResult<Prisma.$ProductBrandPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> brand<T extends Prisma.Product$brandArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$brandArgs<ExtArgs>>): Prisma.Prisma__ProductBrandClient<runtime.Types.Result.GetResult<Prisma.$ProductBrandPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
category<T extends Prisma.Product$categoryArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$categoryArgs<ExtArgs>>): Prisma.Prisma__ProductCategoryClient<runtime.Types.Result.GetResult<Prisma.$ProductCategoryPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> category<T extends Prisma.Product$categoryArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$categoryArgs<ExtArgs>>): Prisma.Prisma__ProductCategoryClient<runtime.Types.Result.GetResult<Prisma.$ProductCategoryPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
purchaseReceiptItems<T extends Prisma.Product$purchaseReceiptItemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$purchaseReceiptItemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PurchaseReceiptItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null> purchaseReceiptItems<T extends Prisma.Product$purchaseReceiptItemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$purchaseReceiptItemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PurchaseReceiptItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
salesInvoiceItems<T extends Prisma.Product$salesInvoiceItemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$salesInvoiceItemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoiceItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
stockAdjustments<T extends Prisma.Product$stockAdjustmentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$stockAdjustmentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockAdjustmentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null> stockAdjustments<T extends Prisma.Product$stockAdjustmentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$stockAdjustmentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockAdjustmentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
stockBalances<T extends Prisma.Product$stockBalancesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$stockBalancesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockBalancePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null> stockBalances<T extends Prisma.Product$stockBalancesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$stockBalancesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockBalancePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
stockMovements<T extends Prisma.Product$stockMovementsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$stockMovementsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockMovementPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null> stockMovements<T extends Prisma.Product$stockMovementsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$stockMovementsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockMovementPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
salesInvoiceItems<T extends Prisma.Product$salesInvoiceItemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$salesInvoiceItemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoiceItemPayload<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.
@@ -2241,6 +2313,7 @@ export interface ProductFieldRefs {
readonly brandId: Prisma.FieldRef<"Product", 'Int'> readonly brandId: Prisma.FieldRef<"Product", 'Int'>
readonly categoryId: Prisma.FieldRef<"Product", 'Int'> readonly categoryId: Prisma.FieldRef<"Product", 'Int'>
readonly salePrice: Prisma.FieldRef<"Product", 'Decimal'> readonly salePrice: Prisma.FieldRef<"Product", 'Decimal'>
readonly minimumStockAlertLevel: Prisma.FieldRef<"Product", 'Decimal'>
} }
@@ -2693,30 +2766,6 @@ export type Product$purchaseReceiptItemsArgs<ExtArgs extends runtime.Types.Exten
distinct?: Prisma.PurchaseReceiptItemScalarFieldEnum | Prisma.PurchaseReceiptItemScalarFieldEnum[] distinct?: Prisma.PurchaseReceiptItemScalarFieldEnum | Prisma.PurchaseReceiptItemScalarFieldEnum[]
} }
/**
* Product.salesInvoiceItems
*/
export type Product$salesInvoiceItemsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the SalesInvoiceItem
*/
select?: Prisma.SalesInvoiceItemSelect<ExtArgs> | null
/**
* Omit specific fields from the SalesInvoiceItem
*/
omit?: Prisma.SalesInvoiceItemOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.SalesInvoiceItemInclude<ExtArgs> | null
where?: Prisma.SalesInvoiceItemWhereInput
orderBy?: Prisma.SalesInvoiceItemOrderByWithRelationInput | Prisma.SalesInvoiceItemOrderByWithRelationInput[]
cursor?: Prisma.SalesInvoiceItemWhereUniqueInput
take?: number
skip?: number
distinct?: Prisma.SalesInvoiceItemScalarFieldEnum | Prisma.SalesInvoiceItemScalarFieldEnum[]
}
/** /**
* Product.stockAdjustments * Product.stockAdjustments
*/ */
@@ -2789,6 +2838,30 @@ export type Product$stockMovementsArgs<ExtArgs extends runtime.Types.Extensions.
distinct?: Prisma.StockMovementScalarFieldEnum | Prisma.StockMovementScalarFieldEnum[] distinct?: Prisma.StockMovementScalarFieldEnum | Prisma.StockMovementScalarFieldEnum[]
} }
/**
* Product.salesInvoiceItems
*/
export type Product$salesInvoiceItemsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the SalesInvoiceItem
*/
select?: Prisma.SalesInvoiceItemSelect<ExtArgs> | null
/**
* Omit specific fields from the SalesInvoiceItem
*/
omit?: Prisma.SalesInvoiceItemOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.SalesInvoiceItemInclude<ExtArgs> | null
where?: Prisma.SalesInvoiceItemWhereInput
orderBy?: Prisma.SalesInvoiceItemOrderByWithRelationInput | Prisma.SalesInvoiceItemOrderByWithRelationInput[]
cursor?: Prisma.SalesInvoiceItemWhereUniqueInput
take?: number
skip?: number
distinct?: Prisma.SalesInvoiceItemScalarFieldEnum | Prisma.SalesInvoiceItemScalarFieldEnum[]
}
/** /**
* Product without action * Product without action
*/ */
@@ -31,6 +31,8 @@ export type PurchaseReceiptPaymentsAvgAggregateOutputType = {
amount: runtime.Decimal | null amount: runtime.Decimal | null
bankAccountId: number | null bankAccountId: number | null
receiptId: number | null receiptId: number | null
inventoryBankAccountInventoryId: number | null
inventoryBankAccountBankAccountId: number | null
} }
export type PurchaseReceiptPaymentsSumAggregateOutputType = { export type PurchaseReceiptPaymentsSumAggregateOutputType = {
@@ -38,6 +40,8 @@ export type PurchaseReceiptPaymentsSumAggregateOutputType = {
amount: runtime.Decimal | null amount: runtime.Decimal | null
bankAccountId: number | null bankAccountId: number | null
receiptId: number | null receiptId: number | null
inventoryBankAccountInventoryId: number | null
inventoryBankAccountBankAccountId: number | null
} }
export type PurchaseReceiptPaymentsMinAggregateOutputType = { export type PurchaseReceiptPaymentsMinAggregateOutputType = {
@@ -50,6 +54,8 @@ export type PurchaseReceiptPaymentsMinAggregateOutputType = {
payedAt: Date | null payedAt: Date | null
description: string | null description: string | null
createdAt: Date | null createdAt: Date | null
inventoryBankAccountInventoryId: number | null
inventoryBankAccountBankAccountId: number | null
} }
export type PurchaseReceiptPaymentsMaxAggregateOutputType = { export type PurchaseReceiptPaymentsMaxAggregateOutputType = {
@@ -62,6 +68,8 @@ export type PurchaseReceiptPaymentsMaxAggregateOutputType = {
payedAt: Date | null payedAt: Date | null
description: string | null description: string | null
createdAt: Date | null createdAt: Date | null
inventoryBankAccountInventoryId: number | null
inventoryBankAccountBankAccountId: number | null
} }
export type PurchaseReceiptPaymentsCountAggregateOutputType = { export type PurchaseReceiptPaymentsCountAggregateOutputType = {
@@ -74,6 +82,8 @@ export type PurchaseReceiptPaymentsCountAggregateOutputType = {
payedAt: number payedAt: number
description: number description: number
createdAt: number createdAt: number
inventoryBankAccountInventoryId: number
inventoryBankAccountBankAccountId: number
_all: number _all: number
} }
@@ -83,6 +93,8 @@ export type PurchaseReceiptPaymentsAvgAggregateInputType = {
amount?: true amount?: true
bankAccountId?: true bankAccountId?: true
receiptId?: true receiptId?: true
inventoryBankAccountInventoryId?: true
inventoryBankAccountBankAccountId?: true
} }
export type PurchaseReceiptPaymentsSumAggregateInputType = { export type PurchaseReceiptPaymentsSumAggregateInputType = {
@@ -90,6 +102,8 @@ export type PurchaseReceiptPaymentsSumAggregateInputType = {
amount?: true amount?: true
bankAccountId?: true bankAccountId?: true
receiptId?: true receiptId?: true
inventoryBankAccountInventoryId?: true
inventoryBankAccountBankAccountId?: true
} }
export type PurchaseReceiptPaymentsMinAggregateInputType = { export type PurchaseReceiptPaymentsMinAggregateInputType = {
@@ -102,6 +116,8 @@ export type PurchaseReceiptPaymentsMinAggregateInputType = {
payedAt?: true payedAt?: true
description?: true description?: true
createdAt?: true createdAt?: true
inventoryBankAccountInventoryId?: true
inventoryBankAccountBankAccountId?: true
} }
export type PurchaseReceiptPaymentsMaxAggregateInputType = { export type PurchaseReceiptPaymentsMaxAggregateInputType = {
@@ -114,6 +130,8 @@ export type PurchaseReceiptPaymentsMaxAggregateInputType = {
payedAt?: true payedAt?: true
description?: true description?: true
createdAt?: true createdAt?: true
inventoryBankAccountInventoryId?: true
inventoryBankAccountBankAccountId?: true
} }
export type PurchaseReceiptPaymentsCountAggregateInputType = { export type PurchaseReceiptPaymentsCountAggregateInputType = {
@@ -126,6 +144,8 @@ export type PurchaseReceiptPaymentsCountAggregateInputType = {
payedAt?: true payedAt?: true
description?: true description?: true
createdAt?: true createdAt?: true
inventoryBankAccountInventoryId?: true
inventoryBankAccountBankAccountId?: true
_all?: true _all?: true
} }
@@ -225,6 +245,8 @@ export type PurchaseReceiptPaymentsGroupByOutputType = {
payedAt: Date payedAt: Date
description: string | null description: string | null
createdAt: Date createdAt: Date
inventoryBankAccountInventoryId: number | null
inventoryBankAccountBankAccountId: number | null
_count: PurchaseReceiptPaymentsCountAggregateOutputType | null _count: PurchaseReceiptPaymentsCountAggregateOutputType | null
_avg: PurchaseReceiptPaymentsAvgAggregateOutputType | null _avg: PurchaseReceiptPaymentsAvgAggregateOutputType | null
_sum: PurchaseReceiptPaymentsSumAggregateOutputType | null _sum: PurchaseReceiptPaymentsSumAggregateOutputType | null
@@ -260,8 +282,11 @@ export type PurchaseReceiptPaymentsWhereInput = {
payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string
description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null
createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string
inventoryBankAccountInventoryId?: Prisma.IntNullableFilter<"PurchaseReceiptPayments"> | number | null
inventoryBankAccountBankAccountId?: Prisma.IntNullableFilter<"PurchaseReceiptPayments"> | number | null
receipt?: Prisma.XOR<Prisma.PurchaseReceiptScalarRelationFilter, Prisma.PurchaseReceiptWhereInput> receipt?: Prisma.XOR<Prisma.PurchaseReceiptScalarRelationFilter, Prisma.PurchaseReceiptWhereInput>
bankAccount?: Prisma.XOR<Prisma.BankAccountScalarRelationFilter, Prisma.BankAccountWhereInput> bankAccount?: Prisma.XOR<Prisma.BankAccountScalarRelationFilter, Prisma.BankAccountWhereInput>
inventoryBankAccount?: Prisma.XOR<Prisma.InventoryBankAccountNullableScalarRelationFilter, Prisma.InventoryBankAccountWhereInput> | null
} }
export type PurchaseReceiptPaymentsOrderByWithRelationInput = { export type PurchaseReceiptPaymentsOrderByWithRelationInput = {
@@ -274,8 +299,11 @@ export type PurchaseReceiptPaymentsOrderByWithRelationInput = {
payedAt?: Prisma.SortOrder payedAt?: Prisma.SortOrder
description?: Prisma.SortOrderInput | Prisma.SortOrder description?: Prisma.SortOrderInput | Prisma.SortOrder
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
inventoryBankAccountInventoryId?: Prisma.SortOrderInput | Prisma.SortOrder
inventoryBankAccountBankAccountId?: Prisma.SortOrderInput | Prisma.SortOrder
receipt?: Prisma.PurchaseReceiptOrderByWithRelationInput receipt?: Prisma.PurchaseReceiptOrderByWithRelationInput
bankAccount?: Prisma.BankAccountOrderByWithRelationInput bankAccount?: Prisma.BankAccountOrderByWithRelationInput
inventoryBankAccount?: Prisma.InventoryBankAccountOrderByWithRelationInput
_relevance?: Prisma.PurchaseReceiptPaymentsOrderByRelevanceInput _relevance?: Prisma.PurchaseReceiptPaymentsOrderByRelevanceInput
} }
@@ -292,8 +320,11 @@ export type PurchaseReceiptPaymentsWhereUniqueInput = Prisma.AtLeast<{
payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string
description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null
createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string
inventoryBankAccountInventoryId?: Prisma.IntNullableFilter<"PurchaseReceiptPayments"> | number | null
inventoryBankAccountBankAccountId?: Prisma.IntNullableFilter<"PurchaseReceiptPayments"> | number | null
receipt?: Prisma.XOR<Prisma.PurchaseReceiptScalarRelationFilter, Prisma.PurchaseReceiptWhereInput> receipt?: Prisma.XOR<Prisma.PurchaseReceiptScalarRelationFilter, Prisma.PurchaseReceiptWhereInput>
bankAccount?: Prisma.XOR<Prisma.BankAccountScalarRelationFilter, Prisma.BankAccountWhereInput> bankAccount?: Prisma.XOR<Prisma.BankAccountScalarRelationFilter, Prisma.BankAccountWhereInput>
inventoryBankAccount?: Prisma.XOR<Prisma.InventoryBankAccountNullableScalarRelationFilter, Prisma.InventoryBankAccountWhereInput> | null
}, "id"> }, "id">
export type PurchaseReceiptPaymentsOrderByWithAggregationInput = { export type PurchaseReceiptPaymentsOrderByWithAggregationInput = {
@@ -306,6 +337,8 @@ export type PurchaseReceiptPaymentsOrderByWithAggregationInput = {
payedAt?: Prisma.SortOrder payedAt?: Prisma.SortOrder
description?: Prisma.SortOrderInput | Prisma.SortOrder description?: Prisma.SortOrderInput | Prisma.SortOrder
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
inventoryBankAccountInventoryId?: Prisma.SortOrderInput | Prisma.SortOrder
inventoryBankAccountBankAccountId?: Prisma.SortOrderInput | Prisma.SortOrder
_count?: Prisma.PurchaseReceiptPaymentsCountOrderByAggregateInput _count?: Prisma.PurchaseReceiptPaymentsCountOrderByAggregateInput
_avg?: Prisma.PurchaseReceiptPaymentsAvgOrderByAggregateInput _avg?: Prisma.PurchaseReceiptPaymentsAvgOrderByAggregateInput
_max?: Prisma.PurchaseReceiptPaymentsMaxOrderByAggregateInput _max?: Prisma.PurchaseReceiptPaymentsMaxOrderByAggregateInput
@@ -326,6 +359,8 @@ export type PurchaseReceiptPaymentsScalarWhereWithAggregatesInput = {
payedAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceiptPayments"> | Date | string payedAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceiptPayments"> | Date | string
description?: Prisma.StringNullableWithAggregatesFilter<"PurchaseReceiptPayments"> | string | null description?: Prisma.StringNullableWithAggregatesFilter<"PurchaseReceiptPayments"> | string | null
createdAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceiptPayments"> | Date | string createdAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceiptPayments"> | Date | string
inventoryBankAccountInventoryId?: Prisma.IntNullableWithAggregatesFilter<"PurchaseReceiptPayments"> | number | null
inventoryBankAccountBankAccountId?: Prisma.IntNullableWithAggregatesFilter<"PurchaseReceiptPayments"> | number | null
} }
export type PurchaseReceiptPaymentsCreateInput = { export type PurchaseReceiptPaymentsCreateInput = {
@@ -337,6 +372,7 @@ export type PurchaseReceiptPaymentsCreateInput = {
createdAt?: Date | string createdAt?: Date | string
receipt: Prisma.PurchaseReceiptCreateNestedOneWithoutPaymentsInput receipt: Prisma.PurchaseReceiptCreateNestedOneWithoutPaymentsInput
bankAccount: Prisma.BankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput bankAccount: Prisma.BankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput
inventoryBankAccount?: Prisma.InventoryBankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput
} }
export type PurchaseReceiptPaymentsUncheckedCreateInput = { export type PurchaseReceiptPaymentsUncheckedCreateInput = {
@@ -349,6 +385,8 @@ export type PurchaseReceiptPaymentsUncheckedCreateInput = {
payedAt: Date | string payedAt: Date | string
description?: string | null description?: string | null
createdAt?: Date | string createdAt?: Date | string
inventoryBankAccountInventoryId?: number | null
inventoryBankAccountBankAccountId?: number | null
} }
export type PurchaseReceiptPaymentsUpdateInput = { export type PurchaseReceiptPaymentsUpdateInput = {
@@ -360,6 +398,7 @@ export type PurchaseReceiptPaymentsUpdateInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
receipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutPaymentsNestedInput receipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutPaymentsNestedInput
bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutPurchaseReceiptPaymentsNestedInput bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutPurchaseReceiptPaymentsNestedInput
inventoryBankAccount?: Prisma.InventoryBankAccountUpdateOneWithoutPurchaseReceiptPaymentsNestedInput
} }
export type PurchaseReceiptPaymentsUncheckedUpdateInput = { export type PurchaseReceiptPaymentsUncheckedUpdateInput = {
@@ -372,6 +411,8 @@ export type PurchaseReceiptPaymentsUncheckedUpdateInput = {
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inventoryBankAccountInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
inventoryBankAccountBankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
} }
export type PurchaseReceiptPaymentsCreateManyInput = { export type PurchaseReceiptPaymentsCreateManyInput = {
@@ -384,6 +425,8 @@ export type PurchaseReceiptPaymentsCreateManyInput = {
payedAt: Date | string payedAt: Date | string
description?: string | null description?: string | null
createdAt?: Date | string createdAt?: Date | string
inventoryBankAccountInventoryId?: number | null
inventoryBankAccountBankAccountId?: number | null
} }
export type PurchaseReceiptPaymentsUpdateManyMutationInput = { export type PurchaseReceiptPaymentsUpdateManyMutationInput = {
@@ -405,6 +448,8 @@ export type PurchaseReceiptPaymentsUncheckedUpdateManyInput = {
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inventoryBankAccountInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
inventoryBankAccountBankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
} }
export type PurchaseReceiptPaymentsListRelationFilter = { export type PurchaseReceiptPaymentsListRelationFilter = {
@@ -433,6 +478,8 @@ export type PurchaseReceiptPaymentsCountOrderByAggregateInput = {
payedAt?: Prisma.SortOrder payedAt?: Prisma.SortOrder
description?: Prisma.SortOrder description?: Prisma.SortOrder
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
inventoryBankAccountInventoryId?: Prisma.SortOrder
inventoryBankAccountBankAccountId?: Prisma.SortOrder
} }
export type PurchaseReceiptPaymentsAvgOrderByAggregateInput = { export type PurchaseReceiptPaymentsAvgOrderByAggregateInput = {
@@ -440,6 +487,8 @@ export type PurchaseReceiptPaymentsAvgOrderByAggregateInput = {
amount?: Prisma.SortOrder amount?: Prisma.SortOrder
bankAccountId?: Prisma.SortOrder bankAccountId?: Prisma.SortOrder
receiptId?: Prisma.SortOrder receiptId?: Prisma.SortOrder
inventoryBankAccountInventoryId?: Prisma.SortOrder
inventoryBankAccountBankAccountId?: Prisma.SortOrder
} }
export type PurchaseReceiptPaymentsMaxOrderByAggregateInput = { export type PurchaseReceiptPaymentsMaxOrderByAggregateInput = {
@@ -452,6 +501,8 @@ export type PurchaseReceiptPaymentsMaxOrderByAggregateInput = {
payedAt?: Prisma.SortOrder payedAt?: Prisma.SortOrder
description?: Prisma.SortOrder description?: Prisma.SortOrder
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
inventoryBankAccountInventoryId?: Prisma.SortOrder
inventoryBankAccountBankAccountId?: Prisma.SortOrder
} }
export type PurchaseReceiptPaymentsMinOrderByAggregateInput = { export type PurchaseReceiptPaymentsMinOrderByAggregateInput = {
@@ -464,6 +515,8 @@ export type PurchaseReceiptPaymentsMinOrderByAggregateInput = {
payedAt?: Prisma.SortOrder payedAt?: Prisma.SortOrder
description?: Prisma.SortOrder description?: Prisma.SortOrder
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
inventoryBankAccountInventoryId?: Prisma.SortOrder
inventoryBankAccountBankAccountId?: Prisma.SortOrder
} }
export type PurchaseReceiptPaymentsSumOrderByAggregateInput = { export type PurchaseReceiptPaymentsSumOrderByAggregateInput = {
@@ -471,6 +524,8 @@ export type PurchaseReceiptPaymentsSumOrderByAggregateInput = {
amount?: Prisma.SortOrder amount?: Prisma.SortOrder
bankAccountId?: Prisma.SortOrder bankAccountId?: Prisma.SortOrder
receiptId?: Prisma.SortOrder receiptId?: Prisma.SortOrder
inventoryBankAccountInventoryId?: Prisma.SortOrder
inventoryBankAccountBankAccountId?: Prisma.SortOrder
} }
export type PurchaseReceiptPaymentsCreateNestedManyWithoutBankAccountInput = { export type PurchaseReceiptPaymentsCreateNestedManyWithoutBankAccountInput = {
@@ -515,6 +570,48 @@ export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountNestedIn
deleteMany?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[] deleteMany?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[]
} }
export type PurchaseReceiptPaymentsCreateNestedManyWithoutInventoryBankAccountInput = {
create?: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput> | Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput[]
connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput[]
createMany?: Prisma.PurchaseReceiptPaymentsCreateManyInventoryBankAccountInputEnvelope
connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
}
export type PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutInventoryBankAccountInput = {
create?: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput> | Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput[]
connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput[]
createMany?: Prisma.PurchaseReceiptPaymentsCreateManyInventoryBankAccountInputEnvelope
connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
}
export type PurchaseReceiptPaymentsUpdateManyWithoutInventoryBankAccountNestedInput = {
create?: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput> | Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput[]
connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput[]
upsert?: Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutInventoryBankAccountInput[]
createMany?: Prisma.PurchaseReceiptPaymentsCreateManyInventoryBankAccountInputEnvelope
set?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
disconnect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
delete?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
update?: Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutInventoryBankAccountInput[]
updateMany?: Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutInventoryBankAccountInput[]
deleteMany?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[]
}
export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutInventoryBankAccountNestedInput = {
create?: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput> | Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput[]
connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput[]
upsert?: Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutInventoryBankAccountInput[]
createMany?: Prisma.PurchaseReceiptPaymentsCreateManyInventoryBankAccountInputEnvelope
set?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
disconnect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
delete?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[]
update?: Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutInventoryBankAccountInput[]
updateMany?: Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutInventoryBankAccountInput[]
deleteMany?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[]
}
export type PurchaseReceiptPaymentsCreateNestedManyWithoutReceiptInput = { export type PurchaseReceiptPaymentsCreateNestedManyWithoutReceiptInput = {
create?: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutReceiptInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput> | Prisma.PurchaseReceiptPaymentsCreateWithoutReceiptInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput[] create?: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutReceiptInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput> | Prisma.PurchaseReceiptPaymentsCreateWithoutReceiptInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput[]
connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput[] connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput[]
@@ -569,6 +666,7 @@ export type PurchaseReceiptPaymentsCreateWithoutBankAccountInput = {
description?: string | null description?: string | null
createdAt?: Date | string createdAt?: Date | string
receipt: Prisma.PurchaseReceiptCreateNestedOneWithoutPaymentsInput receipt: Prisma.PurchaseReceiptCreateNestedOneWithoutPaymentsInput
inventoryBankAccount?: Prisma.InventoryBankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput
} }
export type PurchaseReceiptPaymentsUncheckedCreateWithoutBankAccountInput = { export type PurchaseReceiptPaymentsUncheckedCreateWithoutBankAccountInput = {
@@ -580,6 +678,8 @@ export type PurchaseReceiptPaymentsUncheckedCreateWithoutBankAccountInput = {
payedAt: Date | string payedAt: Date | string
description?: string | null description?: string | null
createdAt?: Date | string createdAt?: Date | string
inventoryBankAccountInventoryId?: number | null
inventoryBankAccountBankAccountId?: number | null
} }
export type PurchaseReceiptPaymentsCreateOrConnectWithoutBankAccountInput = { export type PurchaseReceiptPaymentsCreateOrConnectWithoutBankAccountInput = {
@@ -621,6 +721,57 @@ export type PurchaseReceiptPaymentsScalarWhereInput = {
payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string
description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null
createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string
inventoryBankAccountInventoryId?: Prisma.IntNullableFilter<"PurchaseReceiptPayments"> | number | null
inventoryBankAccountBankAccountId?: Prisma.IntNullableFilter<"PurchaseReceiptPayments"> | number | null
}
export type PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput = {
amount: runtime.Decimal | runtime.DecimalJsLike | number | string
paymentMethod: $Enums.PaymentMethodType
type: $Enums.PaymentType
payedAt: Date | string
description?: string | null
createdAt?: Date | string
receipt: Prisma.PurchaseReceiptCreateNestedOneWithoutPaymentsInput
bankAccount: Prisma.BankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput
}
export type PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput = {
id?: number
amount: runtime.Decimal | runtime.DecimalJsLike | number | string
paymentMethod: $Enums.PaymentMethodType
type: $Enums.PaymentType
bankAccountId: number
receiptId: number
payedAt: Date | string
description?: string | null
createdAt?: Date | string
}
export type PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput = {
where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput
create: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput>
}
export type PurchaseReceiptPaymentsCreateManyInventoryBankAccountInputEnvelope = {
data: Prisma.PurchaseReceiptPaymentsCreateManyInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsCreateManyInventoryBankAccountInput[]
skipDuplicates?: boolean
}
export type PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutInventoryBankAccountInput = {
where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput
update: Prisma.XOR<Prisma.PurchaseReceiptPaymentsUpdateWithoutInventoryBankAccountInput, Prisma.PurchaseReceiptPaymentsUncheckedUpdateWithoutInventoryBankAccountInput>
create: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput>
}
export type PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutInventoryBankAccountInput = {
where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput
data: Prisma.XOR<Prisma.PurchaseReceiptPaymentsUpdateWithoutInventoryBankAccountInput, Prisma.PurchaseReceiptPaymentsUncheckedUpdateWithoutInventoryBankAccountInput>
}
export type PurchaseReceiptPaymentsUpdateManyWithWhereWithoutInventoryBankAccountInput = {
where: Prisma.PurchaseReceiptPaymentsScalarWhereInput
data: Prisma.XOR<Prisma.PurchaseReceiptPaymentsUpdateManyMutationInput, Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutInventoryBankAccountInput>
} }
export type PurchaseReceiptPaymentsCreateWithoutReceiptInput = { export type PurchaseReceiptPaymentsCreateWithoutReceiptInput = {
@@ -631,6 +782,7 @@ export type PurchaseReceiptPaymentsCreateWithoutReceiptInput = {
description?: string | null description?: string | null
createdAt?: Date | string createdAt?: Date | string
bankAccount: Prisma.BankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput bankAccount: Prisma.BankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput
inventoryBankAccount?: Prisma.InventoryBankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput
} }
export type PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput = { export type PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput = {
@@ -642,6 +794,8 @@ export type PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput = {
payedAt: Date | string payedAt: Date | string
description?: string | null description?: string | null
createdAt?: Date | string createdAt?: Date | string
inventoryBankAccountInventoryId?: number | null
inventoryBankAccountBankAccountId?: number | null
} }
export type PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput = { export type PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput = {
@@ -679,6 +833,8 @@ export type PurchaseReceiptPaymentsCreateManyBankAccountInput = {
payedAt: Date | string payedAt: Date | string
description?: string | null description?: string | null
createdAt?: Date | string createdAt?: Date | string
inventoryBankAccountInventoryId?: number | null
inventoryBankAccountBankAccountId?: number | null
} }
export type PurchaseReceiptPaymentsUpdateWithoutBankAccountInput = { export type PurchaseReceiptPaymentsUpdateWithoutBankAccountInput = {
@@ -689,6 +845,7 @@ export type PurchaseReceiptPaymentsUpdateWithoutBankAccountInput = {
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
receipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutPaymentsNestedInput receipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutPaymentsNestedInput
inventoryBankAccount?: Prisma.InventoryBankAccountUpdateOneWithoutPurchaseReceiptPaymentsNestedInput
} }
export type PurchaseReceiptPaymentsUncheckedUpdateWithoutBankAccountInput = { export type PurchaseReceiptPaymentsUncheckedUpdateWithoutBankAccountInput = {
@@ -700,6 +857,8 @@ export type PurchaseReceiptPaymentsUncheckedUpdateWithoutBankAccountInput = {
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inventoryBankAccountInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
inventoryBankAccountBankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
} }
export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountInput = { export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountInput = {
@@ -711,6 +870,55 @@ export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountInput =
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inventoryBankAccountInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
inventoryBankAccountBankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
}
export type PurchaseReceiptPaymentsCreateManyInventoryBankAccountInput = {
id?: number
amount: runtime.Decimal | runtime.DecimalJsLike | number | string
paymentMethod: $Enums.PaymentMethodType
type: $Enums.PaymentType
bankAccountId: number
receiptId: number
payedAt: Date | string
description?: string | null
createdAt?: Date | string
}
export type PurchaseReceiptPaymentsUpdateWithoutInventoryBankAccountInput = {
amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
receipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutPaymentsNestedInput
bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutPurchaseReceiptPaymentsNestedInput
}
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
bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number
receiptId?: Prisma.IntFieldUpdateOperationsInput | number
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutInventoryBankAccountInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType
bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number
receiptId?: Prisma.IntFieldUpdateOperationsInput | number
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
} }
export type PurchaseReceiptPaymentsCreateManyReceiptInput = { export type PurchaseReceiptPaymentsCreateManyReceiptInput = {
@@ -722,6 +930,8 @@ export type PurchaseReceiptPaymentsCreateManyReceiptInput = {
payedAt: Date | string payedAt: Date | string
description?: string | null description?: string | null
createdAt?: Date | string createdAt?: Date | string
inventoryBankAccountInventoryId?: number | null
inventoryBankAccountBankAccountId?: number | null
} }
export type PurchaseReceiptPaymentsUpdateWithoutReceiptInput = { export type PurchaseReceiptPaymentsUpdateWithoutReceiptInput = {
@@ -732,6 +942,7 @@ export type PurchaseReceiptPaymentsUpdateWithoutReceiptInput = {
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutPurchaseReceiptPaymentsNestedInput bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutPurchaseReceiptPaymentsNestedInput
inventoryBankAccount?: Prisma.InventoryBankAccountUpdateOneWithoutPurchaseReceiptPaymentsNestedInput
} }
export type PurchaseReceiptPaymentsUncheckedUpdateWithoutReceiptInput = { export type PurchaseReceiptPaymentsUncheckedUpdateWithoutReceiptInput = {
@@ -743,6 +954,8 @@ export type PurchaseReceiptPaymentsUncheckedUpdateWithoutReceiptInput = {
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inventoryBankAccountInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
inventoryBankAccountBankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
} }
export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutReceiptInput = { export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutReceiptInput = {
@@ -754,6 +967,8 @@ export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutReceiptInput = {
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inventoryBankAccountInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
inventoryBankAccountBankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
} }
@@ -768,8 +983,11 @@ export type PurchaseReceiptPaymentsSelect<ExtArgs extends runtime.Types.Extensio
payedAt?: boolean payedAt?: boolean
description?: boolean description?: boolean
createdAt?: boolean createdAt?: boolean
inventoryBankAccountInventoryId?: boolean
inventoryBankAccountBankAccountId?: boolean
receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs<ExtArgs> receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs<ExtArgs>
bankAccount?: boolean | Prisma.BankAccountDefaultArgs<ExtArgs> bankAccount?: boolean | Prisma.BankAccountDefaultArgs<ExtArgs>
inventoryBankAccount?: boolean | Prisma.PurchaseReceiptPayments$inventoryBankAccountArgs<ExtArgs>
}, ExtArgs["result"]["purchaseReceiptPayments"]> }, ExtArgs["result"]["purchaseReceiptPayments"]>
@@ -784,12 +1002,15 @@ export type PurchaseReceiptPaymentsSelectScalar = {
payedAt?: boolean payedAt?: boolean
description?: boolean description?: boolean
createdAt?: boolean createdAt?: boolean
inventoryBankAccountInventoryId?: boolean
inventoryBankAccountBankAccountId?: boolean
} }
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 PurchaseReceiptPaymentsOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "amount" | "paymentMethod" | "type" | "bankAccountId" | "receiptId" | "payedAt" | "description" | "createdAt" | "inventoryBankAccountInventoryId" | "inventoryBankAccountBankAccountId", 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> = {
receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs<ExtArgs> receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs<ExtArgs>
bankAccount?: boolean | Prisma.BankAccountDefaultArgs<ExtArgs> bankAccount?: boolean | Prisma.BankAccountDefaultArgs<ExtArgs>
inventoryBankAccount?: boolean | Prisma.PurchaseReceiptPayments$inventoryBankAccountArgs<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> = {
@@ -797,6 +1018,7 @@ export type $PurchaseReceiptPaymentsPayload<ExtArgs extends runtime.Types.Extens
objects: { objects: {
receipt: Prisma.$PurchaseReceiptPayload<ExtArgs> receipt: Prisma.$PurchaseReceiptPayload<ExtArgs>
bankAccount: Prisma.$BankAccountPayload<ExtArgs> bankAccount: Prisma.$BankAccountPayload<ExtArgs>
inventoryBankAccount: Prisma.$InventoryBankAccountPayload<ExtArgs> | null
} }
scalars: runtime.Types.Extensions.GetPayloadResult<{ scalars: runtime.Types.Extensions.GetPayloadResult<{
id: number id: number
@@ -808,6 +1030,8 @@ export type $PurchaseReceiptPaymentsPayload<ExtArgs extends runtime.Types.Extens
payedAt: Date payedAt: Date
description: string | null description: string | null
createdAt: Date createdAt: Date
inventoryBankAccountInventoryId: number | null
inventoryBankAccountBankAccountId: number | null
}, ExtArgs["result"]["purchaseReceiptPayments"]> }, ExtArgs["result"]["purchaseReceiptPayments"]>
composites: {} composites: {}
} }
@@ -1150,6 +1374,7 @@ export interface Prisma__PurchaseReceiptPaymentsClient<T, Null = never, ExtArgs
readonly [Symbol.toStringTag]: "PrismaPromise" readonly [Symbol.toStringTag]: "PrismaPromise"
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> 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>
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>
inventoryBankAccount<T extends Prisma.PurchaseReceiptPayments$inventoryBankAccountArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PurchaseReceiptPayments$inventoryBankAccountArgs<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.
@@ -1188,6 +1413,8 @@ export interface PurchaseReceiptPaymentsFieldRefs {
readonly payedAt: Prisma.FieldRef<"PurchaseReceiptPayments", 'DateTime'> readonly payedAt: Prisma.FieldRef<"PurchaseReceiptPayments", 'DateTime'>
readonly description: Prisma.FieldRef<"PurchaseReceiptPayments", 'String'> readonly description: Prisma.FieldRef<"PurchaseReceiptPayments", 'String'>
readonly createdAt: Prisma.FieldRef<"PurchaseReceiptPayments", 'DateTime'> readonly createdAt: Prisma.FieldRef<"PurchaseReceiptPayments", 'DateTime'>
readonly inventoryBankAccountInventoryId: Prisma.FieldRef<"PurchaseReceiptPayments", 'Int'>
readonly inventoryBankAccountBankAccountId: Prisma.FieldRef<"PurchaseReceiptPayments", 'Int'>
} }
@@ -1530,6 +1757,25 @@ export type PurchaseReceiptPaymentsDeleteManyArgs<ExtArgs extends runtime.Types.
limit?: number limit?: number
} }
/**
* PurchaseReceiptPayments.inventoryBankAccount
*/
export type PurchaseReceiptPayments$inventoryBankAccountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the InventoryBankAccount
*/
select?: Prisma.InventoryBankAccountSelect<ExtArgs> | null
/**
* Omit specific fields from the InventoryBankAccount
*/
omit?: Prisma.InventoryBankAccountOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.InventoryBankAccountInclude<ExtArgs> | null
where?: Prisma.InventoryBankAccountWhereInput
}
/** /**
* PurchaseReceiptPayments without action * PurchaseReceiptPayments without action
*/ */
+89 -89
View File
@@ -30,14 +30,14 @@ export type SalesInvoiceAvgAggregateOutputType = {
id: number | null id: number | null
totalAmount: runtime.Decimal | null totalAmount: runtime.Decimal | null
customerId: number | null customerId: number | null
inventoryId: number | null posAccountId: number | null
} }
export type SalesInvoiceSumAggregateOutputType = { export type SalesInvoiceSumAggregateOutputType = {
id: number | null id: number | null
totalAmount: runtime.Decimal | null totalAmount: runtime.Decimal | null
customerId: number | null customerId: number | null
inventoryId: number | null posAccountId: number | null
} }
export type SalesInvoiceMinAggregateOutputType = { export type SalesInvoiceMinAggregateOutputType = {
@@ -48,7 +48,7 @@ export type SalesInvoiceMinAggregateOutputType = {
createdAt: Date | null createdAt: Date | null
updatedAt: Date | null updatedAt: Date | null
customerId: number | null customerId: number | null
inventoryId: number | null posAccountId: number | null
} }
export type SalesInvoiceMaxAggregateOutputType = { export type SalesInvoiceMaxAggregateOutputType = {
@@ -59,7 +59,7 @@ export type SalesInvoiceMaxAggregateOutputType = {
createdAt: Date | null createdAt: Date | null
updatedAt: Date | null updatedAt: Date | null
customerId: number | null customerId: number | null
inventoryId: number | null posAccountId: number | null
} }
export type SalesInvoiceCountAggregateOutputType = { export type SalesInvoiceCountAggregateOutputType = {
@@ -70,7 +70,7 @@ export type SalesInvoiceCountAggregateOutputType = {
createdAt: number createdAt: number
updatedAt: number updatedAt: number
customerId: number customerId: number
inventoryId: number posAccountId: number
_all: number _all: number
} }
@@ -79,14 +79,14 @@ export type SalesInvoiceAvgAggregateInputType = {
id?: true id?: true
totalAmount?: true totalAmount?: true
customerId?: true customerId?: true
inventoryId?: true posAccountId?: true
} }
export type SalesInvoiceSumAggregateInputType = { export type SalesInvoiceSumAggregateInputType = {
id?: true id?: true
totalAmount?: true totalAmount?: true
customerId?: true customerId?: true
inventoryId?: true posAccountId?: true
} }
export type SalesInvoiceMinAggregateInputType = { export type SalesInvoiceMinAggregateInputType = {
@@ -97,7 +97,7 @@ export type SalesInvoiceMinAggregateInputType = {
createdAt?: true createdAt?: true
updatedAt?: true updatedAt?: true
customerId?: true customerId?: true
inventoryId?: true posAccountId?: true
} }
export type SalesInvoiceMaxAggregateInputType = { export type SalesInvoiceMaxAggregateInputType = {
@@ -108,7 +108,7 @@ export type SalesInvoiceMaxAggregateInputType = {
createdAt?: true createdAt?: true
updatedAt?: true updatedAt?: true
customerId?: true customerId?: true
inventoryId?: true posAccountId?: true
} }
export type SalesInvoiceCountAggregateInputType = { export type SalesInvoiceCountAggregateInputType = {
@@ -119,7 +119,7 @@ export type SalesInvoiceCountAggregateInputType = {
createdAt?: true createdAt?: true
updatedAt?: true updatedAt?: true
customerId?: true customerId?: true
inventoryId?: true posAccountId?: true
_all?: true _all?: true
} }
@@ -217,7 +217,7 @@ export type SalesInvoiceGroupByOutputType = {
createdAt: Date createdAt: Date
updatedAt: Date updatedAt: Date
customerId: number | null customerId: number | null
inventoryId: number posAccountId: number
_count: SalesInvoiceCountAggregateOutputType | null _count: SalesInvoiceCountAggregateOutputType | null
_avg: SalesInvoiceAvgAggregateOutputType | null _avg: SalesInvoiceAvgAggregateOutputType | null
_sum: SalesInvoiceSumAggregateOutputType | null _sum: SalesInvoiceSumAggregateOutputType | null
@@ -251,10 +251,10 @@ export type SalesInvoiceWhereInput = {
createdAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string createdAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null
inventoryId?: Prisma.IntFilter<"SalesInvoice"> | number posAccountId?: Prisma.IntFilter<"SalesInvoice"> | number
items?: Prisma.SalesInvoiceItemListRelationFilter items?: Prisma.SalesInvoiceItemListRelationFilter
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
inventory?: Prisma.XOR<Prisma.InventoryScalarRelationFilter, Prisma.InventoryWhereInput> posAccount?: Prisma.XOR<Prisma.PosAccountScalarRelationFilter, Prisma.PosAccountWhereInput>
} }
export type SalesInvoiceOrderByWithRelationInput = { export type SalesInvoiceOrderByWithRelationInput = {
@@ -265,10 +265,10 @@ export type SalesInvoiceOrderByWithRelationInput = {
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
customerId?: Prisma.SortOrderInput | Prisma.SortOrder customerId?: Prisma.SortOrderInput | Prisma.SortOrder
inventoryId?: Prisma.SortOrder posAccountId?: Prisma.SortOrder
items?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput items?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput
customer?: Prisma.CustomerOrderByWithRelationInput customer?: Prisma.CustomerOrderByWithRelationInput
inventory?: Prisma.InventoryOrderByWithRelationInput posAccount?: Prisma.PosAccountOrderByWithRelationInput
_relevance?: Prisma.SalesInvoiceOrderByRelevanceInput _relevance?: Prisma.SalesInvoiceOrderByRelevanceInput
} }
@@ -283,10 +283,10 @@ export type SalesInvoiceWhereUniqueInput = Prisma.AtLeast<{
createdAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string createdAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null
inventoryId?: Prisma.IntFilter<"SalesInvoice"> | number posAccountId?: Prisma.IntFilter<"SalesInvoice"> | number
items?: Prisma.SalesInvoiceItemListRelationFilter items?: Prisma.SalesInvoiceItemListRelationFilter
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
inventory?: Prisma.XOR<Prisma.InventoryScalarRelationFilter, Prisma.InventoryWhereInput> posAccount?: Prisma.XOR<Prisma.PosAccountScalarRelationFilter, Prisma.PosAccountWhereInput>
}, "id" | "code"> }, "id" | "code">
export type SalesInvoiceOrderByWithAggregationInput = { export type SalesInvoiceOrderByWithAggregationInput = {
@@ -297,7 +297,7 @@ export type SalesInvoiceOrderByWithAggregationInput = {
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
customerId?: Prisma.SortOrderInput | Prisma.SortOrder customerId?: Prisma.SortOrderInput | Prisma.SortOrder
inventoryId?: Prisma.SortOrder posAccountId?: Prisma.SortOrder
_count?: Prisma.SalesInvoiceCountOrderByAggregateInput _count?: Prisma.SalesInvoiceCountOrderByAggregateInput
_avg?: Prisma.SalesInvoiceAvgOrderByAggregateInput _avg?: Prisma.SalesInvoiceAvgOrderByAggregateInput
_max?: Prisma.SalesInvoiceMaxOrderByAggregateInput _max?: Prisma.SalesInvoiceMaxOrderByAggregateInput
@@ -316,7 +316,7 @@ export type SalesInvoiceScalarWhereWithAggregatesInput = {
createdAt?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoice"> | Date | string createdAt?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoice"> | Date | string
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoice"> | Date | string updatedAt?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoice"> | Date | string
customerId?: Prisma.IntNullableWithAggregatesFilter<"SalesInvoice"> | number | null customerId?: Prisma.IntNullableWithAggregatesFilter<"SalesInvoice"> | number | null
inventoryId?: Prisma.IntWithAggregatesFilter<"SalesInvoice"> | number posAccountId?: Prisma.IntWithAggregatesFilter<"SalesInvoice"> | number
} }
export type SalesInvoiceCreateInput = { export type SalesInvoiceCreateInput = {
@@ -327,7 +327,7 @@ export type SalesInvoiceCreateInput = {
updatedAt?: Date | string updatedAt?: Date | string
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
inventory: Prisma.InventoryCreateNestedOneWithoutSalesInvoicesInput posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
} }
export type SalesInvoiceUncheckedCreateInput = { export type SalesInvoiceUncheckedCreateInput = {
@@ -338,7 +338,7 @@ export type SalesInvoiceUncheckedCreateInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
customerId?: number | null customerId?: number | null
inventoryId: number posAccountId: number
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
} }
@@ -350,7 +350,7 @@ export type SalesInvoiceUpdateInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
inventory?: Prisma.InventoryUpdateOneRequiredWithoutSalesInvoicesNestedInput posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
} }
export type SalesInvoiceUncheckedUpdateInput = { export type SalesInvoiceUncheckedUpdateInput = {
@@ -361,7 +361,7 @@ export type SalesInvoiceUncheckedUpdateInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
} }
@@ -373,7 +373,7 @@ export type SalesInvoiceCreateManyInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
customerId?: number | null customerId?: number | null
inventoryId: number posAccountId: number
} }
export type SalesInvoiceUpdateManyMutationInput = { export type SalesInvoiceUpdateManyMutationInput = {
@@ -392,7 +392,7 @@ export type SalesInvoiceUncheckedUpdateManyInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
} }
export type SalesInvoiceListRelationFilter = { export type SalesInvoiceListRelationFilter = {
@@ -419,14 +419,14 @@ export type SalesInvoiceCountOrderByAggregateInput = {
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
customerId?: Prisma.SortOrder customerId?: Prisma.SortOrder
inventoryId?: Prisma.SortOrder posAccountId?: Prisma.SortOrder
} }
export type SalesInvoiceAvgOrderByAggregateInput = { export type SalesInvoiceAvgOrderByAggregateInput = {
id?: Prisma.SortOrder id?: Prisma.SortOrder
totalAmount?: Prisma.SortOrder totalAmount?: Prisma.SortOrder
customerId?: Prisma.SortOrder customerId?: Prisma.SortOrder
inventoryId?: Prisma.SortOrder posAccountId?: Prisma.SortOrder
} }
export type SalesInvoiceMaxOrderByAggregateInput = { export type SalesInvoiceMaxOrderByAggregateInput = {
@@ -437,7 +437,7 @@ export type SalesInvoiceMaxOrderByAggregateInput = {
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
customerId?: Prisma.SortOrder customerId?: Prisma.SortOrder
inventoryId?: Prisma.SortOrder posAccountId?: Prisma.SortOrder
} }
export type SalesInvoiceMinOrderByAggregateInput = { export type SalesInvoiceMinOrderByAggregateInput = {
@@ -448,14 +448,14 @@ export type SalesInvoiceMinOrderByAggregateInput = {
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
customerId?: Prisma.SortOrder customerId?: Prisma.SortOrder
inventoryId?: Prisma.SortOrder posAccountId?: Prisma.SortOrder
} }
export type SalesInvoiceSumOrderByAggregateInput = { export type SalesInvoiceSumOrderByAggregateInput = {
id?: Prisma.SortOrder id?: Prisma.SortOrder
totalAmount?: Prisma.SortOrder totalAmount?: Prisma.SortOrder
customerId?: Prisma.SortOrder customerId?: Prisma.SortOrder
inventoryId?: Prisma.SortOrder posAccountId?: Prisma.SortOrder
} }
export type SalesInvoiceScalarRelationFilter = { export type SalesInvoiceScalarRelationFilter = {
@@ -463,45 +463,45 @@ export type SalesInvoiceScalarRelationFilter = {
isNot?: Prisma.SalesInvoiceWhereInput isNot?: Prisma.SalesInvoiceWhereInput
} }
export type SalesInvoiceCreateNestedManyWithoutInventoryInput = { export type SalesInvoiceCreateNestedManyWithoutPosAccountInput = {
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutInventoryInput, Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput> | Prisma.SalesInvoiceCreateWithoutInventoryInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput[] create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput> | Prisma.SalesInvoiceCreateWithoutPosAccountInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput[]
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput | Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput[] connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput | Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput[]
createMany?: Prisma.SalesInvoiceCreateManyInventoryInputEnvelope createMany?: Prisma.SalesInvoiceCreateManyPosAccountInputEnvelope
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
} }
export type SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput = { export type SalesInvoiceUncheckedCreateNestedManyWithoutPosAccountInput = {
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutInventoryInput, Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput> | Prisma.SalesInvoiceCreateWithoutInventoryInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput[] create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput> | Prisma.SalesInvoiceCreateWithoutPosAccountInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput[]
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput | Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput[] connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput | Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput[]
createMany?: Prisma.SalesInvoiceCreateManyInventoryInputEnvelope createMany?: Prisma.SalesInvoiceCreateManyPosAccountInputEnvelope
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
} }
export type SalesInvoiceUpdateManyWithoutInventoryNestedInput = { export type SalesInvoiceUpdateManyWithoutPosAccountNestedInput = {
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutInventoryInput, Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput> | Prisma.SalesInvoiceCreateWithoutInventoryInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput[] create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput> | Prisma.SalesInvoiceCreateWithoutPosAccountInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput[]
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput | Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput[] connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput | Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput[]
upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutInventoryInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutInventoryInput[] upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutPosAccountInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutPosAccountInput[]
createMany?: Prisma.SalesInvoiceCreateManyInventoryInputEnvelope createMany?: Prisma.SalesInvoiceCreateManyPosAccountInputEnvelope
set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutInventoryInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutInventoryInput[] update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutPosAccountInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutPosAccountInput[]
updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutInventoryInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutInventoryInput[] updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutPosAccountInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutPosAccountInput[]
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[] deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
} }
export type SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput = { export type SalesInvoiceUncheckedUpdateManyWithoutPosAccountNestedInput = {
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutInventoryInput, Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput> | Prisma.SalesInvoiceCreateWithoutInventoryInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput[] create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput> | Prisma.SalesInvoiceCreateWithoutPosAccountInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput[]
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput | Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput[] connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput | Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput[]
upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutInventoryInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutInventoryInput[] upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutPosAccountInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutPosAccountInput[]
createMany?: Prisma.SalesInvoiceCreateManyInventoryInputEnvelope createMany?: Prisma.SalesInvoiceCreateManyPosAccountInputEnvelope
set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutInventoryInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutInventoryInput[] update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutPosAccountInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutPosAccountInput[]
updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutInventoryInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutInventoryInput[] updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutPosAccountInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutPosAccountInput[]
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[] deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
} }
@@ -569,7 +569,7 @@ export type SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput = {
update?: Prisma.XOR<Prisma.XOR<Prisma.SalesInvoiceUpdateToOneWithWhereWithoutItemsInput, Prisma.SalesInvoiceUpdateWithoutItemsInput>, Prisma.SalesInvoiceUncheckedUpdateWithoutItemsInput> update?: Prisma.XOR<Prisma.XOR<Prisma.SalesInvoiceUpdateToOneWithWhereWithoutItemsInput, Prisma.SalesInvoiceUpdateWithoutItemsInput>, Prisma.SalesInvoiceUncheckedUpdateWithoutItemsInput>
} }
export type SalesInvoiceCreateWithoutInventoryInput = { export type SalesInvoiceCreateWithoutPosAccountInput = {
code: string code: string
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
description?: string | null description?: string | null
@@ -579,7 +579,7 @@ export type SalesInvoiceCreateWithoutInventoryInput = {
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
} }
export type SalesInvoiceUncheckedCreateWithoutInventoryInput = { export type SalesInvoiceUncheckedCreateWithoutPosAccountInput = {
id?: number id?: number
code: string code: string
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
@@ -590,30 +590,30 @@ export type SalesInvoiceUncheckedCreateWithoutInventoryInput = {
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
} }
export type SalesInvoiceCreateOrConnectWithoutInventoryInput = { export type SalesInvoiceCreateOrConnectWithoutPosAccountInput = {
where: Prisma.SalesInvoiceWhereUniqueInput where: Prisma.SalesInvoiceWhereUniqueInput
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutInventoryInput, Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput> create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput>
} }
export type SalesInvoiceCreateManyInventoryInputEnvelope = { export type SalesInvoiceCreateManyPosAccountInputEnvelope = {
data: Prisma.SalesInvoiceCreateManyInventoryInput | Prisma.SalesInvoiceCreateManyInventoryInput[] data: Prisma.SalesInvoiceCreateManyPosAccountInput | Prisma.SalesInvoiceCreateManyPosAccountInput[]
skipDuplicates?: boolean skipDuplicates?: boolean
} }
export type SalesInvoiceUpsertWithWhereUniqueWithoutInventoryInput = { export type SalesInvoiceUpsertWithWhereUniqueWithoutPosAccountInput = {
where: Prisma.SalesInvoiceWhereUniqueInput where: Prisma.SalesInvoiceWhereUniqueInput
update: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutInventoryInput, Prisma.SalesInvoiceUncheckedUpdateWithoutInventoryInput> update: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedUpdateWithoutPosAccountInput>
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutInventoryInput, Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput> create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput>
} }
export type SalesInvoiceUpdateWithWhereUniqueWithoutInventoryInput = { export type SalesInvoiceUpdateWithWhereUniqueWithoutPosAccountInput = {
where: Prisma.SalesInvoiceWhereUniqueInput where: Prisma.SalesInvoiceWhereUniqueInput
data: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutInventoryInput, Prisma.SalesInvoiceUncheckedUpdateWithoutInventoryInput> data: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedUpdateWithoutPosAccountInput>
} }
export type SalesInvoiceUpdateManyWithWhereWithoutInventoryInput = { export type SalesInvoiceUpdateManyWithWhereWithoutPosAccountInput = {
where: Prisma.SalesInvoiceScalarWhereInput where: Prisma.SalesInvoiceScalarWhereInput
data: Prisma.XOR<Prisma.SalesInvoiceUpdateManyMutationInput, Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryInput> data: Prisma.XOR<Prisma.SalesInvoiceUpdateManyMutationInput, Prisma.SalesInvoiceUncheckedUpdateManyWithoutPosAccountInput>
} }
export type SalesInvoiceScalarWhereInput = { export type SalesInvoiceScalarWhereInput = {
@@ -627,7 +627,7 @@ export type SalesInvoiceScalarWhereInput = {
createdAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string createdAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null
inventoryId?: Prisma.IntFilter<"SalesInvoice"> | number posAccountId?: Prisma.IntFilter<"SalesInvoice"> | number
} }
export type SalesInvoiceCreateWithoutCustomerInput = { export type SalesInvoiceCreateWithoutCustomerInput = {
@@ -637,7 +637,7 @@ export type SalesInvoiceCreateWithoutCustomerInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
inventory: Prisma.InventoryCreateNestedOneWithoutSalesInvoicesInput posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
} }
export type SalesInvoiceUncheckedCreateWithoutCustomerInput = { export type SalesInvoiceUncheckedCreateWithoutCustomerInput = {
@@ -647,7 +647,7 @@ export type SalesInvoiceUncheckedCreateWithoutCustomerInput = {
description?: string | null description?: string | null
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
inventoryId: number posAccountId: number
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
} }
@@ -684,7 +684,7 @@ export type SalesInvoiceCreateWithoutItemsInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
inventory: Prisma.InventoryCreateNestedOneWithoutSalesInvoicesInput posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
} }
export type SalesInvoiceUncheckedCreateWithoutItemsInput = { export type SalesInvoiceUncheckedCreateWithoutItemsInput = {
@@ -695,7 +695,7 @@ export type SalesInvoiceUncheckedCreateWithoutItemsInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
customerId?: number | null customerId?: number | null
inventoryId: number posAccountId: number
} }
export type SalesInvoiceCreateOrConnectWithoutItemsInput = { export type SalesInvoiceCreateOrConnectWithoutItemsInput = {
@@ -721,7 +721,7 @@ export type SalesInvoiceUpdateWithoutItemsInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
inventory?: Prisma.InventoryUpdateOneRequiredWithoutSalesInvoicesNestedInput posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
} }
export type SalesInvoiceUncheckedUpdateWithoutItemsInput = { export type SalesInvoiceUncheckedUpdateWithoutItemsInput = {
@@ -732,10 +732,10 @@ export type SalesInvoiceUncheckedUpdateWithoutItemsInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
} }
export type SalesInvoiceCreateManyInventoryInput = { export type SalesInvoiceCreateManyPosAccountInput = {
id?: number id?: number
code: string code: string
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
@@ -745,7 +745,7 @@ export type SalesInvoiceCreateManyInventoryInput = {
customerId?: number | null customerId?: number | null
} }
export type SalesInvoiceUpdateWithoutInventoryInput = { export type SalesInvoiceUpdateWithoutPosAccountInput = {
code?: Prisma.StringFieldUpdateOperationsInput | string code?: Prisma.StringFieldUpdateOperationsInput | string
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
@@ -755,7 +755,7 @@ export type SalesInvoiceUpdateWithoutInventoryInput = {
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
} }
export type SalesInvoiceUncheckedUpdateWithoutInventoryInput = { export type SalesInvoiceUncheckedUpdateWithoutPosAccountInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number id?: Prisma.IntFieldUpdateOperationsInput | number
code?: Prisma.StringFieldUpdateOperationsInput | string code?: Prisma.StringFieldUpdateOperationsInput | string
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
@@ -766,7 +766,7 @@ export type SalesInvoiceUncheckedUpdateWithoutInventoryInput = {
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
} }
export type SalesInvoiceUncheckedUpdateManyWithoutInventoryInput = { export type SalesInvoiceUncheckedUpdateManyWithoutPosAccountInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number id?: Prisma.IntFieldUpdateOperationsInput | number
code?: Prisma.StringFieldUpdateOperationsInput | string code?: Prisma.StringFieldUpdateOperationsInput | string
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
@@ -783,7 +783,7 @@ export type SalesInvoiceCreateManyCustomerInput = {
description?: string | null description?: string | null
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
inventoryId: number posAccountId: number
} }
export type SalesInvoiceUpdateWithoutCustomerInput = { export type SalesInvoiceUpdateWithoutCustomerInput = {
@@ -793,7 +793,7 @@ export type SalesInvoiceUpdateWithoutCustomerInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
inventory?: Prisma.InventoryUpdateOneRequiredWithoutSalesInvoicesNestedInput posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
} }
export type SalesInvoiceUncheckedUpdateWithoutCustomerInput = { export type SalesInvoiceUncheckedUpdateWithoutCustomerInput = {
@@ -803,7 +803,7 @@ export type SalesInvoiceUncheckedUpdateWithoutCustomerInput = {
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
} }
@@ -814,7 +814,7 @@ export type SalesInvoiceUncheckedUpdateManyWithoutCustomerInput = {
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
} }
@@ -856,10 +856,10 @@ export type SalesInvoiceSelect<ExtArgs extends runtime.Types.Extensions.Internal
createdAt?: boolean createdAt?: boolean
updatedAt?: boolean updatedAt?: boolean
customerId?: boolean customerId?: boolean
inventoryId?: boolean posAccountId?: boolean
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs> items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs> customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs>
inventory?: boolean | Prisma.InventoryDefaultArgs<ExtArgs> posAccount?: boolean | Prisma.PosAccountDefaultArgs<ExtArgs>
_count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs> _count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["salesInvoice"]> }, ExtArgs["result"]["salesInvoice"]>
@@ -873,14 +873,14 @@ export type SalesInvoiceSelectScalar = {
createdAt?: boolean createdAt?: boolean
updatedAt?: boolean updatedAt?: boolean
customerId?: boolean customerId?: boolean
inventoryId?: boolean posAccountId?: boolean
} }
export type SalesInvoiceOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "code" | "totalAmount" | "description" | "createdAt" | "updatedAt" | "customerId" | "inventoryId", ExtArgs["result"]["salesInvoice"]> export type SalesInvoiceOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "code" | "totalAmount" | "description" | "createdAt" | "updatedAt" | "customerId" | "posAccountId", ExtArgs["result"]["salesInvoice"]>
export type SalesInvoiceInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = { export type SalesInvoiceInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs> items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs> customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs>
inventory?: boolean | Prisma.InventoryDefaultArgs<ExtArgs> posAccount?: boolean | Prisma.PosAccountDefaultArgs<ExtArgs>
_count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs> _count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs>
} }
@@ -889,7 +889,7 @@ export type $SalesInvoicePayload<ExtArgs extends runtime.Types.Extensions.Intern
objects: { objects: {
items: Prisma.$SalesInvoiceItemPayload<ExtArgs>[] items: Prisma.$SalesInvoiceItemPayload<ExtArgs>[]
customer: Prisma.$CustomerPayload<ExtArgs> | null customer: Prisma.$CustomerPayload<ExtArgs> | null
inventory: Prisma.$InventoryPayload<ExtArgs> posAccount: Prisma.$PosAccountPayload<ExtArgs>
} }
scalars: runtime.Types.Extensions.GetPayloadResult<{ scalars: runtime.Types.Extensions.GetPayloadResult<{
id: number id: number
@@ -899,7 +899,7 @@ export type $SalesInvoicePayload<ExtArgs extends runtime.Types.Extensions.Intern
createdAt: Date createdAt: Date
updatedAt: Date updatedAt: Date
customerId: number | null customerId: number | null
inventoryId: number posAccountId: number
}, ExtArgs["result"]["salesInvoice"]> }, ExtArgs["result"]["salesInvoice"]>
composites: {} composites: {}
} }
@@ -1242,7 +1242,7 @@ export interface Prisma__SalesInvoiceClient<T, Null = never, ExtArgs extends run
readonly [Symbol.toStringTag]: "PrismaPromise" readonly [Symbol.toStringTag]: "PrismaPromise"
items<T extends Prisma.SalesInvoice$itemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$itemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoiceItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null> items<T extends Prisma.SalesInvoice$itemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$itemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoiceItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
customer<T extends Prisma.SalesInvoice$customerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$customerArgs<ExtArgs>>): Prisma.Prisma__CustomerClient<runtime.Types.Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> customer<T extends Prisma.SalesInvoice$customerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$customerArgs<ExtArgs>>): Prisma.Prisma__CustomerClient<runtime.Types.Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
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> posAccount<T extends Prisma.PosAccountDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PosAccountDefaultArgs<ExtArgs>>): Prisma.Prisma__PosAccountClient<runtime.Types.Result.GetResult<Prisma.$PosAccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
/** /**
* 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.
@@ -1279,7 +1279,7 @@ export interface SalesInvoiceFieldRefs {
readonly createdAt: Prisma.FieldRef<"SalesInvoice", 'DateTime'> readonly createdAt: Prisma.FieldRef<"SalesInvoice", 'DateTime'>
readonly updatedAt: Prisma.FieldRef<"SalesInvoice", 'DateTime'> readonly updatedAt: Prisma.FieldRef<"SalesInvoice", 'DateTime'>
readonly customerId: Prisma.FieldRef<"SalesInvoice", 'Int'> readonly customerId: Prisma.FieldRef<"SalesInvoice", 'Int'>
readonly inventoryId: Prisma.FieldRef<"SalesInvoice", 'Int'> readonly posAccountId: Prisma.FieldRef<"SalesInvoice", 'Int'>
} }
@@ -51,4 +51,9 @@ export class InventoriesController {
getProductCardex(@Param('id') id: string, @Param('productId') productId: string) { getProductCardex(@Param('id') id: string, @Param('productId') productId: string) {
return this.inventoriesService.getProductCardex(Number(id), Number(productId)) return this.inventoriesService.getProductCardex(Number(id), Number(productId))
} }
@Get(':id/cardex')
getCardex(@Param('id') id: string) {
return this.inventoriesService.getCardex(Number(id))
}
} }
@@ -161,37 +161,46 @@ export class InventoriesService {
return ResponseMapper.list(mapped) return ResponseMapper.list(mapped)
} }
async getCardex(inventoryId: number) {
const movements = await this.prisma.stockMovement.findMany({
where: { inventoryId },
orderBy: { createdAt: 'asc' },
include: {
customer: { select: { id: true, firstName: true, lastName: true } },
supplier: { select: { id: true, firstName: true, lastName: true } },
counterInventory: {
select: { id: true, name: true },
},
product: {
select: { id: true, name: true, sku: true },
},
},
omit: {
inventoryId: true,
productId: true,
customerId: true,
supplierId: true,
counterInventoryId: true,
},
})
return ResponseMapper.list(movements)
}
async getProductCardex(inventoryId: number, productId: number) { async getProductCardex(inventoryId: number, productId: number) {
const movements = await this.prisma.stockMovement.findMany({ const movements = await this.prisma.stockMovement.findMany({
where: { productId, inventoryId }, where: { productId, inventoryId },
orderBy: { createdAt: 'asc' }, orderBy: { createdAt: 'asc' },
include: { inventory: true, supplier: true }, include: {
customer: { select: { id: true, firstName: true, lastName: true } },
supplier: { select: { id: true, firstName: true, lastName: true } },
counterInventory: {
select: { id: true, name: true },
},
},
}) })
const mapped = movements.map(movement => ({ return ResponseMapper.list(movements)
id: movement.id,
type: movement.type,
quantity: Number(movement.quantity),
fee: Number(movement.fee),
totalCost: Number(movement.totalCost),
avgCost: Number(movement.avgCost),
referenceType: movement.referenceType,
referenceId: movement.referenceId,
createdAt: movement.createdAt,
remainedInStock: movement.remainedInStock,
inventory: {
id: movement.inventory.id,
name: movement.inventory.name,
},
supplier: movement.supplier
? {
id: movement.supplier.id,
name: movement.supplier.firstName + ' ' + movement.supplier.lastName,
}
: null,
}))
return ResponseMapper.list(mapped)
} }
async getInventoryBankAccounts(inventoryId: number) { async getInventoryBankAccounts(inventoryId: number) {
@@ -62,17 +62,39 @@ export class PosAccountsService {
}, },
}, },
}, },
salesInvoices: {
where: {
createdAt: { gte: new Date(new Date().setHours(0, 0, 0, 0)) },
},
select: {
id: true,
code: true,
totalAmount: true,
createdAt: true,
},
},
}, },
omit: { omit: {
inventoryId: true, inventoryId: true,
bankAccountId: true, bankAccountId: true,
}, },
}) })
return ResponseMapper.list( return ResponseMapper.list(
items.map(item => ({ items.map(item => {
...item, const { inventoryBankAccount, salesInvoices, ...rest } = item
bankAccount: item.inventoryBankAccount?.bankAccount, return {
})), ...rest,
bankAccount: inventoryBankAccount?.bankAccount,
todaySalesInfo: {
salesCount: salesInvoices.length,
salesTotal: salesInvoices.reduce(
(acc, si) => acc + Number(si.totalAmount),
0,
),
},
}
}),
) )
} }
+15 -5
View File
@@ -1,27 +1,37 @@
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger' import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'
import { ArrayMinSize, IsNumber, IsOptional } from 'class-validator' import { Type } from 'class-transformer'
import { ArrayMinSize, IsInt, IsNumber, IsOptional, IsString } from 'class-validator'
export class CreateOrderDto { export class CreateSaleInvoiceDto {
@ApiProperty() @ApiPropertyOptional()
@IsNumber()
@IsOptional() @IsOptional()
@IsInt()
@Type(() => Number)
customerId?: number customerId?: number
@ApiPropertyOptional() @ApiPropertyOptional()
@IsOptional()
@IsString()
description?: string
@ApiProperty()
@ArrayMinSize(1) @ArrayMinSize(1)
items: CreateOrderItemDto[] items: CreateOrderItemDto[]
} }
export class CreateOrderItemDto { export class CreateOrderItemDto {
@ApiProperty() @ApiProperty()
@IsNumber() @IsInt()
@Type(() => Number)
productId: number productId: number
@ApiProperty() @ApiProperty()
@IsNumber() @IsNumber()
@Type(() => Number)
count: number count: number
@ApiProperty() @ApiProperty()
@IsNumber() @IsNumber()
@Type(() => Number)
fee: number fee: number
} }
+2 -2
View File
@@ -1,5 +1,5 @@
import { Body, Controller, Get, Param, Post, Query } from '@nestjs/common' import { Body, Controller, Get, Param, Post, Query } from '@nestjs/common'
import { CreateOrderDto } from './dto/create-pos.dto' import { CreateSaleInvoiceDto } from './dto/create-pos.dto'
import { PosService } from './pos.service' import { PosService } from './pos.service'
@Controller('pos') @Controller('pos')
@@ -34,7 +34,7 @@ export class PosController {
} }
@Post('/:posId/orders/create') @Post('/:posId/orders/create')
async createOrder(@Param('posId') posId: string, @Body() dto: CreateOrderDto) { async createOrder(@Param('posId') posId: string, @Body() dto: CreateSaleInvoiceDto) {
return this.posService.createOrder(Number(posId), dto) return this.posService.createOrder(Number(posId), dto)
} }
} }
+16 -38
View File
@@ -1,29 +1,14 @@
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 { Prisma } from '../../generated/prisma/client' import { Prisma } from '../../generated/prisma/client'
import { SalesInvoiceCreateInput } from '../../generated/prisma/models'
import { PrismaService } from '../../prisma/prisma.service' import { PrismaService } from '../../prisma/prisma.service'
import { CreateOrderDto } from './dto/create-pos.dto' import { CreateSaleInvoiceDto } from './dto/create-pos.dto'
@Injectable() @Injectable()
export class PosService { export class PosService {
constructor(private prisma: PrismaService) {} constructor(private prisma: PrismaService) {}
async getDefaultInventoryId() {
const inventory = await this.prisma.inventory.findFirst({
where: { isPointOfSale: true },
select: { id: true },
})
return inventory?.id || null
}
async getDefaultPosId(inventoryId: number) {
const pos = await this.prisma.posAccount.findFirst({
where: { inventoryId },
select: { id: true },
})
return pos?.id || null
}
async getInfo(posId: number) { async getInfo(posId: number) {
const info = await this.prisma.posAccount.findUniqueOrThrow({ const info = await this.prisma.posAccount.findUniqueOrThrow({
where: { id: posId }, where: { id: posId },
@@ -173,41 +158,34 @@ export class PosService {
return ResponseMapper.list(categories) return ResponseMapper.list(categories)
} }
async createOrder(posId: number, data: CreateOrderDto) { async createOrder(posId: number, data: CreateSaleInvoiceDto) {
const pos = await this.prisma.posAccount.findUniqueOrThrow({ const { customerId, items, ...res } = data
where: { id: posId },
select: { inventoryId: true },
})
const inventoryId = pos.inventoryId
const { customerId, ...res } = data
const preparedOrder = { ...res } as any
const lastCode = await this.prisma.salesInvoice const lastCode = await this.prisma.salesInvoice
.findFirst({ .findFirst({
where: { posAccountId: posId },
orderBy: { code: 'desc' }, orderBy: { code: 'desc' },
select: { code: true }, select: { code: true },
}) })
.then(si => si?.code || '0') .then(si => si?.code || '0')
preparedOrder.code = String(Number(lastCode) + 1) const newCode = String(Number(lastCode) + 1)
preparedOrder.totalAmount = data.items.reduce( const totalAmount = data.items.reduce((acc, item) => acc + item.count * item.fee, 0)
(acc, item) => acc + Number(item.fee),
0,
)
preparedOrder.inventory = { connect: { id: inventoryId } } const preparedOrder: SalesInvoiceCreateInput = {
preparedOrder.customer = { connect: { id: customerId } } ...res,
code: newCode,
if (Object.prototype.hasOwnProperty.call(preparedOrder, 'items')) { posAccount: { connect: { id: posId } },
preparedOrder.items = { customer: customerId ? { connect: { id: customerId } } : undefined,
create: preparedOrder.items.map((item: any) => ({ totalAmount: totalAmount,
items: {
create: items.map(item => ({
product: { connect: { id: Number(item.productId) } }, product: { connect: { id: Number(item.productId) } },
count: item.count, count: item.count,
fee: item.fee, fee: item.fee,
total: item.count * item.fee, total: item.count * item.fee,
})), })),
} },
} }
const item = await this.prisma.salesInvoice.create({ data: preparedOrder }) const item = await this.prisma.salesInvoice.create({ data: preparedOrder })
+4
View File
@@ -26,4 +26,8 @@ export class CreateProductDto {
@Type(() => Number) @Type(() => Number)
@IsInt() @IsInt()
categoryId?: number categoryId?: number
@IsOptional()
@Type(() => Number)
minimumStockAlertLevel?: number
} }
+5
View File
@@ -27,4 +27,9 @@ export class UpdateProductDto {
@Type(() => Number) @Type(() => Number)
@IsInt() @IsInt()
categoryId?: number categoryId?: number
@IsOptional()
@Type(() => Number)
@IsInt()
minimumStockAlertLevel?: number
} }
+65 -53
View File
@@ -4,28 +4,22 @@ import { ResponseMapper } from '../common/response/response-mapper'
import { Prisma } from '../generated/prisma/client' import { Prisma } from '../generated/prisma/client'
import { PrismaService } from '../prisma/prisma.service' import { PrismaService } from '../prisma/prisma.service'
import { CreateProductDto } from './dto/create-product.dto' import { CreateProductDto } from './dto/create-product.dto'
import { UpdateProductDto } from './dto/update-product.dto'
@Injectable() @Injectable()
export class ProductsService { export class ProductsService {
constructor(private prisma: PrismaService) {} constructor(private prisma: PrismaService) {}
async create(data: CreateProductDto) { async create(data: CreateProductDto) {
const payload: any = { ...data } const { brandId, categoryId, ...rest } = data
if (Object.prototype.hasOwnProperty.call(payload, 'brandId')) {
if (payload.brandId !== undefined && payload.brandId !== null) { const dataToCreate = {
payload.brand = { connect: { id: Number(payload.brandId) } } ...rest,
} brand: brandId ? { connect: { id: Number(brandId) } } : undefined,
delete payload.brandId category: categoryId ? { connect: { id: Number(categoryId) } } : undefined,
} }
if (Object.prototype.hasOwnProperty.call(payload, 'categoryId')) { const item = await this.prisma.product.create({ data: dataToCreate })
if (payload.categoryId !== undefined && payload.categoryId !== null) {
payload.category = { connect: { id: Number(payload.categoryId) } }
}
delete payload.categoryId
}
const item = await this.prisma.product.create({ data: payload })
return ResponseMapper.create(item) return ResponseMapper.create(item)
} }
@@ -54,61 +48,79 @@ export class ProductsService {
? p.stockBalances.reduce((acc, sb) => acc + Number(sb.quantity), 0) ? p.stockBalances.reduce((acc, sb) => acc + Number(sb.quantity), 0)
: 0 : 0
return { ...rest, brand, category, stock } return {
...rest,
salePrice: Number(p.salePrice),
minimumStockAlertLevel: Number(p.minimumStockAlertLevel),
brand,
category,
stock,
}
}) })
return ResponseMapper.paginate(mapped, count, page, pageSize) return ResponseMapper.paginate(mapped, count, page, pageSize)
} }
async findOne(id: number) { async findOne(id: number) {
const p = await this.prisma.product.findUnique({ const product = await this.prisma.product.findUniqueOrThrow({
where: { id }, where: { id },
include: { brand: true, category: true, stockBalances: true }, include: {
brand: {
select: { id: true, name: true },
},
category: {
select: { id: true, name: true },
},
stockBalances: {
select: {
quantity: true,
avgCost: true,
inventory: { select: { id: true, name: true } },
},
},
salesInvoiceItems: {
select: { id: true },
},
},
omit: {
brandId: true,
categoryId: true,
},
}) })
if (!p) return null
const { brandId, categoryId, ...rest } = p as any const { salesInvoiceItems, ...rest } = product
const brand: ShortEntity | null = p.brand
? { id: p.brand.id, name: p.brand.name }
: null
const category: ShortEntity | null = p.category
? { id: p.category.id, name: p.category.name }
: null
return ResponseMapper.single({ return ResponseMapper.single({
...rest, ...rest,
brand, salePrice: Number(product.salePrice),
category, minimumStockAlertLevel: Number(product.minimumStockAlertLevel),
stock: stock: product.stockBalances?.reduce((acc, sb) => acc + Number(sb.quantity), 0),
p.stockBalances && p.stockBalances.length > 0
? p.stockBalances.reduce((acc, sb) => acc + Number(sb.quantity), 0)
: 0,
avgCost: avgCost:
p.stockBalances && p.stockBalances.length > 0 product.stockBalances?.reduce((acc, sb) => acc + Number(sb.avgCost), 0) /
? p.stockBalances.reduce((acc, sb) => acc + Number(sb.avgCost), 0) / product.stockBalances.length,
p.stockBalances.length salesCount: product.salesInvoiceItems.length,
: 0,
}) })
} }
async update(id: number, data: any) { async update(id: number, data: UpdateProductDto) {
const payload: any = { ...data } const { brandId, categoryId, ...rest } = data
if (Object.prototype.hasOwnProperty.call(payload, 'brandId')) {
if (payload.brandId === null) { const dataToUpdate = {
payload.brand = { disconnect: true } ...rest,
} else { brand:
payload.brand = { connect: { id: Number(payload.brandId) } } brandId === null
} ? { disconnect: true }
delete payload.brandId : brandId
} ? { connect: { id: Number(brandId) } }
if (Object.prototype.hasOwnProperty.call(payload, 'categoryId')) { : undefined,
if (payload.categoryId === null) { category:
payload.category = { disconnect: true } categoryId === null
} else { ? { disconnect: true }
payload.category = { connect: { id: Number(payload.categoryId) } } : categoryId
} ? { connect: { id: Number(categoryId) } }
delete payload.categoryId : undefined,
} }
const item = await this.prisma.product.update({ where: { id }, data: payload }) const item = await this.prisma.product.update({ where: { id }, data: dataToUpdate })
return ResponseMapper.update(item) return ResponseMapper.update(item)
} }