@if($startDate != '')
@else
@endif
@php $totalCash = 0; $totalTransfer = 0; $totalSubtotalQrisCash = 0; $totalSubtotalCard = 0; @endphp @foreach ($invoices as $invoice) @if ($invoice->payment === 'Multi') @php $totalCash += $invoice->cash; $totalTransfer += $invoice->transfer; @endphp @elseif ($invoice->payment === 'Cash') @php $totalCash += $invoice->subtotal; // Add subtotal for Cash and Qris to totalCash $totalSubtotalQrisCash += $invoice->subtotal; @endphp @elseif ($invoice->payment === 'Qris') @php $totalSubtotalCard += $invoice->subtotal; @endphp @elseif ($invoice->payment === 'Card') @php $totalSubtotalCard += $invoice->subtotal; @endphp @else {{-- mz --}} @endif @endforeach {{-- --}} {{--
Invoice Tanggal Jam User Staff Qty Grand Total Return Cash Card #
{{ $invoice->created_at->format('d/m/y') }} {{ $invoice->created_at->format('H:i') }} {{ $invoice->user->name }} {{ $invoice->sales_name }} {{ $invoice->qty }} Rp. {{ number_format($invoice->must_paid, 0, ',', '.') }}Rp. {{ number_format($invoice->cash, 0, ',', '.') }} Rp. {{ number_format($invoice->transfer, 0, ',', '.') }}Rp. {{ number_format($invoice->subtotal, 0, ',', '.') }} Rp. 0Rp. 0 Rp. {{ number_format($invoice->subtotal, 0, ',', '.') }}Rp. 0 Rp. {{ number_format($invoice->subtotal, 0, ',', '.') }}Rp. 0 Rp. 0
Total {{ $invoices->sum('qty') }} Rp. {{ number_format($invoices->sum('harusbayar'), 0, ',', '.') }} 0 Rp. {{ number_format($invoices->sum('harusbayar'), 0, ',', '.') }} Rp. {{ number_format($totalCash, 0, ',', '.') }} Rp. {{ number_format($totalSubtotalCard, 0, ',', '.') }}
Qty Cash Card Sub Total Discount Grand Total
Total {{ $invoices->sum('qty') }} Rp. {{ number_format($totalCash, 0, ',', '.') }} Rp. {{ number_format($totalSubtotalCard, 0, ',', '.') }} Rp. {{ number_format($invoices->sum('subtotal'), 0, ',', '.') }} Rp. {{ number_format($invoices->sum('discount'), 0, ',', '.') }} Rp. {{ number_format($invoices->sum('grandtotal'), 0, ',', '.') }}
--}}