mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
fix: Rename 'Fixed Asset Depreciation Settings' to 'Fixed Asset Deafults'
This commit is contained in:
@@ -2,6 +2,10 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('Asset Repair', {
|
frappe.ui.form.on('Asset Repair', {
|
||||||
|
refresh: function(frm) {
|
||||||
|
frm.toggle_display(['completion_date', 'repair_status'], !(frm.doc.__islocal));
|
||||||
|
},
|
||||||
|
|
||||||
repair_status: (frm) => {
|
repair_status: (frm) => {
|
||||||
if (frm.doc.completion_date && frm.doc.repair_status == "Completed") {
|
if (frm.doc.completion_date && frm.doc.repair_status == "Completed") {
|
||||||
frappe.call ({
|
frappe.call ({
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"field_order": [
|
"field_order": [
|
||||||
|
"asset",
|
||||||
"naming_series",
|
"naming_series",
|
||||||
"column_break_2",
|
"column_break_2",
|
||||||
"asset",
|
|
||||||
"asset_name",
|
"asset_name",
|
||||||
"section_break_5",
|
"section_break_5",
|
||||||
"failure_date",
|
"failure_date",
|
||||||
@@ -18,7 +18,10 @@
|
|||||||
"column_break_6",
|
"column_break_6",
|
||||||
"completion_date",
|
"completion_date",
|
||||||
"repair_status",
|
"repair_status",
|
||||||
|
"section_break_7",
|
||||||
"repair_cost",
|
"repair_cost",
|
||||||
|
"column_break_8",
|
||||||
|
"payable_account",
|
||||||
"section_break_9",
|
"section_break_9",
|
||||||
"description",
|
"description",
|
||||||
"column_break_9",
|
"column_break_9",
|
||||||
@@ -151,12 +154,27 @@
|
|||||||
"fieldname": "asset_name",
|
"fieldname": "asset_name",
|
||||||
"fieldtype": "Read Only",
|
"fieldtype": "Read Only",
|
||||||
"label": "Asset Name"
|
"label": "Asset Name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "payable_account",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Payable Account",
|
||||||
|
"options": "Account"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "section_break_7",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"label": "Accounting Details"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_8",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-05-10 22:48:42.165513",
|
"modified": "2021-05-11 05:11:58.330860",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Assets",
|
"module": "Assets",
|
||||||
"name": "Asset Repair",
|
"name": "Asset Repair",
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ class AssetRepair(Document):
|
|||||||
if self.repair_status == "Completed" and not self.completion_date:
|
if self.repair_status == "Completed" and not self.completion_date:
|
||||||
frappe.throw(_("Please select Completion Date for Completed Repair"))
|
frappe.throw(_("Please select Completion Date for Completed Repair"))
|
||||||
|
|
||||||
|
if self.repair_status == 'Pending':
|
||||||
|
frappe.db.set_value('Asset', self.asset, 'status', 'Out of Order')
|
||||||
|
else:
|
||||||
|
frappe.db.set_value('Asset', self.asset, 'status', 'Submitted')
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_downtime(failure_date, completion_date):
|
def get_downtime(failure_date, completion_date):
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
"stock_received_but_not_billed",
|
"stock_received_but_not_billed",
|
||||||
"service_received_but_not_billed",
|
"service_received_but_not_billed",
|
||||||
"expenses_included_in_valuation",
|
"expenses_included_in_valuation",
|
||||||
"fixed_asset_depreciation_settings",
|
"fixed_asset_defaults",
|
||||||
"accumulated_depreciation_account",
|
"accumulated_depreciation_account",
|
||||||
"depreciation_expense_account",
|
"depreciation_expense_account",
|
||||||
"series_for_depreciation_entry",
|
"series_for_depreciation_entry",
|
||||||
@@ -519,12 +519,6 @@
|
|||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"options": "Account"
|
"options": "Account"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"collapsible": 1,
|
|
||||||
"fieldname": "fixed_asset_depreciation_settings",
|
|
||||||
"fieldtype": "Section Break",
|
|
||||||
"label": "Fixed Asset Depreciation Settings"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"fieldname": "accumulated_depreciation_account",
|
"fieldname": "accumulated_depreciation_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -734,6 +728,12 @@
|
|||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Default Payment Discount Account",
|
"label": "Default Payment Discount Account",
|
||||||
"options": "Account"
|
"options": "Account"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"collapsible": 1,
|
||||||
|
"fieldname": "fixed_asset_defaults",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"label": "Fixed Asset Defaults"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "fa fa-building",
|
"icon": "fa fa-building",
|
||||||
@@ -741,7 +741,7 @@
|
|||||||
"image_field": "company_logo",
|
"image_field": "company_logo",
|
||||||
"is_tree": 1,
|
"is_tree": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-05-07 03:11:28.189740",
|
"modified": "2021-05-11 21:45:22.803065",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Setup",
|
"module": "Setup",
|
||||||
"name": "Company",
|
"name": "Company",
|
||||||
|
|||||||
Reference in New Issue
Block a user