2
0
forked from Wavyzz/dolibarr

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

@@ -934,6 +934,9 @@ class Commande extends CommonOrder
$line->special_code = $object->lines[$i]->special_code;
$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;
$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];

View File

@@ -329,8 +329,8 @@ else if ($action == 'add' && $user->rights->commande->creer)
$lines[$i]->fk_remise_except,
'HT',
0,
$datestart,
$dateend,
$date_start,
$date_end,
$product_type,
$lines[$i]->rang,
$lines[$i]->special_code,

View File

@@ -2930,11 +2930,24 @@ abstract class CommonObject
global $conf,$langs,$bc;
//var_dump($line);
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')));
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))
{