fix: payment reference on adding cost center in PE and Issue Summary Report error fixes (#24951)
This commit is contained in:
parent
dffa647071
commit
c7c921495b
@ -605,12 +605,22 @@ frappe.ui.form.on('Payment Entry', {
|
|||||||
{fieldtype:"Column Break"},
|
{fieldtype:"Column Break"},
|
||||||
{fieldtype:"Float", label: __("Less Than Amount"), fieldname:"outstanding_amt_less_than"},
|
{fieldtype:"Float", label: __("Less Than Amount"), fieldname:"outstanding_amt_less_than"},
|
||||||
{fieldtype:"Section Break"},
|
{fieldtype:"Section Break"},
|
||||||
|
{fieldtype:"Link", label:__("Cost Center"), fieldname:"cost_center", options:"Cost Center",
|
||||||
|
"get_query": function() {
|
||||||
|
return {
|
||||||
|
"filters": {"company": frm.doc.company}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{fieldtype:"Column Break"},
|
||||||
|
{fieldtype:"Section Break"},
|
||||||
{fieldtype:"Check", label: __("Allocate Payment Amount"), fieldname:"allocate_payment_amount", default:1},
|
{fieldtype:"Check", label: __("Allocate Payment Amount"), fieldname:"allocate_payment_amount", default:1},
|
||||||
];
|
];
|
||||||
|
|
||||||
frappe.prompt(fields, function(filters){
|
frappe.prompt(fields, function(filters){
|
||||||
frappe.flags.allocate_payment_amount = true;
|
frappe.flags.allocate_payment_amount = true;
|
||||||
frm.events.validate_filters_data(frm, filters);
|
frm.events.validate_filters_data(frm, filters);
|
||||||
|
frm.doc.cost_center = filters.cost_center;
|
||||||
frm.events.get_outstanding_documents(frm, filters);
|
frm.events.get_outstanding_documents(frm, filters);
|
||||||
}, __("Filters"), __("Get Outstanding Documents"));
|
}, __("Filters"), __("Get Outstanding Documents"));
|
||||||
},
|
},
|
||||||
@ -1066,11 +1076,6 @@ frappe.ui.form.on('Payment Entry', {
|
|||||||
frm.set_value("paid_from_account_balance", r.message.paid_from_account_balance);
|
frm.set_value("paid_from_account_balance", r.message.paid_from_account_balance);
|
||||||
frm.set_value("paid_to_account_balance", r.message.paid_to_account_balance);
|
frm.set_value("paid_to_account_balance", r.message.paid_to_account_balance);
|
||||||
frm.set_value("party_balance", r.message.party_balance);
|
frm.set_value("party_balance", r.message.party_balance);
|
||||||
},
|
|
||||||
() => {
|
|
||||||
if(frm.doc.payment_type != "Internal") {
|
|
||||||
frm.clear_table("references");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -260,8 +260,7 @@ class IssueSummary(object):
|
|||||||
self.issue_summary_data[value]['avg_user_resolution_time'] = entry.get('avg_user_resolution_time') or 0.0
|
self.issue_summary_data[value]['avg_user_resolution_time'] = entry.get('avg_user_resolution_time') or 0.0
|
||||||
|
|
||||||
def get_chart_data(self):
|
def get_chart_data(self):
|
||||||
if not self.data:
|
self.chart = []
|
||||||
return None
|
|
||||||
|
|
||||||
labels = []
|
labels = []
|
||||||
open_issues = []
|
open_issues = []
|
||||||
@ -310,8 +309,7 @@ class IssueSummary(object):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def get_report_summary(self):
|
def get_report_summary(self):
|
||||||
if not self.data:
|
self.report_summary = []
|
||||||
return None
|
|
||||||
|
|
||||||
open_issues = 0
|
open_issues = 0
|
||||||
replied = 0
|
replied = 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user