@@ -30,7 +30,7 @@ import apiService from '@/service/api-service'
3030import useMillYear from '@/context/millYear/useMillYear'
3131import { useScheduleDocument } from '@/hooks/useScheduleDocument'
3232import { extractDetail } from '@/utils/error'
33- import { numStr } from '@/utils/number'
33+ import { numStr , numStrFixed } from '@/utils/number'
3434import LoadingScreen from '@/components/core/LoadingScreen'
3535import PageState from '@/components/core/PageState'
3636import ScheduleTombstone from '@/components/core/ScheduleTombstone'
@@ -53,17 +53,12 @@ const BEC_CATALOGUE_PATH = '/v1/schedule11/biogeoclimatic-catalogue'
5353const BEC_DEBOUNCE_MS = 250
5454
5555// Legacy display masks (AD-5 no recompute — the values are server-computed, this only formats them).
56- // Null renders BLANK, never "0": a null total means "no contributors", which is meaningful.
57- const mask = ( value : number | null | undefined , minFrac : number , maxFrac : number ) : string =>
58- value === null || value === undefined
59- ? ''
60- : value . toLocaleString ( 'en-US' , {
61- minimumFractionDigits : minFrac ,
62- maximumFractionDigits : maxFrac ,
63- } )
64- const money = ( value : number | null | undefined ) : string => mask ( value , 0 , 0 ) // #,###,##0
65- const area = ( value : number | null | undefined ) : string => mask ( value , 1 , 1 ) // #,###,##0.0
66- const ratio = ( value : number | null | undefined ) : string => mask ( value , 2 , 2 ) // #,###,##0.00
56+ // Delegate to the shared en-CA numStrFixed (Story 29.8): one locale app-wide, no local toLocaleString
57+ // copy. numStrFixed keeps the same contract — fixed decimals, and BLANK (never "0") on null, since a
58+ // null total means "no contributors", which is meaningful.
59+ const money = ( value : number | null | undefined ) : string => numStrFixed ( value , 0 ) // #,###,##0
60+ const area = ( value : number | null | undefined ) : string => numStrFixed ( value , 1 ) // #,###,##0.0
61+ const ratio = ( value : number | null | undefined ) : string => numStrFixed ( value , 2 ) // #,###,##0.00
6762
6863// Whole-dollar costs: legacy accepted fractional input (ILCRCostConverter BigDecimal parse) and
6964// Oracle COST NUMBER(15) ROUNDED it on insert, while the modern Integer wire would silently
0 commit comments