getTotalWeightVolume : add conversion Lb & oz to KG
New conversion value : Oz once Little az a wizzard...
This commit is contained in:
parent
1d91ce90d3
commit
5320ebc051
@ -3097,9 +3097,18 @@ abstract class CommonObject
|
|||||||
$trueWeightUnit=pow(10, $weightUnit);
|
$trueWeightUnit=pow(10, $weightUnit);
|
||||||
$totalWeight += $weight * $qty * $trueWeightUnit;
|
$totalWeight += $weight * $qty * $trueWeightUnit;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
if ($weight_units == 99) {
|
||||||
$totalWeight += $weight * $qty; // This may be wrong if we mix different units
|
// 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)
|
if ($volume_units < 50) // >50 means a standard unit (power of 10 of official unit), > 50 means an exotic unit (like inch)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user