@section('title', translate('discount_List')) @extends('layouts.admin.app') @push('css_or_js') @endpush @section('content')
| {{ translate('SL') }} | {{ translate('image') }} | {{ translate('discount_title') }} | {{ translate('zone') }} | {{ translate('customer_level') }} | {{ translate('customer') }} | {{ translate('category') }} | {{ translate('discount_amount') }} | {{ translate('duration') }} | {{ translate('total_times_used') }} | {{ translate('total_discount') }} {{ translate('amount') }} ({{ session()->get('currency_symbol') ?? '$' }}) |
{{ translate('discount_status') }} | @can('promotion_edit'){{ translate('status') }} | @endcan{{ translate('action') }} |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $discounts->firstItem() + $key }} |
|
{{ \Illuminate\Support\Str::limit($discount->title, 25, '...') }} |
@if ($discount->zone_discount_type == ALL)
{{ ALL }}
@else
@foreach ($discount->zones as $key => $zone)
{{ $zone->name }}
@if ($key % 2 == 1)
@endif @endforeach @endif |
@if ($discount->customer_level_discount_type == ALL)
{{ ALL }}
@else
@foreach ($discount->customerLevels as $key => $level)
{{ $level->name }}
@if ($key % 2 == 1)
@endif @endforeach @endif |
@if ($discount->customer_discount_type == ALL)
{{ ALL }}
@else
@foreach ($discount->customers as $key => $customer)
{{ $customer->first_name . ' ' . $customer->last_name }}
@if ($key % 2 == 1)
@endif @endforeach @endif |
@if (in_array(ALL, $discount->module_discount_type))
{{ ALL }}
@elseif (in_array(PARCEL, $discount->module_discount_type) && in_array(CUSTOM, $discount->module_discount_type))
{{ PARCEL }}
@foreach ($discount->vehicleCategories as $key => $category)
{{ $category->name }}
@if ($key % 2 == 0)
@endif @endforeach @elseif (in_array(PARCEL, $discount->module_discount_type)) {{ PARCEL }} @elseif (in_array(CUSTOM, $discount->module_discount_type)) @foreach ($discount->vehicleCategories as $key => $category) {{ $category->name }} @if ($key % 2 == 1) @endif @endforeach @endif |
{{ $discount->discount_amount_type == PERCENTAGE ? $discount->discount_amount . '%' : set_currency_symbol($discount->discount_amount) }} |
{{ translate('start') }}: {{ date('Y-m-d', strtotime($discount->start_date)) }} {{ translate('end') }}: {{ date('Y-m-d', strtotime($discount->end_date)) }} {{ translate('duration') }}: {{ Carbon\Carbon::parse($discount->end_date)->diffInDays($discount->start_date) + 1 }} Days |
{{ (int) $discount->total_used }} | {{ set_currency_symbol(round($discount->total_amount, 2)) }} | @php($date = Carbon\Carbon::now()->startOfDay()) @if ($date->gt($discount->end_date)) {{ translate(EXPIRED) }} @elseif (!$discount->is_active) {{ translate(CURRENTLY_OFF) }} @elseif ($date->lt($discount->start_date)) {{ translate(UPCOMING) }} @elseif ($date->lte($discount->end_date)) {{ translate(RUNNING) }} @endif | @can('promotion_edit')
|
@endcan
|
{{ translate('no_data_found') }} |
|||||||||||||