added user-specific rates (#1455)

This commit is contained in:
Kevin Papst
2020-02-10 20:29:43 +01:00
committed by GitHub
parent 465d7166d4
commit 52c7437076
83 changed files with 2054 additions and 520 deletions

View File

@@ -130,8 +130,21 @@ class Timesheet implements EntityWithMetaFields, ExportItemInterface
*/
private $rate = 0.00;
// keep the trait include exactly here, for placing the column at the correct position
use RatesTrait;
/**
* @var float
*
* @ORM\Column(name="fixed_rate", type="float", nullable=true)
* @Assert\GreaterThanOrEqual(0)
*/
private $fixedRate = null;
/**
* @var float
*
* @ORM\Column(name="hourly_rate", type="float", nullable=true)
* @Assert\GreaterThanOrEqual(0)
*/
private $hourlyRate = null;
/**
* @var bool
@@ -452,6 +465,30 @@ class Timesheet implements EntityWithMetaFields, ExportItemInterface
return self::CATEGORY_WORK;
}
public function getFixedRate(): ?float
{
return $this->fixedRate;
}
public function setFixedRate(?float $fixedRate): Timesheet
{
$this->fixedRate = $fixedRate;
return $this;
}
public function getHourlyRate(): ?float
{
return $this->hourlyRate;
}
public function setHourlyRate(?float $hourlyRate): Timesheet
{
$this->hourlyRate = $hourlyRate;
return $this;
}
/**
* @internal only here for symfony forms
* @return Collection|MetaTableTypeInterface[]