diff --git a/app/Classes/Modules/Transactions/ControllersLogic/CreateShippingInvoiceTransactionLogic.php b/app/Classes/Modules/Transactions/ControllersLogic/CreateShippingInvoiceTransactionLogic.php index 687bf48c..c7cc985d 100644 --- a/app/Classes/Modules/Transactions/ControllersLogic/CreateShippingInvoiceTransactionLogic.php +++ b/app/Classes/Modules/Transactions/ControllersLogic/CreateShippingInvoiceTransactionLogic.php @@ -118,7 +118,7 @@ class CreateShippingInvoiceTransactionLogic extends AbstractControllerLogic $warehouseId = $order->orderRoles()->where('role_id', OrderRoleTypes::ORIGIN_WAREHOUSE)->first()->company_module_id; $selected_warehouse_rate = $this->getConstantByKey($warehouse_rate_constant, $warehouseId); - $warehouse_rate = $selected_warehouse_rate == 0 ? 0 : $selected_warehouse_rate->amount; + $warehouse_rate = is_object($selected_warehouse_rate) ? $selected_warehouse_rate->amount : 0; $stateId = $address->state_id; $state_rate_constant = $this->getConstantByKey($state_rate_constant, $stateId);