Ask, reply and learn. Join the community of Akaunting.
I did a fresh install of 2.1.9 on shared hosting account via softaculous. I started entering invoices for 2019 and 2020 to build a history. No errors are reported in admin when adding invoices and payments for 2019 and 2020. However when the customer signs in into their portal, the 500 error occurs. When manually entering https://mydomainname.com/portal/invoices in the browser, a list of all invoices display as well as the payments. The dashboard link to the portal throws the exception error.
ErrorException
in /home/xxxxxx/public_html/app/Http/Controllers/Portal/Dashboard.php (line 132)
$is_overdue = $today > $invoice->due_at->format('Y-m-d'); switch ($invoice->status) { case 'paid': $amounts['paid'][$date] += $amount; break; case 'partial': $paid = $invoice->paid; $remainder = $amount - $paid;
HandleExceptions
When I delete all 2019 and 2020 invoices and payments everything is back to normal.
If you experience the same issue I have, please follow these directions:
In app/Http/Controllers/Dashboard.php Line 132 change from:
$amounts['paid'][$date] += $amount;
to:
isset($amounts['paid'][$date]) ? $amounts['paid'][$date] += $amount : $amounts['paid'][$date] = $amount;
Showing 1 to 2 of 2 discussions