mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
test delete duplicated invoice
This commit is contained in:
+4
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user