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:
@@ -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
@@ -7,7 +7,6 @@
|
||||
"@nestjs/platform-express": "^11.0.1",
|
||||
"@nestjs/swagger": "^11.2.3",
|
||||
"@prisma/adapter-mariadb": "^7.1.0",
|
||||
"@prisma/client": "^7.1.0",
|
||||
"class-transformer": "^0.5.1",
|
||||
"class-validator": "^0.14.3",
|
||||
"dayjs": "^1.11.19",
|
||||
@@ -25,6 +24,7 @@
|
||||
"@nestjs/cli": "^11.0.0",
|
||||
"@nestjs/schematics": "^11.0.0",
|
||||
"@nestjs/testing": "^11.0.1",
|
||||
"@prisma/client": "^7.2.0",
|
||||
"@types/express": "^5.0.0",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/node": "^22.10.7",
|
||||
@@ -36,7 +36,7 @@
|
||||
"jest": "^30.0.0",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier-plugin-prisma": "^5.0.0",
|
||||
"prisma": "^7.1.0",
|
||||
"prisma": "^7.2.0",
|
||||
"source-map-support": "^0.5.21",
|
||||
"supertest": "^7.0.0",
|
||||
"ts-jest": "^29.2.5",
|
||||
|
||||
Generated
+54
-49
@@ -26,9 +26,6 @@ importers:
|
||||
'@prisma/adapter-mariadb':
|
||||
specifier: ^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:
|
||||
specifier: ^0.5.1
|
||||
version: 0.5.1
|
||||
@@ -72,6 +69,9 @@ importers:
|
||||
'@nestjs/testing':
|
||||
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)
|
||||
'@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':
|
||||
specifier: ^5.0.0
|
||||
version: 5.0.6
|
||||
@@ -106,8 +106,8 @@ importers:
|
||||
specifier: ^5.0.0
|
||||
version: 5.0.0(prettier@3.7.4)
|
||||
prisma:
|
||||
specifier: ^7.1.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)
|
||||
specifier: ^7.2.0
|
||||
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:
|
||||
specifier: ^0.5.21
|
||||
version: 0.5.21
|
||||
@@ -1003,11 +1003,11 @@ packages:
|
||||
'@prisma/adapter-mariadb@7.1.0':
|
||||
resolution: {integrity: sha512-my5vKT6J4zRi5nNmLxosMafdQCk7tZgQHZ11mfaeFKh8xrJSEjFn0TFa1py8khHvFMvnadKUWdctjPpoJuxSBQ==}
|
||||
|
||||
'@prisma/client-runtime-utils@7.1.0':
|
||||
resolution: {integrity: sha512-39xmeBrNTN40FzF34aJMjfX1PowVCqoT3UKUWBBSP3aXV05NRqGBC3x2wCDs96ti6ZgdiVzqnRDHtbzU8X+lPQ==}
|
||||
'@prisma/client-runtime-utils@7.2.0':
|
||||
resolution: {integrity: sha512-dn7oB53v0tqkB0wBdMuTNFNPdEbfICEUe82Tn9FoKAhJCUkDH+fmyEp0ClciGh+9Hp2Tuu2K52kth2MTLstvmA==}
|
||||
|
||||
'@prisma/client@7.1.0':
|
||||
resolution: {integrity: sha512-qf7GPYHmS/xybNiSOpzv9wBo+UwqfL2PeyX+08v+KVHDI0AlSCQIh5bBySkH3alu06NX9wy98JEnckhMHoMFfA==}
|
||||
'@prisma/client@7.2.0':
|
||||
resolution: {integrity: sha512-JdLF8lWZ+LjKGKpBqyAlenxd/kXjd1Abf/xK+6vUA7R7L2Suo6AFTHFRpPSdAKCan9wzdFApsUpSa/F6+t1AtA==}
|
||||
engines: {node: ^20.19 || ^22.12 || >=24.0}
|
||||
peerDependencies:
|
||||
prisma: '*'
|
||||
@@ -1018,8 +1018,8 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
|
||||
'@prisma/config@7.1.0':
|
||||
resolution: {integrity: sha512-Uz+I43Wn1RYNHtuYtOhOnUcNMWp2Pd3GUDDKs37xlHptCGpzEG3MRR9L+8Y2ISMsMI24z/Ni+ww6OB/OO8M0sQ==}
|
||||
'@prisma/config@7.2.0':
|
||||
resolution: {integrity: sha512-qmvSnfQ6l/srBW1S7RZGfjTQhc44Yl3ldvU6y3pgmuLM+83SBDs6UQVgMtQuMRe9J3gGqB0RF8wER6RlXEr6jQ==}
|
||||
|
||||
'@prisma/debug@6.8.2':
|
||||
resolution: {integrity: sha512-4muBSSUwJJ9BYth5N8tqts8JtiLT8QI/RSAzEogwEfpbYGFo9mYsInsVo8dqXdPO2+Rm5OG5q0qWDDE3nyUbVg==}
|
||||
@@ -1027,26 +1027,29 @@ packages:
|
||||
'@prisma/debug@7.1.0':
|
||||
resolution: {integrity: sha512-pPAckG6etgAsEBusmZiFwM9bldLSNkn++YuC4jCTJACdK5hLOVnOzX7eSL2FgaU6Gomd6wIw21snUX2dYroMZQ==}
|
||||
|
||||
'@prisma/dev@0.15.0':
|
||||
resolution: {integrity: sha512-KhWaipnFlS/fWEs6I6Oqjcy2S08vKGmxJ5LexqUl/3Ve0EgLUsZwdKF0MvqPM5F5ttw8GtfZarjM5y7VLwv9Ow==}
|
||||
'@prisma/debug@7.2.0':
|
||||
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':
|
||||
resolution: {integrity: sha512-AlVLzeXkw81+47MvQ9M8DvTiHkRfJ8xzklTbYjpskb0cTTDVHboTI/OVwT6Wcep/bNvfLKJYO0nylBiM5rxgww==}
|
||||
|
||||
'@prisma/engines-version@7.1.0-6.ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba':
|
||||
resolution: {integrity: sha512-qZUevUh+yPhGT28rDQnV8V2kLnFjirzhVD67elRPIJHRsUV/mkII10HSrJrhK/U2GYgAxXR2VEREtq7AsfS8qw==}
|
||||
'@prisma/engines-version@7.2.0-4.0c8ef2ce45c83248ab3df073180d5eda9e8be7a3':
|
||||
resolution: {integrity: sha512-KezsjCZDsbjNR7SzIiVlUsn9PnLePI7r5uxABlwL+xoerurZTfgQVbIjvjF2sVr3Uc0ZcsnREw3F84HvbggGdA==}
|
||||
|
||||
'@prisma/engines@7.1.0':
|
||||
resolution: {integrity: sha512-KQlraOybdHAzVv45KWKJzpR9mJLkib7/TyApQpqrsL7FUHfgjIcy8jrVGt3iNfG6/GDDl+LNlJ84JSQwIfdzxA==}
|
||||
'@prisma/engines@7.2.0':
|
||||
resolution: {integrity: sha512-HUeOI/SvCDsHrR9QZn24cxxZcujOjcS3w1oW/XVhnSATAli5SRMOfp/WkG3TtT5rCxDA4xOnlJkW7xkho4nURA==}
|
||||
|
||||
'@prisma/fetch-engine@7.1.0':
|
||||
resolution: {integrity: sha512-GZYF5Q8kweXWGfn87hTu17kw7x1DgnehgKoE4Zg1BmHYF3y1Uu0QRY/qtSE4veH3g+LW8f9HKqA0tARG66bxxQ==}
|
||||
'@prisma/fetch-engine@7.2.0':
|
||||
resolution: {integrity: sha512-Z5XZztJ8Ap+wovpjPD2lQKnB8nWFGNouCrglaNFjxIWAGWz0oeHXwUJRiclIoSSXN/ptcs9/behptSk8d0Yy6w==}
|
||||
|
||||
'@prisma/get-platform@6.8.2':
|
||||
resolution: {integrity: sha512-vXSxyUgX3vm1Q70QwzwkjeYfRryIvKno1SXbIqwSptKwqKzskINnDUcx85oX+ys6ooN2ATGSD0xN2UTfg6Zcow==}
|
||||
|
||||
'@prisma/get-platform@7.1.0':
|
||||
resolution: {integrity: sha512-lq8hMdjKiZftuT5SssYB3EtQj8+YjL24/ZTLflQqzFquArKxBcyp6Xrblto+4lzIKJqnpOjfMiBjMvl7YuD7+Q==}
|
||||
'@prisma/get-platform@7.2.0':
|
||||
resolution: {integrity: sha512-k1V0l0Td1732EHpAfi2eySTezyllok9dXb6UQanajkJQzPUGi3vO2z7jdkz67SypFTdmbnyGYxvEvYZdZsMAVA==}
|
||||
|
||||
'@prisma/prisma-schema-wasm@4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f1991584':
|
||||
resolution: {integrity: sha512-JFdsnSgBPN8reDTLOI9Vh/6ccCb2aD1LbY/LWQnkcIgNo6IdpzvuM+qRVbBuA6IZP2SdqQI8Lu6RL2P8EFBQUA==}
|
||||
@@ -1054,8 +1057,8 @@ packages:
|
||||
'@prisma/query-plan-executor@6.18.0':
|
||||
resolution: {integrity: sha512-jZ8cfzFgL0jReE1R10gT8JLHtQxjWYLiQ//wHmVYZ2rVkFHoh0DT8IXsxcKcFlfKN7ak7k6j0XMNn2xVNyr5cA==}
|
||||
|
||||
'@prisma/studio-core@0.8.2':
|
||||
resolution: {integrity: sha512-/iAEWEUpTja+7gVMu1LtR2pPlvDmveAwMHdTWbDeGlT7yiv0ZTCPpmeAGdq/Y9aJ9Zj1cEGBXGRbmmNPj022PQ==}
|
||||
'@prisma/studio-core@0.9.0':
|
||||
resolution: {integrity: sha512-xA2zoR/ADu/NCSQuriBKTh6Ps4XjU0bErkEcgMfnSGh346K1VI7iWKnoq1l2DoxUqiddPHIEWwtxJ6xCHG6W7g==}
|
||||
peerDependencies:
|
||||
'@types/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==}
|
||||
engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0}
|
||||
|
||||
prisma@7.1.0:
|
||||
resolution: {integrity: sha512-dy/3urE4JjhdiW5b09pGjVhGI7kPESK2VlCDrCqeYK5m5SslAtG5FCGnZWP7E8Sdg+Ow1wV2mhJH5RTFL5gEsw==}
|
||||
prisma@7.2.0:
|
||||
resolution: {integrity: sha512-jSdHWgWOgFF24+nRyyNRVBIgGDQEsMEF8KPHvhBBg3jWyR9fUAK0Nq9ThUmiGlNgq2FA7vSk/ZoCvefod+a8qg==}
|
||||
engines: {node: ^20.19 || ^22.12 || >=24.0}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
@@ -4575,16 +4578,16 @@ snapshots:
|
||||
'@prisma/driver-adapter-utils': 7.1.0
|
||||
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:
|
||||
'@prisma/client-runtime-utils': 7.1.0
|
||||
'@prisma/client-runtime-utils': 7.2.0
|
||||
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
|
||||
|
||||
'@prisma/config@7.1.0':
|
||||
'@prisma/config@7.2.0':
|
||||
dependencies:
|
||||
c12: 3.1.0
|
||||
deepmerge-ts: 7.1.5
|
||||
@@ -4597,7 +4600,9 @@ snapshots:
|
||||
|
||||
'@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:
|
||||
'@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:
|
||||
'@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:
|
||||
'@prisma/debug': 7.1.0
|
||||
'@prisma/engines-version': 7.1.0-6.ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba
|
||||
'@prisma/fetch-engine': 7.1.0
|
||||
'@prisma/get-platform': 7.1.0
|
||||
'@prisma/debug': 7.2.0
|
||||
'@prisma/engines-version': 7.2.0-4.0c8ef2ce45c83248ab3df073180d5eda9e8be7a3
|
||||
'@prisma/fetch-engine': 7.2.0
|
||||
'@prisma/get-platform': 7.2.0
|
||||
|
||||
'@prisma/fetch-engine@7.1.0':
|
||||
'@prisma/fetch-engine@7.2.0':
|
||||
dependencies:
|
||||
'@prisma/debug': 7.1.0
|
||||
'@prisma/engines-version': 7.1.0-6.ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba
|
||||
'@prisma/get-platform': 7.1.0
|
||||
'@prisma/debug': 7.2.0
|
||||
'@prisma/engines-version': 7.2.0-4.0c8ef2ce45c83248ab3df073180d5eda9e8be7a3
|
||||
'@prisma/get-platform': 7.2.0
|
||||
|
||||
'@prisma/get-platform@6.8.2':
|
||||
dependencies:
|
||||
'@prisma/debug': 6.8.2
|
||||
|
||||
'@prisma/get-platform@7.1.0':
|
||||
'@prisma/get-platform@7.2.0':
|
||||
dependencies:
|
||||
'@prisma/debug': 7.1.0
|
||||
'@prisma/debug': 7.2.0
|
||||
|
||||
'@prisma/prisma-schema-wasm@4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f1991584': {}
|
||||
|
||||
'@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:
|
||||
'@types/react': 19.2.7
|
||||
react: 19.2.1
|
||||
@@ -6815,12 +6820,12 @@ snapshots:
|
||||
ansi-styles: 5.2.0
|
||||
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:
|
||||
'@prisma/config': 7.1.0
|
||||
'@prisma/dev': 0.15.0(typescript@5.9.3)
|
||||
'@prisma/engines': 7.1.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/config': 7.2.0
|
||||
'@prisma/dev': 0.17.0(typescript@5.9.3)
|
||||
'@prisma/engines': 7.2.0
|
||||
'@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
|
||||
postgres: 3.4.7
|
||||
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;
|
||||
@@ -10,7 +10,6 @@ model Inventory {
|
||||
inventoryTransfersFrom InventoryTransfer[] @relation("Inventory_From")
|
||||
inventoryTransfersTo InventoryTransfer[] @relation("Inventory_To")
|
||||
purchaseReceipts PurchaseReceipt[]
|
||||
salesInvoices SalesInvoice[] @relation("Inventory_SalesInvoices")
|
||||
stockAdjustments StockAdjustment[] @relation("Inventory_Stock_Adjustments")
|
||||
stockBalances StockBalance[] @relation("StockBalance_inventory")
|
||||
counterStockMovements StockMovement[] @relation("StockMovement_CounterInventory")
|
||||
@@ -24,9 +23,10 @@ model InventoryBankAccount {
|
||||
inventoryId Int
|
||||
bankAccountId Int
|
||||
|
||||
inventory Inventory @relation(fields: [inventoryId], references: [id])
|
||||
bankAccount BankAccount @relation(fields: [bankAccountId], references: [id])
|
||||
posAccounts PosAccount[]
|
||||
inventory Inventory @relation(fields: [inventoryId], references: [id])
|
||||
bankAccount BankAccount @relation(fields: [bankAccountId], references: [id])
|
||||
posAccounts PosAccount[]
|
||||
purchaseReceiptPayments PurchaseReceiptPayments[]
|
||||
|
||||
@@id([inventoryId, bankAccountId])
|
||||
@@index([bankAccountId])
|
||||
@@ -45,6 +45,7 @@ model PosAccount {
|
||||
deletedAt DateTime? @db.Timestamp(0)
|
||||
|
||||
inventoryBankAccount InventoryBankAccount @relation(fields: [inventoryId, bankAccountId], references: [inventoryId, bankAccountId])
|
||||
salesInvoices SalesInvoice[]
|
||||
|
||||
@@index([inventoryId])
|
||||
@@map("Pos_Accounts")
|
||||
|
||||
+22
-22
@@ -12,9 +12,9 @@ model Customer {
|
||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||
deletedAt DateTime? @db.Timestamp(0)
|
||||
orders Order[] @relation("Customer_Orders")
|
||||
salesInvoices SalesInvoice[] @relation("Customer_Sales_Invoices")
|
||||
stockMovements StockMovement[] @relation("StockMovement_Customer")
|
||||
orders Order[] @relation()
|
||||
stockMovements StockMovement[] @relation()
|
||||
salesInvoices SalesInvoice[]
|
||||
|
||||
@@map("Customers")
|
||||
}
|
||||
@@ -30,27 +30,27 @@ model Order {
|
||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||
deletedAt DateTime? @db.Timestamp(0)
|
||||
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")
|
||||
}
|
||||
|
||||
model SalesInvoice {
|
||||
id Int @id @default(autoincrement())
|
||||
code String @unique @db.VarChar(100)
|
||||
totalAmount Decimal @db.Decimal(15, 2)
|
||||
description String? @db.Text
|
||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||
customerId Int?
|
||||
inventoryId Int
|
||||
items SalesInvoiceItem[] @relation("SalesInvoice_Items")
|
||||
customer Customer? @relation("Customer_Sales_Invoices", fields: [customerId], references: [id])
|
||||
inventory Inventory @relation("Inventory_SalesInvoices", fields: [inventoryId], references: [id])
|
||||
id Int @id @default(autoincrement())
|
||||
code String @unique @db.VarChar(100)
|
||||
totalAmount Decimal @db.Decimal(15, 2)
|
||||
description String? @db.Text
|
||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||
customerId Int?
|
||||
posAccountId Int
|
||||
items SalesInvoiceItem[]
|
||||
customer Customer? @relation(fields: [customerId], references: [id])
|
||||
posAccount PosAccount @relation(fields: [posAccountId], references: [id])
|
||||
|
||||
@@index([inventoryId], map: "Sales_Invoices_inventoryId_fkey")
|
||||
@@index([customerId], map: "Sales_Invoices_customerId_fkey")
|
||||
@@index([customerId])
|
||||
@@index([posAccountId])
|
||||
@@map("Sales_Invoices")
|
||||
}
|
||||
|
||||
@@ -62,11 +62,11 @@ model SalesInvoiceItem {
|
||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||
invoiceId Int
|
||||
productId Int
|
||||
invoice SalesInvoice @relation("SalesInvoice_Items", fields: [invoiceId], references: [id])
|
||||
product Product @relation("Product_SalesInvoiceItems", fields: [productId], references: [id])
|
||||
invoice SalesInvoice @relation(fields: [invoiceId], references: [id])
|
||||
product Product @relation(fields: [productId], references: [id])
|
||||
|
||||
@@index([invoiceId], map: "Sales_Invoice_Items_invoiceId_fkey")
|
||||
@@index([productId], map: "Sales_Invoice_Items_productId_fkey")
|
||||
@@index([invoiceId])
|
||||
@@index([productId])
|
||||
@@map("Sales_Invoice_Items")
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ model ProductVariant {
|
||||
basePrice Decimal @db.Decimal(15, 2)
|
||||
salePrice Decimal @db.Decimal(15, 2)
|
||||
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)
|
||||
unit String? @db.VarChar(10)
|
||||
quantity Decimal? @default(0.00) @db.Decimal(10, 0)
|
||||
@@ -25,24 +25,24 @@ model Product {
|
||||
id Int @id @default(autoincrement())
|
||||
name String @db.VarChar(255)
|
||||
description String? @db.Text
|
||||
sku String? @unique(map: "products_sku_unique") @db.VarChar(100)
|
||||
barcode String? @unique(map: "products_barcode_unique") @db.VarChar(100)
|
||||
sku String? @unique() @db.VarChar(100)
|
||||
barcode String? @unique() @db.VarChar(100)
|
||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||
deletedAt DateTime? @db.Timestamp(0)
|
||||
brandId Int?
|
||||
categoryId Int?
|
||||
salePrice Decimal @default(0.00) @db.Decimal(15, 0)
|
||||
minimumStockAlertLevel Decimal @default(1.00) @db.Decimal(10, 0)
|
||||
inventoryTransferItems InventoryTransferItem[] @relation("InventoryTransferItem_Product")
|
||||
// productCharges ProductCharge[] @relation("Product_Charges")
|
||||
variants ProductVariant[] @relation("Product_Variant")
|
||||
brand ProductBrand? @relation("Product_Brand", fields: [brandId], references: [id], onUpdate: NoAction)
|
||||
category ProductCategory? @relation("Product_Category", fields: [categoryId], references: [id], onUpdate: NoAction)
|
||||
purchaseReceiptItems PurchaseReceiptItem[] @relation("Product_PurchaseReceiptItems")
|
||||
salesInvoiceItems SalesInvoiceItem[] @relation("Product_SalesInvoiceItems")
|
||||
stockAdjustments StockAdjustment[] @relation("Product_Stock_Adjustments")
|
||||
stockBalances StockBalance[] @relation("StockBalance_Product")
|
||||
stockMovements StockMovement[] @relation("StockMovement_Product")
|
||||
salesInvoiceItems SalesInvoiceItem[]
|
||||
|
||||
@@index([brandId], map: "Products_brandId_fkey")
|
||||
@@index([categoryId], map: "Products_categoryId_fkey")
|
||||
|
||||
@@ -47,8 +47,11 @@ model PurchaseReceiptPayments {
|
||||
description String? @db.Text
|
||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||
|
||||
receipt PurchaseReceipt @relation(fields: [receiptId], references: [id])
|
||||
bankAccount BankAccount @relation(fields: [bankAccountId], references: [id])
|
||||
receipt PurchaseReceipt @relation(fields: [receiptId], 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")
|
||||
@@map("Purchase_Receipt_Payments")
|
||||
|
||||
@@ -15,7 +15,7 @@ model StockMovement {
|
||||
counterInventoryId Int?
|
||||
customerId Int?
|
||||
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])
|
||||
product Product @relation("StockMovement_Product", fields: [productId], references: [id])
|
||||
supplier Supplier? @relation("StockMovement_Supplier", fields: [supplierId], references: [id])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- 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
|
||||
@@ -7,7 +7,6 @@
|
||||
-- Table: Inventory_Transfer_Items
|
||||
-- ------------------------------------------
|
||||
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
|
||||
|
||||
DECLARE fromInv INT;
|
||||
@@ -45,13 +44,12 @@ end;
|
||||
-- Table: Purchase_Receipt_Items
|
||||
-- ------------------------------------------
|
||||
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;
|
||||
|
||||
DECLARE invId INT;
|
||||
DECLARE suppId INT;
|
||||
|
||||
-- Get inventory & supplier from receipt
|
||||
-- Get inventory & supplier from
|
||||
SELECT inventoryId, supplierId
|
||||
INTO invId, suppId
|
||||
FROM Purchase_Receipts
|
||||
@@ -108,11 +106,12 @@ END;
|
||||
-- Table: Purchase_Receipt_Payments
|
||||
-- ------------------------------------------
|
||||
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
|
||||
DECLARE receiptTotal DECIMAL(14,2);
|
||||
DECLARE paid DECIMAL(14,2);
|
||||
|
||||
INSERT INTO Trigger_Logs (name , message) VALUES ('trigger' , 'started');
|
||||
|
||||
SELECT totalAmount, paidAmount
|
||||
INTO receiptTotal, paid
|
||||
FROM Purchase_Receipts
|
||||
@@ -131,19 +130,20 @@ END;
|
||||
-- Table: Purchase_Receipt_Payments
|
||||
-- ------------------------------------------
|
||||
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
|
||||
DECLARE receiptTotal DECIMAL(14,2) DEFAULT 0;
|
||||
DECLARE newPaid DECIMAL(14,2) DEFAULT 0;
|
||||
DECLARE supplierId INT;
|
||||
DECLARE lastBalance DECIMAL(14,2) DEFAULT 0;
|
||||
DECLARE receiptTotal DECIMAL(14,2) Default 0;
|
||||
DECLARE newPaid DECIMAL(14,2) Default 0;
|
||||
DECLARE _supplierId INT;
|
||||
DECLARE lastBalance DECIMAL(14,2)Default 0;
|
||||
|
||||
-- Lock receipt row
|
||||
SELECT COALESCE(totalAmount, 0), COALESCE(paidAmount, 0), supplierId
|
||||
INTO receiptTotal, newPaid, supplierId
|
||||
SELECT COALESCE(totalAmount, 0), COALESCE(paidAmount, 0), supplierId
|
||||
INTO receiptTotal, newPaid, _supplierId
|
||||
FROM Purchase_Receipts
|
||||
WHERE id = NEW.receiptId
|
||||
FOR UPDATE;
|
||||
|
||||
INSERT INTO Trigger_Logs (name, message) VALUES ('supplierId', _supplierId);
|
||||
|
||||
-- Apply payment or refund
|
||||
IF NEW.type = 'PAYMENT' THEN
|
||||
@@ -168,7 +168,7 @@ CREATE DEFINER=`pos`@`%` TRIGGER `trg_pr_payment_after_insert` AFTER INSERT ON `
|
||||
SELECT IFNULL(balance, 0)
|
||||
INTO lastBalance
|
||||
FROM Supplier_Ledger
|
||||
WHERE supplierId = supplierId
|
||||
WHERE supplierId = _supplierId
|
||||
ORDER BY id DESC
|
||||
LIMIT 1;
|
||||
|
||||
@@ -185,13 +185,13 @@ CREATE DEFINER=`pos`@`%` TRIGGER `trg_pr_payment_after_insert` AFTER INSERT ON `
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
supplierId,
|
||||
_supplierId,
|
||||
IF(NEW.type = 'REFUND', NEW.amount, 0),
|
||||
IF(NEW.type = 'PAYMENT', NEW.amount, 0),
|
||||
lastBalance
|
||||
+ IF(NEW.type = 'PAYMENT', NEW.amount, 0)
|
||||
- IF(NEW.type = 'REFUND', NEW.amount, 0),
|
||||
'PURCHASE_PAYMENT',
|
||||
'PAYMENT',
|
||||
NEW.id,
|
||||
NOW()
|
||||
);
|
||||
@@ -203,7 +203,6 @@ END;
|
||||
-- Table: Purchase_Receipt_Payments
|
||||
-- ------------------------------------------
|
||||
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
|
||||
DECLARE receiptTotal DECIMAL(14,2);
|
||||
DECLARE newPaid DECIMAL(14,2);
|
||||
@@ -238,7 +237,6 @@ END;
|
||||
-- Table: Purchase_Receipts
|
||||
-- ------------------------------------------
|
||||
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
|
||||
DECLARE lastBalance DECIMAL(14,2) DEFAULT 0;
|
||||
|
||||
@@ -277,16 +275,18 @@ END;
|
||||
-- Table: 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
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_sales_invoice_items_before_insert` BEFORE INSERT ON `Sales_Invoice_Items` FOR EACH ROW begin DECLARE current_stock DECIMAL(10, 2);
|
||||
|
||||
DECLARE inventory_id INT;
|
||||
DECLARE current_stock DECIMAL(10, 2);
|
||||
DECLARE inventory_id INT;
|
||||
|
||||
|
||||
SELECT inventoryId INTO inventory_id
|
||||
FROM Sales_Invoices si
|
||||
WHERE si.id = NEW.invoiceId
|
||||
LIMIT 1;
|
||||
|
||||
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
|
||||
@@ -307,17 +307,28 @@ end;
|
||||
-- Table: Sales_Invoice_Items
|
||||
-- ------------------------------------------
|
||||
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;
|
||||
|
||||
|
||||
SELECT inventoryId , customerId INTO inventory_id, customer_id
|
||||
|
||||
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
|
||||
@@ -354,7 +365,7 @@ DECLARE customer_id INT;
|
||||
WHEN NEW.count = 0 THEN 0
|
||||
ELSE NEW.total / NEW.count
|
||||
END,
|
||||
current_stock + NEW.count,
|
||||
current_stock - NEW.count,
|
||||
customer_id,
|
||||
NOW()
|
||||
);
|
||||
@@ -368,7 +379,6 @@ END;
|
||||
-- Table: Stock_Movements
|
||||
-- ------------------------------------------
|
||||
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
|
||||
INSERT INTO
|
||||
Stock_Balance (
|
||||
@@ -451,7 +461,6 @@ END;
|
||||
-- Table: Stock_Movements
|
||||
-- ------------------------------------------
|
||||
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
|
||||
|
||||
INSERT INTO
|
||||
@@ -486,7 +495,6 @@ END;
|
||||
-- Table: Stock_Movements
|
||||
-- ------------------------------------------
|
||||
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
|
||||
|
||||
INSERT INTO
|
||||
@@ -514,3 +522,4 @@ ON DUPLICATE KEY UPDATE
|
||||
END IF;
|
||||
|
||||
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
|
||||
* Query Engine version: ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba
|
||||
* Prisma Client JS version: 7.2.0
|
||||
* Query Engine version: 0c8ef2ce45c83248ab3df073180d5eda9e8be7a3
|
||||
*/
|
||||
export const prismaVersion: PrismaVersion = {
|
||||
client: "7.1.0",
|
||||
engine: "ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba"
|
||||
client: "7.2.0",
|
||||
engine: "0c8ef2ce45c83248ab3df073180d5eda9e8be7a3"
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2580,7 +2580,7 @@ export const SalesInvoiceScalarFieldEnum = {
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt',
|
||||
customerId: 'customerId',
|
||||
inventoryId: 'inventoryId'
|
||||
posAccountId: 'posAccountId'
|
||||
} as const
|
||||
|
||||
export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum]
|
||||
@@ -2642,7 +2642,8 @@ export const ProductScalarFieldEnum = {
|
||||
deletedAt: 'deletedAt',
|
||||
brandId: 'brandId',
|
||||
categoryId: 'categoryId',
|
||||
salePrice: 'salePrice'
|
||||
salePrice: 'salePrice',
|
||||
minimumStockAlertLevel: 'minimumStockAlertLevel'
|
||||
} as const
|
||||
|
||||
export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum]
|
||||
@@ -2713,7 +2714,9 @@ export const PurchaseReceiptPaymentsScalarFieldEnum = {
|
||||
receiptId: 'receiptId',
|
||||
payedAt: 'payedAt',
|
||||
description: 'description',
|
||||
createdAt: 'createdAt'
|
||||
createdAt: 'createdAt',
|
||||
inventoryBankAccountInventoryId: 'inventoryBankAccountInventoryId',
|
||||
inventoryBankAccountBankAccountId: 'inventoryBankAccountBankAccountId'
|
||||
} as const
|
||||
|
||||
export type PurchaseReceiptPaymentsScalarFieldEnum = (typeof PurchaseReceiptPaymentsScalarFieldEnum)[keyof typeof PurchaseReceiptPaymentsScalarFieldEnum]
|
||||
|
||||
@@ -293,7 +293,7 @@ export const SalesInvoiceScalarFieldEnum = {
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt',
|
||||
customerId: 'customerId',
|
||||
inventoryId: 'inventoryId'
|
||||
posAccountId: 'posAccountId'
|
||||
} as const
|
||||
|
||||
export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum]
|
||||
@@ -355,7 +355,8 @@ export const ProductScalarFieldEnum = {
|
||||
deletedAt: 'deletedAt',
|
||||
brandId: 'brandId',
|
||||
categoryId: 'categoryId',
|
||||
salePrice: 'salePrice'
|
||||
salePrice: 'salePrice',
|
||||
minimumStockAlertLevel: 'minimumStockAlertLevel'
|
||||
} as const
|
||||
|
||||
export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum]
|
||||
@@ -426,7 +427,9 @@ export const PurchaseReceiptPaymentsScalarFieldEnum = {
|
||||
receiptId: 'receiptId',
|
||||
payedAt: 'payedAt',
|
||||
description: 'description',
|
||||
createdAt: 'createdAt'
|
||||
createdAt: 'createdAt',
|
||||
inventoryBankAccountInventoryId: 'inventoryBankAccountInventoryId',
|
||||
inventoryBankAccountBankAccountId: 'inventoryBankAccountBankAccountId'
|
||||
} as const
|
||||
|
||||
export type PurchaseReceiptPaymentsScalarFieldEnum = (typeof PurchaseReceiptPaymentsScalarFieldEnum)[keyof typeof PurchaseReceiptPaymentsScalarFieldEnum]
|
||||
|
||||
@@ -281,8 +281,8 @@ export type CustomerWhereInput = {
|
||||
updatedAt?: Prisma.DateTimeFilter<"Customer"> | Date | string
|
||||
deletedAt?: Prisma.DateTimeNullableFilter<"Customer"> | Date | string | null
|
||||
orders?: Prisma.OrderListRelationFilter
|
||||
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
stockMovements?: Prisma.StockMovementListRelationFilter
|
||||
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
}
|
||||
|
||||
export type CustomerOrderByWithRelationInput = {
|
||||
@@ -300,8 +300,8 @@ export type CustomerOrderByWithRelationInput = {
|
||||
updatedAt?: Prisma.SortOrder
|
||||
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
orders?: Prisma.OrderOrderByRelationAggregateInput
|
||||
salesInvoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput
|
||||
stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput
|
||||
salesInvoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput
|
||||
_relevance?: Prisma.CustomerOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -323,8 +323,8 @@ export type CustomerWhereUniqueInput = Prisma.AtLeast<{
|
||||
updatedAt?: Prisma.DateTimeFilter<"Customer"> | Date | string
|
||||
deletedAt?: Prisma.DateTimeNullableFilter<"Customer"> | Date | string | null
|
||||
orders?: Prisma.OrderListRelationFilter
|
||||
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
stockMovements?: Prisma.StockMovementListRelationFilter
|
||||
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
}, "id" | "mobileNumber">
|
||||
|
||||
export type CustomerOrderByWithAggregationInput = {
|
||||
@@ -381,8 +381,8 @@ export type CustomerCreateInput = {
|
||||
updatedAt?: Date | string
|
||||
deletedAt?: Date | string | null
|
||||
orders?: Prisma.OrderCreateNestedManyWithoutCustomerInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput
|
||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutCustomerInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput
|
||||
}
|
||||
|
||||
export type CustomerUncheckedCreateInput = {
|
||||
@@ -400,8 +400,8 @@ export type CustomerUncheckedCreateInput = {
|
||||
updatedAt?: Date | string
|
||||
deletedAt?: Date | string | null
|
||||
orders?: Prisma.OrderUncheckedCreateNestedManyWithoutCustomerInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCustomerInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput
|
||||
}
|
||||
|
||||
export type CustomerUpdateInput = {
|
||||
@@ -418,8 +418,8 @@ export type CustomerUpdateInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
orders?: Prisma.OrderUpdateManyWithoutCustomerNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput
|
||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutCustomerNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput
|
||||
}
|
||||
|
||||
export type CustomerUncheckedUpdateInput = {
|
||||
@@ -437,8 +437,8 @@ export type CustomerUncheckedUpdateInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
orders?: Prisma.OrderUncheckedUpdateManyWithoutCustomerNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCustomerNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput
|
||||
}
|
||||
|
||||
export type CustomerCreateManyInput = {
|
||||
@@ -619,8 +619,8 @@ export type CustomerCreateWithoutOrdersInput = {
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
deletedAt?: Date | string | null
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput
|
||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutCustomerInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput
|
||||
}
|
||||
|
||||
export type CustomerUncheckedCreateWithoutOrdersInput = {
|
||||
@@ -637,8 +637,8 @@ export type CustomerUncheckedCreateWithoutOrdersInput = {
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
deletedAt?: Date | string | null
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCustomerInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput
|
||||
}
|
||||
|
||||
export type CustomerCreateOrConnectWithoutOrdersInput = {
|
||||
@@ -670,8 +670,8 @@ export type CustomerUpdateWithoutOrdersInput = {
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput
|
||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutCustomerNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput
|
||||
}
|
||||
|
||||
export type CustomerUncheckedUpdateWithoutOrdersInput = {
|
||||
@@ -688,8 +688,8 @@ export type CustomerUncheckedUpdateWithoutOrdersInput = {
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCustomerNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput
|
||||
}
|
||||
|
||||
export type CustomerCreateWithoutSalesInvoicesInput = {
|
||||
@@ -871,14 +871,14 @@ export type CustomerUncheckedUpdateWithoutStockMovementsInput = {
|
||||
|
||||
export type CustomerCountOutputType = {
|
||||
orders: number
|
||||
salesInvoices: number
|
||||
stockMovements: number
|
||||
salesInvoices: number
|
||||
}
|
||||
|
||||
export type CustomerCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
orders?: boolean | CustomerCountOutputTypeCountOrdersArgs
|
||||
salesInvoices?: boolean | CustomerCountOutputTypeCountSalesInvoicesArgs
|
||||
stockMovements?: boolean | CustomerCountOutputTypeCountStockMovementsArgs
|
||||
salesInvoices?: boolean | CustomerCountOutputTypeCountSalesInvoicesArgs
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -901,15 +901,15 @@ export type CustomerCountOutputTypeCountOrdersArgs<ExtArgs extends runtime.Types
|
||||
/**
|
||||
* CustomerCountOutputType without action
|
||||
*/
|
||||
export type CustomerCountOutputTypeCountSalesInvoicesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.SalesInvoiceWhereInput
|
||||
export type CustomerCountOutputTypeCountStockMovementsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.StockMovementWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* CustomerCountOutputType without action
|
||||
*/
|
||||
export type CustomerCountOutputTypeCountStockMovementsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.StockMovementWhereInput
|
||||
export type CustomerCountOutputTypeCountSalesInvoicesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.SalesInvoiceWhereInput
|
||||
}
|
||||
|
||||
|
||||
@@ -928,8 +928,8 @@ export type CustomerSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
updatedAt?: boolean
|
||||
deletedAt?: boolean
|
||||
orders?: boolean | Prisma.Customer$ordersArgs<ExtArgs>
|
||||
salesInvoices?: boolean | Prisma.Customer$salesInvoicesArgs<ExtArgs>
|
||||
stockMovements?: boolean | Prisma.Customer$stockMovementsArgs<ExtArgs>
|
||||
salesInvoices?: boolean | Prisma.Customer$salesInvoicesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.CustomerCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, 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 CustomerInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
orders?: boolean | Prisma.Customer$ordersArgs<ExtArgs>
|
||||
salesInvoices?: boolean | Prisma.Customer$salesInvoicesArgs<ExtArgs>
|
||||
stockMovements?: boolean | Prisma.Customer$stockMovementsArgs<ExtArgs>
|
||||
salesInvoices?: boolean | Prisma.Customer$salesInvoicesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.CustomerCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
@@ -963,8 +963,8 @@ export type $CustomerPayload<ExtArgs extends runtime.Types.Extensions.InternalAr
|
||||
name: "Customer"
|
||||
objects: {
|
||||
orders: Prisma.$OrderPayload<ExtArgs>[]
|
||||
salesInvoices: Prisma.$SalesInvoicePayload<ExtArgs>[]
|
||||
stockMovements: Prisma.$StockMovementPayload<ExtArgs>[]
|
||||
salesInvoices: Prisma.$SalesInvoicePayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
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> {
|
||||
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>
|
||||
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>
|
||||
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.
|
||||
* @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[]
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
@@ -1779,6 +1755,30 @@ export type Customer$stockMovementsArgs<ExtArgs extends runtime.Types.Extensions
|
||||
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
|
||||
*/
|
||||
|
||||
@@ -243,7 +243,6 @@ export type InventoryWhereInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferListRelationFilter
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferListRelationFilter
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptListRelationFilter
|
||||
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
stockAdjustments?: Prisma.StockAdjustmentListRelationFilter
|
||||
stockBalances?: Prisma.StockBalanceListRelationFilter
|
||||
counterStockMovements?: Prisma.StockMovementListRelationFilter
|
||||
@@ -263,7 +262,6 @@ export type InventoryOrderByWithRelationInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferOrderByRelationAggregateInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferOrderByRelationAggregateInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptOrderByRelationAggregateInput
|
||||
salesInvoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentOrderByRelationAggregateInput
|
||||
stockBalances?: Prisma.StockBalanceOrderByRelationAggregateInput
|
||||
counterStockMovements?: Prisma.StockMovementOrderByRelationAggregateInput
|
||||
@@ -287,7 +285,6 @@ export type InventoryWhereUniqueInput = Prisma.AtLeast<{
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferListRelationFilter
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferListRelationFilter
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptListRelationFilter
|
||||
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
stockAdjustments?: Prisma.StockAdjustmentListRelationFilter
|
||||
stockBalances?: Prisma.StockBalanceListRelationFilter
|
||||
counterStockMovements?: Prisma.StockMovementListRelationFilter
|
||||
@@ -336,7 +333,6 @@ export type InventoryCreateInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput
|
||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
|
||||
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
||||
@@ -356,7 +352,6 @@ export type InventoryUncheckedCreateInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
|
||||
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
||||
@@ -375,7 +370,6 @@ export type InventoryUpdateInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
|
||||
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
||||
@@ -395,7 +389,6 @@ export type InventoryUncheckedUpdateInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
||||
@@ -534,20 +527,6 @@ export type InventoryUpdateOneRequiredWithoutInventoryTransfersToNestedInput = {
|
||||
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 = {
|
||||
create?: Prisma.XOR<Prisma.InventoryCreateWithoutPurchaseReceiptsInput, Prisma.InventoryUncheckedCreateWithoutPurchaseReceiptsInput>
|
||||
connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutPurchaseReceiptsInput
|
||||
@@ -631,7 +610,6 @@ export type InventoryCreateWithoutInventoryBankAccountsInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput
|
||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
|
||||
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
||||
@@ -650,7 +628,6 @@ export type InventoryUncheckedCreateWithoutInventoryBankAccountsInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
|
||||
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
||||
@@ -684,7 +661,6 @@ export type InventoryUpdateWithoutInventoryBankAccountsInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
|
||||
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
||||
@@ -703,7 +679,6 @@ export type InventoryUncheckedUpdateWithoutInventoryBankAccountsInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
||||
@@ -720,7 +695,6 @@ export type InventoryCreateWithoutInventoryTransfersFromInput = {
|
||||
isPointOfSale?: boolean
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput
|
||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
|
||||
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
||||
@@ -739,7 +713,6 @@ export type InventoryUncheckedCreateWithoutInventoryTransfersFromInput = {
|
||||
isPointOfSale?: boolean
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
|
||||
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
||||
@@ -762,7 +735,6 @@ export type InventoryCreateWithoutInventoryTransfersToInput = {
|
||||
isPointOfSale?: boolean
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput
|
||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
|
||||
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
||||
@@ -781,7 +753,6 @@ export type InventoryUncheckedCreateWithoutInventoryTransfersToInput = {
|
||||
isPointOfSale?: boolean
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
|
||||
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
||||
@@ -815,7 +786,6 @@ export type InventoryUpdateWithoutInventoryTransfersFromInput = {
|
||||
isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
|
||||
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
||||
@@ -834,7 +804,6 @@ export type InventoryUncheckedUpdateWithoutInventoryTransfersFromInput = {
|
||||
isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
||||
@@ -863,7 +832,6 @@ export type InventoryUpdateWithoutInventoryTransfersToInput = {
|
||||
isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
|
||||
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
||||
@@ -882,97 +850,6 @@ export type InventoryUncheckedUpdateWithoutInventoryTransfersToInput = {
|
||||
isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput
|
||||
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
|
||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
||||
@@ -990,7 +867,6 @@ export type InventoryCreateWithoutPurchaseReceiptsInput = {
|
||||
isPointOfSale?: boolean
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput
|
||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
|
||||
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
||||
@@ -1009,7 +885,6 @@ export type InventoryUncheckedCreateWithoutPurchaseReceiptsInput = {
|
||||
isPointOfSale?: boolean
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
|
||||
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
||||
@@ -1043,7 +918,6 @@ export type InventoryUpdateWithoutPurchaseReceiptsInput = {
|
||||
isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
|
||||
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
||||
@@ -1062,7 +936,6 @@ export type InventoryUncheckedUpdateWithoutPurchaseReceiptsInput = {
|
||||
isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
||||
@@ -1081,7 +954,6 @@ export type InventoryCreateWithoutCounterStockMovementsInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput
|
||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
|
||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
|
||||
@@ -1100,7 +972,6 @@ export type InventoryUncheckedCreateWithoutCounterStockMovementsInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
|
||||
@@ -1123,7 +994,6 @@ export type InventoryCreateWithoutStockMovementsInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput
|
||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
|
||||
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
||||
@@ -1142,7 +1012,6 @@ export type InventoryUncheckedCreateWithoutStockMovementsInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
|
||||
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
||||
@@ -1176,7 +1045,6 @@ export type InventoryUpdateWithoutCounterStockMovementsInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
|
||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
|
||||
@@ -1195,7 +1063,6 @@ export type InventoryUncheckedUpdateWithoutCounterStockMovementsInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
@@ -1224,7 +1091,6 @@ export type InventoryUpdateWithoutStockMovementsInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
|
||||
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
||||
@@ -1243,7 +1109,6 @@ export type InventoryUncheckedUpdateWithoutStockMovementsInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
||||
@@ -1261,7 +1126,6 @@ export type InventoryCreateWithoutStockBalancesInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput
|
||||
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
|
||||
@@ -1280,7 +1144,6 @@ export type InventoryUncheckedCreateWithoutStockBalancesInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput
|
||||
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
|
||||
@@ -1314,7 +1177,6 @@ export type InventoryUpdateWithoutStockBalancesInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput
|
||||
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
|
||||
@@ -1333,7 +1195,6 @@ export type InventoryUncheckedUpdateWithoutStockBalancesInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
@@ -1351,7 +1212,6 @@ export type InventoryCreateWithoutStockAdjustmentsInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput
|
||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
|
||||
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
|
||||
@@ -1370,7 +1230,6 @@ export type InventoryUncheckedCreateWithoutStockAdjustmentsInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
|
||||
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
|
||||
@@ -1404,7 +1263,6 @@ export type InventoryUpdateWithoutStockAdjustmentsInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
|
||||
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
|
||||
@@ -1423,7 +1281,6 @@ export type InventoryUncheckedUpdateWithoutStockAdjustmentsInput = {
|
||||
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput
|
||||
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput
|
||||
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
|
||||
@@ -1439,7 +1296,6 @@ export type InventoryCountOutputType = {
|
||||
inventoryTransfersFrom: number
|
||||
inventoryTransfersTo: number
|
||||
purchaseReceipts: number
|
||||
salesInvoices: number
|
||||
stockAdjustments: number
|
||||
stockBalances: number
|
||||
counterStockMovements: number
|
||||
@@ -1451,7 +1307,6 @@ export type InventoryCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensi
|
||||
inventoryTransfersFrom?: boolean | InventoryCountOutputTypeCountInventoryTransfersFromArgs
|
||||
inventoryTransfersTo?: boolean | InventoryCountOutputTypeCountInventoryTransfersToArgs
|
||||
purchaseReceipts?: boolean | InventoryCountOutputTypeCountPurchaseReceiptsArgs
|
||||
salesInvoices?: boolean | InventoryCountOutputTypeCountSalesInvoicesArgs
|
||||
stockAdjustments?: boolean | InventoryCountOutputTypeCountStockAdjustmentsArgs
|
||||
stockBalances?: boolean | InventoryCountOutputTypeCountStockBalancesArgs
|
||||
counterStockMovements?: boolean | InventoryCountOutputTypeCountCounterStockMovementsArgs
|
||||
@@ -1490,13 +1345,6 @@ export type InventoryCountOutputTypeCountPurchaseReceiptsArgs<ExtArgs extends ru
|
||||
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
|
||||
*/
|
||||
@@ -1545,7 +1393,6 @@ export type InventorySelect<ExtArgs extends runtime.Types.Extensions.InternalArg
|
||||
inventoryTransfersFrom?: boolean | Prisma.Inventory$inventoryTransfersFromArgs<ExtArgs>
|
||||
inventoryTransfersTo?: boolean | Prisma.Inventory$inventoryTransfersToArgs<ExtArgs>
|
||||
purchaseReceipts?: boolean | Prisma.Inventory$purchaseReceiptsArgs<ExtArgs>
|
||||
salesInvoices?: boolean | Prisma.Inventory$salesInvoicesArgs<ExtArgs>
|
||||
stockAdjustments?: boolean | Prisma.Inventory$stockAdjustmentsArgs<ExtArgs>
|
||||
stockBalances?: boolean | Prisma.Inventory$stockBalancesArgs<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>
|
||||
inventoryTransfersTo?: boolean | Prisma.Inventory$inventoryTransfersToArgs<ExtArgs>
|
||||
purchaseReceipts?: boolean | Prisma.Inventory$purchaseReceiptsArgs<ExtArgs>
|
||||
salesInvoices?: boolean | Prisma.Inventory$salesInvoicesArgs<ExtArgs>
|
||||
stockAdjustments?: boolean | Prisma.Inventory$stockAdjustmentsArgs<ExtArgs>
|
||||
stockBalances?: boolean | Prisma.Inventory$stockBalancesArgs<ExtArgs>
|
||||
counterStockMovements?: boolean | Prisma.Inventory$counterStockMovementsArgs<ExtArgs>
|
||||
@@ -1587,7 +1433,6 @@ export type $InventoryPayload<ExtArgs extends runtime.Types.Extensions.InternalA
|
||||
inventoryTransfersFrom: Prisma.$InventoryTransferPayload<ExtArgs>[]
|
||||
inventoryTransfersTo: Prisma.$InventoryTransferPayload<ExtArgs>[]
|
||||
purchaseReceipts: Prisma.$PurchaseReceiptPayload<ExtArgs>[]
|
||||
salesInvoices: Prisma.$SalesInvoicePayload<ExtArgs>[]
|
||||
stockAdjustments: Prisma.$StockAdjustmentPayload<ExtArgs>[]
|
||||
stockBalances: Prisma.$StockBalancePayload<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>
|
||||
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>
|
||||
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>
|
||||
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>
|
||||
@@ -2403,30 +2247,6 @@ export type Inventory$purchaseReceiptsArgs<ExtArgs extends runtime.Types.Extensi
|
||||
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
|
||||
*/
|
||||
|
||||
@@ -199,6 +199,7 @@ export type InventoryBankAccountWhereInput = {
|
||||
inventory?: Prisma.XOR<Prisma.InventoryScalarRelationFilter, Prisma.InventoryWhereInput>
|
||||
bankAccount?: Prisma.XOR<Prisma.BankAccountScalarRelationFilter, Prisma.BankAccountWhereInput>
|
||||
posAccounts?: Prisma.PosAccountListRelationFilter
|
||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsListRelationFilter
|
||||
}
|
||||
|
||||
export type InventoryBankAccountOrderByWithRelationInput = {
|
||||
@@ -207,6 +208,7 @@ export type InventoryBankAccountOrderByWithRelationInput = {
|
||||
inventory?: Prisma.InventoryOrderByWithRelationInput
|
||||
bankAccount?: Prisma.BankAccountOrderByWithRelationInput
|
||||
posAccounts?: Prisma.PosAccountOrderByRelationAggregateInput
|
||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsOrderByRelationAggregateInput
|
||||
}
|
||||
|
||||
export type InventoryBankAccountWhereUniqueInput = Prisma.AtLeast<{
|
||||
@@ -219,6 +221,7 @@ export type InventoryBankAccountWhereUniqueInput = Prisma.AtLeast<{
|
||||
inventory?: Prisma.XOR<Prisma.InventoryScalarRelationFilter, Prisma.InventoryWhereInput>
|
||||
bankAccount?: Prisma.XOR<Prisma.BankAccountScalarRelationFilter, Prisma.BankAccountWhereInput>
|
||||
posAccounts?: Prisma.PosAccountListRelationFilter
|
||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsListRelationFilter
|
||||
}, "inventoryId_bankAccountId">
|
||||
|
||||
export type InventoryBankAccountOrderByWithAggregationInput = {
|
||||
@@ -243,24 +246,28 @@ export type InventoryBankAccountCreateInput = {
|
||||
inventory: Prisma.InventoryCreateNestedOneWithoutInventoryBankAccountsInput
|
||||
bankAccount: Prisma.BankAccountCreateNestedOneWithoutInventoryBankAccountsInput
|
||||
posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryBankAccountInput
|
||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutInventoryBankAccountInput
|
||||
}
|
||||
|
||||
export type InventoryBankAccountUncheckedCreateInput = {
|
||||
inventoryId: number
|
||||
bankAccountId: number
|
||||
posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryBankAccountInput
|
||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutInventoryBankAccountInput
|
||||
}
|
||||
|
||||
export type InventoryBankAccountUpdateInput = {
|
||||
inventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryBankAccountsNestedInput
|
||||
bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutInventoryBankAccountsNestedInput
|
||||
posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryBankAccountNestedInput
|
||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutInventoryBankAccountNestedInput
|
||||
}
|
||||
|
||||
export type InventoryBankAccountUncheckedUpdateInput = {
|
||||
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryBankAccountNestedInput
|
||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutInventoryBankAccountNestedInput
|
||||
}
|
||||
|
||||
export type InventoryBankAccountCreateManyInput = {
|
||||
@@ -322,6 +329,11 @@ export type InventoryBankAccountScalarRelationFilter = {
|
||||
isNot?: Prisma.InventoryBankAccountWhereInput
|
||||
}
|
||||
|
||||
export type InventoryBankAccountNullableScalarRelationFilter = {
|
||||
is?: Prisma.InventoryBankAccountWhereInput | null
|
||||
isNot?: Prisma.InventoryBankAccountWhereInput | null
|
||||
}
|
||||
|
||||
export type InventoryBankAccountCreateNestedManyWithoutBankAccountInput = {
|
||||
create?: Prisma.XOR<Prisma.InventoryBankAccountCreateWithoutBankAccountInput, Prisma.InventoryBankAccountUncheckedCreateWithoutBankAccountInput> | Prisma.InventoryBankAccountCreateWithoutBankAccountInput[] | Prisma.InventoryBankAccountUncheckedCreateWithoutBankAccountInput[]
|
||||
connectOrCreate?: Prisma.InventoryBankAccountCreateOrConnectWithoutBankAccountInput | Prisma.InventoryBankAccountCreateOrConnectWithoutBankAccountInput[]
|
||||
@@ -420,14 +432,32 @@ export type InventoryBankAccountUpdateOneRequiredWithoutPosAccountsNestedInput =
|
||||
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 = {
|
||||
inventory: Prisma.InventoryCreateNestedOneWithoutInventoryBankAccountsInput
|
||||
posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryBankAccountInput
|
||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutInventoryBankAccountInput
|
||||
}
|
||||
|
||||
export type InventoryBankAccountUncheckedCreateWithoutBankAccountInput = {
|
||||
inventoryId: number
|
||||
posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryBankAccountInput
|
||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutInventoryBankAccountInput
|
||||
}
|
||||
|
||||
export type InventoryBankAccountCreateOrConnectWithoutBankAccountInput = {
|
||||
@@ -467,11 +497,13 @@ export type InventoryBankAccountScalarWhereInput = {
|
||||
export type InventoryBankAccountCreateWithoutInventoryInput = {
|
||||
bankAccount: Prisma.BankAccountCreateNestedOneWithoutInventoryBankAccountsInput
|
||||
posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryBankAccountInput
|
||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutInventoryBankAccountInput
|
||||
}
|
||||
|
||||
export type InventoryBankAccountUncheckedCreateWithoutInventoryInput = {
|
||||
bankAccountId: number
|
||||
posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryBankAccountInput
|
||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutInventoryBankAccountInput
|
||||
}
|
||||
|
||||
export type InventoryBankAccountCreateOrConnectWithoutInventoryInput = {
|
||||
@@ -503,11 +535,13 @@ export type InventoryBankAccountUpdateManyWithWhereWithoutInventoryInput = {
|
||||
export type InventoryBankAccountCreateWithoutPosAccountsInput = {
|
||||
inventory: Prisma.InventoryCreateNestedOneWithoutInventoryBankAccountsInput
|
||||
bankAccount: Prisma.BankAccountCreateNestedOneWithoutInventoryBankAccountsInput
|
||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutInventoryBankAccountInput
|
||||
}
|
||||
|
||||
export type InventoryBankAccountUncheckedCreateWithoutPosAccountsInput = {
|
||||
inventoryId: number
|
||||
bankAccountId: number
|
||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutInventoryBankAccountInput
|
||||
}
|
||||
|
||||
export type InventoryBankAccountCreateOrConnectWithoutPosAccountsInput = {
|
||||
@@ -529,11 +563,53 @@ export type InventoryBankAccountUpdateToOneWithWhereWithoutPosAccountsInput = {
|
||||
export type InventoryBankAccountUpdateWithoutPosAccountsInput = {
|
||||
inventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryBankAccountsNestedInput
|
||||
bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutInventoryBankAccountsNestedInput
|
||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutInventoryBankAccountNestedInput
|
||||
}
|
||||
|
||||
export type InventoryBankAccountUncheckedUpdateWithoutPosAccountsInput = {
|
||||
inventoryId?: 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 = {
|
||||
@@ -543,11 +619,13 @@ export type InventoryBankAccountCreateManyBankAccountInput = {
|
||||
export type InventoryBankAccountUpdateWithoutBankAccountInput = {
|
||||
inventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryBankAccountsNestedInput
|
||||
posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryBankAccountNestedInput
|
||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutInventoryBankAccountNestedInput
|
||||
}
|
||||
|
||||
export type InventoryBankAccountUncheckedUpdateWithoutBankAccountInput = {
|
||||
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryBankAccountNestedInput
|
||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutInventoryBankAccountNestedInput
|
||||
}
|
||||
|
||||
export type InventoryBankAccountUncheckedUpdateManyWithoutBankAccountInput = {
|
||||
@@ -561,11 +639,13 @@ export type InventoryBankAccountCreateManyInventoryInput = {
|
||||
export type InventoryBankAccountUpdateWithoutInventoryInput = {
|
||||
bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutInventoryBankAccountsNestedInput
|
||||
posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryBankAccountNestedInput
|
||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutInventoryBankAccountNestedInput
|
||||
}
|
||||
|
||||
export type InventoryBankAccountUncheckedUpdateWithoutInventoryInput = {
|
||||
bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryBankAccountNestedInput
|
||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutInventoryBankAccountNestedInput
|
||||
}
|
||||
|
||||
export type InventoryBankAccountUncheckedUpdateManyWithoutInventoryInput = {
|
||||
@@ -579,10 +659,12 @@ export type InventoryBankAccountUncheckedUpdateManyWithoutInventoryInput = {
|
||||
|
||||
export type InventoryBankAccountCountOutputType = {
|
||||
posAccounts: number
|
||||
purchaseReceiptPayments: number
|
||||
}
|
||||
|
||||
export type InventoryBankAccountCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
posAccounts?: boolean | InventoryBankAccountCountOutputTypeCountPosAccountsArgs
|
||||
purchaseReceiptPayments?: boolean | InventoryBankAccountCountOutputTypeCountPurchaseReceiptPaymentsArgs
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -602,6 +684,13 @@ export type InventoryBankAccountCountOutputTypeCountPosAccountsArgs<ExtArgs exte
|
||||
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<{
|
||||
inventoryId?: boolean
|
||||
@@ -609,6 +698,7 @@ export type InventoryBankAccountSelect<ExtArgs extends runtime.Types.Extensions.
|
||||
inventory?: boolean | Prisma.InventoryDefaultArgs<ExtArgs>
|
||||
bankAccount?: boolean | Prisma.BankAccountDefaultArgs<ExtArgs>
|
||||
posAccounts?: boolean | Prisma.InventoryBankAccount$posAccountsArgs<ExtArgs>
|
||||
purchaseReceiptPayments?: boolean | Prisma.InventoryBankAccount$purchaseReceiptPaymentsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.InventoryBankAccountCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["inventoryBankAccount"]>
|
||||
|
||||
@@ -624,6 +714,7 @@ export type InventoryBankAccountInclude<ExtArgs extends runtime.Types.Extensions
|
||||
inventory?: boolean | Prisma.InventoryDefaultArgs<ExtArgs>
|
||||
bankAccount?: boolean | Prisma.BankAccountDefaultArgs<ExtArgs>
|
||||
posAccounts?: boolean | Prisma.InventoryBankAccount$posAccountsArgs<ExtArgs>
|
||||
purchaseReceiptPayments?: boolean | Prisma.InventoryBankAccount$purchaseReceiptPaymentsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.InventoryBankAccountCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
@@ -633,6 +724,7 @@ export type $InventoryBankAccountPayload<ExtArgs extends runtime.Types.Extension
|
||||
inventory: Prisma.$InventoryPayload<ExtArgs>
|
||||
bankAccount: Prisma.$BankAccountPayload<ExtArgs>
|
||||
posAccounts: Prisma.$PosAccountPayload<ExtArgs>[]
|
||||
purchaseReceiptPayments: Prisma.$PurchaseReceiptPaymentsPayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
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>
|
||||
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>
|
||||
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.
|
||||
* @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[]
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
||||
@@ -257,6 +257,7 @@ export type PosAccountWhereInput = {
|
||||
updatedAt?: Prisma.DateTimeFilter<"PosAccount"> | Date | string
|
||||
deletedAt?: Prisma.DateTimeNullableFilter<"PosAccount"> | Date | string | null
|
||||
inventoryBankAccount?: Prisma.XOR<Prisma.InventoryBankAccountScalarRelationFilter, Prisma.InventoryBankAccountWhereInput>
|
||||
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
}
|
||||
|
||||
export type PosAccountOrderByWithRelationInput = {
|
||||
@@ -270,6 +271,7 @@ export type PosAccountOrderByWithRelationInput = {
|
||||
updatedAt?: Prisma.SortOrder
|
||||
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
inventoryBankAccount?: Prisma.InventoryBankAccountOrderByWithRelationInput
|
||||
salesInvoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput
|
||||
_relevance?: Prisma.PosAccountOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -287,6 +289,7 @@ export type PosAccountWhereUniqueInput = Prisma.AtLeast<{
|
||||
updatedAt?: Prisma.DateTimeFilter<"PosAccount"> | Date | string
|
||||
deletedAt?: Prisma.DateTimeNullableFilter<"PosAccount"> | Date | string | null
|
||||
inventoryBankAccount?: Prisma.XOR<Prisma.InventoryBankAccountScalarRelationFilter, Prisma.InventoryBankAccountWhereInput>
|
||||
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
}, "id" | "code">
|
||||
|
||||
export type PosAccountOrderByWithAggregationInput = {
|
||||
@@ -329,6 +332,7 @@ export type PosAccountCreateInput = {
|
||||
updatedAt?: Date | string
|
||||
deletedAt?: Date | string | null
|
||||
inventoryBankAccount: Prisma.InventoryBankAccountCreateNestedOneWithoutPosAccountsInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutPosAccountInput
|
||||
}
|
||||
|
||||
export type PosAccountUncheckedCreateInput = {
|
||||
@@ -341,6 +345,7 @@ export type PosAccountUncheckedCreateInput = {
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
deletedAt?: Date | string | null
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutPosAccountInput
|
||||
}
|
||||
|
||||
export type PosAccountUpdateInput = {
|
||||
@@ -351,6 +356,7 @@ export type PosAccountUpdateInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
inventoryBankAccount?: Prisma.InventoryBankAccountUpdateOneRequiredWithoutPosAccountsNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutPosAccountNestedInput
|
||||
}
|
||||
|
||||
export type PosAccountUncheckedUpdateInput = {
|
||||
@@ -363,6 +369,7 @@ export type PosAccountUncheckedUpdateInput = {
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutPosAccountNestedInput
|
||||
}
|
||||
|
||||
export type PosAccountCreateManyInput = {
|
||||
@@ -462,6 +469,11 @@ export type PosAccountSumOrderByAggregateInput = {
|
||||
inventoryId?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type PosAccountScalarRelationFilter = {
|
||||
is?: Prisma.PosAccountWhereInput
|
||||
isNot?: Prisma.PosAccountWhereInput
|
||||
}
|
||||
|
||||
export type PosAccountCreateNestedManyWithoutInventoryBankAccountInput = {
|
||||
create?: Prisma.XOR<Prisma.PosAccountCreateWithoutInventoryBankAccountInput, Prisma.PosAccountUncheckedCreateWithoutInventoryBankAccountInput> | Prisma.PosAccountCreateWithoutInventoryBankAccountInput[] | Prisma.PosAccountUncheckedCreateWithoutInventoryBankAccountInput[]
|
||||
connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutInventoryBankAccountInput | Prisma.PosAccountCreateOrConnectWithoutInventoryBankAccountInput[]
|
||||
@@ -504,6 +516,20 @@ export type PosAccountUncheckedUpdateManyWithoutInventoryBankAccountNestedInput
|
||||
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 = {
|
||||
name: string
|
||||
code: string
|
||||
@@ -511,6 +537,7 @@ export type PosAccountCreateWithoutInventoryBankAccountInput = {
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
deletedAt?: Date | string | null
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutPosAccountInput
|
||||
}
|
||||
|
||||
export type PosAccountUncheckedCreateWithoutInventoryBankAccountInput = {
|
||||
@@ -521,6 +548,7 @@ export type PosAccountUncheckedCreateWithoutInventoryBankAccountInput = {
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
deletedAt?: Date | string | null
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutPosAccountInput
|
||||
}
|
||||
|
||||
export type PosAccountCreateOrConnectWithoutInventoryBankAccountInput = {
|
||||
@@ -564,6 +592,66 @@ export type PosAccountScalarWhereInput = {
|
||||
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 = {
|
||||
id?: number
|
||||
name: string
|
||||
@@ -581,6 +669,7 @@ export type PosAccountUpdateWithoutInventoryBankAccountInput = {
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutPosAccountNestedInput
|
||||
}
|
||||
|
||||
export type PosAccountUncheckedUpdateWithoutInventoryBankAccountInput = {
|
||||
@@ -591,6 +680,7 @@ export type PosAccountUncheckedUpdateWithoutInventoryBankAccountInput = {
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutPosAccountNestedInput
|
||||
}
|
||||
|
||||
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<{
|
||||
id?: boolean
|
||||
@@ -616,6 +735,8 @@ export type PosAccountSelect<ExtArgs extends runtime.Types.Extensions.InternalAr
|
||||
updatedAt?: boolean
|
||||
deletedAt?: boolean
|
||||
inventoryBankAccount?: boolean | Prisma.InventoryBankAccountDefaultArgs<ExtArgs>
|
||||
salesInvoices?: boolean | Prisma.PosAccount$salesInvoicesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.PosAccountCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, 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 PosAccountInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
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> = {
|
||||
name: "PosAccount"
|
||||
objects: {
|
||||
inventoryBankAccount: Prisma.$InventoryBankAccountPayload<ExtArgs>
|
||||
salesInvoices: Prisma.$SalesInvoicePayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
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> {
|
||||
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>
|
||||
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.
|
||||
* @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
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
||||
@@ -31,6 +31,7 @@ export type ProductAvgAggregateOutputType = {
|
||||
brandId: number | null
|
||||
categoryId: number | null
|
||||
salePrice: runtime.Decimal | null
|
||||
minimumStockAlertLevel: runtime.Decimal | null
|
||||
}
|
||||
|
||||
export type ProductSumAggregateOutputType = {
|
||||
@@ -38,6 +39,7 @@ export type ProductSumAggregateOutputType = {
|
||||
brandId: number | null
|
||||
categoryId: number | null
|
||||
salePrice: runtime.Decimal | null
|
||||
minimumStockAlertLevel: runtime.Decimal | null
|
||||
}
|
||||
|
||||
export type ProductMinAggregateOutputType = {
|
||||
@@ -52,6 +54,7 @@ export type ProductMinAggregateOutputType = {
|
||||
brandId: number | null
|
||||
categoryId: number | null
|
||||
salePrice: runtime.Decimal | null
|
||||
minimumStockAlertLevel: runtime.Decimal | null
|
||||
}
|
||||
|
||||
export type ProductMaxAggregateOutputType = {
|
||||
@@ -66,6 +69,7 @@ export type ProductMaxAggregateOutputType = {
|
||||
brandId: number | null
|
||||
categoryId: number | null
|
||||
salePrice: runtime.Decimal | null
|
||||
minimumStockAlertLevel: runtime.Decimal | null
|
||||
}
|
||||
|
||||
export type ProductCountAggregateOutputType = {
|
||||
@@ -80,6 +84,7 @@ export type ProductCountAggregateOutputType = {
|
||||
brandId: number
|
||||
categoryId: number
|
||||
salePrice: number
|
||||
minimumStockAlertLevel: number
|
||||
_all: number
|
||||
}
|
||||
|
||||
@@ -89,6 +94,7 @@ export type ProductAvgAggregateInputType = {
|
||||
brandId?: true
|
||||
categoryId?: true
|
||||
salePrice?: true
|
||||
minimumStockAlertLevel?: true
|
||||
}
|
||||
|
||||
export type ProductSumAggregateInputType = {
|
||||
@@ -96,6 +102,7 @@ export type ProductSumAggregateInputType = {
|
||||
brandId?: true
|
||||
categoryId?: true
|
||||
salePrice?: true
|
||||
minimumStockAlertLevel?: true
|
||||
}
|
||||
|
||||
export type ProductMinAggregateInputType = {
|
||||
@@ -110,6 +117,7 @@ export type ProductMinAggregateInputType = {
|
||||
brandId?: true
|
||||
categoryId?: true
|
||||
salePrice?: true
|
||||
minimumStockAlertLevel?: true
|
||||
}
|
||||
|
||||
export type ProductMaxAggregateInputType = {
|
||||
@@ -124,6 +132,7 @@ export type ProductMaxAggregateInputType = {
|
||||
brandId?: true
|
||||
categoryId?: true
|
||||
salePrice?: true
|
||||
minimumStockAlertLevel?: true
|
||||
}
|
||||
|
||||
export type ProductCountAggregateInputType = {
|
||||
@@ -138,6 +147,7 @@ export type ProductCountAggregateInputType = {
|
||||
brandId?: true
|
||||
categoryId?: true
|
||||
salePrice?: true
|
||||
minimumStockAlertLevel?: true
|
||||
_all?: true
|
||||
}
|
||||
|
||||
@@ -239,6 +249,7 @@ export type ProductGroupByOutputType = {
|
||||
brandId: number | null
|
||||
categoryId: number | null
|
||||
salePrice: runtime.Decimal
|
||||
minimumStockAlertLevel: runtime.Decimal
|
||||
_count: ProductCountAggregateOutputType | null
|
||||
_avg: ProductAvgAggregateOutputType | null
|
||||
_sum: ProductSumAggregateOutputType | null
|
||||
@@ -276,15 +287,16 @@ export type ProductWhereInput = {
|
||||
brandId?: Prisma.IntNullableFilter<"Product"> | number | null
|
||||
categoryId?: Prisma.IntNullableFilter<"Product"> | number | null
|
||||
salePrice?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemListRelationFilter
|
||||
variants?: Prisma.ProductVariantListRelationFilter
|
||||
brand?: Prisma.XOR<Prisma.ProductBrandNullableScalarRelationFilter, Prisma.ProductBrandWhereInput> | null
|
||||
category?: Prisma.XOR<Prisma.ProductCategoryNullableScalarRelationFilter, Prisma.ProductCategoryWhereInput> | null
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemListRelationFilter
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter
|
||||
stockAdjustments?: Prisma.StockAdjustmentListRelationFilter
|
||||
stockBalances?: Prisma.StockBalanceListRelationFilter
|
||||
stockMovements?: Prisma.StockMovementListRelationFilter
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter
|
||||
}
|
||||
|
||||
export type ProductOrderByWithRelationInput = {
|
||||
@@ -299,15 +311,16 @@ export type ProductOrderByWithRelationInput = {
|
||||
brandId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
categoryId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
salePrice?: Prisma.SortOrder
|
||||
minimumStockAlertLevel?: Prisma.SortOrder
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemOrderByRelationAggregateInput
|
||||
variants?: Prisma.ProductVariantOrderByRelationAggregateInput
|
||||
brand?: Prisma.ProductBrandOrderByWithRelationInput
|
||||
category?: Prisma.ProductCategoryOrderByWithRelationInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemOrderByRelationAggregateInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentOrderByRelationAggregateInput
|
||||
stockBalances?: Prisma.StockBalanceOrderByRelationAggregateInput
|
||||
stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput
|
||||
_relevance?: Prisma.ProductOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -326,15 +339,16 @@ export type ProductWhereUniqueInput = Prisma.AtLeast<{
|
||||
brandId?: Prisma.IntNullableFilter<"Product"> | number | null
|
||||
categoryId?: Prisma.IntNullableFilter<"Product"> | number | null
|
||||
salePrice?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemListRelationFilter
|
||||
variants?: Prisma.ProductVariantListRelationFilter
|
||||
brand?: Prisma.XOR<Prisma.ProductBrandNullableScalarRelationFilter, Prisma.ProductBrandWhereInput> | null
|
||||
category?: Prisma.XOR<Prisma.ProductCategoryNullableScalarRelationFilter, Prisma.ProductCategoryWhereInput> | null
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemListRelationFilter
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter
|
||||
stockAdjustments?: Prisma.StockAdjustmentListRelationFilter
|
||||
stockBalances?: Prisma.StockBalanceListRelationFilter
|
||||
stockMovements?: Prisma.StockMovementListRelationFilter
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter
|
||||
}, "id" | "sku" | "barcode">
|
||||
|
||||
export type ProductOrderByWithAggregationInput = {
|
||||
@@ -349,6 +363,7 @@ export type ProductOrderByWithAggregationInput = {
|
||||
brandId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
categoryId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
salePrice?: Prisma.SortOrder
|
||||
minimumStockAlertLevel?: Prisma.SortOrder
|
||||
_count?: Prisma.ProductCountOrderByAggregateInput
|
||||
_avg?: Prisma.ProductAvgOrderByAggregateInput
|
||||
_max?: Prisma.ProductMaxOrderByAggregateInput
|
||||
@@ -371,6 +386,7 @@ export type ProductScalarWhereWithAggregatesInput = {
|
||||
brandId?: Prisma.IntNullableWithAggregatesFilter<"Product"> | number | null
|
||||
categoryId?: Prisma.IntNullableWithAggregatesFilter<"Product"> | number | null
|
||||
salePrice?: Prisma.DecimalWithAggregatesFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalWithAggregatesFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
}
|
||||
|
||||
export type ProductCreateInput = {
|
||||
@@ -382,15 +398,16 @@ export type ProductCreateInput = {
|
||||
updatedAt?: Date | string
|
||||
deletedAt?: Date | string | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput
|
||||
variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput
|
||||
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput
|
||||
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
|
||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||
}
|
||||
|
||||
export type ProductUncheckedCreateInput = {
|
||||
@@ -405,13 +422,14 @@ export type ProductUncheckedCreateInput = {
|
||||
brandId?: number | null
|
||||
categoryId?: number | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput
|
||||
variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||
}
|
||||
|
||||
export type ProductUpdateInput = {
|
||||
@@ -423,15 +441,16 @@ export type ProductUpdateInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput
|
||||
variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput
|
||||
brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput
|
||||
category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||
}
|
||||
|
||||
export type ProductUncheckedUpdateInput = {
|
||||
@@ -446,13 +465,14 @@ export type ProductUncheckedUpdateInput = {
|
||||
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
}
|
||||
|
||||
export type ProductCreateManyInput = {
|
||||
@@ -467,6 +487,7 @@ export type ProductCreateManyInput = {
|
||||
brandId?: number | null
|
||||
categoryId?: number | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
}
|
||||
|
||||
export type ProductUpdateManyMutationInput = {
|
||||
@@ -478,6 +499,7 @@ export type ProductUpdateManyMutationInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
}
|
||||
|
||||
export type ProductUncheckedUpdateManyInput = {
|
||||
@@ -492,6 +514,7 @@ export type ProductUncheckedUpdateManyInput = {
|
||||
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
}
|
||||
|
||||
export type ProductScalarRelationFilter = {
|
||||
@@ -517,6 +540,7 @@ export type ProductCountOrderByAggregateInput = {
|
||||
brandId?: Prisma.SortOrder
|
||||
categoryId?: Prisma.SortOrder
|
||||
salePrice?: Prisma.SortOrder
|
||||
minimumStockAlertLevel?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type ProductAvgOrderByAggregateInput = {
|
||||
@@ -524,6 +548,7 @@ export type ProductAvgOrderByAggregateInput = {
|
||||
brandId?: Prisma.SortOrder
|
||||
categoryId?: Prisma.SortOrder
|
||||
salePrice?: Prisma.SortOrder
|
||||
minimumStockAlertLevel?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type ProductMaxOrderByAggregateInput = {
|
||||
@@ -538,6 +563,7 @@ export type ProductMaxOrderByAggregateInput = {
|
||||
brandId?: Prisma.SortOrder
|
||||
categoryId?: Prisma.SortOrder
|
||||
salePrice?: Prisma.SortOrder
|
||||
minimumStockAlertLevel?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type ProductMinOrderByAggregateInput = {
|
||||
@@ -552,6 +578,7 @@ export type ProductMinOrderByAggregateInput = {
|
||||
brandId?: Prisma.SortOrder
|
||||
categoryId?: Prisma.SortOrder
|
||||
salePrice?: Prisma.SortOrder
|
||||
minimumStockAlertLevel?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type ProductSumOrderByAggregateInput = {
|
||||
@@ -559,6 +586,7 @@ export type ProductSumOrderByAggregateInput = {
|
||||
brandId?: Prisma.SortOrder
|
||||
categoryId?: Prisma.SortOrder
|
||||
salePrice?: Prisma.SortOrder
|
||||
minimumStockAlertLevel?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type ProductListRelationFilter = {
|
||||
@@ -762,14 +790,15 @@ export type ProductCreateWithoutInventoryTransferItemsInput = {
|
||||
updatedAt?: Date | string
|
||||
deletedAt?: Date | string | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput
|
||||
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput
|
||||
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
|
||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||
}
|
||||
|
||||
export type ProductUncheckedCreateWithoutInventoryTransferItemsInput = {
|
||||
@@ -784,12 +813,13 @@ export type ProductUncheckedCreateWithoutInventoryTransferItemsInput = {
|
||||
brandId?: number | null
|
||||
categoryId?: number | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||
}
|
||||
|
||||
export type ProductCreateOrConnectWithoutInventoryTransferItemsInput = {
|
||||
@@ -817,14 +847,15 @@ export type ProductUpdateWithoutInventoryTransferItemsInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput
|
||||
brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput
|
||||
category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||
}
|
||||
|
||||
export type ProductUncheckedUpdateWithoutInventoryTransferItemsInput = {
|
||||
@@ -839,12 +870,13 @@ export type ProductUncheckedUpdateWithoutInventoryTransferItemsInput = {
|
||||
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
}
|
||||
|
||||
export type ProductCreateWithoutSalesInvoiceItemsInput = {
|
||||
@@ -856,6 +888,7 @@ export type ProductCreateWithoutSalesInvoiceItemsInput = {
|
||||
updatedAt?: Date | string
|
||||
deletedAt?: Date | string | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput
|
||||
variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput
|
||||
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput
|
||||
@@ -878,6 +911,7 @@ export type ProductUncheckedCreateWithoutSalesInvoiceItemsInput = {
|
||||
brandId?: number | null
|
||||
categoryId?: number | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput
|
||||
variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput
|
||||
@@ -911,6 +945,7 @@ export type ProductUpdateWithoutSalesInvoiceItemsInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput
|
||||
variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput
|
||||
brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput
|
||||
@@ -933,6 +968,7 @@ export type ProductUncheckedUpdateWithoutSalesInvoiceItemsInput = {
|
||||
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
@@ -950,14 +986,15 @@ export type ProductCreateWithoutVariantsInput = {
|
||||
updatedAt?: Date | string
|
||||
deletedAt?: Date | string | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput
|
||||
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput
|
||||
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
|
||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||
}
|
||||
|
||||
export type ProductUncheckedCreateWithoutVariantsInput = {
|
||||
@@ -972,12 +1009,13 @@ export type ProductUncheckedCreateWithoutVariantsInput = {
|
||||
brandId?: number | null
|
||||
categoryId?: number | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||
}
|
||||
|
||||
export type ProductCreateOrConnectWithoutVariantsInput = {
|
||||
@@ -1005,14 +1043,15 @@ export type ProductUpdateWithoutVariantsInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput
|
||||
brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput
|
||||
category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||
}
|
||||
|
||||
export type ProductUncheckedUpdateWithoutVariantsInput = {
|
||||
@@ -1027,12 +1066,13 @@ export type ProductUncheckedUpdateWithoutVariantsInput = {
|
||||
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
}
|
||||
|
||||
export type ProductCreateWithoutBrandInput = {
|
||||
@@ -1044,14 +1084,15 @@ export type ProductCreateWithoutBrandInput = {
|
||||
updatedAt?: Date | string
|
||||
deletedAt?: Date | string | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput
|
||||
variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput
|
||||
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
|
||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||
}
|
||||
|
||||
export type ProductUncheckedCreateWithoutBrandInput = {
|
||||
@@ -1065,13 +1106,14 @@ export type ProductUncheckedCreateWithoutBrandInput = {
|
||||
deletedAt?: Date | string | null
|
||||
categoryId?: number | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput
|
||||
variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||
}
|
||||
|
||||
export type ProductCreateOrConnectWithoutBrandInput = {
|
||||
@@ -1115,6 +1157,7 @@ export type ProductScalarWhereInput = {
|
||||
brandId?: Prisma.IntNullableFilter<"Product"> | number | null
|
||||
categoryId?: Prisma.IntNullableFilter<"Product"> | number | null
|
||||
salePrice?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
}
|
||||
|
||||
export type ProductCreateWithoutCategoryInput = {
|
||||
@@ -1126,14 +1169,15 @@ export type ProductCreateWithoutCategoryInput = {
|
||||
updatedAt?: Date | string
|
||||
deletedAt?: Date | string | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput
|
||||
variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput
|
||||
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
|
||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||
}
|
||||
|
||||
export type ProductUncheckedCreateWithoutCategoryInput = {
|
||||
@@ -1147,13 +1191,14 @@ export type ProductUncheckedCreateWithoutCategoryInput = {
|
||||
deletedAt?: Date | string | null
|
||||
brandId?: number | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput
|
||||
variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||
}
|
||||
|
||||
export type ProductCreateOrConnectWithoutCategoryInput = {
|
||||
@@ -1191,14 +1236,15 @@ export type ProductCreateWithoutPurchaseReceiptItemsInput = {
|
||||
updatedAt?: Date | string
|
||||
deletedAt?: Date | string | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput
|
||||
variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput
|
||||
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput
|
||||
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
|
||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||
}
|
||||
|
||||
export type ProductUncheckedCreateWithoutPurchaseReceiptItemsInput = {
|
||||
@@ -1213,12 +1259,13 @@ export type ProductUncheckedCreateWithoutPurchaseReceiptItemsInput = {
|
||||
brandId?: number | null
|
||||
categoryId?: number | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput
|
||||
variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||
}
|
||||
|
||||
export type ProductCreateOrConnectWithoutPurchaseReceiptItemsInput = {
|
||||
@@ -1246,14 +1293,15 @@ export type ProductUpdateWithoutPurchaseReceiptItemsInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput
|
||||
variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput
|
||||
brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput
|
||||
category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||
}
|
||||
|
||||
export type ProductUncheckedUpdateWithoutPurchaseReceiptItemsInput = {
|
||||
@@ -1268,12 +1316,13 @@ export type ProductUncheckedUpdateWithoutPurchaseReceiptItemsInput = {
|
||||
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
}
|
||||
|
||||
export type ProductCreateWithoutStockMovementsInput = {
|
||||
@@ -1285,14 +1334,15 @@ export type ProductCreateWithoutStockMovementsInput = {
|
||||
updatedAt?: Date | string
|
||||
deletedAt?: Date | string | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput
|
||||
variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput
|
||||
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput
|
||||
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
|
||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||
}
|
||||
|
||||
export type ProductUncheckedCreateWithoutStockMovementsInput = {
|
||||
@@ -1307,12 +1357,13 @@ export type ProductUncheckedCreateWithoutStockMovementsInput = {
|
||||
brandId?: number | null
|
||||
categoryId?: number | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput
|
||||
variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||
}
|
||||
|
||||
export type ProductCreateOrConnectWithoutStockMovementsInput = {
|
||||
@@ -1340,14 +1391,15 @@ export type ProductUpdateWithoutStockMovementsInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput
|
||||
variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput
|
||||
brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput
|
||||
category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||
}
|
||||
|
||||
export type ProductUncheckedUpdateWithoutStockMovementsInput = {
|
||||
@@ -1362,12 +1414,13 @@ export type ProductUncheckedUpdateWithoutStockMovementsInput = {
|
||||
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
}
|
||||
|
||||
export type ProductCreateWithoutStockBalancesInput = {
|
||||
@@ -1379,14 +1432,15 @@ export type ProductCreateWithoutStockBalancesInput = {
|
||||
updatedAt?: Date | string
|
||||
deletedAt?: Date | string | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput
|
||||
variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput
|
||||
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput
|
||||
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
|
||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||
}
|
||||
|
||||
export type ProductUncheckedCreateWithoutStockBalancesInput = {
|
||||
@@ -1401,12 +1455,13 @@ export type ProductUncheckedCreateWithoutStockBalancesInput = {
|
||||
brandId?: number | null
|
||||
categoryId?: number | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput
|
||||
variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||
}
|
||||
|
||||
export type ProductCreateOrConnectWithoutStockBalancesInput = {
|
||||
@@ -1434,14 +1489,15 @@ export type ProductUpdateWithoutStockBalancesInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput
|
||||
variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput
|
||||
brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput
|
||||
category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
|
||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||
}
|
||||
|
||||
export type ProductUncheckedUpdateWithoutStockBalancesInput = {
|
||||
@@ -1456,12 +1512,13 @@ export type ProductUncheckedUpdateWithoutStockBalancesInput = {
|
||||
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
}
|
||||
|
||||
export type ProductCreateWithoutStockAdjustmentsInput = {
|
||||
@@ -1473,14 +1530,15 @@ export type ProductCreateWithoutStockAdjustmentsInput = {
|
||||
updatedAt?: Date | string
|
||||
deletedAt?: Date | string | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput
|
||||
variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput
|
||||
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput
|
||||
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||
}
|
||||
|
||||
export type ProductUncheckedCreateWithoutStockAdjustmentsInput = {
|
||||
@@ -1495,12 +1553,13 @@ export type ProductUncheckedCreateWithoutStockAdjustmentsInput = {
|
||||
brandId?: number | null
|
||||
categoryId?: number | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput
|
||||
variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||
}
|
||||
|
||||
export type ProductCreateOrConnectWithoutStockAdjustmentsInput = {
|
||||
@@ -1528,14 +1587,15 @@ export type ProductUpdateWithoutStockAdjustmentsInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput
|
||||
variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput
|
||||
brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput
|
||||
category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||
}
|
||||
|
||||
export type ProductUncheckedUpdateWithoutStockAdjustmentsInput = {
|
||||
@@ -1550,12 +1610,13 @@ export type ProductUncheckedUpdateWithoutStockAdjustmentsInput = {
|
||||
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
}
|
||||
|
||||
export type ProductCreateManyBrandInput = {
|
||||
@@ -1569,6 +1630,7 @@ export type ProductCreateManyBrandInput = {
|
||||
deletedAt?: Date | string | null
|
||||
categoryId?: number | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
}
|
||||
|
||||
export type ProductUpdateWithoutBrandInput = {
|
||||
@@ -1580,14 +1642,15 @@ export type ProductUpdateWithoutBrandInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput
|
||||
variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput
|
||||
category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||
}
|
||||
|
||||
export type ProductUncheckedUpdateWithoutBrandInput = {
|
||||
@@ -1601,13 +1664,14 @@ export type ProductUncheckedUpdateWithoutBrandInput = {
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
}
|
||||
|
||||
export type ProductUncheckedUpdateManyWithoutBrandInput = {
|
||||
@@ -1621,6 +1685,7 @@ export type ProductUncheckedUpdateManyWithoutBrandInput = {
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
}
|
||||
|
||||
export type ProductCreateManyCategoryInput = {
|
||||
@@ -1634,6 +1699,7 @@ export type ProductCreateManyCategoryInput = {
|
||||
deletedAt?: Date | string | null
|
||||
brandId?: number | null
|
||||
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
}
|
||||
|
||||
export type ProductUpdateWithoutCategoryInput = {
|
||||
@@ -1645,14 +1711,15 @@ export type ProductUpdateWithoutCategoryInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput
|
||||
variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput
|
||||
brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||
}
|
||||
|
||||
export type ProductUncheckedUpdateWithoutCategoryInput = {
|
||||
@@ -1666,13 +1733,14 @@ export type ProductUncheckedUpdateWithoutCategoryInput = {
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput
|
||||
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||
}
|
||||
|
||||
export type ProductUncheckedUpdateManyWithoutCategoryInput = {
|
||||
@@ -1686,6 +1754,7 @@ export type ProductUncheckedUpdateManyWithoutCategoryInput = {
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
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
|
||||
variants: number
|
||||
purchaseReceiptItems: number
|
||||
salesInvoiceItems: number
|
||||
stockAdjustments: number
|
||||
stockBalances: number
|
||||
stockMovements: number
|
||||
salesInvoiceItems: number
|
||||
}
|
||||
|
||||
export type ProductCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
inventoryTransferItems?: boolean | ProductCountOutputTypeCountInventoryTransferItemsArgs
|
||||
variants?: boolean | ProductCountOutputTypeCountVariantsArgs
|
||||
purchaseReceiptItems?: boolean | ProductCountOutputTypeCountPurchaseReceiptItemsArgs
|
||||
salesInvoiceItems?: boolean | ProductCountOutputTypeCountSalesInvoiceItemsArgs
|
||||
stockAdjustments?: boolean | ProductCountOutputTypeCountStockAdjustmentsArgs
|
||||
stockBalances?: boolean | ProductCountOutputTypeCountStockBalancesArgs
|
||||
stockMovements?: boolean | ProductCountOutputTypeCountStockMovementsArgs
|
||||
salesInvoiceItems?: boolean | ProductCountOutputTypeCountSalesInvoiceItemsArgs
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1744,13 +1813,6 @@ export type ProductCountOutputTypeCountPurchaseReceiptItemsArgs<ExtArgs extends
|
||||
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
|
||||
*/
|
||||
@@ -1772,6 +1834,13 @@ export type ProductCountOutputTypeCountStockMovementsArgs<ExtArgs extends runtim
|
||||
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<{
|
||||
id?: boolean
|
||||
@@ -1785,15 +1854,16 @@ export type ProductSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
brandId?: boolean
|
||||
categoryId?: boolean
|
||||
salePrice?: boolean
|
||||
minimumStockAlertLevel?: boolean
|
||||
inventoryTransferItems?: boolean | Prisma.Product$inventoryTransferItemsArgs<ExtArgs>
|
||||
variants?: boolean | Prisma.Product$variantsArgs<ExtArgs>
|
||||
brand?: boolean | Prisma.Product$brandArgs<ExtArgs>
|
||||
category?: boolean | Prisma.Product$categoryArgs<ExtArgs>
|
||||
purchaseReceiptItems?: boolean | Prisma.Product$purchaseReceiptItemsArgs<ExtArgs>
|
||||
salesInvoiceItems?: boolean | Prisma.Product$salesInvoiceItemsArgs<ExtArgs>
|
||||
stockAdjustments?: boolean | Prisma.Product$stockAdjustmentsArgs<ExtArgs>
|
||||
stockBalances?: boolean | Prisma.Product$stockBalancesArgs<ExtArgs>
|
||||
stockMovements?: boolean | Prisma.Product$stockMovementsArgs<ExtArgs>
|
||||
salesInvoiceItems?: boolean | Prisma.Product$salesInvoiceItemsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.ProductCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["product"]>
|
||||
|
||||
@@ -1811,19 +1881,20 @@ export type ProductSelectScalar = {
|
||||
brandId?: boolean
|
||||
categoryId?: 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> = {
|
||||
inventoryTransferItems?: boolean | Prisma.Product$inventoryTransferItemsArgs<ExtArgs>
|
||||
variants?: boolean | Prisma.Product$variantsArgs<ExtArgs>
|
||||
brand?: boolean | Prisma.Product$brandArgs<ExtArgs>
|
||||
category?: boolean | Prisma.Product$categoryArgs<ExtArgs>
|
||||
purchaseReceiptItems?: boolean | Prisma.Product$purchaseReceiptItemsArgs<ExtArgs>
|
||||
salesInvoiceItems?: boolean | Prisma.Product$salesInvoiceItemsArgs<ExtArgs>
|
||||
stockAdjustments?: boolean | Prisma.Product$stockAdjustmentsArgs<ExtArgs>
|
||||
stockBalances?: boolean | Prisma.Product$stockBalancesArgs<ExtArgs>
|
||||
stockMovements?: boolean | Prisma.Product$stockMovementsArgs<ExtArgs>
|
||||
salesInvoiceItems?: boolean | Prisma.Product$salesInvoiceItemsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.ProductCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
@@ -1835,10 +1906,10 @@ export type $ProductPayload<ExtArgs extends runtime.Types.Extensions.InternalArg
|
||||
brand: Prisma.$ProductBrandPayload<ExtArgs> | null
|
||||
category: Prisma.$ProductCategoryPayload<ExtArgs> | null
|
||||
purchaseReceiptItems: Prisma.$PurchaseReceiptItemPayload<ExtArgs>[]
|
||||
salesInvoiceItems: Prisma.$SalesInvoiceItemPayload<ExtArgs>[]
|
||||
stockAdjustments: Prisma.$StockAdjustmentPayload<ExtArgs>[]
|
||||
stockBalances: Prisma.$StockBalancePayload<ExtArgs>[]
|
||||
stockMovements: Prisma.$StockMovementPayload<ExtArgs>[]
|
||||
salesInvoiceItems: Prisma.$SalesInvoiceItemPayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: number
|
||||
@@ -1852,6 +1923,7 @@ export type $ProductPayload<ExtArgs extends runtime.Types.Extensions.InternalArg
|
||||
brandId: number | null
|
||||
categoryId: number | null
|
||||
salePrice: runtime.Decimal
|
||||
minimumStockAlertLevel: runtime.Decimal
|
||||
}, ExtArgs["result"]["product"]>
|
||||
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>
|
||||
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>
|
||||
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>
|
||||
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>
|
||||
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.
|
||||
* @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 categoryId: Prisma.FieldRef<"Product", 'Int'>
|
||||
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[]
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
@@ -2789,6 +2838,30 @@ export type Product$stockMovementsArgs<ExtArgs extends runtime.Types.Extensions.
|
||||
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
|
||||
*/
|
||||
|
||||
@@ -31,6 +31,8 @@ export type PurchaseReceiptPaymentsAvgAggregateOutputType = {
|
||||
amount: runtime.Decimal | null
|
||||
bankAccountId: number | null
|
||||
receiptId: number | null
|
||||
inventoryBankAccountInventoryId: number | null
|
||||
inventoryBankAccountBankAccountId: number | null
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsSumAggregateOutputType = {
|
||||
@@ -38,6 +40,8 @@ export type PurchaseReceiptPaymentsSumAggregateOutputType = {
|
||||
amount: runtime.Decimal | null
|
||||
bankAccountId: number | null
|
||||
receiptId: number | null
|
||||
inventoryBankAccountInventoryId: number | null
|
||||
inventoryBankAccountBankAccountId: number | null
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsMinAggregateOutputType = {
|
||||
@@ -50,6 +54,8 @@ export type PurchaseReceiptPaymentsMinAggregateOutputType = {
|
||||
payedAt: Date | null
|
||||
description: string | null
|
||||
createdAt: Date | null
|
||||
inventoryBankAccountInventoryId: number | null
|
||||
inventoryBankAccountBankAccountId: number | null
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsMaxAggregateOutputType = {
|
||||
@@ -62,6 +68,8 @@ export type PurchaseReceiptPaymentsMaxAggregateOutputType = {
|
||||
payedAt: Date | null
|
||||
description: string | null
|
||||
createdAt: Date | null
|
||||
inventoryBankAccountInventoryId: number | null
|
||||
inventoryBankAccountBankAccountId: number | null
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsCountAggregateOutputType = {
|
||||
@@ -74,6 +82,8 @@ export type PurchaseReceiptPaymentsCountAggregateOutputType = {
|
||||
payedAt: number
|
||||
description: number
|
||||
createdAt: number
|
||||
inventoryBankAccountInventoryId: number
|
||||
inventoryBankAccountBankAccountId: number
|
||||
_all: number
|
||||
}
|
||||
|
||||
@@ -83,6 +93,8 @@ export type PurchaseReceiptPaymentsAvgAggregateInputType = {
|
||||
amount?: true
|
||||
bankAccountId?: true
|
||||
receiptId?: true
|
||||
inventoryBankAccountInventoryId?: true
|
||||
inventoryBankAccountBankAccountId?: true
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsSumAggregateInputType = {
|
||||
@@ -90,6 +102,8 @@ export type PurchaseReceiptPaymentsSumAggregateInputType = {
|
||||
amount?: true
|
||||
bankAccountId?: true
|
||||
receiptId?: true
|
||||
inventoryBankAccountInventoryId?: true
|
||||
inventoryBankAccountBankAccountId?: true
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsMinAggregateInputType = {
|
||||
@@ -102,6 +116,8 @@ export type PurchaseReceiptPaymentsMinAggregateInputType = {
|
||||
payedAt?: true
|
||||
description?: true
|
||||
createdAt?: true
|
||||
inventoryBankAccountInventoryId?: true
|
||||
inventoryBankAccountBankAccountId?: true
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsMaxAggregateInputType = {
|
||||
@@ -114,6 +130,8 @@ export type PurchaseReceiptPaymentsMaxAggregateInputType = {
|
||||
payedAt?: true
|
||||
description?: true
|
||||
createdAt?: true
|
||||
inventoryBankAccountInventoryId?: true
|
||||
inventoryBankAccountBankAccountId?: true
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsCountAggregateInputType = {
|
||||
@@ -126,6 +144,8 @@ export type PurchaseReceiptPaymentsCountAggregateInputType = {
|
||||
payedAt?: true
|
||||
description?: true
|
||||
createdAt?: true
|
||||
inventoryBankAccountInventoryId?: true
|
||||
inventoryBankAccountBankAccountId?: true
|
||||
_all?: true
|
||||
}
|
||||
|
||||
@@ -225,6 +245,8 @@ export type PurchaseReceiptPaymentsGroupByOutputType = {
|
||||
payedAt: Date
|
||||
description: string | null
|
||||
createdAt: Date
|
||||
inventoryBankAccountInventoryId: number | null
|
||||
inventoryBankAccountBankAccountId: number | null
|
||||
_count: PurchaseReceiptPaymentsCountAggregateOutputType | null
|
||||
_avg: PurchaseReceiptPaymentsAvgAggregateOutputType | null
|
||||
_sum: PurchaseReceiptPaymentsSumAggregateOutputType | null
|
||||
@@ -260,8 +282,11 @@ export type PurchaseReceiptPaymentsWhereInput = {
|
||||
payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string
|
||||
description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null
|
||||
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>
|
||||
bankAccount?: Prisma.XOR<Prisma.BankAccountScalarRelationFilter, Prisma.BankAccountWhereInput>
|
||||
inventoryBankAccount?: Prisma.XOR<Prisma.InventoryBankAccountNullableScalarRelationFilter, Prisma.InventoryBankAccountWhereInput> | null
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsOrderByWithRelationInput = {
|
||||
@@ -274,8 +299,11 @@ export type PurchaseReceiptPaymentsOrderByWithRelationInput = {
|
||||
payedAt?: Prisma.SortOrder
|
||||
description?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
inventoryBankAccountInventoryId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
inventoryBankAccountBankAccountId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
receipt?: Prisma.PurchaseReceiptOrderByWithRelationInput
|
||||
bankAccount?: Prisma.BankAccountOrderByWithRelationInput
|
||||
inventoryBankAccount?: Prisma.InventoryBankAccountOrderByWithRelationInput
|
||||
_relevance?: Prisma.PurchaseReceiptPaymentsOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -292,8 +320,11 @@ export type PurchaseReceiptPaymentsWhereUniqueInput = Prisma.AtLeast<{
|
||||
payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string
|
||||
description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null
|
||||
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>
|
||||
bankAccount?: Prisma.XOR<Prisma.BankAccountScalarRelationFilter, Prisma.BankAccountWhereInput>
|
||||
inventoryBankAccount?: Prisma.XOR<Prisma.InventoryBankAccountNullableScalarRelationFilter, Prisma.InventoryBankAccountWhereInput> | null
|
||||
}, "id">
|
||||
|
||||
export type PurchaseReceiptPaymentsOrderByWithAggregationInput = {
|
||||
@@ -306,6 +337,8 @@ export type PurchaseReceiptPaymentsOrderByWithAggregationInput = {
|
||||
payedAt?: Prisma.SortOrder
|
||||
description?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
inventoryBankAccountInventoryId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
inventoryBankAccountBankAccountId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
_count?: Prisma.PurchaseReceiptPaymentsCountOrderByAggregateInput
|
||||
_avg?: Prisma.PurchaseReceiptPaymentsAvgOrderByAggregateInput
|
||||
_max?: Prisma.PurchaseReceiptPaymentsMaxOrderByAggregateInput
|
||||
@@ -326,6 +359,8 @@ export type PurchaseReceiptPaymentsScalarWhereWithAggregatesInput = {
|
||||
payedAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceiptPayments"> | Date | string
|
||||
description?: Prisma.StringNullableWithAggregatesFilter<"PurchaseReceiptPayments"> | string | null
|
||||
createdAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceiptPayments"> | Date | string
|
||||
inventoryBankAccountInventoryId?: Prisma.IntNullableWithAggregatesFilter<"PurchaseReceiptPayments"> | number | null
|
||||
inventoryBankAccountBankAccountId?: Prisma.IntNullableWithAggregatesFilter<"PurchaseReceiptPayments"> | number | null
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsCreateInput = {
|
||||
@@ -337,6 +372,7 @@ export type PurchaseReceiptPaymentsCreateInput = {
|
||||
createdAt?: Date | string
|
||||
receipt: Prisma.PurchaseReceiptCreateNestedOneWithoutPaymentsInput
|
||||
bankAccount: Prisma.BankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput
|
||||
inventoryBankAccount?: Prisma.InventoryBankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsUncheckedCreateInput = {
|
||||
@@ -349,6 +385,8 @@ export type PurchaseReceiptPaymentsUncheckedCreateInput = {
|
||||
payedAt: Date | string
|
||||
description?: string | null
|
||||
createdAt?: Date | string
|
||||
inventoryBankAccountInventoryId?: number | null
|
||||
inventoryBankAccountBankAccountId?: number | null
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsUpdateInput = {
|
||||
@@ -360,6 +398,7 @@ export type PurchaseReceiptPaymentsUpdateInput = {
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
receipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutPaymentsNestedInput
|
||||
bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutPurchaseReceiptPaymentsNestedInput
|
||||
inventoryBankAccount?: Prisma.InventoryBankAccountUpdateOneWithoutPurchaseReceiptPaymentsNestedInput
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsUncheckedUpdateInput = {
|
||||
@@ -372,6 +411,8 @@ export type PurchaseReceiptPaymentsUncheckedUpdateInput = {
|
||||
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
inventoryBankAccountInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
inventoryBankAccountBankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsCreateManyInput = {
|
||||
@@ -384,6 +425,8 @@ export type PurchaseReceiptPaymentsCreateManyInput = {
|
||||
payedAt: Date | string
|
||||
description?: string | null
|
||||
createdAt?: Date | string
|
||||
inventoryBankAccountInventoryId?: number | null
|
||||
inventoryBankAccountBankAccountId?: number | null
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsUpdateManyMutationInput = {
|
||||
@@ -405,6 +448,8 @@ export type PurchaseReceiptPaymentsUncheckedUpdateManyInput = {
|
||||
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
inventoryBankAccountInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
inventoryBankAccountBankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsListRelationFilter = {
|
||||
@@ -433,6 +478,8 @@ export type PurchaseReceiptPaymentsCountOrderByAggregateInput = {
|
||||
payedAt?: Prisma.SortOrder
|
||||
description?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
inventoryBankAccountInventoryId?: Prisma.SortOrder
|
||||
inventoryBankAccountBankAccountId?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsAvgOrderByAggregateInput = {
|
||||
@@ -440,6 +487,8 @@ export type PurchaseReceiptPaymentsAvgOrderByAggregateInput = {
|
||||
amount?: Prisma.SortOrder
|
||||
bankAccountId?: Prisma.SortOrder
|
||||
receiptId?: Prisma.SortOrder
|
||||
inventoryBankAccountInventoryId?: Prisma.SortOrder
|
||||
inventoryBankAccountBankAccountId?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsMaxOrderByAggregateInput = {
|
||||
@@ -452,6 +501,8 @@ export type PurchaseReceiptPaymentsMaxOrderByAggregateInput = {
|
||||
payedAt?: Prisma.SortOrder
|
||||
description?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
inventoryBankAccountInventoryId?: Prisma.SortOrder
|
||||
inventoryBankAccountBankAccountId?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsMinOrderByAggregateInput = {
|
||||
@@ -464,6 +515,8 @@ export type PurchaseReceiptPaymentsMinOrderByAggregateInput = {
|
||||
payedAt?: Prisma.SortOrder
|
||||
description?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
inventoryBankAccountInventoryId?: Prisma.SortOrder
|
||||
inventoryBankAccountBankAccountId?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsSumOrderByAggregateInput = {
|
||||
@@ -471,6 +524,8 @@ export type PurchaseReceiptPaymentsSumOrderByAggregateInput = {
|
||||
amount?: Prisma.SortOrder
|
||||
bankAccountId?: Prisma.SortOrder
|
||||
receiptId?: Prisma.SortOrder
|
||||
inventoryBankAccountInventoryId?: Prisma.SortOrder
|
||||
inventoryBankAccountBankAccountId?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsCreateNestedManyWithoutBankAccountInput = {
|
||||
@@ -515,6 +570,48 @@ export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountNestedIn
|
||||
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 = {
|
||||
create?: Prisma.XOR<Prisma.PurchaseReceiptPaymentsCreateWithoutReceiptInput, Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput> | Prisma.PurchaseReceiptPaymentsCreateWithoutReceiptInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput[]
|
||||
connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput[]
|
||||
@@ -569,6 +666,7 @@ export type PurchaseReceiptPaymentsCreateWithoutBankAccountInput = {
|
||||
description?: string | null
|
||||
createdAt?: Date | string
|
||||
receipt: Prisma.PurchaseReceiptCreateNestedOneWithoutPaymentsInput
|
||||
inventoryBankAccount?: Prisma.InventoryBankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsUncheckedCreateWithoutBankAccountInput = {
|
||||
@@ -580,6 +678,8 @@ export type PurchaseReceiptPaymentsUncheckedCreateWithoutBankAccountInput = {
|
||||
payedAt: Date | string
|
||||
description?: string | null
|
||||
createdAt?: Date | string
|
||||
inventoryBankAccountInventoryId?: number | null
|
||||
inventoryBankAccountBankAccountId?: number | null
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsCreateOrConnectWithoutBankAccountInput = {
|
||||
@@ -621,6 +721,57 @@ export type PurchaseReceiptPaymentsScalarWhereInput = {
|
||||
payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string
|
||||
description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null
|
||||
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 = {
|
||||
@@ -631,6 +782,7 @@ export type PurchaseReceiptPaymentsCreateWithoutReceiptInput = {
|
||||
description?: string | null
|
||||
createdAt?: Date | string
|
||||
bankAccount: Prisma.BankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput
|
||||
inventoryBankAccount?: Prisma.InventoryBankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput = {
|
||||
@@ -642,6 +794,8 @@ export type PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput = {
|
||||
payedAt: Date | string
|
||||
description?: string | null
|
||||
createdAt?: Date | string
|
||||
inventoryBankAccountInventoryId?: number | null
|
||||
inventoryBankAccountBankAccountId?: number | null
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput = {
|
||||
@@ -679,6 +833,8 @@ export type PurchaseReceiptPaymentsCreateManyBankAccountInput = {
|
||||
payedAt: Date | string
|
||||
description?: string | null
|
||||
createdAt?: Date | string
|
||||
inventoryBankAccountInventoryId?: number | null
|
||||
inventoryBankAccountBankAccountId?: number | null
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsUpdateWithoutBankAccountInput = {
|
||||
@@ -689,6 +845,7 @@ export type PurchaseReceiptPaymentsUpdateWithoutBankAccountInput = {
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
receipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutPaymentsNestedInput
|
||||
inventoryBankAccount?: Prisma.InventoryBankAccountUpdateOneWithoutPurchaseReceiptPaymentsNestedInput
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsUncheckedUpdateWithoutBankAccountInput = {
|
||||
@@ -700,6 +857,8 @@ export type PurchaseReceiptPaymentsUncheckedUpdateWithoutBankAccountInput = {
|
||||
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
inventoryBankAccountInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
inventoryBankAccountBankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountInput = {
|
||||
@@ -711,6 +870,55 @@ export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountInput =
|
||||
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
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 = {
|
||||
@@ -722,6 +930,8 @@ export type PurchaseReceiptPaymentsCreateManyReceiptInput = {
|
||||
payedAt: Date | string
|
||||
description?: string | null
|
||||
createdAt?: Date | string
|
||||
inventoryBankAccountInventoryId?: number | null
|
||||
inventoryBankAccountBankAccountId?: number | null
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsUpdateWithoutReceiptInput = {
|
||||
@@ -732,6 +942,7 @@ export type PurchaseReceiptPaymentsUpdateWithoutReceiptInput = {
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutPurchaseReceiptPaymentsNestedInput
|
||||
inventoryBankAccount?: Prisma.InventoryBankAccountUpdateOneWithoutPurchaseReceiptPaymentsNestedInput
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsUncheckedUpdateWithoutReceiptInput = {
|
||||
@@ -743,6 +954,8 @@ export type PurchaseReceiptPaymentsUncheckedUpdateWithoutReceiptInput = {
|
||||
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
inventoryBankAccountInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
inventoryBankAccountBankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
}
|
||||
|
||||
export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutReceiptInput = {
|
||||
@@ -754,6 +967,8 @@ export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutReceiptInput = {
|
||||
payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
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
|
||||
description?: boolean
|
||||
createdAt?: boolean
|
||||
inventoryBankAccountInventoryId?: boolean
|
||||
inventoryBankAccountBankAccountId?: boolean
|
||||
receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs<ExtArgs>
|
||||
bankAccount?: boolean | Prisma.BankAccountDefaultArgs<ExtArgs>
|
||||
inventoryBankAccount?: boolean | Prisma.PurchaseReceiptPayments$inventoryBankAccountArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["purchaseReceiptPayments"]>
|
||||
|
||||
|
||||
@@ -784,12 +1002,15 @@ export type PurchaseReceiptPaymentsSelectScalar = {
|
||||
payedAt?: boolean
|
||||
description?: 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> = {
|
||||
receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs<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> = {
|
||||
@@ -797,6 +1018,7 @@ export type $PurchaseReceiptPaymentsPayload<ExtArgs extends runtime.Types.Extens
|
||||
objects: {
|
||||
receipt: Prisma.$PurchaseReceiptPayload<ExtArgs>
|
||||
bankAccount: Prisma.$BankAccountPayload<ExtArgs>
|
||||
inventoryBankAccount: Prisma.$InventoryBankAccountPayload<ExtArgs> | null
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: number
|
||||
@@ -808,6 +1030,8 @@ export type $PurchaseReceiptPaymentsPayload<ExtArgs extends runtime.Types.Extens
|
||||
payedAt: Date
|
||||
description: string | null
|
||||
createdAt: Date
|
||||
inventoryBankAccountInventoryId: number | null
|
||||
inventoryBankAccountBankAccountId: number | null
|
||||
}, ExtArgs["result"]["purchaseReceiptPayments"]>
|
||||
composites: {}
|
||||
}
|
||||
@@ -1150,6 +1374,7 @@ export interface Prisma__PurchaseReceiptPaymentsClient<T, Null = never, ExtArgs
|
||||
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>
|
||||
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.
|
||||
* @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 description: Prisma.FieldRef<"PurchaseReceiptPayments", 'String'>
|
||||
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
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
||||
@@ -30,14 +30,14 @@ export type SalesInvoiceAvgAggregateOutputType = {
|
||||
id: number | null
|
||||
totalAmount: runtime.Decimal | null
|
||||
customerId: number | null
|
||||
inventoryId: number | null
|
||||
posAccountId: number | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceSumAggregateOutputType = {
|
||||
id: number | null
|
||||
totalAmount: runtime.Decimal | null
|
||||
customerId: number | null
|
||||
inventoryId: number | null
|
||||
posAccountId: number | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceMinAggregateOutputType = {
|
||||
@@ -48,7 +48,7 @@ export type SalesInvoiceMinAggregateOutputType = {
|
||||
createdAt: Date | null
|
||||
updatedAt: Date | null
|
||||
customerId: number | null
|
||||
inventoryId: number | null
|
||||
posAccountId: number | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceMaxAggregateOutputType = {
|
||||
@@ -59,7 +59,7 @@ export type SalesInvoiceMaxAggregateOutputType = {
|
||||
createdAt: Date | null
|
||||
updatedAt: Date | null
|
||||
customerId: number | null
|
||||
inventoryId: number | null
|
||||
posAccountId: number | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceCountAggregateOutputType = {
|
||||
@@ -70,7 +70,7 @@ export type SalesInvoiceCountAggregateOutputType = {
|
||||
createdAt: number
|
||||
updatedAt: number
|
||||
customerId: number
|
||||
inventoryId: number
|
||||
posAccountId: number
|
||||
_all: number
|
||||
}
|
||||
|
||||
@@ -79,14 +79,14 @@ export type SalesInvoiceAvgAggregateInputType = {
|
||||
id?: true
|
||||
totalAmount?: true
|
||||
customerId?: true
|
||||
inventoryId?: true
|
||||
posAccountId?: true
|
||||
}
|
||||
|
||||
export type SalesInvoiceSumAggregateInputType = {
|
||||
id?: true
|
||||
totalAmount?: true
|
||||
customerId?: true
|
||||
inventoryId?: true
|
||||
posAccountId?: true
|
||||
}
|
||||
|
||||
export type SalesInvoiceMinAggregateInputType = {
|
||||
@@ -97,7 +97,7 @@ export type SalesInvoiceMinAggregateInputType = {
|
||||
createdAt?: true
|
||||
updatedAt?: true
|
||||
customerId?: true
|
||||
inventoryId?: true
|
||||
posAccountId?: true
|
||||
}
|
||||
|
||||
export type SalesInvoiceMaxAggregateInputType = {
|
||||
@@ -108,7 +108,7 @@ export type SalesInvoiceMaxAggregateInputType = {
|
||||
createdAt?: true
|
||||
updatedAt?: true
|
||||
customerId?: true
|
||||
inventoryId?: true
|
||||
posAccountId?: true
|
||||
}
|
||||
|
||||
export type SalesInvoiceCountAggregateInputType = {
|
||||
@@ -119,7 +119,7 @@ export type SalesInvoiceCountAggregateInputType = {
|
||||
createdAt?: true
|
||||
updatedAt?: true
|
||||
customerId?: true
|
||||
inventoryId?: true
|
||||
posAccountId?: true
|
||||
_all?: true
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ export type SalesInvoiceGroupByOutputType = {
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
customerId: number | null
|
||||
inventoryId: number
|
||||
posAccountId: number
|
||||
_count: SalesInvoiceCountAggregateOutputType | null
|
||||
_avg: SalesInvoiceAvgAggregateOutputType | null
|
||||
_sum: SalesInvoiceSumAggregateOutputType | null
|
||||
@@ -251,10 +251,10 @@ export type SalesInvoiceWhereInput = {
|
||||
createdAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||
customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null
|
||||
inventoryId?: Prisma.IntFilter<"SalesInvoice"> | number
|
||||
posAccountId?: Prisma.IntFilter<"SalesInvoice"> | number
|
||||
items?: Prisma.SalesInvoiceItemListRelationFilter
|
||||
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 = {
|
||||
@@ -265,10 +265,10 @@ export type SalesInvoiceOrderByWithRelationInput = {
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
customerId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
inventoryId?: Prisma.SortOrder
|
||||
posAccountId?: Prisma.SortOrder
|
||||
items?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput
|
||||
customer?: Prisma.CustomerOrderByWithRelationInput
|
||||
inventory?: Prisma.InventoryOrderByWithRelationInput
|
||||
posAccount?: Prisma.PosAccountOrderByWithRelationInput
|
||||
_relevance?: Prisma.SalesInvoiceOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -283,10 +283,10 @@ export type SalesInvoiceWhereUniqueInput = Prisma.AtLeast<{
|
||||
createdAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||
customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null
|
||||
inventoryId?: Prisma.IntFilter<"SalesInvoice"> | number
|
||||
posAccountId?: Prisma.IntFilter<"SalesInvoice"> | number
|
||||
items?: Prisma.SalesInvoiceItemListRelationFilter
|
||||
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
|
||||
inventory?: Prisma.XOR<Prisma.InventoryScalarRelationFilter, Prisma.InventoryWhereInput>
|
||||
posAccount?: Prisma.XOR<Prisma.PosAccountScalarRelationFilter, Prisma.PosAccountWhereInput>
|
||||
}, "id" | "code">
|
||||
|
||||
export type SalesInvoiceOrderByWithAggregationInput = {
|
||||
@@ -297,7 +297,7 @@ export type SalesInvoiceOrderByWithAggregationInput = {
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
customerId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
inventoryId?: Prisma.SortOrder
|
||||
posAccountId?: Prisma.SortOrder
|
||||
_count?: Prisma.SalesInvoiceCountOrderByAggregateInput
|
||||
_avg?: Prisma.SalesInvoiceAvgOrderByAggregateInput
|
||||
_max?: Prisma.SalesInvoiceMaxOrderByAggregateInput
|
||||
@@ -316,7 +316,7 @@ export type SalesInvoiceScalarWhereWithAggregatesInput = {
|
||||
createdAt?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoice"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoice"> | Date | string
|
||||
customerId?: Prisma.IntNullableWithAggregatesFilter<"SalesInvoice"> | number | null
|
||||
inventoryId?: Prisma.IntWithAggregatesFilter<"SalesInvoice"> | number
|
||||
posAccountId?: Prisma.IntWithAggregatesFilter<"SalesInvoice"> | number
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateInput = {
|
||||
@@ -327,7 +327,7 @@ export type SalesInvoiceCreateInput = {
|
||||
updatedAt?: Date | string
|
||||
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
||||
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
|
||||
inventory: Prisma.InventoryCreateNestedOneWithoutSalesInvoicesInput
|
||||
posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedCreateInput = {
|
||||
@@ -338,7 +338,7 @@ export type SalesInvoiceUncheckedCreateInput = {
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
customerId?: number | null
|
||||
inventoryId: number
|
||||
posAccountId: number
|
||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||
}
|
||||
|
||||
@@ -350,7 +350,7 @@ export type SalesInvoiceUpdateInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
||||
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
|
||||
inventory?: Prisma.InventoryUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||
posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedUpdateInput = {
|
||||
@@ -361,7 +361,7 @@ export type SalesInvoiceUncheckedUpdateInput = {
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ export type SalesInvoiceCreateManyInput = {
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
customerId?: number | null
|
||||
inventoryId: number
|
||||
posAccountId: number
|
||||
}
|
||||
|
||||
export type SalesInvoiceUpdateManyMutationInput = {
|
||||
@@ -392,7 +392,7 @@ export type SalesInvoiceUncheckedUpdateManyInput = {
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
}
|
||||
|
||||
export type SalesInvoiceListRelationFilter = {
|
||||
@@ -419,14 +419,14 @@ export type SalesInvoiceCountOrderByAggregateInput = {
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
customerId?: Prisma.SortOrder
|
||||
inventoryId?: Prisma.SortOrder
|
||||
posAccountId?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SalesInvoiceAvgOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
totalAmount?: Prisma.SortOrder
|
||||
customerId?: Prisma.SortOrder
|
||||
inventoryId?: Prisma.SortOrder
|
||||
posAccountId?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SalesInvoiceMaxOrderByAggregateInput = {
|
||||
@@ -437,7 +437,7 @@ export type SalesInvoiceMaxOrderByAggregateInput = {
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
customerId?: Prisma.SortOrder
|
||||
inventoryId?: Prisma.SortOrder
|
||||
posAccountId?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SalesInvoiceMinOrderByAggregateInput = {
|
||||
@@ -448,14 +448,14 @@ export type SalesInvoiceMinOrderByAggregateInput = {
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
customerId?: Prisma.SortOrder
|
||||
inventoryId?: Prisma.SortOrder
|
||||
posAccountId?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SalesInvoiceSumOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
totalAmount?: Prisma.SortOrder
|
||||
customerId?: Prisma.SortOrder
|
||||
inventoryId?: Prisma.SortOrder
|
||||
posAccountId?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SalesInvoiceScalarRelationFilter = {
|
||||
@@ -463,45 +463,45 @@ export type SalesInvoiceScalarRelationFilter = {
|
||||
isNot?: Prisma.SalesInvoiceWhereInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateNestedManyWithoutInventoryInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutInventoryInput, Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput> | Prisma.SalesInvoiceCreateWithoutInventoryInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput[]
|
||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput | Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput[]
|
||||
createMany?: Prisma.SalesInvoiceCreateManyInventoryInputEnvelope
|
||||
export type SalesInvoiceCreateNestedManyWithoutPosAccountInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput> | Prisma.SalesInvoiceCreateWithoutPosAccountInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput[]
|
||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput | Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput[]
|
||||
createMany?: Prisma.SalesInvoiceCreateManyPosAccountInputEnvelope
|
||||
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutInventoryInput, Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput> | Prisma.SalesInvoiceCreateWithoutInventoryInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput[]
|
||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput | Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput[]
|
||||
createMany?: Prisma.SalesInvoiceCreateManyInventoryInputEnvelope
|
||||
export type SalesInvoiceUncheckedCreateNestedManyWithoutPosAccountInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput> | Prisma.SalesInvoiceCreateWithoutPosAccountInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput[]
|
||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput | Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput[]
|
||||
createMany?: Prisma.SalesInvoiceCreateManyPosAccountInputEnvelope
|
||||
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type SalesInvoiceUpdateManyWithoutInventoryNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutInventoryInput, Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput> | Prisma.SalesInvoiceCreateWithoutInventoryInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput[]
|
||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput | Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput[]
|
||||
upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutInventoryInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutInventoryInput[]
|
||||
createMany?: Prisma.SalesInvoiceCreateManyInventoryInputEnvelope
|
||||
export type SalesInvoiceUpdateManyWithoutPosAccountNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput> | Prisma.SalesInvoiceCreateWithoutPosAccountInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput[]
|
||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput | Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput[]
|
||||
upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutPosAccountInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutPosAccountInput[]
|
||||
createMany?: Prisma.SalesInvoiceCreateManyPosAccountInputEnvelope
|
||||
set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutInventoryInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutInventoryInput[]
|
||||
updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutInventoryInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutInventoryInput[]
|
||||
update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutPosAccountInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutPosAccountInput[]
|
||||
updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutPosAccountInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutPosAccountInput[]
|
||||
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutInventoryInput, Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput> | Prisma.SalesInvoiceCreateWithoutInventoryInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput[]
|
||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput | Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput[]
|
||||
upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutInventoryInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutInventoryInput[]
|
||||
createMany?: Prisma.SalesInvoiceCreateManyInventoryInputEnvelope
|
||||
export type SalesInvoiceUncheckedUpdateManyWithoutPosAccountNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput> | Prisma.SalesInvoiceCreateWithoutPosAccountInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput[]
|
||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput | Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput[]
|
||||
upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutPosAccountInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutPosAccountInput[]
|
||||
createMany?: Prisma.SalesInvoiceCreateManyPosAccountInputEnvelope
|
||||
set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutInventoryInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutInventoryInput[]
|
||||
updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutInventoryInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutInventoryInput[]
|
||||
update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutPosAccountInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutPosAccountInput[]
|
||||
updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutPosAccountInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutPosAccountInput[]
|
||||
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
||||
}
|
||||
|
||||
@@ -569,7 +569,7 @@ export type SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.SalesInvoiceUpdateToOneWithWhereWithoutItemsInput, Prisma.SalesInvoiceUpdateWithoutItemsInput>, Prisma.SalesInvoiceUncheckedUpdateWithoutItemsInput>
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateWithoutInventoryInput = {
|
||||
export type SalesInvoiceCreateWithoutPosAccountInput = {
|
||||
code: string
|
||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
description?: string | null
|
||||
@@ -579,7 +579,7 @@ export type SalesInvoiceCreateWithoutInventoryInput = {
|
||||
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedCreateWithoutInventoryInput = {
|
||||
export type SalesInvoiceUncheckedCreateWithoutPosAccountInput = {
|
||||
id?: number
|
||||
code: string
|
||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
@@ -590,30 +590,30 @@ export type SalesInvoiceUncheckedCreateWithoutInventoryInput = {
|
||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateOrConnectWithoutInventoryInput = {
|
||||
export type SalesInvoiceCreateOrConnectWithoutPosAccountInput = {
|
||||
where: Prisma.SalesInvoiceWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutInventoryInput, Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput>
|
||||
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput>
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateManyInventoryInputEnvelope = {
|
||||
data: Prisma.SalesInvoiceCreateManyInventoryInput | Prisma.SalesInvoiceCreateManyInventoryInput[]
|
||||
export type SalesInvoiceCreateManyPosAccountInputEnvelope = {
|
||||
data: Prisma.SalesInvoiceCreateManyPosAccountInput | Prisma.SalesInvoiceCreateManyPosAccountInput[]
|
||||
skipDuplicates?: boolean
|
||||
}
|
||||
|
||||
export type SalesInvoiceUpsertWithWhereUniqueWithoutInventoryInput = {
|
||||
export type SalesInvoiceUpsertWithWhereUniqueWithoutPosAccountInput = {
|
||||
where: Prisma.SalesInvoiceWhereUniqueInput
|
||||
update: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutInventoryInput, Prisma.SalesInvoiceUncheckedUpdateWithoutInventoryInput>
|
||||
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutInventoryInput, Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput>
|
||||
update: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedUpdateWithoutPosAccountInput>
|
||||
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput>
|
||||
}
|
||||
|
||||
export type SalesInvoiceUpdateWithWhereUniqueWithoutInventoryInput = {
|
||||
export type SalesInvoiceUpdateWithWhereUniqueWithoutPosAccountInput = {
|
||||
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
|
||||
data: Prisma.XOR<Prisma.SalesInvoiceUpdateManyMutationInput, Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryInput>
|
||||
data: Prisma.XOR<Prisma.SalesInvoiceUpdateManyMutationInput, Prisma.SalesInvoiceUncheckedUpdateManyWithoutPosAccountInput>
|
||||
}
|
||||
|
||||
export type SalesInvoiceScalarWhereInput = {
|
||||
@@ -627,7 +627,7 @@ export type SalesInvoiceScalarWhereInput = {
|
||||
createdAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||
customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null
|
||||
inventoryId?: Prisma.IntFilter<"SalesInvoice"> | number
|
||||
posAccountId?: Prisma.IntFilter<"SalesInvoice"> | number
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateWithoutCustomerInput = {
|
||||
@@ -637,7 +637,7 @@ export type SalesInvoiceCreateWithoutCustomerInput = {
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
||||
inventory: Prisma.InventoryCreateNestedOneWithoutSalesInvoicesInput
|
||||
posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedCreateWithoutCustomerInput = {
|
||||
@@ -647,7 +647,7 @@ export type SalesInvoiceUncheckedCreateWithoutCustomerInput = {
|
||||
description?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
inventoryId: number
|
||||
posAccountId: number
|
||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||
}
|
||||
|
||||
@@ -684,7 +684,7 @@ export type SalesInvoiceCreateWithoutItemsInput = {
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
|
||||
inventory: Prisma.InventoryCreateNestedOneWithoutSalesInvoicesInput
|
||||
posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedCreateWithoutItemsInput = {
|
||||
@@ -695,7 +695,7 @@ export type SalesInvoiceUncheckedCreateWithoutItemsInput = {
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
customerId?: number | null
|
||||
inventoryId: number
|
||||
posAccountId: number
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateOrConnectWithoutItemsInput = {
|
||||
@@ -721,7 +721,7 @@ export type SalesInvoiceUpdateWithoutItemsInput = {
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
|
||||
inventory?: Prisma.InventoryUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||
posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedUpdateWithoutItemsInput = {
|
||||
@@ -732,10 +732,10 @@ export type SalesInvoiceUncheckedUpdateWithoutItemsInput = {
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateManyInventoryInput = {
|
||||
export type SalesInvoiceCreateManyPosAccountInput = {
|
||||
id?: number
|
||||
code: string
|
||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
@@ -745,7 +745,7 @@ export type SalesInvoiceCreateManyInventoryInput = {
|
||||
customerId?: number | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceUpdateWithoutInventoryInput = {
|
||||
export type SalesInvoiceUpdateWithoutPosAccountInput = {
|
||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -755,7 +755,7 @@ export type SalesInvoiceUpdateWithoutInventoryInput = {
|
||||
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedUpdateWithoutInventoryInput = {
|
||||
export type SalesInvoiceUncheckedUpdateWithoutPosAccountInput = {
|
||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
@@ -766,7 +766,7 @@ export type SalesInvoiceUncheckedUpdateWithoutInventoryInput = {
|
||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedUpdateManyWithoutInventoryInput = {
|
||||
export type SalesInvoiceUncheckedUpdateManyWithoutPosAccountInput = {
|
||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
@@ -783,7 +783,7 @@ export type SalesInvoiceCreateManyCustomerInput = {
|
||||
description?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
inventoryId: number
|
||||
posAccountId: number
|
||||
}
|
||||
|
||||
export type SalesInvoiceUpdateWithoutCustomerInput = {
|
||||
@@ -793,7 +793,7 @@ export type SalesInvoiceUpdateWithoutCustomerInput = {
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
||||
inventory?: Prisma.InventoryUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||
posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedUpdateWithoutCustomerInput = {
|
||||
@@ -803,7 +803,7 @@ export type SalesInvoiceUncheckedUpdateWithoutCustomerInput = {
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||
}
|
||||
|
||||
@@ -814,7 +814,7 @@ export type SalesInvoiceUncheckedUpdateManyWithoutCustomerInput = {
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: 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
|
||||
updatedAt?: boolean
|
||||
customerId?: boolean
|
||||
inventoryId?: boolean
|
||||
posAccountId?: boolean
|
||||
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
|
||||
customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs>
|
||||
inventory?: boolean | Prisma.InventoryDefaultArgs<ExtArgs>
|
||||
posAccount?: boolean | Prisma.PosAccountDefaultArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["salesInvoice"]>
|
||||
|
||||
@@ -873,14 +873,14 @@ export type SalesInvoiceSelectScalar = {
|
||||
createdAt?: boolean
|
||||
updatedAt?: 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> = {
|
||||
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
|
||||
customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs>
|
||||
inventory?: boolean | Prisma.InventoryDefaultArgs<ExtArgs>
|
||||
posAccount?: boolean | Prisma.PosAccountDefaultArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
@@ -889,7 +889,7 @@ export type $SalesInvoicePayload<ExtArgs extends runtime.Types.Extensions.Intern
|
||||
objects: {
|
||||
items: Prisma.$SalesInvoiceItemPayload<ExtArgs>[]
|
||||
customer: Prisma.$CustomerPayload<ExtArgs> | null
|
||||
inventory: Prisma.$InventoryPayload<ExtArgs>
|
||||
posAccount: Prisma.$PosAccountPayload<ExtArgs>
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: number
|
||||
@@ -899,7 +899,7 @@ export type $SalesInvoicePayload<ExtArgs extends runtime.Types.Extensions.Intern
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
customerId: number | null
|
||||
inventoryId: number
|
||||
posAccountId: number
|
||||
}, ExtArgs["result"]["salesInvoice"]>
|
||||
composites: {}
|
||||
}
|
||||
@@ -1242,7 +1242,7 @@ export interface Prisma__SalesInvoiceClient<T, Null = never, ExtArgs extends run
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
items<T extends Prisma.SalesInvoice$itemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$itemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoiceItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
customer<T extends Prisma.SalesInvoice$customerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$customerArgs<ExtArgs>>): Prisma.Prisma__CustomerClient<runtime.Types.Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
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.
|
||||
* @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 updatedAt: Prisma.FieldRef<"SalesInvoice", 'DateTime'>
|
||||
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) {
|
||||
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)
|
||||
}
|
||||
|
||||
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) {
|
||||
const movements = await this.prisma.stockMovement.findMany({
|
||||
where: { productId, inventoryId },
|
||||
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 => ({
|
||||
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)
|
||||
return ResponseMapper.list(movements)
|
||||
}
|
||||
|
||||
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: {
|
||||
inventoryId: true,
|
||||
bankAccountId: true,
|
||||
},
|
||||
})
|
||||
|
||||
return ResponseMapper.list(
|
||||
items.map(item => ({
|
||||
...item,
|
||||
bankAccount: item.inventoryBankAccount?.bankAccount,
|
||||
})),
|
||||
items.map(item => {
|
||||
const { inventoryBankAccount, salesInvoices, ...rest } = item
|
||||
return {
|
||||
...rest,
|
||||
bankAccount: inventoryBankAccount?.bankAccount,
|
||||
todaySalesInfo: {
|
||||
salesCount: salesInvoices.length,
|
||||
salesTotal: salesInvoices.reduce(
|
||||
(acc, si) => acc + Number(si.totalAmount),
|
||||
0,
|
||||
),
|
||||
},
|
||||
}
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,27 +1,37 @@
|
||||
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 {
|
||||
@ApiProperty()
|
||||
@IsNumber()
|
||||
export class CreateSaleInvoiceDto {
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsInt()
|
||||
@Type(() => Number)
|
||||
customerId?: number
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
description?: string
|
||||
|
||||
@ApiProperty()
|
||||
@ArrayMinSize(1)
|
||||
items: CreateOrderItemDto[]
|
||||
}
|
||||
|
||||
export class CreateOrderItemDto {
|
||||
@ApiProperty()
|
||||
@IsNumber()
|
||||
@IsInt()
|
||||
@Type(() => Number)
|
||||
productId: number
|
||||
|
||||
@ApiProperty()
|
||||
@IsNumber()
|
||||
@Type(() => Number)
|
||||
count: number
|
||||
|
||||
@ApiProperty()
|
||||
@IsNumber()
|
||||
@Type(() => Number)
|
||||
fee: number
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
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'
|
||||
|
||||
@Controller('pos')
|
||||
@@ -34,7 +34,7 @@ export class PosController {
|
||||
}
|
||||
|
||||
@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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +1,14 @@
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from '../../common/response/response-mapper'
|
||||
import { Prisma } from '../../generated/prisma/client'
|
||||
import { SalesInvoiceCreateInput } from '../../generated/prisma/models'
|
||||
import { PrismaService } from '../../prisma/prisma.service'
|
||||
import { CreateOrderDto } from './dto/create-pos.dto'
|
||||
import { CreateSaleInvoiceDto } from './dto/create-pos.dto'
|
||||
|
||||
@Injectable()
|
||||
export class PosService {
|
||||
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) {
|
||||
const info = await this.prisma.posAccount.findUniqueOrThrow({
|
||||
where: { id: posId },
|
||||
@@ -173,41 +158,34 @@ export class PosService {
|
||||
return ResponseMapper.list(categories)
|
||||
}
|
||||
|
||||
async createOrder(posId: number, data: CreateOrderDto) {
|
||||
const pos = await this.prisma.posAccount.findUniqueOrThrow({
|
||||
where: { id: posId },
|
||||
select: { inventoryId: true },
|
||||
})
|
||||
const inventoryId = pos.inventoryId
|
||||
|
||||
const { customerId, ...res } = data
|
||||
const preparedOrder = { ...res } as any
|
||||
async createOrder(posId: number, data: CreateSaleInvoiceDto) {
|
||||
const { customerId, items, ...res } = data
|
||||
const lastCode = await this.prisma.salesInvoice
|
||||
.findFirst({
|
||||
where: { posAccountId: posId },
|
||||
orderBy: { code: 'desc' },
|
||||
select: { code: true },
|
||||
})
|
||||
.then(si => si?.code || '0')
|
||||
|
||||
preparedOrder.code = String(Number(lastCode) + 1)
|
||||
const newCode = String(Number(lastCode) + 1)
|
||||
|
||||
preparedOrder.totalAmount = data.items.reduce(
|
||||
(acc, item) => acc + Number(item.fee),
|
||||
0,
|
||||
)
|
||||
const totalAmount = data.items.reduce((acc, item) => acc + item.count * item.fee, 0)
|
||||
|
||||
preparedOrder.inventory = { connect: { id: inventoryId } }
|
||||
preparedOrder.customer = { connect: { id: customerId } }
|
||||
|
||||
if (Object.prototype.hasOwnProperty.call(preparedOrder, 'items')) {
|
||||
preparedOrder.items = {
|
||||
create: preparedOrder.items.map((item: any) => ({
|
||||
const preparedOrder: SalesInvoiceCreateInput = {
|
||||
...res,
|
||||
code: newCode,
|
||||
posAccount: { connect: { id: posId } },
|
||||
customer: customerId ? { connect: { id: customerId } } : undefined,
|
||||
totalAmount: totalAmount,
|
||||
items: {
|
||||
create: items.map(item => ({
|
||||
product: { connect: { id: Number(item.productId) } },
|
||||
count: item.count,
|
||||
fee: item.fee,
|
||||
total: item.count * item.fee,
|
||||
})),
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
const item = await this.prisma.salesInvoice.create({ data: preparedOrder })
|
||||
|
||||
@@ -26,4 +26,8 @@ export class CreateProductDto {
|
||||
@Type(() => Number)
|
||||
@IsInt()
|
||||
categoryId?: number
|
||||
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
minimumStockAlertLevel?: number
|
||||
}
|
||||
|
||||
@@ -27,4 +27,9 @@ export class UpdateProductDto {
|
||||
@Type(() => Number)
|
||||
@IsInt()
|
||||
categoryId?: number
|
||||
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsInt()
|
||||
minimumStockAlertLevel?: number
|
||||
}
|
||||
|
||||
@@ -4,28 +4,22 @@ import { ResponseMapper } from '../common/response/response-mapper'
|
||||
import { Prisma } from '../generated/prisma/client'
|
||||
import { PrismaService } from '../prisma/prisma.service'
|
||||
import { CreateProductDto } from './dto/create-product.dto'
|
||||
import { UpdateProductDto } from './dto/update-product.dto'
|
||||
|
||||
@Injectable()
|
||||
export class ProductsService {
|
||||
constructor(private prisma: PrismaService) {}
|
||||
|
||||
async create(data: CreateProductDto) {
|
||||
const payload: any = { ...data }
|
||||
if (Object.prototype.hasOwnProperty.call(payload, 'brandId')) {
|
||||
if (payload.brandId !== undefined && payload.brandId !== null) {
|
||||
payload.brand = { connect: { id: Number(payload.brandId) } }
|
||||
}
|
||||
delete payload.brandId
|
||||
const { brandId, categoryId, ...rest } = data
|
||||
|
||||
const dataToCreate = {
|
||||
...rest,
|
||||
brand: brandId ? { connect: { id: Number(brandId) } } : undefined,
|
||||
category: categoryId ? { connect: { id: Number(categoryId) } } : undefined,
|
||||
}
|
||||
|
||||
if (Object.prototype.hasOwnProperty.call(payload, 'categoryId')) {
|
||||
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 })
|
||||
const item = await this.prisma.product.create({ data: dataToCreate })
|
||||
return ResponseMapper.create(item)
|
||||
}
|
||||
|
||||
@@ -54,61 +48,79 @@ export class ProductsService {
|
||||
? p.stockBalances.reduce((acc, sb) => acc + Number(sb.quantity), 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)
|
||||
}
|
||||
|
||||
async findOne(id: number) {
|
||||
const p = await this.prisma.product.findUnique({
|
||||
const product = await this.prisma.product.findUniqueOrThrow({
|
||||
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 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
|
||||
const { salesInvoiceItems, ...rest } = product
|
||||
|
||||
return ResponseMapper.single({
|
||||
...rest,
|
||||
brand,
|
||||
category,
|
||||
stock:
|
||||
p.stockBalances && p.stockBalances.length > 0
|
||||
? p.stockBalances.reduce((acc, sb) => acc + Number(sb.quantity), 0)
|
||||
: 0,
|
||||
salePrice: Number(product.salePrice),
|
||||
minimumStockAlertLevel: Number(product.minimumStockAlertLevel),
|
||||
stock: product.stockBalances?.reduce((acc, sb) => acc + Number(sb.quantity), 0),
|
||||
avgCost:
|
||||
p.stockBalances && p.stockBalances.length > 0
|
||||
? p.stockBalances.reduce((acc, sb) => acc + Number(sb.avgCost), 0) /
|
||||
p.stockBalances.length
|
||||
: 0,
|
||||
product.stockBalances?.reduce((acc, sb) => acc + Number(sb.avgCost), 0) /
|
||||
product.stockBalances.length,
|
||||
salesCount: product.salesInvoiceItems.length,
|
||||
})
|
||||
}
|
||||
|
||||
async update(id: number, data: any) {
|
||||
const payload: any = { ...data }
|
||||
if (Object.prototype.hasOwnProperty.call(payload, 'brandId')) {
|
||||
if (payload.brandId === null) {
|
||||
payload.brand = { disconnect: true }
|
||||
} else {
|
||||
payload.brand = { connect: { id: Number(payload.brandId) } }
|
||||
}
|
||||
delete payload.brandId
|
||||
}
|
||||
if (Object.prototype.hasOwnProperty.call(payload, 'categoryId')) {
|
||||
if (payload.categoryId === null) {
|
||||
payload.category = { disconnect: true }
|
||||
} else {
|
||||
payload.category = { connect: { id: Number(payload.categoryId) } }
|
||||
}
|
||||
delete payload.categoryId
|
||||
async update(id: number, data: UpdateProductDto) {
|
||||
const { brandId, categoryId, ...rest } = data
|
||||
|
||||
const dataToUpdate = {
|
||||
...rest,
|
||||
brand:
|
||||
brandId === null
|
||||
? { disconnect: true }
|
||||
: brandId
|
||||
? { connect: { id: Number(brandId) } }
|
||||
: undefined,
|
||||
category:
|
||||
categoryId === null
|
||||
? { disconnect: true }
|
||||
: categoryId
|
||||
? { connect: { id: Number(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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user