Advanced Pricing Rules

This is a custom app for ERNext, enhancing the standard pricing and discount mechanisms in sales-related documents.

Install Advanced Pricing Rules

bench get-app https://github.com/evghenin/advanced-pricing-rules

Tags

  • erpnext
  • frappe
  • frappe-app

Add the Frappe Gems badge to your README

Maintain Advanced Pricing Rules? Paste this into your README:

[![Listed on Frappe Gems](https://frappegems.com/api/method/frappe_gems.seo.badge?app=evghenin%2Fadvanced-pricing-rules)](https://frappegems.com/gems/apps/evghenin/advanced-pricing-rules)

About Advanced Pricing Rules

Advanced Pricing Rules

This is a custom app for ERPNext, enhancing the standard pricing and discount mechanisms in sales-related documents.

Features

This app provides the following enhancements:

  1. New pricing option: "Rate from Price List"
    Introduced in the Rate or Discount field of Pricing Rule.
    When selected, a new field Rate from Price List appears, allowing the user to choose a specific Price List from which the item price should be fetched directly.

These improvements allow greater flexibility when applying pricing rules, overriding them per item and selectively using custom price lists.

📘 Use Case: Applying a Pricing Rule with "Rate from Price List"

This example demonstrates how to configure a dynamic pricing rule that fetches the rate from a specific price list when a quantity threshold is met.

Step-by-Step

  1. Create Price List: Standard Selling

    • Go to Selling > Price List
    • Click Add Price List
    • Set:
      • Price List Name: Standard Selling
      • Selling: ✔️
      • Currency: e.g., EUR
    • Save
  2. Create Price List: Wholesale Selling

    • Repeat the steps above
    • Set Price List Name: Wholesale Selling
  3. Create an Item

    • Go to Stock > Item
    • Click Add Item
    • Set:
      • Item Code: ITEM-001
      • Item Name: Example Product
    • Save
  4. Add Item Prices

    • Go to Stock > Item Price
    • Create two records:
      • One for Standard Selling with rate 100 EUR
      • One for Wholesale Selling with rate 80 EUR
  5. Create a Pricing Rule

    • Go to Selling > Pricing Rule
    • Click Add Pricing Rule
    • Set:
      • Apply On: Item Code
      • Item Code: ITEM-001
      • Min Qty: 10
      • Rate or Discount: Rate from Price List
      • Rate from Price List: Wholesale Selling
    • Save and Submit

✅ Result

When adding ITEM-001 to a Sales Order:

  • If Qty < 10, the price will be taken from the Standard Selling price list
  • If Qty ≥ 10, the price will be overridden using the rate from the Wholesale Selling price list

This allows you to define quantity-based pricing logic that pulls directly from different price lists.

Installation

You can install this app using the bench CLI:

cd $PATH_TO_YOUR_BENCH
bench get-app $URL_OF_THIS_REPO --branch develop
bench install-app advanced_pricing_rules

Contributing

This app uses pre-commit for code formatting and linting. Please install pre-commit and enable it for this repository:

cd apps/advanced_pricing_rules
pre-commit install

Pre-commit is configured to use the following tools for checking and formatting your code:

  • ruff
  • eslint
  • prettier
  • pyupgrade

License

mit

Related Sales & CRM apps for Frappe & ERPNext

  • Crm — Fully featured, open source CRM
  • Flow — Frappe Flow — native AI agents, tools, and triggers for Frappe
  • Sales Kpi — Sales KPI app for ERPNext
  • Crm Override — An example Frappe app that demonstrates how to override Frappe UI based apps.
  • Eseller Suite — A comprehensive frappe app designed to help selling partners thrive on various online platforms like Amazon and Flipkart. With powerful tools for optimization, analytics, and automation, sellers can boost sales, optimize listings, and stay ahead of the competition effortlessly.
  • Sales Prediction — AI-powered sales forecasting using Prophet
  • Dlitscustom — Erpnext Custom Pricing rule , commission , tools etc..
  • Van Sales Pwa — Van Sales PWA: field sales app (customers, invoicing, payments, stock) with backend and frontend source in one app (like HRMS or POS Awesome). Install on any site, build, and open /pwa.