fixed short invoice calculator (#114)

* fixed money display and address field for InvoiceTemplate entity
* added quick start button for users without active records
* rearranged columns on project and customer admin page
* improved extensions docu
This commit is contained in:
Kevin Papst
2018-01-28 12:08:44 +01:00
committed by GitHub
parent 9bbaf0ec71
commit e35d73eab5
7 changed files with 35 additions and 27 deletions

View File

@@ -175,7 +175,7 @@ class InvoiceTemplate
* @param string $address
* @return InvoiceTemplate
*/
public function setAddress(string $address)
public function setAddress($address)
{
$this->address = $address;
return $this;

View File

@@ -30,6 +30,7 @@ class ShortInvoiceCalculator extends DefaultCalculator
$timesheet = new Timesheet();
foreach ($this->model->getEntries() as $entry) {
$timesheet->setRate($timesheet->getRate() + $entry->getRate());
$timesheet->setDuration($timesheet->getDuration() + $entry->getDuration());
if ($timesheet->getActivity() === null) {
$timesheet->setActivity($entry->getActivity());

View File

@@ -121,7 +121,7 @@ class Extensions extends \Twig_Extension
*/
public function money($amount, $currency = null)
{
$result = round($amount, 2);
$result = number_format(round($amount, 2), 2);
if ($currency !== null) {
$result .= ' ' . Intl::getCurrencyBundle()->getCurrencySymbol($currency);
}