From 299512ec088578375cdd17c2140e4e8a0e7b5958 Mon Sep 17 00:00:00 2001 From: edmondlang Date: Sat, 1 Apr 2023 17:29:28 +0800 Subject: [PATCH] final-duplicated-invoice-debug --- routes/web.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/routes/web.php b/routes/web.php index 6b856803..1e927e6d 100644 --- a/routes/web.php +++ b/routes/web.php @@ -957,8 +957,7 @@ Route::get('/packing-lists/delete-duplicated', function(Request $request){ }); Route::get('/final-duplicated-invoice-debug', function(){ - $duplicatedTransactions = DB::table('transactions') - ->select(DB::raw('owner_type, owner_id, receiver, type, GROUP_CONCAT(id) as transaction_ids, COUNT(*) as count')) + $duplicatedTransactions = Transaction::select(DB::raw('owner_type, owner_id, receiver, type, GROUP_CONCAT(id) as transaction_ids, COUNT(*) as count')) ->groupBy('owner_type', 'owner_id', 'receiver', 'type') ->having('count', '>', 1) ->get();