";
if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 3631a6509ee..df35201af24 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -3648,11 +3648,12 @@ abstract class CommonObject
* Return HTML table table of source object lines
* TODO Move this and previous function into output html class file (htmlline.class.php).
* If lines are into a template, title must also be into a template
- * But for the moment we don't know if it's possible as we keep a method available on overloaded objects.
+ * But for the moment we don't know if it's possible, so we keep the method available on overloaded objects.
*
+ * @param string $restrictlist ''=All lines, 'services'=Restrict to services only
* @return void
*/
- function printOriginLinesList()
+ function printOriginLinesList($restrictlist='')
{
global $langs, $hookmanager, $conf;
@@ -3674,8 +3675,6 @@ abstract class CommonObject
foreach ($this->lines as $line)
{
-
-
if (is_object($hookmanager) && (($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line)))
{
if (empty($line->fk_parent_line))
@@ -3687,7 +3686,7 @@ abstract class CommonObject
}
else
{
- $this->printOriginLine($line,$var);
+ $this->printOriginLine($line, $var, $restrictlist);
}
$i++;
@@ -3700,11 +3699,12 @@ abstract class CommonObject
* If lines are into a template, title must also be into a template
* But for the moment we don't know if it's possible as we keep a method available on overloaded objects.
*
- * @param CommonObjectLine $line Line
- * @param string $var Var
+ * @param CommonObjectLine $line Line
+ * @param string $var Var
+ * @param string $restrictlist ''=All lines, 'services'=Restrict to services only (strike line if not)
* @return void
*/
- function printOriginLine($line,$var)
+ function printOriginLine($line, $var, $restrictlist='')
{
global $langs, $conf;
@@ -3806,6 +3806,10 @@ abstract class CommonObject
if($conf->global->PRODUCT_USE_UNITS) $this->tpl['unit'] = $line->getLabelOfUnit('long');
$this->tpl['remise_percent'] = (($line->info_bits & 2) != 2) ? vatrate($line->remise_percent, true) : ' ';
+ // Is the line strike or not
+ $this->tpl['strike']=0;
+ if ($restrictlist == 'services' && $line->product_type != Product::TYPE_SERVICE) $this->tpl['strike']=1;
+
// Output template part (modules that overwrite templates must declare this into descriptor)
// Use global variables + $dateSelector + $seller and $buyer
$dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl'));
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index faf26f7c111..389519d7b7f 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -4742,6 +4742,7 @@ class Form
{
$shour = dol_print_date($set_time, "%H");
$smin = dol_print_date($set_time, "%M");
+ $ssec = dol_print_date($set_time, "%S");
}
}
else
@@ -4752,6 +4753,7 @@ class Form
$sday = '';
$shour = !isset($conf->global->MAIN_DEFAULT_DATE_HOUR) ? '' : $conf->global->MAIN_DEFAULT_DATE_HOUR;
$smin = !isset($conf->global->MAIN_DEFAULT_DATE_MIN) ? '' : $conf->global->MAIN_DEFAULT_DATE_MIN;
+ $ssec = !isset($conf->global->MAIN_DEFAULT_DATE_SEC) ? '' : $conf->global->MAIN_DEFAULT_DATE_SEC;
}
// You can set MAIN_POPUP_CALENDAR to 'eldy' or 'jquery'
@@ -4932,6 +4934,8 @@ class Form
$retstring.='';
}
$retstring.='';
+
+ $retstring.='';
}
// Add a "Now" link
diff --git a/htdocs/core/tpl/originproductline.tpl.php b/htdocs/core/tpl/originproductline.tpl.php
index c8cd6674a7a..2efc114cc1d 100644
--- a/htdocs/core/tpl/originproductline.tpl.php
+++ b/htdocs/core/tpl/originproductline.tpl.php
@@ -19,8 +19,8 @@
?>
-';
+tpl['strike'])?'':' strikefordisabled').'">';
print '
'.$this->tpl['label'].'
';
print '
'.$this->tpl['description'].'
';
print '
'.$this->tpl['vat_rate'].'
';
@@ -29,7 +29,7 @@ if (!empty($conf->multicurrency->enabled))
print '
';
+
+ $objectsrc->printOriginLinesList(empty($conf->global->FICHINTER_PRINT_PRODUCTS)?'services':''); // Show only service, except if option FICHINTER_PRINT_PRODUCTS is on
+
+ print '