@if(!empty($venues) && !$venues->isEmpty()) @php($total_screen_price = 0) @php($total_screen_discount = 0) @foreach ($venues as $venue) @if(!empty($venue->venuScreens) && !$venue->venuScreens->isEmpty()) @php($total_screens = count($venue->venuScreens)) {{-- @php($total_screen_price = $venue->venuScreens->sum('slotPrice.slots.price')/$total_screens) --}} @php($total_screen_price = (!empty($venue->venuScreens->sum('price')) && $venue->venuScreens->sum('price') > 0) ? ($venue->venuScreens->sum('price')/$total_screens) : ($venue->venuScreens->sum('slotPrice.slots.price')/$total_screens)) @php($screen_discount = $venue->venuScreens->sum('discount')) @if(!empty($screen_discount) && $screen_discount > 0) @php($total_screen_discount = $screen_discount/$total_screens) @php($total_screen_price = ($total_screen_price-$total_screen_discount)*count($venue->venuScreens)) @else @php($total_screen_price = ($total_screen_price-$total_screen_discount)*count($venue->venuScreens)) @endif @php($total_screen_price_with_out_content = $total_screen_price*$date_diff) @php($total_screen_price = $total_screen_price_with_out_content*$total_slots) {{ !empty($venue->location) ? strlen($venue->location) > 30 ? substr($venue->location, 0, 30). '...' : $venue->location : 'NA' }} {{ !empty($venue->location) ? strlen($venue->location) > 30 ? substr($venue->location, 0, 30). '...' : $venue->location : 'NA' }} {{ !empty($venue->venuScreens) ? count($venue->venuScreens) : '0' }} {{ priceFormat($total_screen_price) }} {{ thousandsCurrencyFormat($venue->venuScreens->sum('viewer')) }}

Double click to delete

@endif @endforeach @endif