@push('css') @endpush
Sale Report

@php $i=0; $subTotal=0; $discount=0; $shipping_charge=0; $grand_total=0;$paid_amount=0;$due=0; @endphp @foreach ($this->dateFilter($salesInvoice) as $saleInvoice) @endforeach
SL Date Customer Name Sub Total Discount Shipping Charge Payable Amount Paid Due
{{ ++$i }} {{ $saleInvoice->sale_date }} @if($saleInvoice->Contact) {{ $saleInvoice->Contact->first_name }} {{ $saleInvoice->Contact->last_name }} @endif {{ $saleInvoice->total_amount }} @php $subTotal +=$saleInvoice->total_amount @endphp {{ $saleInvoice->discount }} @php $discount += $saleInvoice->discount @endphp {{ $saleInvoice->shipping_charge }} @php $shipping_charge += $saleInvoice->shipping_charge @endphp {{ $saleInvoice->payable_amount }} @php $grand_total += $saleInvoice->payable_amount @endphp {{ $saleInvoice->SalePayment->sum('total_amount') }} @php $paid_amount += $saleInvoice->SalePayment->sum('total_amount') @endphp {{ $saleInvoice->payable_amount - $saleInvoice->SalePayment->sum('total_amount')}} @php $due += $saleInvoice->payable_amount - $saleInvoice->SalePayment->sum('total_amount') @endphp
Total
{{ $subTotal }} {{ $discount }} {{ $shipping_charge }} {{ $grand_total }} {{ $paid_amount }} {{ $due }}
@push('scripts') @endpush