This commit is contained in:
Laurent Destailleur 2011-03-08 11:12:57 +00:00
parent 4f13506668
commit b2532440fb
3 changed files with 30 additions and 16 deletions

View File

@ -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
{

View File

@ -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)."";

View File

@ -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);