{{ __('messages.Order bill') }}
# {{ \Carbon\Carbon::parse($data->date_time)->year }} - {{ $data->id }}
{{ __('messages.Gentlemen asked for') }}: @php $customerCount = $uniqueCustomers->count(); @endphp
@foreach($uniqueCustomers as $k => $customer)
{{ $customer->name }}@if($k < $customerCount - 1)،@endif
@endforeach
@php
$totalQuantity = 0;
$totalWeight = 0;
$totalPriceForAll = 0;
@endphp
| ت |
{{ __('messages.Item') }} |
{{ __('messages.Unit') }} |
{{ __('messages.weight') }} |
{{ __('messages.Quantity') }} |
{{-- {{ __('messages.price') }} |
{{ __('messages.Total alajmaliu') }} | --}}
@foreach($data->purchaseItems as $index => $item)
@php
$calcWeight = ($item->meat_weight ?? 0) + ($item->sum_return_weight_item ?? 0);
$calcQty = $item->quantity;
$unitPrice = $item->item_price_after_discount ?? 0;
$rowBase = $item->meat_weight !== null ? $calcWeight : $calcQty;
$rowTotal = $rowBase * $unitPrice;
$totalQuantity += ($item->meat_weight !== null ? ($item->quantity ?? 0) + ($item->sum_return_quantities_item ?? 0) : $calcQty);
$totalWeight += $calcWeight;
$totalPriceForAll += $rowTotal;
@endphp
| {{ $index + 1 }} |
{{ $item->item->name }} |
{{ $item->item->unit_type }} |
{{ $item->meat_weight !== null ? number_format($calcWeight, 3) : number_format(0, 3) }} |
{{ number_format($calcQty, 3) }} |
{{-- {{ number_format($unitPrice, 3) }} |
{{ number_format($rowTotal, 3) }} | --}}
@endforeach
{{--
--}}
{{--
|
{{ __('messages.Total alajmaliu') }}
|
{{ number_format($totalPriceForAll, 3) }}
|
--}}
{{-- @if(!empty($data->note))
{{ __('messages.note') }}
{{ $data->note }}
@endif --}}
@if($data->itemsDescription->count() > 0)
{{ __('Items Description') }}
| {{ __('Item Name') }} |
{{ __('Quantity') }} |
{{ __('Weight') }} |
{{-- {{ __('Price') }} | --}}
@foreach($data->itemsDescription as $item)
| {{ $item->name }} |
{{ number_format($item->quantity, 3) }} |
{{ number_format($item->weight, 3) }} |
{{-- {{ number_format($item->price, 3) }} | --}}
@endforeach
@endif