mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-18 20:49:19 +00:00
fix: add server side validation
(cherry picked from commit e04353fc31)
# Conflicts:
# erpnext/assets/doctype/asset/asset.py
This commit is contained in:
@@ -155,9 +155,15 @@ class Asset(AccountsController):
|
|||||||
self.validate_expected_value_after_useful_life()
|
self.validate_expected_value_after_useful_life()
|
||||||
self.set_total_booked_depreciations()
|
self.set_total_booked_depreciations()
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
def before_save(self):
|
def before_save(self):
|
||||||
self.total_asset_cost = self.gross_purchase_amount + self.additional_asset_cost
|
self.total_asset_cost = self.gross_purchase_amount + self.additional_asset_cost
|
||||||
self.status = self.get_status()
|
self.status = self.get_status()
|
||||||
|
=======
|
||||||
|
def before_submit(self):
|
||||||
|
if self.is_composite_asset and not has_active_capitalization(self.name):
|
||||||
|
frappe.throw(_("Please capitalize this asset before submitting."))
|
||||||
|
>>>>>>> e04353fc31 (fix: add server side validation)
|
||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
self.validate_in_use_date()
|
self.validate_in_use_date()
|
||||||
|
|||||||
Reference in New Issue
Block a user