|
|
|
|
|
|
|
|
&& $orderProduct->getProduct()->getProductFamily()->getId() == $productFamily->getId())) { |
|
|
&& $orderProduct->getProduct()->getProductFamily()->getId() == $productFamily->getId())) { |
|
|
|
|
|
|
|
|
if($byWeight) { |
|
|
if($byWeight) { |
|
|
$quantity += $orderProduct->getQuantityOrder() * ($orderProduct->getQuantityProduct() / $product->getUnitInherited()->getCoefficient()) ; |
|
|
|
|
|
|
|
|
$quantity += $orderProduct->getQuantityOrder() * ($orderProduct->getQuantityProduct() / $orderProduct->getProduct()->getUnitInherited()->getCoefficient()) ; |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
$quantity += $orderProduct->getQuantityOrder() ; |
|
|
$quantity += $orderProduct->getQuantityOrder() ; |