feat: implement business pricing service and money utilities

- Added `businessPricing.service.js` to handle business customer pricing logic.
- Introduced `money.js` for money parsing, formatting, and calculations.
- Created `pricing.service.js` to manage variant quoting and promotion application.
- Updated validation schemas in `catalogue.schemas.js` and `inventoryMerchandising.schemas.js` for new pricing and inventory features.
- Implemented cron job for inventory reservation expiry in `inventoryReservationExpiry.cron.js`.
- Created database migrations for catalogue and inventory structures.
- Added unit tests for catalogue localization, validation, and inventory merchandising functionalities.
This commit is contained in:
Sathira Sri Sathara
2026-09-03 19:25:13 +05:30
parent fd4e324571
commit 5643d89236
75 changed files with 663 additions and 1 deletions
+2 -1
View File
@@ -10,11 +10,12 @@
// cron/index.js
const startCleanInactiveNotificationsCron = require("./notificationCleaning.cron");
const startInventoryReservationExpiryCron = require("./inventoryReservationExpiry.cron");
function startAllCrons() {
console.log("Starting Cron Jobs...");
const tasks = [startCleanInactiveNotificationsCron()];
const tasks = [startCleanInactiveNotificationsCron(), startInventoryReservationExpiryCron()];
return async () => {
for (const task of tasks) {
+1
View File
@@ -0,0 +1 @@
const cron=require("node-cron"),inventory=require("../app/services/inventory/inventory.service");module.exports=()=>cron.schedule("* * * * *",async()=>{try{await inventory.expireReservations(100);}catch(error){console.error("Inventory reservation reconciliation failed",{name:error.name,message:error.message});}},{noOverlap:true});