fix: Buying and selling check in pricing rule
This commit is contained in:
parent
2106de0fa5
commit
f54838ab56
@ -250,6 +250,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
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user