Merge pull request #21361 from rohitwaghchaure/fixed-unsupported-operand-type-issue-develop

fix: unsupported operand type issue in pricing rule
This commit is contained in:
Deepesh Garg 2020-04-22 08:45:56 +05:30 committed by GitHub
commit 0fcdc33393
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -330,9 +330,9 @@ def get_qty_and_rate_for_mixed_conditions(doc, pr_doc, args):
if pr_doc.mixed_conditions:
amt = args.get('qty') * args.get("price_list_rate")
if args.get("item_code") != row.get("item_code"):
amt = row.get('qty') * (row.get("price_list_rate") or args.get("rate"))
amt = flt(row.get('qty')) * flt(row.get("price_list_rate") or args.get("rate"))
sum_qty += row.get("stock_qty") or args.get("stock_qty") or args.get("qty")
sum_qty += flt(row.get("stock_qty")) or flt(args.get("stock_qty")) or flt(args.get("qty"))
sum_amt += amt
if pr_doc.is_cumulative: