@section('page_css')
@if(!empty($checkInvoice->due_date) && $checkInvoice->due_date < date('Y-m-d')) @endif @if(!empty($checkInvoice))
{{-- @include('owner.carwashowner.partials._filter') --}}
@if(!empty($checkInvoice->bill_date)) @else @endif @if(!empty($checkInvoice->due_date)) @else @endif
Invoice No Bill Date Due Date Total
{{$checkInvoice->invoice_no??''}}{{ $checkInvoice->bill_date ? \Carbon\Carbon::parse($checkInvoice->bill_date)->format('jS F, Y') : 'N/A' }}N.A{{ $checkInvoice->due_date ? \Carbon\Carbon::parse($checkInvoice->due_date)->format('jS F, Y') : 'N/A' }}N.AR {{ ($checkInvoice->total_amount ?? 0) }}
@else
You have nothing to pay
@endif
@if(!empty($checkInvoice)) @if($checkInvoice->type > 0)
@if(!empty($records->amount)) R {{$records->amount}} @endif @if($checkInvoice->is_subscription_paid == 0) Pay Subscription @endif

Currently your subscription is: @if(!empty($records->type)) {{ $records->type == 1 ? 'monthly' : ($records->type == 2 ? 'yearly' : 'quarter') }} @endif

@if(!empty($checkInvoice) && $records->type==1)

Start Date: {{ \Carbon\Carbon::parse($checkInvoice->due_date)->addDays(1)->format('jS F, Y') }}

End Date: {{ \Carbon\Carbon::parse($checkInvoice->due_date)->addMonth()->format('jS F, Y') }}

@endif @if(!empty($checkInvoice) && $records->type==2)

Start Date: {{ \Carbon\Carbon::parse($checkInvoice->due_date)->addDays(1)->format('jS F, Y') }}

End Date: {{ \Carbon\Carbon::parse($checkInvoice->due_date)->addYear()->format('jS F, Y') }}

@endif @if(!empty($checkInvoice) && $records->type==3)

Start Date: {{ \Carbon\Carbon::parse($checkInvoice->due_date)->addDays(1)->format('jS F, Y') }}

End Date: {{ \Carbon\Carbon::parse($checkInvoice->due_date)->addDays(90)->format('jS F, Y') }}

@endif
@endif
WhatsApp Charges: @if(!empty($checkInvoice->whatsapp_start_date)) ({{ \Carbon\Carbon::parse($checkInvoice->whatsapp_start_date)->format('jS F, Y') }} - {{ \Carbon\Carbon::parse($checkInvoice->whatsapp_end_date)->format('jS F, Y') }}) @endif
@if(!empty($checkInvoice->whatsapp_amount)) R {{ number_format($checkInvoice->whatsapp_amount ?? 0.00, 2) }} @endif @if($checkInvoice->is_whatsapp_paid == 0) @if($checkInvoice->whatsapp_amount > 0) Pay WhatsApp @endif @else Already Paid @endif

Cars Washed: {{ $washedDataCount }}

Sent Notifications: {{ $checkInvoice->total_notifications_count??0}}

Transactions With Phone# {{$washedDataNoMessages}}

Billing Start Date: {{ \Carbon\Carbon::parse($checkInvoice->whatsapp_start_date)->format('d-m-Y') }}

Billing End Date: {{ \Carbon\Carbon::parse($checkInvoice->whatsapp_end_date)->format('d-m-Y') }}

Total Charges: {{ $checkInvoice->total_notifications_count }} x 0.3 = R {{ number_format($checkInvoice->total_notifications_count * 0.3, 2) }}

* Charges are calculated at 30 cents per WhatsApp Notification.

@else
You currently have nothing to pay
@endif
@if(!empty($checkInvoice))
Download Invoice @if($checkInvoice->type > 0) @if($checkInvoice->is_paid == 0) Pay All @endif @endif
@else @endif
@if(isset($previousBill) && $previousBill->isNotEmpty()) @foreach ($previousBill as $key => $bill)
{{ \Carbon\Carbon::parse($bill->bill_date)->format('F, Y') }}
@if($bill->type > 0)

Subscription Charge: R {{ $bill->amount }}

Subscription Start Date: {{ \Carbon\Carbon::parse($bill->bill_date)->format('d-m-Y') }}

Subscription End Date: {{ \Carbon\Carbon::parse($bill->due_date)->format('d-m-Y') }}

@endif

WhatsApp Charge: R {{ $bill->whatsapp_amount ?? '0.00' }}

Total: R {{ number_format(($bill->amount ?? 0) + ($bill->whatsapp_amount ?? 0), 2) }}

@endforeach @else
Nothing to show here
@endif
@section('page_scripts') {{-- --}} @endsection