From caef08aa980de0ce09719d17fbae2c2892ee392a Mon Sep 17 00:00:00 2001 From: edmondlang Date: Sat, 7 May 2022 22:28:13 +0800 Subject: [PATCH] update generate invoice api --- .../ControllersLogic/CreateShippingInvoiceTransactionLogic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);