fix release and hold button for packing lists

This commit is contained in:
omair saleh
2022-01-20 11:16:52 +08:00
parent 1854ca24de
commit 5c4fbe2c52
4 changed files with 80 additions and 69 deletions
@@ -46,10 +46,13 @@ class UpdateDoFromVTPortalProcessor
* @param $address
* @return array
* @throws GuzzleException
* @throws InternalServerErrorException
*/
public function execute($address) {
if(!app()->environment(['production'])){
return [];
}
try {
$order = $address->owner()->orderBy('id', 'desc')->first();
$packing_list = $order->packingLists()->orderBy('id', 'desc')->first();