Fix: add picto for child line
This commit is contained in:
parent
e72d538b1a
commit
252c8eefd5
@ -1570,9 +1570,9 @@ class CommonObject
|
|||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
if ($line->product_type == 9 && ! empty($line->special_code))
|
if (($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line))
|
||||||
{
|
{
|
||||||
$object->hooks[$line->special_code]->printOriginObjectLine($line,$i);
|
if (empty($line->fk_parent_line)) $object->hooks[$line->special_code]->printOriginObjectLine($this,$line,$i);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1599,11 +1599,14 @@ class CommonObject
|
|||||||
$date_end=$line->date_fin_prevue;
|
$date_end=$line->date_fin_prevue;
|
||||||
if ($line->date_fin_reel) $date_end=$line->date_fin_reel;
|
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');
|
||||||
|
|
||||||
if (($line->info_bits & 2) == 2)
|
if (($line->info_bits & 2) == 2)
|
||||||
{
|
{
|
||||||
$discount=new DiscountAbsolute($db);
|
$discount=new DiscountAbsolute($db);
|
||||||
$discount->fk_soc = $this->socid;
|
$discount->fk_soc = $this->socid;
|
||||||
$this->tpl['label'] = $discount->getNomUrl(0,'discount');
|
$this->tpl['label'].= $discount->getNomUrl(0,'discount');
|
||||||
}
|
}
|
||||||
else if ($line->fk_product)
|
else if ($line->fk_product)
|
||||||
{
|
{
|
||||||
@ -1611,7 +1614,7 @@ class CommonObject
|
|||||||
$productstatic->id = $line->fk_product;
|
$productstatic->id = $line->fk_product;
|
||||||
$productstatic->ref = $line->ref;
|
$productstatic->ref = $line->ref;
|
||||||
$productstatic->type = $line->fk_product_type;
|
$productstatic->type = $line->fk_product_type;
|
||||||
$this->tpl['label'] = $productstatic->getNomUrl(1);
|
$this->tpl['label'].= $productstatic->getNomUrl(1);
|
||||||
$this->tpl['label'].= $line->label?' - '.$line->label:'';
|
$this->tpl['label'].= $line->label?' - '.$line->label:'';
|
||||||
// Dates
|
// Dates
|
||||||
if ($date_start || $date_end)
|
if ($date_start || $date_end)
|
||||||
@ -1621,7 +1624,7 @@ 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 : '');
|
$this->tpl['label'].= ($line->label ? ' '.$line->label : '');
|
||||||
// Dates
|
// Dates
|
||||||
if ($date_start || $date_end)
|
if ($date_start || $date_end)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
/* Copyright (C) 2010-2011 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user