Hello,
I want to create stats in the Project doctype. Here is an example of stats that are already in the Customer doctype:
Thanks,
Anisha Jain
NCP
August 2, 2024, 6:13am
2
Please check the example of the customer indicator:
set_party_dashboard_indicators: function (frm) {
if (frm.doc.__onload && frm.doc.__onload.dashboard_info) {
var company_wise_info = frm.doc.__onload.dashboard_info;
if (company_wise_info.length > 1) {
company_wise_info.forEach(function (info) {
erpnext.utils.add_indicator_for_multicompany(frm, info);
});
} else if (company_wise_info.length === 1) {
frm.dashboard.add_indicator(
__("Annual Billing: {0}", [
format_currency(
company_wise_info[0].billing_this_year,
company_wise_info[0].currency
),
]),
"blue"
);
frm.dashboard.add_indicator(
__("Total Unpaid: {0}", [
format_currency(company_wise_info[0].total_unpaid, company_wise_info[0].currency),
This file has been truncated. show original
Thanks for providing the solution. It works fine. However, the stats are shown in the ‘Connection’ tab. Is it possible to display the stats in another tab?
NCP
August 2, 2024, 7:13am
4
You have to check the logic in core!