Enforcing Minimum Order Quantity (MOQ) in ERPNext
ERPNext lacked a crucial feature, particularly for businesses in the wholesaling industry: enforcing a Minimum Order Quantity (MOQ). For wholesalers, it’s vital to ensure that items are only sold in quantities that meet the MOQ requirements.
To address this gap, we’ve developed a simple yet essential app.
Key Features:
- Automatic Field Creation: The app automatically creates the
custom_moq
field in the Item DocType during installation, eliminating the need for manual setup. This field stores the minimum order quantity for each item and is set to mandatory with a default value of 1. - MOQ Validation: During sales processes (e.g., Quotations, Sales Orders), if an item’s quantity is below the specified MOQ, the app will display an error message and block the transaction until the correct quantity is entered.
This app ensures that MOQ is consistently enforced across all sales transactions.
Next Steps:
Our next goal is to build an app that enforces tiered pricing and cumulative tiered pricing, integrating it with the MOQ app. The long-term plan is to eventually replace the entire Price Rule app, as it has become obsolete for most businesses.
You can access the app’s repository here.