- @if($o->invoices->where('date_orig','>',($x=\Carbon\Carbon::now()->subMonths(12)))->where('due','=',0)->count())
+ @if(($x=$o->invoices()->where('ab_invoice.date_orig','>',\Carbon\Carbon::now()->subMonths(12)->unix())->with(['items.taxes','paymentitems.payment','account.country.currency'])->get()->where('due','<=',0))->count())
@@ -19,7 +19,7 @@
- @foreach ($o->invoices->where('date_orig','>',$x)->where('due','=',0) as $oo)
+ @foreach ($x as $oo)
{{ $oo->account->name }} |
{{ $oo->sid }} |
diff --git a/resources/views/theme/backend/adminlte/u/payment/widgets/list.blade.php b/resources/views/theme/backend/adminlte/u/payment/widgets/list.blade.php
index 4fdbb3a..2fe0567 100644
--- a/resources/views/theme/backend/adminlte/u/payment/widgets/list.blade.php
+++ b/resources/views/theme/backend/adminlte/u/payment/widgets/list.blade.php
@@ -5,7 +5,7 @@
- @if($o->payments->where('date_orig','>',($x=\Carbon\Carbon::now()->subMonths(12)))->count())
+ @if(($x=$o->payments()->where('ab_payment.date_orig','>',\Carbon\Carbon::now()->subMonths(12)->unix())->with(['items','account'])->get())->count())
@@ -19,7 +19,7 @@
- @foreach ($o->payments->where('date_orig','>',($x=\Carbon\Carbon::now()->subMonths(12))) as $oo)
+ @foreach ($x as $oo)
{{ $oo->account->name }} |
{{ $oo->sid }} |