@@ 148-158 (lines=11) @@ | ||
145 | } |
|
146 | ||
147 | /** @var \Eccube\Entity\Shipping $Shipping */ |
|
148 | foreach ($Shippings as $Shipping) { |
|
149 | $shipmentItems = $Shipping->getShipmentItems(); |
|
150 | /** @var \Eccube\Entity\ShipmentItem $ShipmentItem */ |
|
151 | foreach ($shipmentItems as $ShipmentItem) { |
|
152 | $ShipmentItem->setOrder($TargetOrder); |
|
153 | $ShipmentItem->setShipping($Shipping); |
|
154 | $app['orm.em']->persist($ShipmentItem); |
|
155 | } |
|
156 | $Shipping->setOrder($TargetOrder); |
|
157 | $app['orm.em']->persist($Shipping); |
|
158 | } |
|
159 | } else { |
|
160 | ||
161 | $NewShipmentItems = new ArrayCollection(); |
|
@@ 185-195 (lines=11) @@ | ||
182 | } |
|
183 | // 配送商品の更新. delete/insert. |
|
184 | $Shippings = $TargetOrder->getShippings(); |
|
185 | foreach ($Shippings as $Shipping) { |
|
186 | $ShipmentItems = $Shipping->getShipmentItems(); |
|
187 | foreach ($ShipmentItems as $ShipmentItem) { |
|
188 | $app['orm.em']->remove($ShipmentItem); |
|
189 | } |
|
190 | $ShipmentItems->clear(); |
|
191 | foreach ($NewShipmentItems as $NewShipmentItem) { |
|
192 | $NewShipmentItem->setShipping($Shipping); |
|
193 | $ShipmentItems->add($NewShipmentItem); |
|
194 | } |
|
195 | } |
|
196 | } |
|
197 | ||
198 | $Customer = $TargetOrder->getCustomer(); |