delete duplicated invoice

This commit is contained in:
edmondlang
2023-02-27 19:21:25 +08:00
parent 4058456797
commit e83e53a1d7
+1 -1
View File
@@ -872,7 +872,7 @@ Route::get('/invoices/delete-duplicated', function(Request $request){
$paidInvoice = $packingList->transactions()->where('type', TransactionType::SHIPPING_INVOICE)->where('status', ApprovalStatus::COMPLETED)->get();
// check inside packingList has how many unpaid invoice
$unpaidInvoices = $packingList->transactions()->where('type', TransactionType::SHIPPING_INVOICE)->whereIn('status', [ApprovalStatus::PENDING_SUBMISSION, ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::APPROVED])->sortByDesc('created_at')->get();
$unpaidInvoices = $packingList->transactions()->where('type', TransactionType::SHIPPING_INVOICE)->whereIn('status', [ApprovalStatus::PENDING_SUBMISSION, ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::APPROVED])->get()->sortByDesc('created_at');
dump($unpaidInvoices);