It is usually prepared after practical completion. Every variation, remeasurement and claim must be settled, so a contractor with poor records of changes and instructions often loses money at this stage.
Once the final account is agreed, the remaining payment (less any retention still held until the end of the defects liability period) becomes due.
How Civova handles it
For subcontracts, Civova keeps a running final account from the documents themselves (scope value, certified, retention held, back-charges, invoiced and paid), so it reconciles without a spreadsheet.