From 5f821b93a5832ee3f37d37dc9192ac656be3224e Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Mon, 5 Dec 2022 15:43:03 +0530 Subject: [PATCH] chore: Add POS Invoices --- erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py | 2 +- erpnext/accounts/doctype/pricing_rule/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py index d27f65eba0..5bb366a770 100644 --- a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py @@ -1123,7 +1123,7 @@ def make_pricing_rule(**args): "apply_on": args.apply_on or "Item Code", "applicable_for": args.applicable_for, "selling": args.selling or 0, - "currency": "USD", + "currency": "INR", "apply_discount_on_rate": args.apply_discount_on_rate or 0, "buying": args.buying or 0, "min_qty": args.min_qty or 0.0, diff --git a/erpnext/accounts/doctype/pricing_rule/utils.py b/erpnext/accounts/doctype/pricing_rule/utils.py index e93b130879..ab1d4d3fa1 100644 --- a/erpnext/accounts/doctype/pricing_rule/utils.py +++ b/erpnext/accounts/doctype/pricing_rule/utils.py @@ -250,7 +250,7 @@ def get_other_conditions(conditions, values, args): and ifnull(`tabPricing Rule`.valid_upto, '2500-12-31')""" values["transaction_date"] = args.get("transaction_date") - if args.get("doctype") in ["Sales Order", "Delivery Note", "Sales Invoice"]: + if args.get("doctype") in ["Sales Order", "Delivery Note", "Sales Invoice", "POS Invoice"]: conditions += """ and ifnull(`tabPricing Rule`.selling, 0) = 1""" else: conditions += """ and ifnull(`tabPricing Rule`.buying, 0) = 1"""