Skip to content
Snippets Groups Projects
Commit 1e9ea31b authored by Rodolphe Quiedeville's avatar Rodolphe Quiedeville
Browse files

Ajout Methode Active

parent 6b87eabb
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,40 @@ Class methode_expedition
$this->description = "ERREUR DANS LA DEFINITION DU MODULE.";
}
Function Active()
{
// Mise a jour du statut
$sql = "UPDATE ".MAIN_DB_PREFIX."expedition_methode set statut= 1 ";
$sql.= " WHERE rowid = ".$this->id;
$resql = $this->db->query($sql);
if ($resql)
{
$af = $this->db->affected_rows($resql);
if ($af == 0)
{
// On cr la mthode dans la base
$sql = "INSERT INTO ".MAIN_DB_PREFIX."expedition_methode";
$sql .= " (rowid, statut, code, libelle, description)";
$sql .= " VALUES (".$this->id.",1,'$this->code','$this->name','$this->description')";
$resql = $this->db->query($sql);
if (! $resql)
{
dolibarr_syslog("methode_expedition::Active Erreur 2");
}
}
}
else
{
dolibarr_syslog("methode_expedition::Active Erreur 1");
}
}
Function write_pdf_file($id)
{
global $user;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment