Skip to content

Commit

Permalink
fix: reportview average of ints should be float (#26284) (#26288)
Browse files Browse the repository at this point in the history
(cherry picked from commit 8bd40b3)

Co-authored-by: Ankush Menat <ankush@frappe.io>
  • Loading branch information
mergify[bot] and ankush committed May 2, 2024
1 parent 5657af4 commit 11f041b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frappe/public/js/frappe/ui/group_by/group_by.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,9 @@ frappe.ui.GroupBy = class {
if (this.aggregate_function === "sum") {
docfield.label = __("Sum of {0}", [__(docfield.label, null, docfield.parent)]);
} else {
if (docfield.fieldtype == "Int") {
docfield.fieldtype = "Float"; // average of ints can be a float
}
docfield.label = __("Average of {0}", [__(docfield.label, null, docfield.parent)]);
}
}
Expand Down

0 comments on commit 11f041b

Please sign in to comment.