mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
fix export arrival list
This commit is contained in:
@@ -41,7 +41,9 @@ class ExportsArrivedParcel implements WithHeadings, WithHeadingRow, WithMapping,
|
||||
{
|
||||
$returnArray = collect();
|
||||
|
||||
$packingLists = PackingList::where('type', '=', 1)->where('status', '=', 2)->where('owner_type', '!=', CompanyModule::class)->get();
|
||||
$packingLists = PackingList::where('type', '=', 1)->where('status', '=', 2)->where('owner_type', '!=', CompanyModule::class)->whereHas('transports', function ($query){
|
||||
return $query->whereYear('drop_date', 2022);
|
||||
})->get();
|
||||
|
||||
foreach($packingLists as $packingList){
|
||||
$packages = !$packingList->packingLists()->exists() ? $packingList->packages : $packingList->packingLists->first()->packages;
|
||||
|
||||
Reference in New Issue
Block a user