I suggest having a single standard markup table with the two columns being [Order Size] and [Markup]. It will also have a number from 1-40 which you would set as your Key Field to represent the Markup level.
On the parent record you would would have a formula calculate which of the 40 markups to use based on yes, a 40 line IF statement.
Then you would pull in the correct markup to apply into the Parent record and then look that up to the child records..
When the order has been invoiced, you would then trigger a native Action to copy the values from the markup lookup value into the frozen lookup value so that it would not change if you changed your discount structure in the future. so the formula for the markup would actually be to use the frozen value if there is one, else use the lookup, and that is what would be passed down to the child records.