update generate invoice api

This commit is contained in:
edmondlang
2022-05-07 22:28:13 +08:00
parent 2c2e4eece8
commit caef08aa98
@@ -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);