mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-28 17:04:18 +00:00
sync vt do with shipping portal
This commit is contained in:
@@ -59,6 +59,13 @@ class RequestChangeOrderAddressProcessor
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return mixed
|
||||
* @throws \App\Classes\Exceptions\AccessForbiddenException
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
* @throws \App\Classes\Exceptions\RequestValidationException
|
||||
*/
|
||||
public function execute(Request $request)
|
||||
{
|
||||
$this->canChangeOrderAddress->passes();
|
||||
@@ -70,31 +77,33 @@ class RequestChangeOrderAddressProcessor
|
||||
|
||||
$address = $this->fetchesAddress->execute(['id' => $request->get('address_id')]);
|
||||
$addressObject = new AddressObject($address->street_one, $address->street_two, $address->country_id, $address->state_id, $address->district_id, $address->postcode, $address->reference, ApprovalStatus::PENDING_VERIFICATION);
|
||||
$order_address = $this->createsAddress->execute($order, $addressObject);
|
||||
$order_address = $this->createsAddress->execute($order, $addressObject);
|
||||
|
||||
$contact = $address->contacts()->first();
|
||||
$contactObject = new ContactObject(
|
||||
$contact->reference,
|
||||
$contact->phone,
|
||||
'',
|
||||
''
|
||||
);
|
||||
if($contact){
|
||||
$contactObject = new ContactObject(
|
||||
$contact->reference,
|
||||
$contact->phone,
|
||||
'',
|
||||
''
|
||||
);
|
||||
|
||||
$this->createContactProcessor->execute($contactObject, $order_address);
|
||||
|
||||
if($contactObject->getPhone()){
|
||||
$order_remark = $this->createContactProcessor->execute($contactObject, $order_address);
|
||||
}
|
||||
|
||||
$remark = $address->remarks()->first();
|
||||
|
||||
$remarkObject = new RemarkObject(
|
||||
$remark->content,
|
||||
Auth()->user()->id
|
||||
);
|
||||
if($remark){
|
||||
$remarkObject = new RemarkObject(
|
||||
$remark->content,
|
||||
Auth()->user()->id
|
||||
);
|
||||
|
||||
if($remarkObject->getContent()){
|
||||
$this->createRemarkProcessor->execute($order_address, $remarkObject);
|
||||
}
|
||||
|
||||
|
||||
return $order;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user