@php $total_cost_amount = 0; $total_cost_vat_amount = 0; $total_amount = 0; $total_payment_amount = 0; @endphp @foreach($orders as $i=>$order) @php $total_cost_amount = $total_cost_amount + $order->total_cost; $vat = ($order->included_vat == 1) ? $order->total_cost * 0.07 : 0; $total_cost_vat_amount = $total_cost_vat_amount + $vat; $total_amount = $total_amount + $order->total_cost + $vat; $total_payment_amount = $total_payment_amount + $order->payment_total; @endphp @endforeach

 

รายงานสรุป บริษัท ที่ปรึกษา เฟิร์สสตาร์ จำกัด

ณ วันที่ {{ date('d/m') }}/{{ ($year < 2500) ? $year + 543 : $year }}

ช่วงเวลา เดือน{{ $month }}

ตัวกรองที่เลือก @if($request->owner)  ผู้ว่าจ้าง: {{ $request->owner }} @endif @if($request->worker)  ผู้รับงาน: {{ $request->worker }} @endif  สถานะการชำระเงิน: {{ display_payment_status($request->payment_status) }} @if($request->payment_status==9 && $request->payment_status_other)  {{ $request->payment_status_other }} @endif @if($request->open_job_status=="true")  งานที่ยังไม่ได้ส่ง: ไม่ได้ ปิด job // ไม่มีผู้รับงาน @endif

ลำดับ

รหัสงาน

วันที่รับงาน

วันกำหนดส่ง

ชื่อผู้ว่าจ้าง

สถานะ
การชำระเงิน

ยอดเงิน

VAT

ยอดเงินรวม

ค่าใช้จ่าย

ผู้รับงาน

วันส่งงาน

{{ 1 + $i }}

 {{ $order->order_no }} 

 {{ $order->order_date_thai }} 

 {{ $order->end_date_thai }} 

 {{ $order->owner_name }} 

 {{ $order->payment_status_text }} 

 {{ number_format($order->total_cost, 2) }} 

 {{ number_format(($order->included_vat == 1)?$order->total_cost * 0.07:0, 2) }} 

 {{ number_format(( ($order->included_vat == 1)?$order->total_cost * 0.07:0) + $order->total_cost, 2) }} 

 {{ number_format($order->payment_total, 2) }} 

 {{ $order->worker }} 

 {{ $order->delivery_date_thai }} 

 

 

 

 

 

 

 

 

 

 

 

 

ยอดรวม

{{ number_format($total_cost_amount) }}

{{ number_format($total_cost_vat_amount) }}

{{ number_format($total_amount) }}

{{ number_format($total_payment_amount) }}

 

 

จำนวนงานที่ล่าช้า

{{ number_format($delay_count) }}

งาน

 

@foreach($orders as $i=>$order) @php $inc_vat = ($order->included_vat == 1) ? $order->total_cost * 0.07 : 0; $total_cost_amount = $order->total_cost + $inc_vat; @endphp @endforeach