summary amount format change for Humans..
This commit is contained in:
@ -12,7 +12,7 @@ class Content extends Component
|
||||
{
|
||||
public $counts;
|
||||
|
||||
public $totals;
|
||||
public $summary_amounts;
|
||||
|
||||
public $transactions;
|
||||
|
||||
@ -72,7 +72,20 @@ class Content extends Component
|
||||
$totals['paid'] += $item->getAmountConvertedToDefault();
|
||||
});
|
||||
|
||||
$this->totals = $totals;
|
||||
$open_amount = money($totals['open'], setting('default.currency'), true);
|
||||
$overdue_amount = money($totals['overdue'], setting('default.currency'), true);
|
||||
$paid_amount = money($totals['paid'], setting('default.currency'), true);
|
||||
|
||||
$summary_amounts = [
|
||||
'open_exact' => $open_amount->format(),
|
||||
'open_for_humans' => $open_amount->formatForHumans(),
|
||||
'overdue_exact' => $overdue_amount->format(),
|
||||
'overdue_for_humans' => $overdue_amount->formatForHumans(),
|
||||
'paid_exact' => $paid_amount->format(),
|
||||
'paid_for_humans' => $paid_amount->formatForHumans(),
|
||||
];
|
||||
|
||||
$this->summary_amounts = $summary_amounts;
|
||||
|
||||
$this->transactions = $this->paginate($this->transactions->sortByDesc('paid_at'));
|
||||
$this->documents = $this->paginate($this->documents->sortByDesc('issued_at'));
|
||||
|
Reference in New Issue
Block a user