@lang('lang_v1.sell_return')

@lang('lang_v1.scan_or_enter_receipt_information')

@php $pos_can_view_all_locations = auth()->user()->can('pos.view_all_locations_in_receipt_lookup') || auth()->user()->can('superadmin'); $pos_location_opts = $business_locations ?? []; if ($pos_location_opts instanceof \Illuminate\Support\Collection) { $pos_location_opts = $pos_location_opts->toArray(); } if (!$pos_can_view_all_locations) { if (!empty($default_location)) { $pos_location_opts = [$default_location->id => $default_location->name]; } elseif (is_array($pos_location_opts) && count($pos_location_opts) === 1) { // Keep the only available location. } else { // Fallback: show nothing instead of accidentally exposing locations. $pos_location_opts = []; } } @endphp {!! Form::label('pos_sell_return_location_filter', __('purchase.business_location') . ':') !!} {!! Form::select( 'pos_sell_return_location_filter', ($pos_can_view_all_locations ? ['' => __('lang_v1.all')] : []) + $pos_location_opts, null, [ 'class' => 'form-control', 'id' => 'pos_sell_return_location_filter', 'disabled' => $pos_can_view_all_locations ? false : true, ] ) !!}
{!! Form::label('pos_sell_return_receipt_search', __('messages.search') . ':') !!}
@lang('messages.date') @lang('sale.invoice_no') @lang('purchase.business_location') @lang('contact.customer') @lang('sale.total') @lang('messages.action')