@php $whatsappGatewayDisabled = \App\Models\WhatsappGateway\WhatsappGatewayGeneral::first()->disabled; // $billingUnpayments = $billings->where('status', '!=', 'paid'); @endphp
{!! trans('billing.periode') !!} @if ($search_with_month == 'all-month') All Month @else {{ \Carbon\Carbon::create()->month((int) $search_with_month)->format('F') }} @endif @if ($search_with_year == 'all-year') All Year @else {{ \Carbon\Carbon::create()->year((int) $search_with_year)->format('Y') }} @endif
@if (count($billingUnpayments)) {!! trans('billing.button.invoice') !!} {!! trans('billing.button.billing') !!} @endif {!! trans('billing.button.create') !!} {!! trans('billing.button.reset-next-bill') !!} @if (!$whatsappGatewayDisabled) {{ __('billing.button.send-notification') }} @endif
{{ trans('billing.status.unpayment') }} {{ trans('billing.status.pay-later') }} {{ trans('billing.status.overdue') }} {{ trans('billing.status.partial-paid') }} {{ trans('billing.status.payment') }} {{ trans('billing.ph.all') }} @if($search_with_status === 'paylater' || $search_with_status === 'partially_paid' || $search_with_status === 'paid') {{ trans('billing.ph.search-teller') }} @foreach ($payments as $payment) {{ $payment->teller }} @endforeach @endif {{ __('billing.ph.all-year') }} @foreach ($years as $year) {{ $year->year }} @endforeach {{ __('billing.ph.all-month') }} @foreach (array_reverse(\Carbon\CarbonPeriod::create(now()->addMonth(), '1 month', now()->addMonths(12))->toArray()) as $date) {{ $date->format('F') }} @endforeach
{{ __('Reset') }} {{ __('Advance Search') }}
{{ trans('billing.table.no') }} {{ trans('billing.table.customer-name') }} {{ trans('billing.table.bill') }} @forelse ($users as $key => $user) {{ ($users->currentpage() - 1) * $users->perpage() + $loop->index + 1 }}
{{ $user->full_name }}
{{ $user->user_address->address }}
# {{ trans('billing.table.customer-paket') }} {{ trans('billing.table.periode') }} {{ trans('billing.table.bill') }} {{ trans('billing.table.deadline') }} {{ trans('billing.table.payment-time') }} {{ trans('billing.table.action') }} @php if ($search_with_status == 'paid') { $userBillings = $user->invoices()->orderByDesc('periode')->paginate(3); } else { $userBillings = $user->invoices()->orderBy('periode')->orderBy('customer_paket_id')->paginate(3); } @endphp @forelse ($userBillings as $key => $billing) {{ $billing->customer_paket->paket->name.' - '.$billing->customer_paket->internet_service->value }} {{ Str::apa($billing->customer_paket->renewal_period) }} @if (!is_null($billing->customer_paket->customer_billing_address->last_reminder_date)) Last Reminder {{ \Carbon\Carbon::parse($billing->customer_paket->customer_billing_address->last_reminder_date)->format('d M Y, H:i') }} @endif
{{ \Carbon\Carbon::parse($billing->periode)->format('F Y') }} {{ \Carbon\Carbon::parse($billing->start_periode)->format('d-m-y') }} - {{ \Carbon\Carbon::parse($billing->end_periode)->format('d-m-y') }}
@empty
{{ trans('billing.notfound') }}
@endforelse
@empty
{{ trans('billing.notfound') }}
@endforelse @if ($users->count())
{{ trans('billing.label.action-with-selected') }}
@if (collect($selectedInvoice)->count()) @if($search_with_status === 'paid') {!! trans_choice('billing.button.bulk-unpayment', collect($selectedInvoice)->count(), [ 'count' => collect($selectedInvoice)->count(),]) !!} @else {!! trans_choice('billing.button.bulk-payment', collect($selectedInvoice)->count(), [ 'count' => collect($selectedInvoice)->count(),]) !!} {!! trans_choice('billing.button.bulk-delete-invoice', collect($selectedInvoice)->count(), [ 'count' => collect($selectedInvoice)->count(),]) !!} @endif @endif
@endif
@if ($users->hasPages())
{{ $users->links() }}
@endif