fix get_cheapest_agreement_for_qty sorting