| 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') ) | 
| 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') ) |