fix(stock): get item price based on party
This commit is contained in:
parent
01ca3e5e36
commit
4e45663297
@ -440,13 +440,12 @@ def get_item_price(args, item_code, ignore_party=False):
|
|||||||
and ifnull(uom, '') in ('', %(uom)s)"""
|
and ifnull(uom, '') in ('', %(uom)s)"""
|
||||||
|
|
||||||
if not ignore_party:
|
if not ignore_party:
|
||||||
conditions += " and (customer is null or customer = '') and (supplier is null or supplier = '')"
|
|
||||||
if args.get("customer"):
|
if args.get("customer"):
|
||||||
conditions += " and customer=%(customer)s"
|
conditions += " and customer=%(customer)s"
|
||||||
|
elif args.get("supplier"):
|
||||||
if args.get("supplier"):
|
|
||||||
conditions += " and supplier=%(supplier)s"
|
conditions += " and supplier=%(supplier)s"
|
||||||
|
else:
|
||||||
|
conditions += " and (customer is null or customer = '') and (supplier is null or supplier = '')"
|
||||||
|
|
||||||
if args.get('min_qty'):
|
if args.get('min_qty'):
|
||||||
conditions += " and ifnull(min_qty, 0) <= %(min_qty)s"
|
conditions += " and ifnull(min_qty, 0) <= %(min_qty)s"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user