Printed by: {{auth()->user()->name}}
Printed Date: 2024-11-23 08:17:10 PM
{{$app->app_name}},
Detailed Sales Summary - All Outlets
Report Date
{{$from}} / {{$to}}
@if($from == $to) @foreach($branches_sales as $report) @endforeach
Outlets Date Account number Total sale
{{empty($app->currency) ? "GHS" : $app->currency}}
Discount
{{empty($app->currency) ? "GHS" : $app->currency}}
Receipt count Rejected
{{empty($app->currency) ? "GHS" : $app->currency}}
No Charge
{{empty($app->currency) ? "GHS" : $app->currency}}
{{@strtoupper($report->branch_name)}} {{$from}} {{$report->branch_account_number}} @convert( \DB::table('invoices') ->whereDate('created_at', $from) ->where('invoice_status', 1) ->where('branch', $report->branch_name) ->sum('invoice_total_price') ) @convert( \DB::table('orders')->where('branch', $report->branch_name) ->whereDate('created_at', $from) ->sum('discount') ) @convert( \DB::table('orders') ->whereDate('created_at', $from) ->where('branch', $report->branch_name) ->count() ) @convert( \DB::table('invoices') ->whereDate('created_at', $from) ->where('invoice_status', 0) ->where('branch', $report->branch_name) ->sum('invoice_total_price') ) {{empty($app->currency) ? "GHS" : $app->currency}}@convert( \DB::table('invoices') ->whereDate('created_at', $from) ->where('invoice_status', 2) ->where('branch', $report->branch_name) ->sum('invoice_total_price') )
Grand Total {{empty($app->currency) ? "GHS" : $app->currency}}@convert( \DB::table('invoices') ->whereDate('created_at', $from) ->where('invoice_status', 1) ->whereIn('branch', $branches_sales->pluck('branch_name')) ->sum('invoice_total_price') ) {{empty($app->currency) ? "GHS" : $app->currency}}@convert( \DB::table('orders') ->whereDate('created_at', $from) ->sum('discount') ) @convert( \DB::table('orders') ->whereDate('created_at', $from) ->count() ) {{empty($app->currency) ? "GHS" : $app->currency}} @convert( \DB::table('invoices') ->whereDate('created_at', $from) ->where('invoice_status', 0) ->whereIn('branch', $branches_sales->pluck('branch_name')) ->sum('invoice_total_price') ) {{empty($app->currency) ? "GHS" : $app->currency}} @convert( \DB::table('invoices') ->whereDate('created_at', $from) ->where('invoice_status', 2) ->whereIn('branch', $branches_sales->pluck('branch_name')) ->sum('invoice_total_price') )
@else
@foreach($branches_sales as $report) @endforeach
Outlets Account number Total sale
{{empty($app->currency) ? "GHS" : $app->currency}}
Discount
{{empty($app->currency) ? "GHS" : $app->currency}}
Receipt count Rejected
{{empty($app->currency) ? "GHS" : $app->currency}}
No Charge
{{empty($app->currency) ? "GHS" : $app->currency}}
{{@strtoupper($report->branch_name)}} {{$report->branch_account_number}} @convert( \DB::table('invoices') ->WhereDate('created_at','>=', $from) ->WhereDate('created_at','<=', $to) ->where('invoice_status', 1) ->where('branch', $report->branch_name) ->sum('invoice_total_price') ) @convert( \DB::table('orders') ->WhereDate('created_at','>=', $from) ->WhereDate('created_at','<=', $to) ->where('branch', $report->branch_name) ->sum('discount') ) @convert( \DB::table('orders') ->WhereDate('created_at','>=', $from) ->WhereDate('created_at','<=', $to) ->where('branch', $report->branch_name) ->count() ) @convert( \DB::table('invoices') ->WhereDate('created_at','>=', $from) ->WhereDate('created_at','<=', $to) ->where('invoice_status', 0) ->where('branch', $report->branch_name) ->sum('invoice_total_price') ) @convert( \DB::table('invoices') ->WhereDate('created_at','>=', $from) ->WhereDate('created_at','<=', $to) ->where('invoice_status', 2) ->where('branch', $report->branch_name) ->sum('invoice_total_price') )
Grand Total {{empty($app->currency) ? "GHS" : $app->currency}} @convert( \DB::table('invoices') ->WhereDate('created_at','>=', $from) ->WhereDate('created_at','<=', $to) ->where('invoice_status', 1) ->whereIn('branch', $branches_sales->pluck('branch_name')) ->sum('invoice_total_price') ) {{empty($app->currency) ? "GHS" : $app->currency}}@convert( \DB::table('orders') ->WhereDate('created_at','>=', $from) ->WhereDate('created_at','<=', $to) ->sum('discount') ) @convert( \DB::table('orders') ->WhereDate('created_at','>=', $from) ->WhereDate('created_at','<=', $to) ->count() ) {{empty($app->currency) ? "GHS" : $app->currency}} @convert( \DB::table('invoices') ->WhereDate('created_at','>=', $from) ->WhereDate('created_at','<=', $to) ->where('invoice_status', 0) ->whereIn('branch', $branches_sales->pluck('branch_name')) ->sum('invoice_total_price') ) {{empty($app->currency) ? "GHS" : $app->currency}} @convert( \DB::table('invoices') ->WhereDate('created_at','>=', $from) ->WhereDate('created_at','<=', $to) ->where('invoice_status', 2) ->whereIn('branch', $branches_sales->pluck('branch_name')) ->sum('invoice_total_price') )
@endif