| @@ 1278-1294 (lines=17) @@ | ||
| 1275 | * |
|
| 1276 | * @return float |
|
| 1277 | */ |
|
| 1278 | public function getTotalDays($id_type = null) |
|
| 1279 | { |
|
| 1280 | if (!isset($this->total_days)) { |
|
| 1281 | $this->loadedElementsTotal(); |
|
| 1282 | } |
|
| 1283 | ||
| 1284 | if (isset($id_type)) { |
|
| 1285 | ||
| 1286 | if (!isset($this->total_type_days[$id_type])) { |
|
| 1287 | return 0.0; |
|
| 1288 | } |
|
| 1289 | ||
| 1290 | return $this->total_type_days[$id_type]; |
|
| 1291 | } |
|
| 1292 | ||
| 1293 | return $this->total_days; |
|
| 1294 | } |
|
| 1295 | ||
| 1296 | /** |
|
| 1297 | * Get sum of elements quantity, converted in hours |
|
| @@ 1303-1319 (lines=17) @@ | ||
| 1300 | * |
|
| 1301 | * @return float |
|
| 1302 | */ |
|
| 1303 | public function getTotalHours($id_type = null) |
|
| 1304 | { |
|
| 1305 | if (!isset($this->total_hours)) { |
|
| 1306 | $this->loadedElementsTotal(); |
|
| 1307 | } |
|
| 1308 | ||
| 1309 | if (isset($id_type)) { |
|
| 1310 | ||
| 1311 | if (!isset($this->total_type_hours[$id_type])) { |
|
| 1312 | return 0.0; |
|
| 1313 | } |
|
| 1314 | ||
| 1315 | return $this->total_type_hours[$id_type]; |
|
| 1316 | } |
|
| 1317 | ||
| 1318 | return $this->total_hours; |
|
| 1319 | } |
|
| 1320 | ||
| 1321 | ||
| 1322 | ||