Exemplo n.º 1
0
 public static function getStock($warehouseId, $cartonId = null, $categoryId = null, $paletteId = null, $locationId = null, $male = null, $female = null, $children = null, $baby = null, $summer = null, $winter = null, $showEmpty = false)
 {
     if ($warehouseId) {
         if ($cartonId) {
             return Statistic::getCartonStock($warehouseId, $cartonId);
         } else {
             if ($paletteId) {
                 return Statistic::getPaletteStock($warehouseId, $paletteId);
             } else {
                 if ($locationId) {
                     return Statistic::getLocationStock($warehouseId, $locationId);
                 } else {
                     if ($categoryId) {
                         return Statistic::getCategoryStock($warehouseId, $categoryId);
                     } else {
                         return Statistic::getWarehouseStock($warehouseId);
                     }
                 }
             }
         }
     }
 }