@if(count($stockClearanceProduct) == 0 && request()->has('searchValue'))

{{ translate('Product_List') }}

+ {{ translate('Add_Product') }} @if(count($stockClearanceProduct) > 0) {{ translate('clear_all') }}
@csrf @method('delete')
@endif
@if(isset($clearanceConfig->discount_type) && $clearanceConfig->discount_type == 'product_wise') @else @endif
{{ translate('sl') }}
{{translate('Image')}}
{{translate('name')}}
{{ translate('unit_price') }} ({{ getCurrencySymbol(currencyCode: getCurrencyCode()) }}) {{ translate('discount_amount') }} {{ translate('discount_amount') . ' (%)' }} {{ translate('discount_price') }} ({{ getCurrencySymbol(currencyCode: getCurrencyCode()) }}) {{ translate('status') }} {{translate('action')}}
@include('layouts.back-end._empty-state',['text'=>'no_product_found'],['image'=>'default'])
@elseif(count($stockClearanceProduct) == 0)

{{ translate('Product_List') }}

+ {{ translate('Add_Product') }}
{{ translate('add_product_show_in_the_clearance_offer_section_in_customer_app_and_website') }}
+ {{ translate('Add_Product') }}
@else

{{ translate('Product_List') }} {{ $stockClearanceProduct->total() }}

+ {{ translate('Add_Product') }} @if(count($stockClearanceProduct) > 0) {{ translate('clear_all') }}
@csrf @method('delete')
@endif
@if(isset($clearanceConfig->discount_type) && $clearanceConfig->discount_type == 'product_wise') @else @endif @foreach($stockClearanceProduct as $key => $clearanceProduct) @endforeach
{{ translate('sl') }}
{{translate('Image')}}
{{ translate('name') }}
{{ translate('unit_price') }} ({{ getCurrencySymbol(currencyCode: getCurrencyCode()) }}) {{ translate('discount_amount') }} {{ translate('discount_amount') . ' (%)' }} {{ translate('discount_price') }} ({{ getCurrencySymbol(currencyCode: getCurrencyCode()) }}) {{ translate('status') }} {{translate('action')}}
{{ $key+1 }}
{{ $clearanceProduct?->product?->name }}
@if($clearanceProduct?->product->product_type != 'digital') {{ translate('current_stock') }} {{ $clearanceProduct?->product?->current_stock }} @endif {{ translate('category') }}: {{ $clearanceProduct?->product?->category->name ?? translate('not_found') }}
@if($clearanceProduct?->product?->product_type !== 'digital') {{translate('brand')}}: {{ $clearanceProduct?->product?->brand->name ?? translate('not_found') }} @endif
@if($clearanceConfig?->discount_type == 'flat') @php($discountAmount = $clearanceProduct?->product?->unit_price - ($clearanceProduct?->product?->unit_price * $clearanceProduct->discount_amount) / 100) @else @php($discountAmount = $clearanceProduct->discount_type === 'percentage' ? ($clearanceProduct?->product?->unit_price - ($clearanceProduct?->product?->unit_price * $clearanceProduct->discount_amount) / 100): ($clearanceProduct?->product?->unit_price - $clearanceProduct->discount_amount)) @endif @if($discountAmount < 0)
{{ setCurrencySymbol(amount: usdToDefaultCurrency(amount: $clearanceProduct?->product?->unit_price), currencyCode: getCurrencyCode()) }}
@else
{{ setCurrencySymbol(amount: usdToDefaultCurrency(amount: $clearanceProduct?->product?->unit_price), currencyCode: getCurrencyCode()) }}
@endif
@if($clearanceConfig?->discount_type == 'flat')
{{ $clearanceProduct->discount_amount }}
@else
{{ $clearanceProduct?->discount_type == 'flat' ? getCurrencySymbol(currencyCode: getCurrencyCode()) : '%' }}
@endif @if(isset($clearanceConfig->discount_type) && $clearanceConfig->discount_type == 'product_wise') @endif
@if($clearanceConfig?->discount_type == 'flat') {{setCurrencySymbol(amount: usdToDefaultCurrency(amount: $clearanceProduct?->product?->unit_price - ($clearanceProduct?->product?->unit_price * $clearanceProduct->discount_amount) / 100), currencyCode: getCurrencyCode()) }} @else @php($discountAmount = $clearanceProduct->discount_type === 'percentage'? ($clearanceProduct?->product?->unit_price - ($clearanceProduct?->product?->unit_price * $clearanceProduct->discount_amount) / 100): ($clearanceProduct?->product?->unit_price - $clearanceProduct->discount_amount)) {{setCurrencySymbol(amount: usdToDefaultCurrency(amount: $discountAmount), currencyCode: getCurrencyCode()) }} @endif
@csrf
@csrf @method('delete')
@endif