Customizing the Dashboard Help

I’d like to have one of the panels at the top of my dashboard represent my total outstanding quotes that have an APPROVED status. I’ve currently got this…

$mytotal = 0;
$mycount = 0;

                        @foreach ($upcoming as $invoice)
                            @if ($invoice->invoice_type_id == INVOICE_TYPE_QUOTE)
                                    $mytotal += $invoice->balance;
                                    $mycount += 1;

                            $myaverage = ($mytotal / $mycount);

Which lists all quotes. However, I’d like to include a check for “invoice_status_id == 4”. This doesn’t seem to be valid for “$upcoming”. Is there a method you could recommend to accomplish this? I apologize but I am not super familiar with blade.

One additional question I have is that Total Revenue in the dashboard seems to show last years payments. Shouldn’t this be reset if my fiscal year is January? Is there a way to do this or do I have to archive my payments from the previous year?


Try using ->where('invoice_status_id', '=', 4)

Try setting the first month of the year on Settings > Localization

Note: in general we don’t provide developer support.

No problem. Thanks for the response.