@include('layouts.header')
@include('layouts.sidebar')

POS Reports

POS Report

@php $no = 1; $rowCount = count(!empty($search_pos) ? $search_pos : $pos_data); $subtotal = 0; // Initialize subtotal variable $discounttotal = 0; // Initialize subtotal variable $amounttotal = 0; @endphp @if (Auth::user()->is_admin == '1' || Auth::user()->type == 'Admin') @if (!empty($search_pos)) @foreach ($search_pos as $pos) @php $no++; $subtotal += $pos->discount_total + $pos->total; // Add subtotal for each $discounttotal += $pos_datas->discount_total; $discounttotal += $pos->discount_total; $amounttotal += $pos->total; @endphp @endforeach @else @foreach ($pos_data as $pos_datas) @php $no++; $subtotal += $pos_datas->discount_total + $pos_datas->total; // Add subtotal for each row $discounttotal += $pos_datas->discount_total; $amounttotal += $pos_datas->total; @endphp @endforeach @endif @elseif (Auth::user()->type == 'Warehouse') @if (!empty($search_pos)) @foreach ($search_pos as $pos) @foreach ($pos->sells as $sell) @if ($sell->warehouse == Auth::user()->level) @php $no++; $subtotal += $pos->discount_total + $pos->total; // Add subtotal for each $discounttotal += $pos_datas->discount_total; $discounttotal += $pos->discount_total; $amounttotal += $pos->total; @endphp @endif @endforeach @endforeach @else @foreach ($pos_data as $pos_datas) @foreach ($pos_datas->sells as $sell) @if ($sell->warehouse == Auth::user()->level) @php $no++; $subtotal += $pos_datas->discount_total + $pos_datas->total; // Add subtotal for each row $discounttotal += $pos_datas->discount_total; $amounttotal += $pos_datas->total; @endphp @endif @endforeach @endforeach @endif @endif
No. POS No. Date Sub Total Discount Total Amount Sale By
{{ $no }} {{ $pos->invoice_no }} {{ $pos->invoice_date }} {{ number_format($pos->discount_total + $pos->total) }} {{ $pos->discount_total ?? 0 }} {{ number_format($pos->total) }} {{ $pos->sale_by }}
{{ $no }} {{ $pos_datas->invoice_no }} {{ $pos_datas->invoice_date }} {{ number_format($pos_datas->discount_total + $pos_datas->total) }} {{ $pos_datas->discount_total ?? 0 }} {{ number_format($pos_datas->total) }} {{ $pos_datas->sale_by }}
{{ $no }} {{ $pos->invoice_no }} {{ $pos->invoice_date }} {{ number_format($pos->discount_total + $pos->total) }} {{ number_format($pos->discount_total ?? 0) }} {{ number_format($pos->total) }} {{ $pos->sale_by }}
{{ $no }} {{ $pos_datas->invoice_no }} {{ $pos_datas->invoice_date }} {{ number_format($pos_datas->discount_total + $pos_datas->total) }} {{ number_format($pos_datas->discount_total ?? 0) }} {{ number_format($pos_datas->total) }}
Total {{ number_format($subtotal) }} {{ number_format($discounttotal) }} {{ number_format($amounttotal) }}
@php $no = 1; @endphp @foreach ($sale_totals as $sale_total) @php $no++; @endphp @endforeach
No. Sale By Total
{{ $no }} {{ $sale_total->sale_by }} {{ number_format($sale_total->sale_total) }}