Fix : Add service date limit transfert from propal to order

This commit is contained in:
fhenry
2013-04-15 15:55:10 +02:00
parent acd3d136b5
commit 24a6321d45
3 changed files with 28 additions and 8 deletions

View File

@@ -2930,11 +2930,24 @@ abstract class CommonObject
global $conf,$langs,$bc;
//var_dump($line);
$date_start=$line->date_debut_prevue;
if ($line->date_debut_reel) $date_start=$line->date_debut_reel;
$date_end=$line->date_fin_prevue;
if ($line->date_fin_reel) $date_end=$line->date_fin_reel;
if (!empty($line->date_start))
{
$date_start=$line->date_start;
}
else
{
$date_start=$line->date_debut_prevue;
if ($line->date_debut_reel) $date_start=$line->date_debut_reel;
}
if (!empty($line->date_end))
{
$date_end=$line->date_end;
}
else
{
$date_end=$line->date_fin_prevue;
if ($line->date_fin_reel) $date_end=$line->date_fin_reel;
}
$this->tpl['label'] = '';
if (! empty($line->fk_parent_line)) $this->tpl['label'].= img_picto('', 'rightarrow');
@@ -2962,7 +2975,11 @@ abstract class CommonObject
else
{
$this->tpl['label'].= ($line->product_type == -1 ? ' ' : ($line->product_type == 1 ? img_object($langs->trans(''),'service') : img_object($langs->trans(''),'product')));
$this->tpl['label'].= ($line->label ? ' '.$line->label : '');
if (!empty($line->desc)) {
$this->tpl['label'].=$line->desc;
}else {
$this->tpl['label'].= ($line->label ? ' '.$line->label : '');
}
// Dates
if ($line->product_type == 1 && ($date_start || $date_end))
{