mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
Merge branch 'develop' into sla_fix
This commit is contained in:
@@ -43,8 +43,13 @@ frappe.ui.form.on('Bank Guarantee', {
|
|||||||
|
|
||||||
reference_docname: function(frm) {
|
reference_docname: function(frm) {
|
||||||
if (frm.doc.reference_docname && frm.doc.reference_doctype) {
|
if (frm.doc.reference_docname && frm.doc.reference_doctype) {
|
||||||
let fields_to_fetch = ["project", "grand_total"];
|
let fields_to_fetch = ["grand_total"];
|
||||||
let party_field = frm.doc.reference_doctype == "Sales Order" ? "customer" : "supplier";
|
let party_field = frm.doc.reference_doctype == "Sales Order" ? "customer" : "supplier";
|
||||||
|
|
||||||
|
if (frm.doc.reference_doctype == "Sales Order") {
|
||||||
|
fields_to_fetch.push("project");
|
||||||
|
}
|
||||||
|
|
||||||
fields_to_fetch.push(party_field);
|
fields_to_fetch.push(party_field);
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: "erpnext.accounts.doctype.bank_guarantee.bank_guarantee.get_vouchar_detials",
|
method: "erpnext.accounts.doctype.bank_guarantee.bank_guarantee.get_vouchar_detials",
|
||||||
|
|||||||
@@ -14,8 +14,12 @@ erpnext.doctypes_with_dimensions.forEach((doctype) => {
|
|||||||
onload: function(frm) {
|
onload: function(frm) {
|
||||||
dimension_filters.then((dimensions) => {
|
dimension_filters.then((dimensions) => {
|
||||||
dimensions.forEach((dimension) => {
|
dimensions.forEach((dimension) => {
|
||||||
frm.set_query(dimension['fieldname'],{
|
frappe.model.with_doctype(dimension['document_type'], () => {
|
||||||
"is_group": 0
|
if (frappe.meta.has_field(dimension['document_type'], 'is_group')) {
|
||||||
|
frm.set_query(dimension['fieldname'], {
|
||||||
|
"is_group": 0
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user