@extends('companyuser::layouts.master') @section('title', __('settings::other_fees.other_fees')) @section('extra_styles') @endsection @section('breadcrumb') @endsection @section('content')

@lang('settings::other_fees.other_fees')

@can('settings.other-fees.create') @endcan
@include('companyuser::errors.lists') @canany(['settings.other-fees.create', 'settings.other-fees.edit'])
@lang('settings::other_fees.selected_count', ['count' => 0])
@endcanany @canany(['settings.other-fees.create', 'settings.other-fees.edit']) @endcanany @foreach($otherFees as $fee) @canany(['settings.other-fees.create', 'settings.other-fees.edit']) @endcanany @endforeach
@lang('settings::other_fees.reference_id') @lang('settings::other_fees.service_name') @lang('settings::other_fees.account_name') @lang('settings::other_fees.tax') @lang('settings::other_fees.value') @lang('settings::other_fees.assigned_transactions') @lang('Actions')
{{ $fee['reference'] }} {{ $fee['name'] }} {{ $fee['account_name'] }} @if($fee['tax_percent'] !== null) @php $taxName = app()->getLocale() === 'ar' ? ($fee['tax_name_ar'] ?? $fee['tax_name_en'] ?? '') : ($fee['tax_name_en'] ?? $fee['tax_name_ar'] ?? ''); @endphp {{ $fee['tax_percent'] }}% @endif {{ number_format((float) $fee['value'], 2) }} {!! __('settings::currencies.'.$currencyCode) !!} @php $assignments = $fee['assigned_transactions'] ?? []; $previewLimit = 2; $previewItems = array_slice($assignments, 0, $previewLimit); $moreCount = max(0, count($assignments) - $previewLimit); @endphp
@forelse($previewItems as $screen) {{ __('settings::other_fees.'.$screen) }} @empty @lang('settings::other_fees.no_assignments') @endforelse @if($moreCount > 0) @endif
@can('settings.other-fees.edit') @endcan @can('settings.other-fees.delete') @endcan
@include('settings::other_fees.create-modal') @include('settings::other_fees.bulk-assign-modal') @include('settings::other_fees.assignment-details-modal')
@endsection @section('extra_scripts') @yield('create_other_fee_scripts') @endsection