update on psosale string 1 bugs
All checks were successful
All checks were successful
This commit is contained in:
@@ -187,9 +187,9 @@ public function dashboard()
|
||||
$data = [
|
||||
'total_expense' => (float) $expense_amount,
|
||||
'total_income' => (float) $income_amount + $sale_profit,
|
||||
'total_items' => Product::where('business_id', $business_id)->count(),
|
||||
'total_categories' => Category::where('business_id', $business_id)->count(),
|
||||
'stock_value' => $total_stock_value,
|
||||
'total_items' => (int) Product::where('business_id', $business_id)->count(),
|
||||
'total_categories' => (int) Category::where('business_id', $business_id)->count(),
|
||||
'stock_value' => (float) $total_stock_value,
|
||||
'total_due' => (float) Sale::where('business_id', $business_id)->whereBetween('saleDate', [$start, $end])->sum('dueAmount'),
|
||||
'total_profit' => (float) Sale::where('business_id', $business_id)->whereBetween('created_at', [$start, $end])->where('lossProfit', '>', 0)->sum('lossProfit'),
|
||||
'total_loss' => (float) Sale::where('business_id', $business_id)->whereBetween('created_at', [$start, $end])->where('lossProfit', '<', 0)->sum('lossProfit'),
|
||||
|
||||
Reference in New Issue
Block a user