Skip to content

Commit

Permalink
Fix phan warning
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 26, 2024
1 parent 49898fb commit 6b72c66
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion htdocs/comm/propal/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -2878,7 +2878,7 @@
if ($totalVolume) {
print '<tr><td>'.$langs->trans("CalculatedVolume").'</td>';
print '<td class="valuefield">';
print showDimensionInBestUnit($totalVolume, 0, "volume", getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no'), 1);
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no'), 1);
print '</td></tr>';
}
}
Expand Down
4 changes: 2 additions & 2 deletions htdocs/commande/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -2775,13 +2775,13 @@
if ($totalWeight) {
print '<tr><td>'.$langs->trans("CalculatedWeight").'</td>';
print '<td class="valuefield">';
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND) ? $conf->global->MAIN_WEIGHT_DEFAULT_ROUND : -1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no');
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, getDolGlobalInt('MAIN_WEIGHT_DEFAULT_ROUND', -1), isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no');
print '</td></tr>';
}
if ($totalVolume) {
print '<tr><td>'.$langs->trans("CalculatedVolume").'</td>';
print '<td class="valuefield">';
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND) ? $conf->global->MAIN_VOLUME_DEFAULT_ROUND : -1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no');
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no');
print '</td></tr>';
}

Expand Down
6 changes: 3 additions & 3 deletions htdocs/expedition/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -2045,7 +2045,7 @@
if (!empty($object->trueWeight)) {
print ' ('.$langs->trans("SumOfProductWeights").': ';
}
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND) ? $conf->global->MAIN_WEIGHT_DEFAULT_ROUND : -1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no');
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, getDolGlobalInt('MAIN_WEIGHT_DEFAULT_ROUND', -1), isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no');
if (!empty($object->trueWeight)) {
print ')';
}
Expand Down Expand Up @@ -2097,7 +2097,7 @@
// If sending volume not defined we use sum of products
if ($calculatedVolume > 0) {
if ($volumeUnit < 50) {
print showDimensionInBestUnit($calculatedVolume, $volumeUnit, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND) ? $conf->global->MAIN_VOLUME_DEFAULT_ROUND : -1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no');
print showDimensionInBestUnit($calculatedVolume, $volumeUnit, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no'));
} else {
print $calculatedVolume.' '.measuringUnitString(0, "volume", (string) $volumeUnit);
}
Expand All @@ -2106,7 +2106,7 @@
if ($calculatedVolume) {
print ' ('.$langs->trans("SumOfProductVolumes").': ';
}
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND) ? $conf->global->MAIN_VOLUME_DEFAULT_ROUND : -1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no');
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no'));
//if (empty($calculatedVolume)) print ' ('.$langs->trans("Calculated").')';
if ($calculatedVolume) {
print ')';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/expedition/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -1571,7 +1571,7 @@
print '<td class="center">';
if (empty($object->trueWeight)) {
$tmparray = $object->getTotalWeightVolume();
print showDimensionInBestUnit($tmparray['weight'], 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND) ? $conf->global->MAIN_WEIGHT_DEFAULT_ROUND : -1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no');
print showDimensionInBestUnit($tmparray['weight'], 0, "weight", $langs, getDolGlobalInt('MAIN_WEIGHT_DEFAULT_ROUND', -1), isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no');
print $form->textwithpicto('', $langs->trans('EstimatedWeight'), 1);
} else {
print $object->trueWeight;
Expand Down
4 changes: 2 additions & 2 deletions htdocs/expedition/shipment.php
Original file line number Diff line number Diff line change
Expand Up @@ -492,11 +492,11 @@
if ($totalWeight || $totalVolume) {
print '<tr><td>'.$langs->trans("CalculatedWeight").'</td>';
print '<td colspan="2">';
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND) ? $conf->global->MAIN_WEIGHT_DEFAULT_ROUND : -1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no');
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, getDolGlobalInt('MAIN_WEIGHT_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_WEIGHT_DEFAULT_UNIT', 'no'));
print '</td></tr>';
print '<tr><td>'.$langs->trans("CalculatedVolume").'</td>';
print '<td colspan="2">';
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND) ? $conf->global->MAIN_VOLUME_DEFAULT_ROUND : -1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no');
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no'));
print '</td></tr>';
}

Expand Down

0 comments on commit 6b72c66

Please sign in to comment.