public static int insertCommandeClient(int identreprise, int idinterlocuteur,  Date datecommandeclient,String referencecommandeclient,Float totalhtcommandeclient,Float totalttccommandeclient, Float remisecommandeclient) throws SQLException {

        String query = "";
        ResultSet resultat;
        int retour=0;
        
        try {
            query = "INSERT INTO COMMANDE_CLIENT(ID_ENTREPRISE,ID_INTERLOCUTEUR,COMDATE,COMREF,COMHT,COMTTC,COMREMISE) VALUES (?,?,?,?,?,?,?)  ";

            PreparedStatement pStatement = ConnectionBDD.getInstance().getPreparedStatement(query);
            pStatement.setInt(1, identreprise);
            pStatement.setInt(2, idinterlocuteur);
            pStatement.setObject(3, datecommandeclient);
            pStatement.setString(4, referencecommandeclient);
            pStatement.setFloat(5, totalhtcommandeclient);
            pStatement.setFloat(6, totalttccommandeclient);
            pStatement.setFloat(7, remisecommandeclient);
            pStatement.executeUpdate();
          
            resultat= pStatement.executeQuery("select LAST_INSERT_ID()");
          
        if (resultat.next()){ 
            retour=resultat.getInt(1); 
        } 


          
        } catch (SQLException ex) {
            Logger.getLogger(RequetesCommandeClient.class.getName()).log(Level.SEVERE, null, ex);

        }
        return retour;
        
    }