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:
@@ -55,6 +55,7 @@ module.exports = (sequelize, DataTypes) => {
|
||||
approvedAt: { type: DataTypes.DATE, allowNull: false },
|
||||
approvedBy: { type: DataTypes.STRING, allowNull: false },
|
||||
settlement_term_id: { type: DataTypes.STRING, allowNull: true },
|
||||
business_tier_id: { type: DataTypes.STRING, allowNull: true },
|
||||
},
|
||||
{
|
||||
tableName: "business_customers",
|
||||
@@ -71,6 +72,7 @@ module.exports = (sequelize, DataTypes) => {
|
||||
BusinessCustomer.hasMany(db.Address, { foreignKey: "business_profile_id", as: "addresses" });
|
||||
BusinessCustomer.hasOne(db.BusinessCreditAccount, { foreignKey: "business_profile_id", as: "creditAccount" });
|
||||
BusinessCustomer.belongsTo(db.SettlementTerm, { foreignKey: "settlement_term_id", as: "settlementTerm" });
|
||||
BusinessCustomer.belongsTo(db.BusinessTier, { foreignKey: "business_tier_id", as: "businessTier" });
|
||||
};
|
||||
|
||||
return BusinessCustomer;
|
||||
|
||||
Reference in New Issue
Block a user