Fix dashboard SQL query error, doesnt work with postgres

This commit is contained in:
2024-07-03 13:52:16 +10:00
parent 74864e66cb
commit 1b4504cee2
2 changed files with 18 additions and 17 deletions

View File

@@ -6,7 +6,7 @@
</div>
<div class="card-body">
@if($o->query_invoice_summary()->having('balance','>',0)->count())
@if($o->query_invoice_summary()->havingRaw('invoice_total-payments > 0')->count())
<table class="table table-bordered w-100" id="reseller_invoices_due">
<thead>
<tr>
@@ -21,7 +21,7 @@
</thead>
<tbody>
@foreach ($o->query_invoice_summary()->having('balance','>',0)->get() as $oo)
@foreach ($o->query_invoice_summary()->havingRaw('invoice_total-payments > 0')->get() as $oo)
<tr @if ($oo->due_at->isPast()) class="table-danger" @endif>
<td>{{ $oo->account->name }}</td>
<td><a href="{{ url('u/invoice',$oo->id) }}">{{ $oo->sid }}</a></td>