Timesheet validator: prevent overbooking budgets (#2422)
This commit is contained in:
@@ -432,6 +432,11 @@ class Project implements EntityWithMetaFields
|
||||
return $this->budget;
|
||||
}
|
||||
|
||||
public function hasBudget(): bool
|
||||
{
|
||||
return $this->budget > 0.00;
|
||||
}
|
||||
|
||||
public function setTimeBudget(int $seconds): Project
|
||||
{
|
||||
$this->timeBudget = $seconds;
|
||||
@@ -444,6 +449,11 @@ class Project implements EntityWithMetaFields
|
||||
return $this->timeBudget;
|
||||
}
|
||||
|
||||
public function hasTimeBudget(): bool
|
||||
{
|
||||
return $this->timeBudget > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection|MetaTableTypeInterface[]
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user