Reposting Item Valuation Error TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'

ERPNext: v13.42.6 (version-13)

Frappe Framework: v13.46.2 (version-13)

valuation_amount_as_per_doc - stock_value_diff, d.precision(“base_net_amount”)
TypeError: unsupported operand type(s) for -: ‘float’ and ‘NoneType’