mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
auto generate invoices
This commit is contained in:
+1
-1
@@ -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())){
|
||||
|
||||
Reference in New Issue
Block a user