From b2532440fb8ffd8d9605895a67e4a5c4680d0093 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Mar 2011 11:12:57 +0000 Subject: [PATCH] Doxygen --- htdocs/adherents/options.php | 34 +++++++++++++------ htdocs/comm/propal/class/propal.class.php | 8 ++--- htdocs/compta/facture/class/facture.class.php | 4 +-- 3 files changed, 30 insertions(+), 16 deletions(-) diff --git a/htdocs/adherents/options.php b/htdocs/adherents/options.php index 481ae1cdc43..fa79db38358 100644 --- a/htdocs/adherents/options.php +++ b/htdocs/adherents/options.php @@ -44,13 +44,20 @@ if ($_POST["action"] == 'add' && $user->rights->adherent->configurer) // Type et taille non encore pris en compte => varchar(255) if (isset($_POST["attrname"]) && preg_match("/^\w[a-zA-Z0-9-_]*$/",$_POST['attrname'])) { - $adho->create($_POST['attrname'],$_POST['type'],$_POST['size']); - if (isset($_POST['label'])) + $result=$adho->create($_POST['attrname'],$_POST['type'],$_POST['size']); + if ($result > 0) { - $adho->create_label($_POST['attrname'],$_POST['label'],$_POST['type'],$_POST['pos'],$_POST['size']); + if (isset($_POST['label'])) + { + $adho->create_label($_POST['attrname'],$_POST['label'],$_POST['type'],$_POST['pos'],$_POST['size']); + } + Header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } + else + { + $mesg=$adho->error; } - Header("Location: ".$_SERVER["PHP_SELF"]); - exit; } else { @@ -68,13 +75,20 @@ if ($_POST["action"] == 'update' && $user->rights->adherent->configurer) { if (isset($_POST["attrname"]) && preg_match("/^\w[a-zA-Z0-9-_]*$/",$_POST['attrname'])) { - $adho->update($_POST['attrname'],$_POST['type'],$_POST['size']); - if (isset($_POST['label'])) + $result=$adho->update($_POST['attrname'],$_POST['type'],$_POST['size']); + if ($result > 0) { - $adho->update_label($_POST['attrname'],$_POST['label'],$_POST['type'],$_POST['size']); + if (isset($_POST['label'])) + { + $adho->update_label($_POST['attrname'],$_POST['label'],$_POST['type'],$_POST['size']); + } + Header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } + else + { + $mesg=$adho->error; } - Header("Location: ".$_SERVER["PHP_SELF"]); - exit; } else { diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 75ffaa7c81a..8d19c3f3f15 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -478,8 +478,8 @@ class Propal extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."propaldet "; $sql.= " SET qty='".$qty."'"; - $sql.= " , price='". price2num($price)."'"; // \TODO A virer - $sql.= " , remise_percent='".$remise_percent."'"; // \TODO A virer + $sql.= " , price='". price2num($price)."'"; // TODO A virer + $sql.= " , remise_percent='".$remise_percent."'"; // TODO A virer $sql.= " , subprice=".price2num($pu); $sql.= " , tva_tx=".price2num($txtva); $sql.= " , localtax1_tx=".price2num($txlocaltax1); @@ -2391,8 +2391,8 @@ class PropaleLigne $sql.= ",qty='".price2num($this->qty)."'"; $sql.= ",subprice=".price2num($this->subprice).""; $sql.= ",remise_percent=".price2num($this->remise_percent).""; - $sql.= ",price=".price2num($this->price).""; // \TODO A virer - $sql.= ",remise=".price2num($this->remise).""; // \TODO A virer + $sql.= ",price=".price2num($this->price).""; // TODO A virer + $sql.= ",remise=".price2num($this->remise).""; // TODO A virer $sql.= ",info_bits='".$this->info_bits."'"; $sql.= ",total_ht=".price2num($this->total_ht).""; $sql.= ",total_tva=".price2num($this->total_tva).""; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 0dc76b1640b..b2911b95fb7 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1727,7 +1727,7 @@ class Facture extends CommonObject $rangtouse = $rangmax + 1; } - // \TODO A virer + // TODO A virer // Anciens indicateurs: $price, $remise (a ne plus utiliser) $price = $pu; $remise = 0; @@ -1772,7 +1772,7 @@ class Facture extends CommonObject $this->line->origin=$origin; $this->line->origin_id=$origin_id; - // \TODO Ne plus utiliser + // TODO Ne plus utiliser $this->line->price=($this->type==2?-1:1)*abs($price); $this->line->remise=($this->type==2?-1:1)*abs($remise);