I have modified a standard customer statement to show outstanding invoices and credits in date order. However on doing this it messed up the "Balance", ie the accumulating total on each line (ie each line added the line's value to the total of the previous…