SetStagePercent clamps the value you type to whatever is left after the pinned stages, marks that stage pinned, and hands the remainder to the last unpinned stage. Adding or removing a stage re-runs the same rebalance, so the list can never be saved at 97% or 104%.
Also called: stage percentages · pinned stages · auto balance · payment split
- 1rebalancePayment() finds the last unpinned stage and sets it to 100 minus everything else.
- 2setStagePercent() computes the maximum available (100 minus pinned others) and clamps to it.
- 3addPaymentStage / removePaymentStage both rebalance after the change.
- 4A single-stage list refuses to be emptied.
A percentage schedule that does not total 100 either underbills the job or overbills the customer, and the arithmetic was being done in a builder's head between phone calls. Stages rebalance themselves so the list always adds to 100, and any stage can be pinned — a builder who types 30% means 30%, so the remainder moves somewhere else instead of quietly rewriting their number.
- Schedules saved with percentages that do not total 100.
- Editing one stage silently changing a figure the builder deliberately set.
See it on your own jobs
Twenty minutes, your numbers, no slide deck. We’ll build one of your real buildings in front of you and send you the estimate link at the end — yours to keep either way.
or keep browsing features →