mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 03:01:22 +00:00
fix: cannot create existing assets
This commit is contained in:
@@ -126,6 +126,8 @@ class Asset(AccountsController):
|
|||||||
frappe.throw(_("Available-for-use Date should be after purchase date"))
|
frappe.throw(_("Available-for-use Date should be after purchase date"))
|
||||||
|
|
||||||
def validate_gross_and_purchase_amount(self):
|
def validate_gross_and_purchase_amount(self):
|
||||||
|
if self.is_existing_asset: return
|
||||||
|
|
||||||
if self.gross_purchase_amount and self.gross_purchase_amount != self.purchase_receipt_amount:
|
if self.gross_purchase_amount and self.gross_purchase_amount != self.purchase_receipt_amount:
|
||||||
frappe.throw(_("Gross Purchase Amount should be {} to purchase amount of one single Asset. {}\
|
frappe.throw(_("Gross Purchase Amount should be {} to purchase amount of one single Asset. {}\
|
||||||
Please do not book expense of multiple assets against one single Asset.")
|
Please do not book expense of multiple assets against one single Asset.")
|
||||||
|
|||||||
Reference in New Issue
Block a user