public static ResultSet createOrder(Connection conn, Map<String, String> params, Logger logger) throws SQLException, InvalidParameterException {
        PreparedStatement sp = null;
        try {
            sp = conn.prepareStatement("exec dbo.Wga_CreateOrder ?, ?, ?, ?");
            if (params.get(IDCLIENT) != null) {
                sp.setInt(1, Integer.parseInt(params.get(IDCLIENT)));
            } else {
                sp.setNull(1, java.sql.Types.INTEGER);
            }

            if (params.get(DESCRIPTION) != null) {
                try {
                    sp.setString(2, URLDecoder.decode(params.get(DESCRIPTION), "UTF-8"));
                } catch (UnsupportedEncodingException ex) {
                    logger.error("Unable decode description field use empty string", ex);
                    sp.setString(2, "");
                }
            } else {
                sp.setNull(2, java.sql.Types.VARCHAR);
            }
            if (params.get(DISCOUNT) != null) {
                sp.setInt(3, Integer.parseInt(params.get(DISCOUNT)));
            } else {
                sp.setNull(3, java.sql.Types.INTEGER);
            }
            if ((params.get(IFDISCOUNT) != null) && (!(params.get(IFDISCOUNT)).isEmpty())) {
                int val = Integer.parseInt(params.get(IFDISCOUNT));
                sp.setBoolean(4, val > 0);
            } else {
                sp.setBoolean(4, false);
            }
            return sp.executeQuery();
        } finally {
            if (sp != null) {
                sp.close();
            }
        }
    }