From 57eb1e147d9de775d3b68f424aff332407de7955 Mon Sep 17 00:00:00 2001 From: edmondlang Date: Sat, 1 Apr 2023 18:48:34 +0800 Subject: [PATCH] final-duplicated-invoice-debug --- routes/web.php | 1 + 1 file changed, 1 insertion(+) diff --git a/routes/web.php b/routes/web.php index a448d558..4e5e1eb2 100644 --- a/routes/web.php +++ b/routes/web.php @@ -958,6 +958,7 @@ Route::get('/packing-lists/delete-duplicated', function(Request $request){ Route::get('/final-duplicated-invoice-debug', function(){ $duplicatedTransactions = Transaction::select(DB::raw('owner_type, owner_id, receiver, type, GROUP_CONCAT(id) as transaction_ids, COUNT(*) as count')) + ->whereNotIn('status', [ApprovalStatus::REJECTED,ApprovalStatus::SUSPENDED,ApprovalStatus::EXPIRED]) ->groupBy('owner_type', 'owner_id', 'receiver', 'type') ->having('count', '>', 1) ->get();