FIX expedition PDF models using units labels (#30358)

This commit is contained in:
lvessiller-opendsi 2024-07-13 17:18:05 +02:00 committed by GitHub
parent 2335ea3067
commit 09fdb887bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 8 deletions

View file

@ -847,11 +847,11 @@ class pdf_espadon extends ModelePdfExpedition
$object->volume_units = $object->size_units * 3;
}
if ($totalWeight != '') {
$totalWeighttoshow = showDimensionInBestUnit($totalWeight, 0, "weight", $outputlangs);
if (!empty($totalWeight)) {
$totalWeighttoshow = showDimensionInBestUnit($totalWeight, 0, "weight", $outputlangs, -1, 'no', 1);
}
if ($totalVolume != '') {
$totalVolumetoshow = showDimensionInBestUnit($totalVolume, 0, "volume", $outputlangs);
if (!empty($totalVolume)) {
$totalVolumetoshow = showDimensionInBestUnit($totalVolume, 0, "volume", $outputlangs, -1, 'no', 1);
}
if ($object->trueWeight) {
$totalWeighttoshow = showDimensionInBestUnit($object->trueWeight, $object->weight_units, "weight", $outputlangs);

View file

@ -734,11 +734,11 @@ class pdf_rouget extends ModelePdfExpedition
$object->volume_units = $object->size_units * 3;
}
if ($totalWeight != '') {
$totalWeighttoshow = showDimensionInBestUnit($totalWeight, 0, "weight", $outputlangs);
if (!empty($totalWeight)) {
$totalWeighttoshow = showDimensionInBestUnit($totalWeight, 0, "weight", $outputlangs, -1, 'no', 1);
}
if ($totalVolume != '') {
$totalVolumetoshow = showDimensionInBestUnit($totalVolume, 0, "volume", $outputlangs);
if (!empty($totalVolume)) {
$totalVolumetoshow = showDimensionInBestUnit($totalVolume, 0, "volume", $outputlangs, -1, 'no', 1);
}
if (!empty($object->trueWeight)) {
$totalWeighttoshow = showDimensionInBestUnit($object->trueWeight, $object->weight_units, "weight", $outputlangs);