суммируйте несколько полей отдельно в Ларавеле

$customer = FinanceSale::select(
  DB::raw('SUM(sub_total) as total_sales'),
  DB::raw('SUM(discount) as d'),
)
->where('customer_id', $id)
->groupBy('customer_id')
->first();
Farhan Bajwa