| @@ 81-85 (lines=5) @@ | ||
| 78 | // 配送商品に含まれる商品種別を抽出. |
|
| 79 | $OrderItems = $Shipping->getProductOrderItems(); |
|
| 80 | $ProductTypes = array(); |
|
| 81 | foreach ($OrderItems as $OrderItem) { |
|
| 82 | $ProductClass = $OrderItem->getProductClass(); |
|
| 83 | $ProductType = $ProductClass->getProductType(); |
|
| 84 | $ProductTypes[$ProductType->getId()] = $ProductType; |
|
| 85 | } |
|
| 86 | ||
| 87 | // 商品種別に紐づく配送業者を取得. |
|
| 88 | $Deliveries = $this->deliveryRepository->getDeliveries($ProductTypes); |
|
| @@ 267-271 (lines=5) @@ | ||
| 264 | // 配送商品に含まれる商品種別を抽出. |
|
| 265 | $OrderItems = $Shipping->getOrderItems(); |
|
| 266 | $ProductTypes = []; |
|
| 267 | foreach ($OrderItems as $OrderItem) { |
|
| 268 | $ProductClass = $OrderItem->getProductClass(); |
|
| 269 | $ProductType = $ProductClass->getProductType(); |
|
| 270 | $ProductTypes[$ProductType->getId()] = $ProductType; |
|
| 271 | } |
|
| 272 | ||
| 273 | // 商品種別に紐づく配送業者を取得. |
|
| 274 | $Deliveries = $this->deliveryRepository->getDeliveries($ProductTypes); |
|
| @@ 296-304 (lines=9) @@ | ||
| 293 | // 受注明細に含まれる商品種別を抽出. |
|
| 294 | $ProductTypes = []; |
|
| 295 | /** @var OrderItem $OrderItem */ |
|
| 296 | foreach ($OrderItems as $OrderItem) { |
|
| 297 | $ProductClass = $OrderItem->getProductClass(); |
|
| 298 | if (is_null($ProductClass)) { |
|
| 299 | // 商品明細のみ対象とする. 送料明細等はスキップする. |
|
| 300 | continue; |
|
| 301 | } |
|
| 302 | $ProductType = $ProductClass->getProductType(); |
|
| 303 | $ProductTypes[$ProductType->getId()] = $ProductType; |
|
| 304 | } |
|
| 305 | ||
| 306 | // 商品種別に紐づく配送業者を抽出 |
|
| 307 | $Deliveries = $this->deliveryRepository->getDeliveries($ProductTypes); |
|