Transaction Report for Year {{ $year }}
{{--
จำนวนรายการทั้งหมด: {{ $totalTransactions }}
ยอดรวมทั้งหมด: {{ number_format($totalAmount, 2) }} บาท
ลูกค้าทั้งหมด: {{ $totalCustomers }} ราย
--}}
{{--
รายงานตามเดือน
| เดือน |
จำนวนรายการ |
ยอดรวม |
@foreach ($monthlyDetails as $month => $data)
| {{ DateTime::createFromFormat('!m', $month)->format('F') }} |
{{ $data['total_transactions'] }} |
{{ number_format($data['order_total_price'], 2) }} บาท |
@endforeach
--}}
@if (!$isSearching)
กรุณาเลือกเงื่อนไขและกดค้นหา
@elseif (collect($transactions)->isEmpty())
ไม่มีข้อมูลที่ตรงกับเงื่อนไขการค้นหา
@else
รายการทั้งหมด
| No. |
เลขที่เบิก |
รายการของที่ระลึก |
วันที่เบิก |
ชื่อผู้เบิก |
หน่วยงาน |
จำนวนที่เบิก |
จำนวนรวม |
มูลค่า |
@php $no = 1; @endphp
@foreach ($transactions as $order)
| {{ $no++ }} |
{{ $order->order_code ?? $order->order_id }} |
{{-- เลขที่เบิก --}}
@if (isset($order->products) && count($order->products) > 0)
@foreach ($order->products as $product)
- {{ $product->product_name }}
({{ $product->quantity }})
@endforeach
@else
-
@endif
|
{{ \Carbon\Carbon::parse($order->created_at)->format('d/m/Y') }}
|
{{ $order->order_customer_name ?? $order->customer_name }} |
{{ $order->department_name ?? '-' }} |
@if (isset($order->products) && count($order->products) > 0)
{{ $order->products->sum('quantity') }}
@else
-
@endif
|
{{ number_format($order->total_quantity) }}
|
{{ number_format($order->order_total_price, 2) }} บาท |
@endforeach
|
รวมทั้งหมด
|
{{ number_format($grandTotalQuantity) }}
|
{{ number_format($grandTotalAmount, 2) }} บาท
|
@endif