Skip to content

Commit

Permalink
fix: removed unrelated code modification
Browse files Browse the repository at this point in the history
(cherry picked from commit 360c3b3)
  • Loading branch information
khushi8112 authored and mergify[bot] committed May 14, 2024
1 parent 9b3f309 commit 0aca1e8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
15 changes: 4 additions & 11 deletions erpnext/assets/doctype/asset/asset.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"asset_owner_company",
"is_existing_asset",
"is_composite_asset",
"is_composite_component",
"supplier",
"customer",
"image",
Expand Down Expand Up @@ -203,7 +202,8 @@
"fieldname": "purchase_date",
"fieldtype": "Date",
"label": "Purchase Date",
"mandatory_depends_on": "eval:!doc.is_existing_asset && !doc.is_composite_asset"
"mandatory_depends_on": "eval:!doc.is_existing_asset && !doc.is_composite_asset",
"read_only_depends_on": "eval:!doc.is_existing_asset && !doc.is_composite_asset"
},
{
"fieldname": "disposal_date",
Expand Down Expand Up @@ -234,7 +234,7 @@
"fieldname": "available_for_use_date",
"fieldtype": "Date",
"label": "Available-for-use Date",
"mandatory_depends_on": "eval:(!doc.is_composite_component && doc.docstatus==1)"
"mandatory_depends_on": "eval:(!doc.is_composite_asset || doc.docstatus==1)"
},
{
"default": "0",
Expand Down Expand Up @@ -509,7 +509,7 @@
},
{
"default": "0",
"depends_on": "eval:(!doc.is_existing_asset && !doc.is_composite_component)",
"depends_on": "eval:!doc.is_existing_asset",
"fieldname": "is_composite_asset",
"fieldtype": "Check",
"label": "Is Composite Asset"
Expand Down Expand Up @@ -538,13 +538,6 @@
"options": "Company:company:default_currency",
"read_only": 1
},
{
"default": "0",
"depends_on": "eval:(!doc.is_existing_asset && !doc.is_composite_asset)",
"fieldname": "is_composite_component",
"fieldtype": "Check",
"label": "Is Composite Component"
},
{
"fieldname": "purchase_amount",
"fieldtype": "Currency",
Expand Down
1 change: 0 additions & 1 deletion erpnext/assets/doctype/asset/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ class Asset(AccountsController):
insured_value: DF.Data | None
insurer: DF.Data | None
is_composite_asset: DF.Check
is_composite_component: DF.Check
is_existing_asset: DF.Check
is_fully_depreciated: DF.Check
item_code: DF.Link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,6 @@ def create_target_asset(self):
asset_doc.purchase_date = self.posting_date
asset_doc.gross_purchase_amount = total_target_asset_value
asset_doc.purchase_amount = total_target_asset_value
asset_doc.purchase_amount = total_target_asset_value
asset_doc.capitalized_in = self.name
asset_doc.flags.ignore_validate = True
asset_doc.flags.asset_created_via_asset_capitalization = True
Expand Down

0 comments on commit 0aca1e8

Please sign in to comment.