Optimise product tables

This commit is contained in:
Deon George
2022-04-22 15:23:08 +10:00
parent e1a4db700f
commit 16cc0c9f8d
10 changed files with 88 additions and 24 deletions

View File

@@ -357,9 +357,9 @@ class User extends Authenticatable implements IDs
->select([
'payment_id',
'invoice_id',
DB::raw('SUM(alloc_amt) AS allocate'),
DB::raw('SUM(amount) AS allocate'),
])
->where('alloc_amt','>',0)
->where('amount','>',0)
->groupBy(['invoice_id','payment_id']);
}