diff --git a/routes/web.php b/routes/web.php index 21f5fb06..1d28dc08 100644 --- a/routes/web.php +++ b/routes/web.php @@ -745,7 +745,7 @@ Route::get('/generate/invoices', function(){ $billingAddress = $companyModule->addresses()->where('type', \App\Classes\ValueObjects\Constants\AddressType::BILLING)->first(); $deliveryAddress = $order->addresses()->where('status', ApprovalStatus::APPROVED)->first(); - $postCodes = \App\Models\SegmentConstant::whereIn('reference', ['CENTER_POSTCODE', 'OUTSTATION_POSTCODE'])->get()->pluck('value'); + $postCodes = \App\Models\SegmentConstant::whereIn('reference', ['CENTER_POSTCODE', 'OUTSTATION_POSTCODE'])->get()->pluck('value')->flatten(); dump($deliveryAddress->postcode, $postCodes->toArray()); if(!!$billingAddress && in_array($deliveryAddress->postcode, $postCodes->toArray())){