fix: Rename 'Fixed Asset Depreciation Settings' to 'Fixed Asset Deafults'

This commit is contained in:
GangaManoj 2021-07-09 22:10:35 +05:30
parent 9e26f2d797
commit 58bc967073
4 changed files with 36 additions and 10 deletions

View File

@ -2,6 +2,10 @@
// For license information, please see license.txt
frappe.ui.form.on('Asset Repair', {
refresh: function(frm) {
frm.toggle_display(['completion_date', 'repair_status'], !(frm.doc.__islocal));
},
repair_status: (frm) => {
if (frm.doc.completion_date && frm.doc.repair_status == "Completed") {
frappe.call ({

View File

@ -7,9 +7,9 @@
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"asset",
"naming_series",
"column_break_2",
"asset",
"asset_name",
"section_break_5",
"failure_date",
@ -18,7 +18,10 @@
"column_break_6",
"completion_date",
"repair_status",
"section_break_7",
"repair_cost",
"column_break_8",
"payable_account",
"section_break_9",
"description",
"column_break_9",
@ -151,12 +154,27 @@
"fieldname": "asset_name",
"fieldtype": "Read Only",
"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,
"is_submittable": 1,
"links": [],
"modified": "2021-05-10 22:48:42.165513",
"modified": "2021-05-11 05:11:58.330860",
"modified_by": "Administrator",
"module": "Assets",
"name": "Asset Repair",

View File

@ -13,6 +13,10 @@ class AssetRepair(Document):
if self.repair_status == "Completed" and not self.completion_date:
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()
def get_downtime(failure_date, completion_date):

View File

@ -74,7 +74,7 @@
"stock_received_but_not_billed",
"service_received_but_not_billed",
"expenses_included_in_valuation",
"fixed_asset_depreciation_settings",
"fixed_asset_defaults",
"accumulated_depreciation_account",
"depreciation_expense_account",
"series_for_depreciation_entry",
@ -519,12 +519,6 @@
"no_copy": 1,
"options": "Account"
},
{
"collapsible": 1,
"fieldname": "fixed_asset_depreciation_settings",
"fieldtype": "Section Break",
"label": "Fixed Asset Depreciation Settings"
},
{
"fieldname": "accumulated_depreciation_account",
"fieldtype": "Link",
@ -734,6 +728,12 @@
"fieldtype": "Link",
"label": "Default Payment Discount Account",
"options": "Account"
},
{
"collapsible": 1,
"fieldname": "fixed_asset_defaults",
"fieldtype": "Section Break",
"label": "Fixed Asset Defaults"
}
],
"icon": "fa fa-building",
@ -741,7 +741,7 @@
"image_field": "company_logo",
"is_tree": 1,
"links": [],
"modified": "2021-05-07 03:11:28.189740",
"modified": "2021-05-11 21:45:22.803065",
"modified_by": "Administrator",
"module": "Setup",
"name": "Company",