Fix: do not update price with special product 9
This commit is contained in:
parent
a3eebde120
commit
fba4111f44
@ -250,7 +250,7 @@ class Propal extends CommonObject
|
|||||||
$result=$propalligne->insert();
|
$result=$propalligne->insert();
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$result=$this->update_price();
|
$result=$this->update_price(1);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
@ -750,7 +750,7 @@ class Propal extends CommonObject
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
// Mise a jour infos denormalisees
|
// Mise a jour infos denormalisees
|
||||||
$resql=$this->update_price();
|
$resql=$this->update_price(1);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
if (! $notrigger)
|
if (! $notrigger)
|
||||||
@ -1336,7 +1336,7 @@ class Propal extends CommonObject
|
|||||||
if ($this->db->query($sql) )
|
if ($this->db->query($sql) )
|
||||||
{
|
{
|
||||||
$this->remise_percent = $remise;
|
$this->remise_percent = $remise;
|
||||||
$this->update_price();
|
$this->update_price(1);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1370,7 +1370,7 @@ class Propal extends CommonObject
|
|||||||
if ($this->db->query($sql) )
|
if ($this->db->query($sql) )
|
||||||
{
|
{
|
||||||
$this->remise_absolue = $remise;
|
$this->remise_absolue = $remise;
|
||||||
$this->update_price();
|
$this->update_price(1);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -1271,7 +1271,7 @@ class Commande extends CommonObject
|
|||||||
$result=$line->insert();
|
$result=$line->insert();
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$result=$this->update_price();
|
$result=$this->update_price(1);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
@ -1610,7 +1610,7 @@ class Commande extends CommonObject
|
|||||||
if ($this->db->query($sql))
|
if ($this->db->query($sql))
|
||||||
{
|
{
|
||||||
$this->remise_percent = $remise;
|
$this->remise_percent = $remise;
|
||||||
$this->update_price();
|
$this->update_price(1);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1645,7 +1645,7 @@ class Commande extends CommonObject
|
|||||||
if ($this->db->query($sql))
|
if ($this->db->query($sql))
|
||||||
{
|
{
|
||||||
$this->remise_absolue = $remise;
|
$this->remise_absolue = $remise;
|
||||||
$this->update_price();
|
$this->update_price(1);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -1298,7 +1298,7 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer)
|
|||||||
// Calcul contrat->price (HT), contrat->total (TTC), contrat->tva
|
// Calcul contrat->price (HT), contrat->total (TTC), contrat->tva
|
||||||
$objectsrc->remise_absolue=$remise_absolue;
|
$objectsrc->remise_absolue=$remise_absolue;
|
||||||
$objectsrc->remise_percent=$remise_percent;
|
$objectsrc->remise_percent=$remise_percent;
|
||||||
$objectsrc->update_price();
|
$objectsrc->update_price(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
print "\n<!-- ".$classname." info -->";
|
print "\n<!-- ".$classname." info -->";
|
||||||
|
|||||||
@ -1714,7 +1714,7 @@ if ($_GET['action'] == 'create')
|
|||||||
// Calcul contrat->price (HT), contrat->total (TTC), contrat->tva
|
// Calcul contrat->price (HT), contrat->total (TTC), contrat->tva
|
||||||
$objectsrc->remise_absolue=$remise_absolue;
|
$objectsrc->remise_absolue=$remise_absolue;
|
||||||
$objectsrc->remise_percent=$remise_percent;
|
$objectsrc->remise_percent=$remise_percent;
|
||||||
$objectsrc->update_price();
|
$objectsrc->update_price(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
print "\n<!-- ".$classname." info -->";
|
print "\n<!-- ".$classname." info -->";
|
||||||
|
|||||||
@ -1022,7 +1022,7 @@ class Facture extends CommonObject
|
|||||||
$lineid=$facligne->insert();
|
$lineid=$facligne->insert();
|
||||||
if ($lineid > 0)
|
if ($lineid > 0)
|
||||||
{
|
{
|
||||||
$result=$this->update_price();
|
$result=$this->update_price(1);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
// Cr<43>e lien entre remise et ligne de facture
|
// Cr<43>e lien entre remise et ligne de facture
|
||||||
@ -1499,7 +1499,7 @@ class Facture extends CommonObject
|
|||||||
|
|
||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
$this->update_price();
|
$this->update_price(1);
|
||||||
|
|
||||||
// Validate
|
// Validate
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture';
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture';
|
||||||
@ -2037,7 +2037,7 @@ class Facture extends CommonObject
|
|||||||
if ($this->db->query($sql))
|
if ($this->db->query($sql))
|
||||||
{
|
{
|
||||||
$this->remise_percent = $remise;
|
$this->remise_percent = $remise;
|
||||||
$this->update_price($this->id);
|
$this->update_price(1);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2073,7 +2073,7 @@ class Facture extends CommonObject
|
|||||||
if ($this->db->query($sql))
|
if ($this->db->query($sql))
|
||||||
{
|
{
|
||||||
$this->remise_absolue = $remise;
|
$this->remise_absolue = $remise;
|
||||||
$this->update_price($this->id);
|
$this->update_price(1);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -3388,7 +3388,6 @@ class FactureLigne
|
|||||||
// Check parameters
|
// Check parameters
|
||||||
if ($this->product_type < 0) return -1;
|
if ($this->product_type < 0) return -1;
|
||||||
|
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
// Mise a jour ligne en base
|
// Mise a jour ligne en base
|
||||||
@ -3500,6 +3499,8 @@ class FactureLigne
|
|||||||
$sql.= ",total_localtax2=".price2num($this->total_localtax2)."";
|
$sql.= ",total_localtax2=".price2num($this->total_localtax2)."";
|
||||||
$sql.= ",total_ttc=".price2num($this->total_ttc)."";
|
$sql.= ",total_ttc=".price2num($this->total_ttc)."";
|
||||||
$sql.= " WHERE rowid = ".$this->rowid;
|
$sql.= " WHERE rowid = ".$this->rowid;
|
||||||
|
|
||||||
|
dol_syslog("PropaleLigne::update_total sql=".$sql, LOG_DEBUG);
|
||||||
|
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user