diff --git a/.changeset/1980-forecast-formula-summary.md b/.changeset/1980-forecast-formula-summary.md new file mode 100644 index 00000000..19f590e7 --- /dev/null +++ b/.changeset/1980-forecast-formula-summary.md @@ -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. diff --git a/src/sales/views/forecast.view.ts b/src/sales/views/forecast.view.ts index e1f2fa44..368abb4b 100644 --- a/src/sales/views/forecast.view.ts +++ b/src/sales/views/forecast.view.ts @@ -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 },