ERPNext.com Frappe Cloud Support Partners Foundation Frappe School

Asset Error: Invalid Gross Purchase Amount

Dear community, as you can see below, I could not save the doc due to this error. It is an existing asset.

Version: v12.9.3

1 Like

ERPNext: v13.0.0-beta.9 (version-13-beta)
Frappe Framework: v13.0.0-beta.9 (version-13-beta)

Error still persists while I have tried to import Asset from Data Import using Excel.

Traceback (most recent call last):
File "/home/frappe/erpnext/apps/frappe/frappe/core/doctype/data_import/importer.py", line 126, in 
import_data
doc = self.process_doc(doc)
File "/home/frappe/erpnext/apps/frappe/frappe/core/doctype/data_import/importer.py", line 194, in 
process_doc
return self.insert_record(doc)
File "/home/frappe/erpnext/apps/frappe/frappe/core/doctype/data_import/importer.py", line 213, in 
insert_record
new_doc.insert()
File "/home/frappe/erpnext/apps/frappe/frappe/model/document.py", line 238, in insert
self.run_before_save_methods()
File "/home/frappe/erpnext/apps/frappe/frappe/model/document.py", line 947, in 
run_before_save_methods
self.run_method("validate")
File "/home/frappe/erpnext/apps/frappe/frappe/model/document.py", line 848, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/frappe/erpnext/apps/frappe/frappe/model/document.py", line 1133, in composer
return composed(self, method, *args, **kwargs)
File "/home/frappe/erpnext/apps/frappe/frappe/model/document.py", line 1116, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/frappe/erpnext/apps/frappe/frappe/model/document.py", line 842, in 
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/frappe/erpnext/apps/erpnext/erpnext/assets/doctype/asset/asset.py", line 25, in validate
self.validate_gross_and_purchase_amount()
File "/home/frappe/erpnext/apps/erpnext/erpnext/assets/doctype/asset/asset.py", line 138, in 
validate_gross_and_purchase_amount
.format(frappe.bold("equal"), "
"), title=_("Invalid Gross Purchase Amount"))
 File "/home/frappe/erpnext/apps/frappe/frappe/__init__.py", line 409, in throw
msgprint(msg, raise_exception=exc, title=title, indicator='red', is_minimizable=is_minimizable, 
wide=wide, as_list=as_list)
 File "/home/frappe/erpnext/apps/frappe/frappe/__init__.py", line 388, in msgprint
_raise_exception()
File "/home/frappe/erpnext/apps/frappe/frappe/__init__.py", line 342, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError: Gross Purchase Amount should be equal to purchase amount of one  
single Asset. Please do not book expense of multiple assets against one single Asset.