A comprehensive ERPNext custom app for advanced pricing rules and sales partner commission management.
- 4 Base Price Types: Price List Rate, Valuation Rate, Selling Rate, Item Rate
- Flexible Discount Options: Percentage and amount-based discounts
- Smart Validation: Automatic validation based on price type selection
- Item Rate Support: Direct item rate pricing without discount calculations
- Production-Ready Logging: Clean console logging for pricing rule applications
- Automatic Supplier Linking: Auto-create suppliers for sales partners
- Commission Tracking: Built-in commission management
- Custom Fields: Enhanced sales partner profiles with supplier integration
- Pricing Rules Analysis: Interactive report with filtering and export capabilities
- DLITS Sales Partner Commission Report: Detailed commission tracking and payment management
- DLITS Custom Workspace: Centralized access to all features
- Quick Shortcuts: Easy navigation to key functions
- User-Friendly Interface: Organized layout for efficient workflow
- ERPNext v13+ or v14+
- Frappe Framework
- Administrator access to ERPNext site
-
Navigate to your Frappe bench directory:
cd /path/to/your/frappe-bench -
Get the app:
bench get-app https://github.com/your-repo/dlitscustom
-
Install on your site:
bench --site your-site-name install-app dlitscustom
-
Restart and migrate:
bench restart bench --site your-site-name migrate
If you have the app files locally:
-
Copy app to apps directory:
cp -r dlitscustom /path/to/frappe-bench/apps/
-
Install the app:
cd /path/to/frappe-bench bench --site your-site-name install-app dlitscustom -
Complete setup:
bench restart bench --site your-site-name migrate
After installation, check that the following components are available:
- Workspace: Navigate to "DLITS Custom" workspace
- DocType: Access "Pricing Rule Dlits" from the workspace
- Reports: Check "Pricing Rules Analysis" and "DLITS Sales Partner Commission Report"
- Custom Fields: Verify Sales Partner has "Supplier" and "Auto Create Supplier" fields
- Go to Sales Partner list
- Create or edit existing sales partners
- Enable "Auto Create Supplier" for automatic supplier creation
- Link existing suppliers if needed
- Navigate to Pricing Rule Dlits from the workspace
- Create your first pricing rule:
- Select appropriate Base Price Type
- Configure Apply On (Item Code, Item Group, Brand)
- Set Discount Percentage or Discount Amount
- For Item Rate type, no discount configuration needed
- Create a test Pricing Rule Dlits
- Create a Sales Order with matching items
- Verify pricing calculations in the console log
- Check that the correct pricing rule is applied
- Create a Sales Partner with auto-create supplier enabled
- Verify supplier is created automatically
- Test commission calculations in sales transactions
-
Access Pricing Rule Dlits:
- From DLITS Custom workspace → Pricing Rule Dlits
- Or search "Pricing Rule Dlits" in the awesome bar
-
Configure Base Price Type:
- Price List Rate: Uses item's price list rate
- Valuation Rate: Uses item's valuation rate
- Selling Rate: Uses item's selling rate
- Item Rate: Uses direct item rate (no discount needed)
-
Set Application Criteria:
- Choose Apply On: Item Code, Item Group, or Brand
- Select specific items/groups/brands
- Set date ranges if needed
-
Configure Discounts:
- For Price List/Valuation/Selling Rate: Set discount percentage or amount
- For Item Rate: No discount configuration required
-
Create Sales Partner:
- Go to Sales Partner list
- Create new partner
- Enable "Auto Create Supplier" for automatic supplier linking
-
Commission Management:
- Use DLITS Sales Partner Commission Report
- Track commissions across sales transactions
- Generate payment entries for commissions
- Access: DLITS Custom workspace → Reports section
- Features: Filter by date, item, customer
- Export: Excel, PDF, CSV formats available
- Access: DLITS Custom workspace → Reports section
- Features: Commission calculations, payment tracking
- Actions: Generate payment entries directly from report
# Clear cache and restart
bench --site your-site-name clear-cache
bench restart# Reinstall custom fields
bench --site your-site-name console
>>> from dlitscustom.fixtures.custom_fields import create_sales_partner_custom_fields
>>> create_sales_partner_custom_fields()- Check console logs for pricing rule application messages
- Verify pricing rule criteria match your items
- Ensure pricing rule is enabled and within date range
- Ensure user has appropriate roles
- Check DocType permissions for Pricing Rule Dlits
- Verify workspace permissions
Enable debug logging for detailed troubleshooting:
# In ERPNext console
import frappe
frappe.conf.developer_mode = 1
frappe.conf.log_level = "DEBUG"cd /path/to/frappe-bench
bench update --app dlitscustom
bench --site your-site-name migrate
bench restartbench --site your-site-name console
>>> from dlitscustom.migrate import execute
>>> execute()# Uninstall the app
bench --site your-site-name uninstall-app dlitscustom
# Remove app files (optional)
rm -rf apps/dlitscustomIf automatic uninstall fails:
bench --site your-site-name console
>>> from dlitscustom.uninstall import before_uninstall
>>> before_uninstall()dlitscustom/
├── dlitscustom/
│ ├── doctype/
│ │ └── pricing_rule_dlits/
│ ├── fixtures/
│ │ └── custom_fields.py
│ ├── report/
│ │ ├── pricing_rules_analysis/
│ │ └── sales_partner_commission_report/
│ ├── utils/
│ │ └── get_pricing_rule_dlits.py
│ ├── install.py
│ ├── uninstall.py
│ └── migrate.py
├── hooks.py
└── README.md
hooks.py: App configuration and event hooksinstall.py: Installation scripts and setupuninstall.py: Clean removal scriptsmigrate.py: Version upgrade scriptsget_pricing_rule_dlits.py: Core pricing calculation logic
- Fork the repository
- Create feature branch
- Make changes with proper testing
- Submit pull request
- ERPNext Documentation: https://docs.erpnext.com
- Frappe Framework: https://frappeframework.com/docs
- Report bugs and feature requests through GitHub issues
- Include ERPNext version, error logs, and reproduction steps
- ERPNext Community Forum
- Frappe Discord Server
This app is licensed under the MIT License. See LICENSE file for details.
- Initial release
- Pricing Rule Dlits with 4 base price types
- Sales Partner supplier integration
- Comprehensive workspace and reports
- Production-ready installation scripts
Made with ❤️ for the ERPNext community