The 105 is down to our aging eyes. It actually says 10 dollars, with "$" masquerading as a "5". $10 would have been easier to spot!
Did you look at what I wrote? Your main problem, as before, is "what if there are too many detail records for my table". With the minimum value (0.01) you could still get 999 details records and not need them. You could allow for 1000, and know that you have to write them once you hit that limit, you'd have to change the logic to write the trailer at the end, then put a SORT step after your program to get the header back where you want it.
Of course, the more you know about the data, the better you can set the limit for the table.