| @@ 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); |
|
| @@ 323-327 (lines=5) @@ | ||
| 320 | // 配送商品に含まれる商品種別を抽出. |
|
| 321 | $OrderItems = $Shipping->getOrderItems(); |
|
| 322 | $ProductTypes = []; |
|
| 323 | foreach ($OrderItems as $OrderItem) { |
|
| 324 | $ProductClass = $OrderItem->getProductClass(); |
|
| 325 | $ProductType = $ProductClass->getProductType(); |
|
| 326 | $ProductTypes[$ProductType->getId()] = $ProductType; |
|
| 327 | } |
|
| 328 | ||
| 329 | // 商品種別に紐づく配送業者を取得. |
|
| 330 | $Deliveries = $this->deliveryRepository->getDeliveries($ProductTypes); |
|
| @@ 349-357 (lines=9) @@ | ||
| 346 | // 受注明細に含まれる商品種別を抽出. |
|
| 347 | $ProductTypes = []; |
|
| 348 | /** @var OrderItem $OrderItem */ |
|
| 349 | foreach ($OrderItems as $OrderItem) { |
|
| 350 | $ProductClass = $OrderItem->getProductClass(); |
|
| 351 | if (is_null($ProductClass)) { |
|
| 352 | // 商品明細のみ対象とする. 送料明細等はスキップする. |
|
| 353 | continue; |
|
| 354 | } |
|
| 355 | $ProductType = $ProductClass->getProductType(); |
|
| 356 | $ProductTypes[$ProductType->getId()] = $ProductType; |
|
| 357 | } |
|
| 358 | ||
| 359 | // 商品種別に紐づく配送業者を抽出 |
|
| 360 | $Deliveries = $this->deliveryRepository->getDeliveries($ProductTypes); |
|