feat: complete inventory management module implementation #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant updates to the inventory management system, including new features, database schema changes, and additional entity definitions. The changes aim to enhance inventory tracking, wastage management, and reconciliation workflows. Below is a breakdown of the most important changes grouped by theme:
Inventory Management Features
TASKS.mdto reflect the progress of advanced inventory management features, marking tasks like low stock alerts, predictive stock forecasting, and inventory valuation reports as completed. Added a new section for testing and integration tasks.Database Schema Updates
leadTimeDays,costPrice,productId) to theproductandinventory_transactiontables, along with foreign key constraints and updated default values. [1] [2]inventory_transactionsto include new transaction types (in,out,waste) and updated the enum type.inventory_batches,inventory_wastage,inventory_counts, and related tables to improve data integrity.New Entities
InventoryBatchentity to track batch-level inventory details, including batch numbers, quantities, costs, and expiry dates.InventoryCountandInventoryCountItementities to support inventory reconciliation workflows, including fields for expected vs. actual quantities and discrepancies.InventoryWastageentity to log wastage events, including reasons (e.g., expired, damaged) and associated metadata.Codebase Integration
InventoryBatch,InventoryWastage,InventoryCount,InventoryCountItem) intobackend/data-source.tsandbackend/src/config/database.config.tsfor ORM configuration. [1] [2] [3] [4]Migration Scripts
These updates collectively enhance the system's ability to manage inventory efficiently and accurately, laying the groundwork for advanced reporting and operational workflows.