Merge pull request #16365 from hiousi/patch-1
fix: variant can not get its price
This commit is contained in:
commit
afbdaa525e
@ -370,16 +370,16 @@ def get_price_list_rate(args, item_doc, out):
|
||||
|
||||
price_list_rate = get_price_list_rate_for(args, item_doc.name) or 0
|
||||
|
||||
# variant
|
||||
if not price_list_rate and item_doc.variant_of:
|
||||
price_list_rate = get_price_list_rate_for(args, item_doc.variant_of)
|
||||
|
||||
# insert in database
|
||||
if not price_list_rate:
|
||||
if args.price_list and args.rate:
|
||||
insert_item_price(args)
|
||||
return {}
|
||||
|
||||
# variant
|
||||
if not price_list_rate and item_doc.variant_of:
|
||||
price_list_rate = get_price_list_rate_for(args, item_doc.variant_of)
|
||||
|
||||
out.price_list_rate = flt(price_list_rate) * flt(args.plc_conversion_rate) \
|
||||
/ flt(args.conversion_rate)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user