Skip to content
Snippets Groups Projects
Commit 5320ebc0 authored by BENKE Charlene's avatar BENKE Charlene Committed by GitHub
Browse files

getTotalWeightVolume : add conversion Lb & oz to KG

New conversion value : Oz once
Little az a wizzard...
parent 1d91ce90
No related branches found
No related tags found
No related merge requests found
......@@ -3097,9 +3097,18 @@ abstract class CommonObject
$trueWeightUnit=pow(10, $weightUnit);
$totalWeight += $weight * $qty * $trueWeightUnit;
}
else
{
$totalWeight += $weight * $qty; // This may be wrong if we mix different units
else {
if ($weight_units == 99) {
// conversion 1 Livre = 0.45359237 KG
$trueWeightUnit = 0.45359237;
$totalWeight += $weight * $qty * $trueWeightUnit;
} elseif ($weight_units == 98) {
// conversion 1 once = 0.0283495 KG
$trueWeightUnit = 0.0283495;
$totalWeight += $weight * $qty * $trueWeightUnit;
}
else
$totalWeight += $weight * $qty; // This may be wrong if we mix different units
}
if ($volume_units < 50) // >50 means a standard unit (power of 10 of official unit), > 50 means an exotic unit (like inch)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment