Last active
January 28, 2022 09:15
-
-
Save f7urry/101cceeadb6218184e338808cca3fea5 to your computer and use it in GitHub Desktop.
Revisions
-
f7urry revised this gist
Jan 28, 2022 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ ``` frappe.query_reports["Budget vs Claim"] = { "filters": [ @@ -36,4 +37,5 @@ frappe.query_reports["Budget vs Claim"] = { } }; //you can check fieldname on this object //console.log(frappe.query_report); ``` -
f7urry renamed this gist
Jan 28, 2022 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
f7urry created this gist
Jan 28, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,39 @@ frappe.query_reports["Budget vs Claim"] = { "filters": [ { "fieldname": "company", "label": __("Company"), "fieldtype": "Link", "width": "80", "options": "Company", "default": frappe.defaults.get_default("company") }, { "fieldname":"from_date", "label": __("From Date"), "fieldtype": "Date", "width": "80", "reqd": 1, "default": frappe.datetime.add_months(frappe.datetime.get_today(), -1), }, { "fieldname":"to_date", "label": __("To Date"), "fieldtype": "Date", "width": "80", "reqd": 1, "default": frappe.datetime.get_today() } ], "formatter": function (value, row, column, data, default_formatter) { value = default_formatter(value, row, column, data); if (column.fieldname == "sisa" && data && data.sisa < 0) { value = "<span style='color:red'>" + value + "</span>"; } return value; } }; //you can check fieldname on this object //console.log(frappe.query_report);