fix bug for undefined hoursUsed variable
This commit is contained in:
		| @@ -67,6 +67,7 @@ class Referral | |||||||
|     { |     { | ||||||
|         $this->notes = new ArrayCollection(); |         $this->notes = new ArrayCollection(); | ||||||
|         $this->present = new ArrayCollection(); |         $this->present = new ArrayCollection(); | ||||||
|  |         $this->hoursUsed = 0.0; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public function getId(): ?Uuid |     public function getId(): ?Uuid | ||||||
| @@ -195,7 +196,7 @@ class Referral | |||||||
|         $this->notes = $notes; |         $this->notes = $notes; | ||||||
|         $this->hoursUsed = 0.0; |         $this->hoursUsed = 0.0; | ||||||
|  |  | ||||||
|         foreach($this->notes as $note) { |         foreach ($this->notes as $note) { | ||||||
|             $this->hoursUsed += ($note->calcTimeUsed() / 60); |             $this->hoursUsed += ($note->calcTimeUsed() / 60); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user