mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
delete duplicated invoice
This commit is contained in:
+2
-2
@@ -869,10 +869,10 @@ Route::get('/invoices/delete-duplicated', function(Request $request){
|
||||
$order = $packingList->owner;
|
||||
$order_marking = $order->reference;
|
||||
|
||||
$paidInvoice = $packingList->transactions->where('type', TransactionType::SHIPPING_INVOICE)->where('status', ApprovalStatus::COMPLETED)->get();
|
||||
$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])->sortByDesc('created_at')->get();
|
||||
|
||||
dump($unpaidInvoices);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user