|
|
|
|
|
|
|
|
return $this->getTitle(); |
|
|
return $this->getTitle(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function getAvailableQuantityInherited() |
|
|
|
|
|
{ |
|
|
|
|
|
$availableQuantity = 0 ; |
|
|
|
|
|
|
|
|
|
|
|
switch ($this->getBehaviorCountStock()) { |
|
|
|
|
|
|
|
|
|
|
|
case ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE : |
|
|
|
|
|
case ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT_FAMILY : |
|
|
|
|
|
|
|
|
|
|
|
$availableQuantity = $this->getAvailableQuantity() ; |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT : |
|
|
|
|
|
|
|
|
|
|
|
foreach($this->getProducts() as $product) { |
|
|
|
|
|
$availableQuantity += $product->getAvailableQuantityInherited() ; |
|
|
|
|
|
} |
|
|
|
|
|
break ; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return $availableQuantity ; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public function getTaxRateInherited() |
|
|
public function getTaxRateInherited() |
|
|
{ |
|
|
{ |
|
|
if ($this->getTaxRate()) { |
|
|
if ($this->getTaxRate()) { |