{{ Session::get('business.name') }}

CASHIER REPORT

Print Date: {{ \Carbon::now()->format('m/d/Y') }}
Print Time: {{ \Carbon::now()->format('h:i A') }}

@php $renderSection = function($title, $items, $isExpense = false) { $html = '
' . $title . '
'; $html .= ''; $html .= ''; $html .= ''; $html .= ''; if ($isExpense) { $html .= ''; $html .= ''; } else { $html .= ''; $html .= ''; $html .= ''; $html .= ''; } $html .= ''; $total_qty = 0; $total_amount = 0; foreach($items as $item) { $html .= ''; $html .= ''; $html .= ''; if ($isExpense) { // For expenses, title logic uses category_name or description $desc = !empty($item->category_name) ? $item->category_name : $item->description; $html .= ''; $html .= ''; } else { $html .= ''; $html .= ''; $html .= ''; $html .= ''; } $html .= ''; $total_amount += $item->total_amount; if (!$isExpense) $total_qty += $item->total_quantity; } $html .= ''; if ($isExpense) { $html .= ''; $html .= ''; } else { $html .= ''; $html .= ''; $html .= ''; } $html .= '
Transaction IDTimeDescriptionTotal AmountCustomerUserQuantityTotal Amount
' . (!empty($item->invoice_no) ? $item->invoice_no : $item->ref_no) . '' . \Carbon::parse($item->time)->format('H:i:s') . '' . $desc . '' . app('App\Utils\Util')->num_f($item->total_amount, true) . '' . $item->customer_name . '' . $item->user_name . '' . number_format($item->total_quantity, 0) . '' . app('App\Utils\Util')->num_f($item->total_amount, true) . '
' . app('App\Utils\Util')->num_f($total_amount, true) . '' . number_format($total_qty, 0) . '' . app('App\Utils\Util')->num_f($total_amount, true) . '
'; // Return empty if no items found? Wait, user receipt image shows empty tables with 0 totals. return $html; }; @endphp {!! $renderSection('Customer Goods Return', $custom_report_details['customer_goods_return']) !!} {!! $renderSection('Customer Receipt', $custom_report_details['customer_receipt']) !!} {!! $renderSection('Due Settled Invoice', $custom_report_details['due_settled_invoice']) !!} {!! $renderSection('Goods Received Memo', $custom_report_details['goods_received_memo']) !!} {!! $renderSection('Vender Goods Return', $custom_report_details['vendor_goods_return']) !!} {!! $renderSection('Vender Receipt', $custom_report_details['vendor_receipt']) !!} {!! $renderSection('Customer Credit Note', $custom_report_details['customer_credit_note']) !!} {!! $renderSection('Customer Debit Note', $custom_report_details['customer_debit_note']) !!} {!! $renderSection('Vender Credit Note', $custom_report_details['vendor_credit_note']) !!} {!! $renderSection('Vender Debit Note', $custom_report_details['vendor_debit_note']) !!} {!! $renderSection('Expences Note', $custom_report_details['expenses'], true) !!}