diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index 405583ea314..96b2165c65a 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -4381,6 +4381,12 @@ class Product extends CommonObject
if (!empty($this->label)) {
$label .= '
'.$langs->trans('ProductLabel').': '.$this->label;
}
+ if ($this->type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
+ if (!empty($conf->productbatch->enabled)) {
+ $langs->load("productbatch");
+ $label .= "
".$langs->trans("ManageLotSerial").': '.$this->getLibStatut(0, 2);
+ }
+ }
if (!empty($conf->barcode->enabled)) {
$label .= '
'.$langs->trans('BarCode').': '.$this->barcode;
}
@@ -4390,28 +4396,26 @@ class Product extends CommonObject
if ($this->weight) {
$label .= "
".$langs->trans("Weight").': '.$this->weight.' '.measuringUnitString(0, "weight", $this->weight_units);
}
+ $labelsize = "";
if ($this->length) {
- $label .= "
".$langs->trans("Length").': '.$this->length.' '.measuringUnitString(0, 'size', $this->length_units);
+ $labelsize .= ($labelsize ? " - ": "")."".$langs->trans("Length").': '.$this->length.' '.measuringUnitString(0, 'size', $this->length_units);
}
if ($this->width) {
- $label .= "
".$langs->trans("Width").': '.$this->width.' '.measuringUnitString(0, 'size', $this->width_units);
+ $labelsize .= ($labelsize ? " - ": "")."".$langs->trans("Width").': '.$this->width.' '.measuringUnitString(0, 'size', $this->width_units);
}
if ($this->height) {
- $label .= "
".$langs->trans("Height").': '.$this->height.' '.measuringUnitString(0, 'size', $this->height_units);
+ $labelsize .= ($labelsize ? " - ": "")."".$langs->trans("Height").': '.$this->height.' '.measuringUnitString(0, 'size', $this->height_units);
}
+ if ($labelsize) $label .= "
".$labelsize;
+
+ $labelsurfacevolume = "";
if ($this->surface) {
- $label .= "
".$langs->trans("Surface").': '.$this->surface.' '.measuringUnitString(0, 'surface', $this->surface_units);
+ $labelsurfacevolume .= ($labelsurfacevolume ? " - " : "")."".$langs->trans("Surface").': '.$this->surface.' '.measuringUnitString(0, 'surface', $this->surface_units);
}
if ($this->volume) {
- $label .= "
".$langs->trans("Volume").': '.$this->volume.' '.measuringUnitString(0, 'volume', $this->volume_units);
- }
- }
-
- if ($this->type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
- if (!empty($conf->productbatch->enabled)) {
- $langs->load("productbatch");
- $label .= "
".$langs->trans("ManageLotSerial").': '.$this->getLibStatut(0, 2);
+ $labelsurfacevolume .= ($labelsurfacevolume ? " - " : "")."".$langs->trans("Volume").': '.$this->volume.' '.measuringUnitString(0, 'volume', $this->volume_units);
}
+ if ($labelsurfacevolume) $label .= "
".$labelsurfacevolume;
}
if (!empty($conf->accounting->enabled) && $this->status) {