If there is a commercial contact, use its name in proposal

This commit is contained in:
Laurent Destailleur
2009-02-16 21:37:28 +00:00
parent d7291bc655
commit ba175ce7f4
5 changed files with 42 additions and 77 deletions

View File

@@ -837,7 +837,7 @@ class CommonObject
function update_price()
{
include_once(DOL_DOCUMENT_ROOT.'/lib/price.lib.php');
$err=0;
// List lines to sum
@@ -855,7 +855,7 @@ class CommonObject
$this->total_ht = 0;
$this->total_tva = 0;
$this->total_ttc = 0;
$num = $this->db->num_rows($resql);
$i = 0;
while ($i < $num)
@@ -878,7 +878,7 @@ class CommonObject
if ($this->element == 'facture_fourn') $fieldtva='total_tva';
$fieldttc='total_ttc';
if ($this->element == 'propal') $fieldttc='total';
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET';
$sql .= " ".$fieldht."='".price2num($this->total_ht)."',";
$sql .= " ".$fieldtva."='".price2num($this->total_tva)."',";
@@ -905,7 +905,7 @@ class CommonObject
dolibarr_syslog("CommonObject::update_price error=".$this->error,LOG_ERR);
return -1;
}
}
}
}
?>