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) @php $mytotal += $invoice->balance; $mycount += 1; @endphp @endif @endforeach @php $myaverage = ($mytotal / $mycount); @endphp
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?