mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 23:24:28 -04:00
Improvement and bug of expenses report #1958
This commit is contained in:
parent
2c98aaceb3
commit
7e272e1a75
@ -44,6 +44,11 @@ class ExpensePresenter extends EntityPresenter
|
||||
return Utils::formatMoney($this->entity->amountWithTax(), $this->entity->expense_currency_id);
|
||||
}
|
||||
|
||||
public function currencyCode()
|
||||
{
|
||||
return Utils::getFromCache($this->entity->expense_currency_id, 'currencies')->code;
|
||||
}
|
||||
|
||||
public function taxAmount()
|
||||
{
|
||||
return Utils::formatMoney($this->entity->taxAmount(), $this->entity->expense_currency_id);
|
||||
|
@ -27,6 +27,10 @@ class ExpenseReport extends AbstractReport
|
||||
$columns['tax'] = ['columnSelector-false'];
|
||||
}
|
||||
|
||||
if ($this->isExport) {
|
||||
$columns['currency'] = ['columnSelector-false'];
|
||||
}
|
||||
|
||||
return $columns;
|
||||
}
|
||||
|
||||
@ -85,6 +89,10 @@ class ExpenseReport extends AbstractReport
|
||||
$row[] = $expense->present()->taxAmount;
|
||||
}
|
||||
|
||||
if ($this->isExport) {
|
||||
$row[] = $expense->present()->currencyCode;
|
||||
}
|
||||
|
||||
$this->data[] = $row;
|
||||
|
||||
$this->addToTotals($expense->expense_currency_id, 'amount', $amount);
|
||||
|
@ -7,6 +7,7 @@
|
||||
<td>{{ trans('texts.expense_date') }}</td>
|
||||
<td>{{ trans('texts.amount') }}</td>
|
||||
<td>{{ trans('texts.tax') }}</td>
|
||||
<td>{{ trans('texts.currency') }}</td>
|
||||
<td>{{ trans('texts.category') }}</td>
|
||||
<td>{{ trans('texts.status') }}</td>
|
||||
<td>{{ trans('texts.public_notes') }}</td>
|
||||
@ -25,6 +26,7 @@
|
||||
<td>{{ $expense->present()->expense_date }}</td>
|
||||
<td>{{ $expense->present()->amount }}</td>
|
||||
<td>{{ $expense->present()->taxAmount }}</td>
|
||||
<td>{{ $expense->present()->currencyCode }}</td>
|
||||
<td>{{ $expense->present()->category }}</td>
|
||||
<td>{{ $expense->statusLabel() }}</td>
|
||||
<td>{{ $expense->public_notes }}</td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user