| @@ 1629-1645 (lines=17) @@ | ||
| 1626 | * |
|
| 1627 | * @return float |
|
| 1628 | */ |
|
| 1629 | public function getTotalDays($id_type = null) |
|
| 1630 | { |
|
| 1631 | if (!isset($this->total_days)) { |
|
| 1632 | $this->loadedElementsTotal(); |
|
| 1633 | } |
|
| 1634 | ||
| 1635 | if (isset($id_type)) { |
|
| 1636 | ||
| 1637 | if (!isset($this->total_type_days[$id_type])) { |
|
| 1638 | return 0.0; |
|
| 1639 | } |
|
| 1640 | ||
| 1641 | return $this->total_type_days[$id_type]; |
|
| 1642 | } |
|
| 1643 | ||
| 1644 | return $this->total_days; |
|
| 1645 | } |
|
| 1646 | ||
| 1647 | /** |
|
| 1648 | * Get sum of elements quantity, converted in hours |
|
| @@ 1654-1670 (lines=17) @@ | ||
| 1651 | * |
|
| 1652 | * @return float |
|
| 1653 | */ |
|
| 1654 | public function getTotalHours($id_type = null) |
|
| 1655 | { |
|
| 1656 | if (!isset($this->total_hours)) { |
|
| 1657 | $this->loadedElementsTotal(); |
|
| 1658 | } |
|
| 1659 | ||
| 1660 | if (isset($id_type)) { |
|
| 1661 | ||
| 1662 | if (!isset($this->total_type_hours[$id_type])) { |
|
| 1663 | return 0.0; |
|
| 1664 | } |
|
| 1665 | ||
| 1666 | return $this->total_type_hours[$id_type]; |
|
| 1667 | } |
|
| 1668 | ||
| 1669 | return $this->total_hours; |
|
| 1670 | } |
|
| 1671 | ||
| 1672 | ||
| 1673 | ||