Fonctionnalités principales : 1. Marchés hybrides - Onglet Mercurial - Ajout onglet Mercurial avec style distinct (vert, gras, blanc) - Affichage des produits mercuriaux pour marchés hybrides - Filtrage automatique des produits "Hors Marché 999" - Documentation Phase 2 avec CAS 1 et CAS 2 de marchés hybrides - Règles métier pour validation différenciée (devis 100% mercurial vs mixte) 2. Corrections bugs - Fix flag chkChange sur onglet "Sélection Produits" (callback asynchrone) - Plus d'alerte intempestive après sauvegarde des produits 3. Outils de déploiement - Nouveau script deploy-file.sh pour déploiement unitaire (DEV/PROD) - Amélioration deploy-cleo.sh 4. Gestion multi-contacts (v2.0.3) - Contrôleur AJAX cjxcontacts.php - Script migration clients_contacts - Documentation complète 5. Documentation - Mise à jour TODO.md avec Phase 2 marchés hybrides - Mise à jour README.md v2.0.3 - Ajout RULES.md - Ajout migration_clients_contacts.sql 6. Nettoyage - Suppression fichiers obsolètes (conf_new.php, conf_old.php, uof_linet_20250911.sql) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
34 lines
1021 B
PHP
34 lines
1021 B
PHP
<?php
|
|
$search = "";
|
|
if ($_POST) {
|
|
if (isset($_POST["schClients"])) {
|
|
$search = trim($_POST["schClients"]);
|
|
}
|
|
}
|
|
|
|
//! On récupère la liste des clients
|
|
if ($search != "") {
|
|
// SÉCURITÉ : Utilisation de requêtes préparées pour éviter l'injection SQL
|
|
try {
|
|
$db = Database::getInstance();
|
|
$sql = 'SELECT c.* FROM clients c
|
|
WHERE c.libelle LIKE :search
|
|
OR c.adresse1 LIKE :search
|
|
OR c.cp LIKE :search
|
|
OR c.ville LIKE :search
|
|
OR c.contact_nom LIKE :search
|
|
OR c.contact_prenom LIKE :search
|
|
OR c.contact_fonction LIKE :search
|
|
ORDER BY c.libelle';
|
|
|
|
$searchParam = '%' . $search . '%';
|
|
$aModel["clients"] = $db->fetchAll($sql, [':search' => $searchParam]);
|
|
} catch (Exception $e) {
|
|
error_log("Erreur recherche clients : " . $e->getMessage());
|
|
$aModel["clients"] = [];
|
|
}
|
|
} else {
|
|
$sql = 'SELECT c.* FROM clients c ORDER BY c.libelle';
|
|
$aModel["clients"] = getinfos($sql, "gen");
|
|
}
|