fix(Asset Repair): Display fields according to the state of the doc
This commit is contained in:
parent
4e620c3b32
commit
fd272569aa
@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
frappe.ui.form.on('Asset Repair', {
|
frappe.ui.form.on('Asset Repair', {
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
frm.toggle_display(['completion_date', 'repair_status', 'accounting_details', 'accounting_dimensions_section'], !(frm.doc.__islocal));
|
|
||||||
|
|
||||||
if (frm.doc.docstatus) {
|
if (frm.doc.docstatus) {
|
||||||
frm.add_custom_button("View General Ledger", function() {
|
frm.add_custom_button("View General Ledger", function() {
|
||||||
frappe.route_options = {
|
frappe.route_options = {
|
||||||
|
|||||||
@ -71,6 +71,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "completion_date",
|
"fieldname": "completion_date",
|
||||||
"fieldtype": "Datetime",
|
"fieldtype": "Datetime",
|
||||||
"label": "Completion Date"
|
"label": "Completion Date"
|
||||||
@ -78,6 +79,7 @@
|
|||||||
{
|
{
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"default": "Pending",
|
"default": "Pending",
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "repair_status",
|
"fieldname": "repair_status",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"label": "Repair Status",
|
"label": "Repair Status",
|
||||||
@ -154,6 +156,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "0",
|
"default": "0",
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "capitalize_repair_cost",
|
"fieldname": "capitalize_repair_cost",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"label": "Capitalize Repair Cost"
|
"label": "Capitalize Repair Cost"
|
||||||
@ -196,6 +199,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "0",
|
"default": "0",
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "stock_consumption",
|
"fieldname": "stock_consumption",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"label": "Stock Consumed During Repair"
|
"label": "Stock Consumed During Repair"
|
||||||
@ -230,6 +234,7 @@
|
|||||||
"label": "Increase In Asset Life(Months)"
|
"label": "Increase In Asset Life(Months)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "purchase_invoice",
|
"fieldname": "purchase_invoice",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Purchase Invoice",
|
"label": "Purchase Invoice",
|
||||||
@ -239,8 +244,7 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-06-15 10:34:00.839353",
|
"modified": "2021-06-16 07:01:28.217619",
|
||||||
"title_field": "asset_name",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Assets",
|
"module": "Assets",
|
||||||
"name": "Asset Repair",
|
"name": "Asset Repair",
|
||||||
@ -279,6 +283,7 @@
|
|||||||
],
|
],
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
|
"title_field": "asset_name",
|
||||||
"track_changes": 1,
|
"track_changes": 1,
|
||||||
"track_seen": 1
|
"track_seen": 1
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user