1 Commits

Author SHA1 Message Date
4109523f59 Add stock quantity recalculation tests and enhance inventory schemas
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Introduced a new test suite for stock quantity recalculation in `stockQuantity.recalculate.test.js`, ensuring comprehensive coverage of listing variant recalculation logic.
- Enhanced the `filamentstock`, `partstock`, and `productstock` schemas by adding new rollup configurations for tracking unconsumed, used, and consumed states.
- Implemented a pre-validation hook in the `partstock` and `productstock` schemas to automatically set the `part` field based on the associated `partSku`.
- Updated the `stockevent` schema to include new rollup configurations and statistics methods for better inventory management.
- Improved the `listing` and `listingvarient` schemas with additional recalculation logic and statistics methods to enhance data integrity and reporting capabilities.
2026-08-25 01:59:22 +01:00