@php $totalCash = 0; $totalTransfer = 0; $totalSubtotalQrisCash = 0; $totalSubtotalCard = 0; $totalGrandtotal = 0; @endphp @foreach ($invoices as $invoice) @if ($invoice->cashback !== 'N') @else @endif @if ($invoice->payment === 'Multi') @php $totalCash += $invoice->cash; $totalSubtotalCard += $invoice->transfer; @endphp @elseif ($invoice->payment === 'Cash') @php $totalCash += $invoice->grandtotal; @endphp @elseif ($invoice->payment === 'Qris') @php $totalSubtotalCard += $invoice->grandtotal; @endphp @elseif ($invoice->payment === 'Card') @php $totalSubtotalCard += $invoice->grandtotal; @endphp {{-- mz --}} @else @endif @endforeach
Invoice Date Time User Staff Qty Subtotal Discount Cashback Grand Total Cash Card
{{ $invoice->no }} {{ \Carbon\Carbon::parse($invoice->created_at)->format('d/m/y') }} {{ \Carbon\Carbon::parse($invoice->created_at)->format('H:i') }} {{ $invoice->users_name }} {{ $invoice->sales_name }} {{ $invoice->total_qty }} {{ $invoice->subtotal }} {{ number_format($invoice->disc_total ?? 0, 2, ',', '.') }}{{ $invoice->value }}0{{ $invoice->grandtotal }}{{ $invoice->cash }} {{ $invoice->transfer }}{{ $invoice->grandtotal }} 00 {{ $invoice->grandtotal }}0 {{ $invoice->grandtotal }}0 0
Grand Total {{ $invoices->sum('total_qty') }} {{ $invoices->sum('subtotal') }} {{ $invoices->sum('discount') }} {{ $invoices->sum('value') }} {{ $invoices->sum('grandtotal') }} {{ $totalCash }} {{ $totalSubtotalCard }}