@include('layouts.header')
@include('layouts.sidebar')
{{-- Permission Php --}} @php $choosePermission = []; if (auth()->user()->permission) { $decodedPermissions = json_decode(auth()->user()->permission, true); if (json_last_error() === JSON_ERROR_NONE) { $choosePermission = $decodedPermissions; } } @endphp {{-- End Php --}}

Item Report

Item Reports

@foreach ($warehouses as $warehouse) @endforeach @php $totalRetailPrice = 0; $totalWholesalePrice = 0; $totalRetailAmount = 0; $totalWholesaleAmount = 0; @endphp @foreach ($items as $item) @php $totalRetailPrice += (float) $item['retail_price']; $totalWholesalePrice += (float) $item['wholesale_price']; if ($item['item_type'] == 'Service') { $totalRetailAmount += (float) 1 * (float) $item['retail_price']; } else { $totalRetailAmount += (float) $item['total_quantity'] * (float) $item['retail_price']; } if ($item['item_type'] == 'Service') { $totalWholesaleAmount += (float) 1 * (float) $item['wholesale_price']; } else { $totalWholesaleAmount += (float) $item['total_quantity'] * (float) $item['wholesale_price']; } @endphp @foreach ($warehouses as $warehouse) @endforeach @endforeach
Item Name{{ $warehouse->name }}Total Quantity လက်လီစျေး လက်ကားစျေး Total Amount (လက်လီ) Total Amount (လက်ကား)
{{ $item['item_name'] }} @if ($item['item_type'] == 'Service') 0 @else {{ $item['warehouse_quantities'][$warehouse->id] ?? 0 }} @endif @if ($item['item_type'] == 'Service') 0 @else {{ $item['total_quantity'] }} @endif {{ number_format((float) $item['retail_price'] ?? 0, 2) }} {{ number_format((float) $item['wholesale_price'] ?? 0, 2) }} @if ($item['item_type'] == 'Service') {{ number_format((float) 1 * (float) $item['retail_price'] ?? 0, 2) }} @else {{ number_format((float) $item['total_quantity'] * (float) $item['retail_price'] ?? 0, 2) }} @endif @if ($item['item_type'] == 'Service') {{ number_format((float) 1 * (float) $item['wholesale_price'] ?? 0, 2) }} @else {{ number_format((float) $item['total_quantity'] * (float) $item['wholesale_price'] ?? 0, 2) }} @endif
Total {{ number_format($totalRetailPrice ?? 0, 2) }} {{ number_format($totalWholesalePrice ?? 0, 2) }} {{ number_format($totalRetailAmount ?? 0, 2) }} {{ number_format($totalWholesaleAmount ?? 0, 2) }}