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

feat(pos): update sale invoice creation to include customer and item details
feat(pos): enhance POS account service to include today's sales information
feat(pos): refactor order DTO to create sale invoice with detailed item structure
feat(products): add minimum stock alert level to product creation and update DTOs
fix(triggers): implement stock validation and movement logging for sales invoice items
refactor(database): update sales invoices schema to include posAccountId and remove inventoryId
This commit is contained in:
2025-12-30 21:04:01 +03:30
parent 1bb206a608
commit eb6e0e7a0d
30 changed files with 1265 additions and 648 deletions
@@ -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]