{{$lang->data['print_sales_report'] ?? 'Print Sales Report'}} @php $expenses = \App\Models\Expense::whereDate('date','>=',$start_date)->whereDate('date','<=',$end_date)->latest(); if($branch != '') { $expenses->where('created_by',$branch); } if($payment_mode != '') { $expenses->where('payment_mode',$payment_mode); } $expenses = $expenses->get(); @endphp

Expense Report

@if($branch != '') @php $branchUser = \App\Models\User::where('id',$branch)->first(); @endphp

[{{ $branchUser->name; }}]

@endif
{{ \Carbon\Carbon::parse($start_date)->format('d/m/Y') }} {{ \Carbon\Carbon::parse($end_date)->format('d/m/Y') }}


@php $totaltax = 0; @endphp @foreach ($expenses as $item) @php $unitprice = $item->amount * (100 / (100 + $item->tax_percentage ?? 15)); $taxamount = $item->amount - $unitprice; if($item->tax_included == 0) { $taxamount = 0; } $totaltax += $taxamount; @endphp @endforeach
Date Expense Amount Towards/Category Tax % Tax Amount Payment Method Branch
{{$item->date->format('d/m/Y')}} {{getFormattedCurrency($item->amount)}} {{$item->head->name}} @if($item->tax_included != 0) {{$item->tax_percentage}}% @else - @endif {{getFormattedCurrency($taxamount)}} {{getPaymentMode($item->payment_mode)}} {{$item->createdBy->name ?? ''}}


Total Expense: {{$expenses->sum('amount')}} Total Tax: {{getFormattedCurrency($totaltax)}}