fix: unsupported operand type(s) for +: 'int' and 'NoneType'

This commit is contained in:
Rohit Waghchaure 2022-12-15 16:34:06 +05:30
parent 5ea6080a6e
commit 0f28074e5a

View File

@ -828,9 +828,9 @@ def insert_item_price(args):
):
if frappe.has_permission("Item Price", "write"):
price_list_rate = (
(args.rate + args.discount_amount) / args.get("conversion_factor")
(flt(args.rate) + flt(args.discount_amount)) / args.get("conversion_factor")
if args.get("conversion_factor")
else (args.rate + args.discount_amount)
else (flt(args.rate) + flt(args.discount_amount))
)
item_price = frappe.db.get_value(