Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .changeset/1980-forecast-formula-summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'hotcrm': patch
---

The *All Forecasts* list no longer shows a column total under **Expected**

**Expected** is a formula field (Closed Won + Commit, computed per row), so the
database has no stored value for it to add up. The platform's aggregate rules
refuse a `sum` over a formula field, and the view no longer asks for one. The
column itself stays, with each row's value. **Closed Won** and **Commit** keep
their totals, so the expected figure for a group or for the whole list is still
the sum of those two totals. Quota, Best Case and Pipeline keep their totals too.
3 changes: 2 additions & 1 deletion src/sales/views/forecast.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export const ForecastViews = defineView({
{ field: 'commit_amount', width: 140, align: 'right', summary: 'sum' },
{ field: 'best_case_amount', width: 140, align: 'right', summary: 'sum' },
{ field: 'pipeline_amount', width: 140, align: 'right', summary: 'sum' },
{ field: 'expected_amount', width: 140, align: 'right', summary: 'sum' },
// No total here: a formula has no stored column to aggregate, so the spec refuses `sum` on a `formula` field (#1980).
{ field: 'expected_amount', width: 140, align: 'right' },
{ field: 'attainment_pct', width: 130, align: 'right' },
{ field: 'coverage_ratio', width: 130, align: 'right' },
{ field: 'source', width: 130 },
Expand Down
Loading