forked from Wavyzz/dolibarr
Fix : Add service date limit transfert from propal to order
This commit is contained in:
@@ -934,6 +934,9 @@ class Commande extends CommonOrder
|
|||||||
$line->special_code = $object->lines[$i]->special_code;
|
$line->special_code = $object->lines[$i]->special_code;
|
||||||
$line->fk_parent_line = $object->lines[$i]->fk_parent_line;
|
$line->fk_parent_line = $object->lines[$i]->fk_parent_line;
|
||||||
|
|
||||||
|
$line->date_start = $object->lines[$i]->date_start;
|
||||||
|
$line->date_end = $object->lines[$i]->date_end;
|
||||||
|
|
||||||
$line->fk_fournprice = $object->lines[$i]->fk_fournprice;
|
$line->fk_fournprice = $object->lines[$i]->fk_fournprice;
|
||||||
$marginInfos = getMarginInfos($object->lines[$i]->subprice, $object->lines[$i]->remise_percent, $object->lines[$i]->tva_tx, $object->lines[$i]->localtax1_tx, $object->lines[$i]->localtax2_tx, $object->lines[$i]->fk_fournprice, $object->lines[$i]->pa_ht);
|
$marginInfos = getMarginInfos($object->lines[$i]->subprice, $object->lines[$i]->remise_percent, $object->lines[$i]->tva_tx, $object->lines[$i]->localtax1_tx, $object->lines[$i]->localtax2_tx, $object->lines[$i]->fk_fournprice, $object->lines[$i]->pa_ht);
|
||||||
$line->pa_ht = $marginInfos[0];
|
$line->pa_ht = $marginInfos[0];
|
||||||
|
|||||||
@@ -329,8 +329,8 @@ else if ($action == 'add' && $user->rights->commande->creer)
|
|||||||
$lines[$i]->fk_remise_except,
|
$lines[$i]->fk_remise_except,
|
||||||
'HT',
|
'HT',
|
||||||
0,
|
0,
|
||||||
$datestart,
|
$date_start,
|
||||||
$dateend,
|
$date_end,
|
||||||
$product_type,
|
$product_type,
|
||||||
$lines[$i]->rang,
|
$lines[$i]->rang,
|
||||||
$lines[$i]->special_code,
|
$lines[$i]->special_code,
|
||||||
|
|||||||
@@ -2930,11 +2930,24 @@ abstract class CommonObject
|
|||||||
global $conf,$langs,$bc;
|
global $conf,$langs,$bc;
|
||||||
|
|
||||||
//var_dump($line);
|
//var_dump($line);
|
||||||
|
if (!empty($line->date_start))
|
||||||
$date_start=$line->date_debut_prevue;
|
{
|
||||||
if ($line->date_debut_reel) $date_start=$line->date_debut_reel;
|
$date_start=$line->date_start;
|
||||||
$date_end=$line->date_fin_prevue;
|
}
|
||||||
if ($line->date_fin_reel) $date_end=$line->date_fin_reel;
|
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'] = '';
|
$this->tpl['label'] = '';
|
||||||
if (! empty($line->fk_parent_line)) $this->tpl['label'].= img_picto('', 'rightarrow');
|
if (! empty($line->fk_parent_line)) $this->tpl['label'].= img_picto('', 'rightarrow');
|
||||||
@@ -2962,7 +2975,11 @@ abstract class CommonObject
|
|||||||
else
|
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->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
|
// Dates
|
||||||
if ($line->product_type == 1 && ($date_start || $date_end))
|
if ($line->product_type == 1 && ($date_start || $date_end))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user