@extends('layouts.back-end.app') @section('title', $seller?->shop->name ?? translate("shop_name_not_found")) @section('content')

{{translate('Vendor_details')}}

@if ($seller->status=="pending")

{{translate('vendor_request_for_open_a_shop')}}
@csrf
@csrf
@endif
@if(!$clearanceConfig)
{{ translate('No_Clearance_Sale_available_now') }}
@else
{{translate('duration')}} : {{ $clearanceConfig?->duration_start_date->format('d M Y') }} - {{ $clearanceConfig?->duration_end_date->format('d M Y') }}
{{ translate('offer_active') }} : {{ ucwords(str_replace('_', " ", $clearanceConfig?->offer_active_time)) . ' '. ($clearanceConfig?->offer_active_time == 'always' ? '' : translate('in_a_day')) }}
@if($clearanceConfig?->offer_active_time == 'specific_time')
{{translate('time')}} : {{ $clearanceConfig?->offer_active_range_start->format('h:i A') }} - {{ $clearanceConfig?->offer_active_range_end->format('h:i A') }}
@endif
{{ translate('discount_type') }} : {{ ucwords(str_replace('_', " ", $clearanceConfig?->discount_type)) . ' ' . ($clearanceConfig?->discount_type == 'flat' ? translate('discount') : '')}}
@if($clearanceConfig?->discount_type == 'flat')
{{ translate('discount_amount') }} : {{ $clearanceConfig?->discount_amount }}%
@endif
@endif
@if(count($stockClearanceProduct) == 0 && request()->has('searchValue'))

{{ translate('Product_List') }} @if($stockClearanceProduct->total() > 0) {{ $stockClearanceProduct->total() }} @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()) }})
@include('layouts.back-end._empty-state',['text'=>'no_product_found'],['image'=>'default'])
@elseif(count($stockClearanceProduct) < 1 && $clearanceConfig)
{{ translate('no_products_Are_added') }}
@else @if($clearanceConfig)

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

@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()) }})
{{ $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
{{setCurrencySymbol(amount: usdToDefaultCurrency(amount: $clearanceProduct?->product?->unit_price), currencyCode: getCurrencyCode()) }}
@if($clearanceConfig?->discount_type == 'flat')
{{ $clearanceProduct->discount_amount }}
@else @if($clearanceProduct?->discount_type == 'flat') {{ setCurrencySymbol(amount: usdToDefaultCurrency(amount: $clearanceProduct->discount_amount), currencyCode: getCurrencyCode()) }} @else {{ $clearanceProduct->discount_amount. ' %' }} @endif @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
@endif @endif
@endsection