@php // Quantities and weights: thousands separators, decimals only when needed (up to 3), e.g. 1,250 or 1,250.5 $fmtQty = function ($value) { $formatted = number_format((float) $value, 3, '.', ','); return rtrim(rtrim($formatted, '0'), '.'); }; // Money: thousands separators with 3 decimals, e.g. 1,250,000.500 $fmtMoney = function ($value) { return number_format((float) $value, 3, '.', ','); }; @endphp
{{__('messages.Return to the main page')}}
شركة النعم لتسويق المواد الغذائية
ALNEAM CO. FOR MARKETING FOOD STUFF
{{__('messages.Returned order invoice')}}
{{__('messages.Serial number')}}: #{{ $serialNumber }}
{{__('messages.Date Of Creation:')}}: {{ $formattedDateTime }}
{{__('messages.Created by')}}: {{ $user->name }}
@php $total = 0; @endphp @foreach($returnedOrdersArray as $item) @php $total += $item['unit_price'] * ($item['qty'] > 0 ? $item['qty'] : $item['weight']); @endphp @endforeach
{{__('messages.Item')}} {{__('messages.Supplier')}} {{__('messages.Piece price')}} {{__('messages.Quantity')}} {{__('messages.Weight')}} {{__('messages.Total price')}}
{{ $item['name'] }} {{ $item['supplier_name'] }} {{ $fmtMoney($item['unit_price']) }} {{ $fmtQty($item['qty']) }} {{ $fmtQty($item['weight']) }} {{ $fmtMoney($item['unit_price'] * ($item['qty'] > 0 ? $item['qty'] : $item['weight'])) }}
{{__('messages.Total')}}:
{{__('messages.Quantity')}} {{ $fmtQty($totalReturnQty) }}
{{__('messages.Weight')}} {{ $fmtQty($totalReturnWeight) }}
{{__('messages.Total Price')}} {{ $fmtMoney($total) }}
{{__('messages.Transportation Supervisor')}}
{{__('messages.Fakhri Al-Sawy')}}