In Query Script not invoking Java Script

I have a query which shows the result. Below in script I have given the following code.

frappe.query_reports[“Purchase Order Status count”] = {
formatter: function(row, cell, value, columnDef, data, default_formatter) {
console.log(“FIELD:”, columnDef.fieldname, “LABEL:”, columnDef.label); // Inspect in dev tools

    value = default_formatter(row, cell, value, columnDef, data);

    // Use the exact fieldname detected (not label)
    if (columnDef.fieldname === "total_value") {
        return "₹" + Number(value).toLocaleString('en-IN');
    }

    return value;
}

};

But the script part is not executing at all

I think you don’t have to do this.

Why don’t you set total_value field as Currency

Yes, that’s a good idea. But I need to know how colouring options can apply and improve aesthetic.

Your syntax (function signature) is little but wrong.

Check this:

  1. razorpayx-integration/razorpayx_integration/razorpayx_integration/report/razorpayx_payout_status/razorpayx_payout_status.js at 661dd51f5b4938b3f03d28ebace0bc297e18ee50 · resilient-tech/razorpayx-integration · GitHub

  2. erpnext/erpnext/accounts/report/budget_variance_report/budget_variance_report.js at f087da927aba08542e319ea9a76797cf5bd25b7b · frappe/erpnext · GitHub