I think I already mentioned it - you will need to develop the whole functionality for adding/substituting products with ATP check by yourself.
How and what would be the logic - no idea, try to think how you would like this to look like in foreground and then go and speak with a developer if it is possible.
I guess, you will need to run ATP check, get partial confirmed quantity, create item 1, then for the remaining part run substitution in background like with 0000 reason and create item 2.
If a client does not like any of all these suggestions and will not accept any compromise to the original requirement (the 'waahh I wanna' reaction), I wouldn't bother further and suggest to find somebody else to do this (a magician, perhaps).