Pārlūkot izejas kodu

Merge branch 'develop' of https://gitea.laclic.fr/Laclic/LcShopBundle into develop

feature/export_comptable
Fab pirms 4 gadiem
vecāks
revīzija
66e27ce7cb
1 mainītis faili ar 23 papildinājumiem un 0 dzēšanām
  1. +23
    -0
      ShopBundle/Model/ProductFamily.php

+ 23
- 0
ShopBundle/Model/ProductFamily.php Parādīt failu

@@ -182,6 +182,29 @@ abstract class ProductFamily extends AbstractDocumentEntity implements ProductPr
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()
{
if ($this->getTaxRate()) {

Notiek ielāde…
Atcelt
Saglabāt