{ dol_print_error($db); } } // bascule du statut d'un contact if ($_GET["action"] == 'swapstatut' && $user->rights->commande->creer) { $commande = new Commande($db); if ($commande->fetch($_GET["id"])) { $contact = $commande->detail_contact($_GET["ligne"]); $id_type_contact = $contact->fk_c_type_contact; $statut = ($contact->statut == 4) ? 5 : 4; $result = $commande->update_contact($_GET["ligne"], $statut, $id_type_contact); if ($result >= 0) { $db->commit(); } else { dol_print_error($db, "result=$result"); $db->rollback(); } } else { dol_print_error($db); } } // Efface un contact