minor fix in applying pricing rule
This commit is contained in:
parent
2dd57acdef
commit
f5dee777dd
@ -285,8 +285,9 @@ def get_pricing_rules(args):
|
|||||||
|
|
||||||
def filter_pricing_rules(args, pricing_rules):
|
def filter_pricing_rules(args, pricing_rules):
|
||||||
# filter for qty
|
# filter for qty
|
||||||
stock_qty = args.get('qty') * args.get('conversion_factor', 1)
|
|
||||||
if pricing_rules:
|
if pricing_rules:
|
||||||
|
stock_qty = flt(args.get('qty')) * args.get('conversion_factor', 1)
|
||||||
|
|
||||||
pricing_rules = filter(lambda x: (flt(stock_qty)>=flt(x.min_qty)
|
pricing_rules = filter(lambda x: (flt(stock_qty)>=flt(x.min_qty)
|
||||||
and (flt(stock_qty)<=x.max_qty if x.max_qty else True)), pricing_rules)
|
and (flt(stock_qty)<=x.max_qty if x.max_qty else True)), pricing_rules)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user