refactor sale_rule management