fix: Multiplle sider issues
This commit is contained in:
parent
133ce286f9
commit
23ab5c5cc0
@ -11,7 +11,7 @@ frappe.ui.form.on('Budget', {
|
|||||||
report_type: "Profit and Loss",
|
report_type: "Profit and Loss",
|
||||||
is_group: 0
|
is_group: 0
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
frm.set_query("monthly_distribution", function() {
|
frm.set_query("monthly_distribution", function() {
|
||||||
@ -19,7 +19,7 @@ frappe.ui.form.on('Budget', {
|
|||||||
filters: {
|
filters: {
|
||||||
fiscal_year: frm.doc.fiscal_year
|
fiscal_year: frm.doc.fiscal_year
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
erpnext.accounts.dimensions.setup_dimension_filters(frm, frm.doctype);
|
erpnext.accounts.dimensions.setup_dimension_filters(frm, frm.doctype);
|
||||||
|
@ -15,9 +15,9 @@ frappe.ui.form.on("Fees", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onload: function(frm){
|
onload: function(frm){
|
||||||
frm.set_query("academic_term",function(){
|
frm.set_query("academic_term",function() {
|
||||||
return{
|
return{
|
||||||
"filters":{
|
"filters": {
|
||||||
"academic_year": (frm.doc.academic_year)
|
"academic_year": (frm.doc.academic_year)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -16,7 +16,7 @@ frappe.ui.form.on('Expense Claim', {
|
|||||||
frappe.ui.form.on('Expense Claim Detail', {
|
frappe.ui.form.on('Expense Claim Detail', {
|
||||||
expense_type: function(frm, cdt, cdn) {
|
expense_type: function(frm, cdt, cdn) {
|
||||||
var d = locals[cdt][cdn];
|
var d = locals[cdt][cdn];
|
||||||
if(!frm.doc.company) {
|
if (!frm.doc.company) {
|
||||||
d.expense_type = "";
|
d.expense_type = "";
|
||||||
frappe.msgprint(__("Please set the Company"));
|
frappe.msgprint(__("Please set the Company"));
|
||||||
this.frm.refresh_fields();
|
this.frm.refresh_fields();
|
||||||
|
@ -115,7 +115,7 @@ $.extend(erpnext.queries, {
|
|||||||
["Warehouse", "is_group", "=",0]
|
["Warehouse", "is_group", "=",0]
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
get_filtered_dimensions: function(doc, child_fields, dimension, company) {
|
get_filtered_dimensions: function(doc, child_fields, dimension, company) {
|
||||||
|
@ -202,7 +202,7 @@ $.extend(erpnext.utils, {
|
|||||||
let found = filters.some(el => el.fieldname === dimension['fieldname']);
|
let found = filters.some(el => el.fieldname === dimension['fieldname']);
|
||||||
|
|
||||||
if (!found) {
|
if (!found) {
|
||||||
filters.splice(index, 0 ,{
|
filters.splice(index, 0, {
|
||||||
"fieldname": dimension["fieldname"],
|
"fieldname": dimension["fieldname"],
|
||||||
"label": __(dimension["label"]),
|
"label": __(dimension["label"]),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
@ -69,13 +69,13 @@ erpnext.accounts.dimensions = {
|
|||||||
update_dimension(frm, doctype) {
|
update_dimension(frm, doctype) {
|
||||||
if (this.accounting_dimensions) {
|
if (this.accounting_dimensions) {
|
||||||
this.accounting_dimensions.forEach((dimension) => {
|
this.accounting_dimensions.forEach((dimension) => {
|
||||||
if(frm.is_new()) {
|
if (frm.is_new()) {
|
||||||
if(frm.doc.company && Object.keys(this.default_dimensions || {}).length > 0
|
if (frm.doc.company && Object.keys(this.default_dimensions || {}).length > 0
|
||||||
&& this.default_dimensions[frm.doc.company]) {
|
&& this.default_dimensions[frm.doc.company]) {
|
||||||
|
|
||||||
let default_dimension = this.default_dimensions[frm.doc.company][dimension['fieldname']];
|
let default_dimension = this.default_dimensions[frm.doc.company][dimension['fieldname']];
|
||||||
|
|
||||||
if(default_dimension) {
|
if (default_dimension) {
|
||||||
if (frappe.meta.has_field(doctype, dimension['fieldname'])) {
|
if (frappe.meta.has_field(doctype, dimension['fieldname'])) {
|
||||||
frm.set_value(dimension['fieldname'], default_dimension);
|
frm.set_value(dimension['fieldname'], default_dimension);
|
||||||
}
|
}
|
||||||
@ -98,4 +98,4 @@ erpnext.accounts.dimensions = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
@ -2,7 +2,7 @@
|
|||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.provide("erpnext.stock");
|
frappe.provide("erpnext.stock");
|
||||||
frappe.provide("erpnext.accounts.dimensions")
|
frappe.provide("erpnext.accounts.dimensions");
|
||||||
|
|
||||||
frappe.ui.form.on("Stock Reconciliation", {
|
frappe.ui.form.on("Stock Reconciliation", {
|
||||||
onload: function(frm) {
|
onload: function(frm) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user