Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	ChangeLog
	dev/skeletons/skeleton_list.php
	htdocs/accountancy/class/html.formventilation.class.php
	htdocs/core/lib/cron.lib.php
	htdocs/core/tpl/admin_extrafields_add.tpl.php
This commit is contained in:
Laurent Destailleur
2016-10-01 18:42:50 +02:00
38 changed files with 344 additions and 153 deletions

View File

@@ -929,7 +929,7 @@ class Propal extends CommonObject
for ($i=0;$i<$num;$i++)
{
// Reset fk_parent_line for no child products and special product
// Reset fk_parent_line for line that are not child lines or special product
if (($this->lines[$i]->product_type != 9 && empty($this->lines[$i]->fk_parent_line)) || $this->lines[$i]->product_type == 9) {
$fk_parent_line = 0;
}
@@ -945,7 +945,7 @@ class Propal extends CommonObject
$this->lines[$i]->remise_percent,
'HT',
0,
0,
$this->lines[$i]->info_bits,
$this->lines[$i]->product_type,
$this->lines[$i]->rang,
$this->lines[$i]->special_code,
@@ -1161,6 +1161,7 @@ class Propal extends CommonObject
$clonedObj->ref = $modPropale->getNextValue($objsoc,$clonedObj);
// Create clone
$result=$clonedObj->create($user);
if ($result < 0) $error++;
else
@@ -3635,7 +3636,11 @@ class PropaleLigne extends CommonObjectLine
if (empty($this->fk_fournprice)) $this->fk_fournprice=0;
if (! is_numeric($this->qty)) $this->qty = 0;
if (empty($this->pa_ht)) $this->pa_ht=0;
if (empty($this->multicurrency_subprice)) $this->multicurrency_subprice=0;
if (empty($this->multicurrency_total_ht)) $this->multicurrency_total_ht=0;
if (empty($this->multicurrency_total_vat)) $this->multicurrency_total_vat=0;
if (empty($this->multicurrency_total_ttc)) $this->multicurrency_total_ttc=0;
// if buy price not defined, define buyprice as configured in margin admin
if ($this->pa_ht == 0 && $pa_ht_isemptystring)
{