diff --git a/routes/web.php b/routes/web.php index 8ec57508..2297d68f 100644 --- a/routes/web.php +++ b/routes/web.php @@ -845,7 +845,8 @@ Route::get('/invoices/show-duplicated', function(Request $request){ Route::get('/invoices/delete-duplicated', function(Request $request){ $duplicatedInvoices = DB::table('transactions') ->where('type', TransactionType::SHIPPING_INVOICE) - ->where('status', '!=' , ApprovalStatus::COMPLETED) + // ->where('status', '!=' , ApprovalStatus::COMPLETED) + ->where('status', '!=' , ApprovalStatus::EXPIRED) ->where('deleted_at', null) ->select('owner_id', DB::raw('count(*) as count')) ->groupBy('owner_id') @@ -864,8 +865,9 @@ Route::get('/invoices/delete-duplicated', function(Request $request){ if (count($paidInvoice)) { // $packingList->transactions()->where('type', TransactionType::SHIPPING_INVOICE)->where('status', '!=', ApprovalStatus::COMPLETED)->delete(); // continue; + dump($order->reference . ' -has payment'); } else { - dump('no'); + dump($order->reference . ' -no'); } // if have unverified payment