update to Symfony 4.4 (#1275)

This commit is contained in:
Kevin Papst
2020-02-04 15:29:26 +01:00
committed by GitHub
parent 375691365e
commit 75dcae6fbe
53 changed files with 1046 additions and 1019 deletions

View File

@@ -211,13 +211,23 @@ final class InvoiceModel
return $this->formatter;
}
public function getCurrency(): string
{
if (null === $this->getCustomer()) {
// this should be set from the configuration
return Customer::DEFAULT_CURRENCY;
}
return $this->getCustomer()->getCurrency();
}
public function toArray(): array
{
$model = $this;
$customer = $model->getCustomer();
$project = $model->getQuery()->getProject();
$activity = $model->getQuery()->getActivity();
$currency = $model->getCalculator()->getCurrency();
$currency = $this->getCurrency();
$tax = $model->getCalculator()->getTax();
$total = $model->getCalculator()->getTotal();
$subtotal = $model->getCalculator()->getSubtotal();