[IMP] sale_margin: improved code for checking the condition