Drew,
My expected results are contained in the two temporary tables #ItemResults and #SurplusResults. They represent the results after having offset order quantities with available surplus quantities. If there is a logical conflict, I choose to offset larger sizes first if there is an available combination for that scenario
Thanks,
-Michael