mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-04 16:12:39 +01:00
FIX Better compatible fix for the trouble of weight / size units
This commit is contained in:
@@ -450,12 +450,12 @@ class pdf_squille extends ModelePdfReception
|
||||
$weighttxt='';
|
||||
if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->product->weight)
|
||||
{
|
||||
$weighttxt=round($object->lines[$i]->product->weight * $object->lines[$i]->qty, 5).' '.measuring_units_string($object->lines[$i]->product->weight_units, "weight");
|
||||
$weighttxt=round($object->lines[$i]->product->weight * $object->lines[$i]->qty, 5).' '.measuringUnitString(0, "weight", $object->lines[$i]->product->weight_units);
|
||||
}
|
||||
$voltxt='';
|
||||
if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->product->volume)
|
||||
{
|
||||
$voltxt=round($object->lines[$i]->product->volume * $object->lines[$i]->qty, 5).' '.measuring_units_string($object->lines[$i]->product->volume_units?$object->lines[$i]->product->volume_units:0, "volume");
|
||||
$voltxt=round($object->lines[$i]->product->volume * $object->lines[$i]->qty, 5).' '.measuringUnitString(0, "volume", $object->lines[$i]->product->volume_units?$object->lines[$i]->product->volume_units:0);
|
||||
}
|
||||
|
||||
$pdf->writeHTMLCell($this->posxqtyordered - $this->posxweightvol + 2, 3, $this->posxweightvol - 1, $curY, $weighttxt.(($weighttxt && $voltxt)?'<br>':'').$voltxt, 0, 0, false, true, 'C');
|
||||
|
||||
Reference in New Issue
Block a user