erolha
January 22, 2016, 1:23pm
1
I just discovered that the overdue calculation on the dashboard either
In my setup I have many more invoices that is overdue, but they are not a part of the result of the calculated amount. (They all have status “Sent”.)
Best regards,
Erol Haagenrud
(This is not a request for support, it’s just a notification to the developers.)
erolha
January 23, 2016, 4:11am
2
FYI, I made a temporary solution for my own system.
In /application/modules/dashboard/controllers/dashboard.php I changed from
'quote_statuses' => $this->mdl_quotes->statuses(),
'overdue_invoices' => $this->mdl_invoices->is_overdue()->limit(10)->get()->result()
to
'quote_statuses' => $this->mdl_quotes->statuses(),
'overdue_invoices_warning' => $this->mdl_invoices->is_overdue()->get()->result(),
'overdue_invoices' => $this->mdl_invoices->is_overdue()->limit(10)->get()->result()
(I added the second last line.)
Then, in /application/modules/dashboard/views/index.php, around line 100 I changed from
<?php } else {
$overdue_invoices_total = 0;
foreach ($overdue_invoices as $invoice) {
$overdue_invoices_total += $invoice->invoice_balance;
}
to
<?php } else {
$overdue_invoices_total = 0;
foreach ($overdue_invoices_warning as $invoice) {
$overdue_invoices_total += $invoice->invoice_balance;
}
Now all invoices that are overdue is included in the calculation.
Why there initially was a limit of showing the sum of only the last 10 invoices that was overdue I don’t know.
1 Like
Kovah
January 29, 2016, 12:01pm
3
1 Like
Kovah
Closed
January 30, 2016, 12:19pm
4
This topic was automatically closed after 24 hours. New replies are no longer allowed.