mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 03:29:16 +00:00
fix: Buying and selling check in pricing rule
This commit is contained in:
@@ -250,6 +250,11 @@ def get_other_conditions(conditions, values, args):
|
|||||||
and ifnull(`tabPricing Rule`.valid_upto, '2500-12-31')"""
|
and ifnull(`tabPricing Rule`.valid_upto, '2500-12-31')"""
|
||||||
values["transaction_date"] = args.get("transaction_date")
|
values["transaction_date"] = args.get("transaction_date")
|
||||||
|
|
||||||
|
if args.get("doctype") in ["Sales Order", "Delivery Note", "Sales Invoice"]:
|
||||||
|
conditions += """ and ifnull(`tabPricing Rule`.selling, 0) = 1"""
|
||||||
|
else:
|
||||||
|
conditions += """ and ifnull(`tabPricing Rule`.buying, 0) = 1"""
|
||||||
|
|
||||||
return conditions
|
return conditions
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user