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:
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user