} | } | ||||
elseif($entity->getBehaviorPriceInherited() == 'by-reference-unit') { | elseif($entity->getBehaviorPriceInherited() == 'by-reference-unit') { | ||||
if($entity->getQuantityInherited() > 0) { | if($entity->getQuantityInherited() > 0) { | ||||
return $entity->getPriceByRefUnitInherited() * $entity->getQuantityInherited() ; | |||||
return $entity->getPriceByRefUnitInherited() * ($entity->getQuantityInherited() / $entity->getUnitInherited()->getCoefficient()) ; | |||||
} | } | ||||
} | } | ||||
} | } |