mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
feat(Asset Repair): Change visibilty of sections
This commit is contained in:
@@ -2,35 +2,9 @@
|
|||||||
// 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', {
|
||||||
// setup: function(frm) {
|
|
||||||
// frm.add_fetch("company", "repair_and_maintenance_account", "payable_account");
|
|
||||||
|
|
||||||
// frm.set_query("payable_account", function() {
|
|
||||||
// return {
|
|
||||||
// filters: {
|
|
||||||
// "report_type": "Balance Sheet",
|
|
||||||
// "account_type": "Payable",
|
|
||||||
// "company": frm.doc.company,
|
|
||||||
// "is_group": 0
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
|
|
||||||
// stock_items_add: function(frm){
|
|
||||||
// var table = frm.doc.stock_items;
|
|
||||||
// for(var i in table) {
|
|
||||||
// if (table[i].valuation_rate == 0) {
|
|
||||||
// frm.set_value(table[i].total_value, (table[i].valuation_rate * table[i].consumed_quantity))
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
|
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
frm.toggle_display(['completion_date', 'repair_status', 'accounting_details', 'accounting_dimensions_section'], !(frm.doc.__islocal));
|
frm.toggle_display(['completion_date', 'repair_status', 'accounting_details', 'accounting_dimensions_section'], !(frm.doc.__islocal));
|
||||||
frm.toggle_display(['stock_consumption_details_section', 'total_repair_cost'], frm.doc.stock_consumption);
|
|
||||||
frm.toggle_display('asset_depreciation_details_section', frm.doc.capitalize_repair_cost);
|
|
||||||
|
|
||||||
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 = {
|
||||||
|
|||||||
@@ -201,11 +201,13 @@
|
|||||||
"label": "Stock Consumed During Repair"
|
"label": "Stock Consumed During Repair"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "stock_consumption",
|
||||||
"fieldname": "stock_consumption_details_section",
|
"fieldname": "stock_consumption_details_section",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "Stock Consumption Details"
|
"label": "Stock Consumption Details"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "stock_consumption",
|
||||||
"fieldname": "total_repair_cost",
|
"fieldname": "total_repair_cost",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"label": "Total Repair Cost"
|
"label": "Total Repair Cost"
|
||||||
@@ -217,6 +219,7 @@
|
|||||||
"options": "Warehouse"
|
"options": "Warehouse"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "capitalize_repair_cost",
|
||||||
"fieldname": "asset_depreciation_details_section",
|
"fieldname": "asset_depreciation_details_section",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "Asset Depreciation Details"
|
"label": "Asset Depreciation Details"
|
||||||
@@ -224,7 +227,7 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "increase_in_asset_life",
|
"fieldname": "increase_in_asset_life",
|
||||||
"fieldtype": "Int",
|
"fieldtype": "Int",
|
||||||
"label": "Increase In Asset Life"
|
"label": "Increase In Asset Life(Months)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "purchase_invoice",
|
"fieldname": "purchase_invoice",
|
||||||
@@ -236,7 +239,7 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-05-14 02:31:57.226273",
|
"modified": "2021-05-21 10:37:35.002238",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Assets",
|
"module": "Assets",
|
||||||
"name": "Asset Repair",
|
"name": "Asset Repair",
|
||||||
|
|||||||
Reference in New Issue
Block a user