added freelancer invoice template (#254)
This commit is contained in:
@@ -62,7 +62,7 @@ class DefaultCalculator implements CalculatorInterface
|
||||
/**
|
||||
* @return float
|
||||
*/
|
||||
public function getVat()
|
||||
public function getVat(): ?float
|
||||
{
|
||||
return $this->model->getTemplate()->getVat();
|
||||
}
|
||||
@@ -97,4 +97,19 @@ class DefaultCalculator implements CalculatorInterface
|
||||
{
|
||||
return $this->model->getCustomer()->getCurrency();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the total amount of worked time in seconds.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getTimeWorked(): int
|
||||
{
|
||||
$time = 0;
|
||||
foreach ($this->model->getEntries() as $entry) {
|
||||
$time += $entry->getDuration();
|
||||
}
|
||||
|
||||
return $time;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user