@php $activities = $activities ?? collect(); $baseTotal = (float) ($baseTotal ?? 0); $currencyCode = $currencyCode ?? 'SAR'; $otherFeesTotal = 0.0; @endphp @if(count($activities)) @foreach($activities as $activity) @php $otherFeesTotal += (float) ($activity->total_amount ?? 0) + (float) ($activity->tax_value ?? 0); @endphp @endforeach

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

@foreach($activities as $activity) @php $feeBase = (float) ($activity->total_amount ?? 0); $feeVat = (float) ($activity->tax_value ?? 0); $feeTotal = $feeBase + $feeVat; $feeName = optional(optional($activity->feeServiceModel)->feeService)['name_'.app()->getLocale()] ?? __('settings::other_fees.service_name'); @endphp @endforeach
@lang('settings::other_fees.service_name') @lang('sales::estimates.total_amount') @lang('sales::estimates.vat_value') @lang('sales::estimates.total_amount_with_service')
{{ $feeName }} {{ number_format($feeBase, 2, '.', ',') }} {{ number_format($feeVat, 2, '.', ',') }} {{ number_format($feeTotal, 2, '.', ',') }}
@lang('sales::estimates.total_amount_with_service') {{ number_format($baseTotal + $otherFeesTotal, 2, '.', ',') }} {!! __('settings::currencies.' . $currencyCode) !!}
@endif