fix: Buying and selling check in pricing rule
(cherry picked from commit f54838ab56)
This commit is contained in:
@@ -244,6 +244,11 @@ 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"]:
|
||||
conditions += """ and ifnull(`tabPricing Rule`.selling, 0) = 1"""
|
||||
else:
|
||||
conditions += """ and ifnull(`tabPricing Rule`.buying, 0) = 1"""
|
||||
|
||||
return conditions
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user