mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-16 19:14:38 -04:00
Sum balance
instead of amount
This commit is contained in:
parent
a5852f61fe
commit
00e37ea681
@ -232,7 +232,7 @@ class Design extends BaseDesign
|
||||
]],
|
||||
['element' => 'tr', 'properties' => [], 'elements' => [
|
||||
['element' => 'th', 'properties' => [], 'content' => '$balance_due_label'],
|
||||
['element' => 'th', 'properties' => [], 'content' => Number::formatMoney($this->invoices->sum('amount'), $this->entity->client)],
|
||||
['element' => 'th', 'properties' => [], 'content' => Number::formatMoney($this->invoices->sum('balance'), $this->entity->client)],
|
||||
]],
|
||||
];
|
||||
}
|
||||
@ -379,7 +379,7 @@ class Design extends BaseDesign
|
||||
return [];
|
||||
}
|
||||
|
||||
$outstanding = $this->invoices->sum('amount');
|
||||
$outstanding = $this->invoices->sum('balance');
|
||||
|
||||
return [
|
||||
['element' => 'p', 'content' => '$outstanding_label: ' . Number::formatMoney($outstanding, $this->entity->client)],
|
||||
@ -424,7 +424,11 @@ class Design extends BaseDesign
|
||||
|
||||
public function statementPaymentTableTotals(): array
|
||||
{
|
||||
if ($this->type !== self::STATEMENT || !$this->payments->first()) {
|
||||
if (is_null($this->payments) && $this->type !== self::STATEMENT) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (\array_key_exists('show_payments_table', $this->options) && $this->options['show_payments_table'] === false) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user