mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
chore: additional_asset_cost field (backport #38904) (#38905) * chore: additional_asset_cost field (#38904) (cherry picked from commit283763dfb2) # Conflicts: # erpnext/assets/doctype/asset/asset.py * chore: resolve conflicts in asset.py --------- Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com> (cherry picked from commit3b9feffc00) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
"purchase_invoice",
|
"purchase_invoice",
|
||||||
"available_for_use_date",
|
"available_for_use_date",
|
||||||
"total_asset_cost",
|
"total_asset_cost",
|
||||||
|
"additional_asset_cost",
|
||||||
"column_break_23",
|
"column_break_23",
|
||||||
"gross_purchase_amount",
|
"gross_purchase_amount",
|
||||||
"asset_quantity",
|
"asset_quantity",
|
||||||
@@ -541,6 +542,14 @@
|
|||||||
"label": "Total Asset Cost",
|
"label": "Total Asset Cost",
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"depends_on": "eval:doc.docstatus > 0",
|
||||||
|
"fieldname": "additional_asset_cost",
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"label": "Additional Asset Cost",
|
||||||
|
"options": "Company:company:default_currency",
|
||||||
|
"read_only": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"idx": 72,
|
"idx": 72,
|
||||||
@@ -574,7 +583,7 @@
|
|||||||
"link_fieldname": "target_asset"
|
"link_fieldname": "target_asset"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"modified": "2023-12-20 16:50:21.128595",
|
"modified": "2023-12-21 16:46:20.732869",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Assets",
|
"module": "Assets",
|
||||||
"name": "Asset",
|
"name": "Asset",
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ class Asset(AccountsController):
|
|||||||
if self.get("schedules"):
|
if self.get("schedules"):
|
||||||
self.validate_expected_value_after_useful_life()
|
self.validate_expected_value_after_useful_life()
|
||||||
|
|
||||||
|
self.total_asset_cost = self.gross_purchase_amount
|
||||||
self.status = self.get_status()
|
self.status = self.get_status()
|
||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ class AssetRepair(AccountsController):
|
|||||||
|
|
||||||
if self.capitalize_repair_cost:
|
if self.capitalize_repair_cost:
|
||||||
self.asset_doc.total_asset_cost += self.repair_cost
|
self.asset_doc.total_asset_cost += self.repair_cost
|
||||||
|
self.asset_doc.additional_asset_cost += self.repair_cost
|
||||||
|
|
||||||
if self.get("stock_consumption"):
|
if self.get("stock_consumption"):
|
||||||
self.check_for_stock_items_and_warehouse()
|
self.check_for_stock_items_and_warehouse()
|
||||||
@@ -73,6 +74,7 @@ class AssetRepair(AccountsController):
|
|||||||
|
|
||||||
if self.capitalize_repair_cost:
|
if self.capitalize_repair_cost:
|
||||||
self.asset_doc.total_asset_cost -= self.repair_cost
|
self.asset_doc.total_asset_cost -= self.repair_cost
|
||||||
|
self.asset_doc.additional_asset_cost -= self.repair_cost
|
||||||
|
|
||||||
if self.get("stock_consumption"):
|
if self.get("stock_consumption"):
|
||||||
self.increase_stock_quantity()
|
self.increase_stock_quantity()
|
||||||
|
|||||||
Reference in New Issue
Block a user