fix: UOM was not fetching in purchase invoice (#19732) (#19737)

* fix: UOM was not fetching in purchase invoice

* fix: Changes requested

Co-authored-by: Marica <maricadsouza221197@gmail.com>
This commit is contained in:
Marica
2019-11-28 19:03:14 +05:30
committed by Nabin Hait
parent b1fac1817c
commit 32b69bf122
3 changed files with 9 additions and 19 deletions

View File

@@ -29,7 +29,8 @@ def get_asset_category_account(fieldname, item=None, asset=None, account=None, a
account=None
if not account:
asset_category, company = frappe.db.get_value("Asset", asset, ["asset_category", "company"])
asset_details = frappe.db.get_value("Asset", asset, ["asset_category", "company"])
asset_category, company = asset_details or [None, None]
account = frappe.db.get_value("Asset Category Account",
filters={"parent": asset_category, "company_name": company}, fieldname=fieldname)