Skip to content

Commit

Permalink
Fix use of option SHIPPING_PDF_HIDE_VOLUME in shipping lines
Browse files Browse the repository at this point in the history
  • Loading branch information
lemathou committed Nov 21, 2024
1 parent 34bb34d commit d3ae9b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion htdocs/core/modules/expedition/doc/pdf_espadon.modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede
$weighttxt = round($object->lines[$i]->weight * $object->lines[$i]->qty_shipped, getDolGlobalInt('SHIPMENT_ROUND_WEIGHT_ON_PDF', 5)).' '.measuringUnitString(0, "weight", $object->lines[$i]->weight_units, 1);
}
$voltxt = '';
if (empty($object->lines[$i]->fk_product_type) && $object->lines[$i]->volume) {
if (empty($object->lines[$i]->fk_product_type) && $object->lines[$i]->volume && !getDolGlobalString('SHIPPING_PDF_HIDE_VOLUME')) {
$voltxt = round($object->lines[$i]->volume * $object->lines[$i]->qty_shipped, getDolGlobalInt('SHIPMENT_ROUND_VOLUME_ON_PDF', 5)).' '.measuringUnitString(0, "volume", $object->lines[$i]->volume_units ? $object->lines[$i]->volume_units : 0, 1);
}

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede
$weighttxt = round($object->lines[$i]->weight * $object->lines[$i]->qty_shipped, getDolGlobalInt('SHIPMENT_ROUND_WEIGHT_ON_PDF', 5)).' '.measuringUnitString(0, "weight", $object->lines[$i]->weight_units, 1);
}
$voltxt = '';
if (empty($object->lines[$i]->fk_product_type) && $object->lines[$i]->volume) {
if (empty($object->lines[$i]->fk_product_type) && $object->lines[$i]->volume && !getDolGlobalString('SHIPPING_PDF_HIDE_VOLUME')) {
$voltxt = round($object->lines[$i]->volume * $object->lines[$i]->qty_shipped, getDolGlobalInt('SHIPMENT_ROUND_VOLUME_ON_PDF', 5)).' '.measuringUnitString(0, "volume", $object->lines[$i]->volume_units ? $object->lines[$i]->volume_units : 0, 1);
}

Expand Down

0 comments on commit d3ae9b2

Please sign in to comment.