@include('partials.show-customer-heading') @php $deletedPakets = $user->customer_pakets()->onlyTrashed()->whereHas('paket'); @endphp
@if ($deletedPakets->count()) {{ __('customer.button.deleted-pakets', ['count' => $deletedPakets->count()]) }} @endif {{ __('customer.button.add-paket') }}
@php $customerPakets = $user->customer_pakets()->paginate(2); @endphp @if ($customerPakets->hasPages())
{{ $customerPakets->links() }}
@endif
@forelse ($customerPakets as $key => $customer_paket)
{{ $customer_paket->customer_installation_address->address }}
{{ trans('customer.table.paket') }}
{{ trans('customer.table.internet-service') }}
@if ($customer_paket->internet_service->value == 'ppp') {{ $customer_paket->internet_service->name }} @elseif ($customer_paket->internet_service->value == 'ip_static') {{ $customer_paket->internet_service->name }} @endif
@if ($customer_paket->internet_service->value == 'ppp')
{{ trans('customer.label.ppp-username') }}
{{ trans('customer.label.ppp-password') }}
@elseif ($customer_paket->internet_service->value == 'ip_static')
{{ trans('customer.label.ip-address') }}
{{ trans('customer.label.mac-address') }}
{{ trans('customer.label.simpleque-name') }}
{{ $customer_paket->customer_static_paket->simpleque_name }}
@endif
@if ( $customer_paket->status === 'active' || $customer_paket->status === 'cancelled' || $customer_paket->status === 'expired')
{{ trans('customer.table.activation-date') }}
{{ Carbon\Carbon::parse($customer_paket->activation_date)->format('d M Y')}}
@endif @if ($customer_paket->start_date)
{{ trans('customer.label.start-date') }}
{{ Carbon\Carbon::parse($customer_paket->start_date)->format('d M Y') }}
@endif @if ($customer_paket->expired_date)
{{ trans('customer.label.expired-date') }}
{{ Carbon\Carbon::parse($customer_paket->expired_date)->format('d M Y') }}
@endif @if ($customer_paket->next_billed_at)
{{ trans('customer.label.next-bill') }}
{{ Carbon\Carbon::parse($customer_paket->next_billed_at)->format('d M Y') }}
@endif @if ($customer_paket->paylater_date)
{{ trans('customer.label.paylater-date') }}
{{ Carbon\Carbon::parse($customer_paket->paylater_date)->format('d M Y') }}
@endif
{{ trans('customer.label.subscription-status') }}
: {{ Str::apa($customer_paket->renewal_period) }}
{{ trans('customer.table.bill') }}
: @if ($customer_paket->status === 'active' || $customer_paket->status === 'cancelled' ||($customer_paket->status === 'expired' && !$customer_paket->disabled)) @money($customer_paket->price - $customer_paket->discount) @else @money(0) @endif
{{ trans('customer.table.discount') }}
: @moneyIDR($customer_paket->discount)
{{ trans('customer.paket.label.installation_address') }}
: {{ $customer_paket->customer_installation_address->address }}
@php $country_code = \App\Models\WhatsappGateway\WhatsappGatewayGeneral::first()->country_code; @endphp
{{ trans('customer.paket.label.installation_phone') }}
: {{ $customer_paket->customer_installation_address->phone ? preg_replace('/^' . $country_code . '?/', 0, $customer_paket->customer_installation_address->phone) : '-' }} @if ($customer_paket->customer_installation_address->phone) @endif
{{ trans('customer.paket.label.billing_address') }}
: {{ $customer_paket->customer_billing_address->address }}
{{ trans('customer.paket.label.billing_phone') }}
: {{ $customer_paket->customer_billing_address->phone ? preg_replace('/^' . $country_code . '?/', 0, $customer_paket->customer_billing_address->phone) : '-' }} @if ($customer_paket->customer_billing_address->phone) @if ($customer_paket->customer_billing_address->phone) @endif @endif
{{ trans('customer.button.delete-paket') }}
@empty
{{ trans('customer.paket-notfound') }}
@endforelse