|
@@ 81-83 (lines=3) @@
|
| 78 |
|
// ステータスをキャンセルに変更した場合 |
| 79 |
|
if ($To->getOrderStatus() && $To->getOrderStatus()->getId() == OrderStatus::CANCEL |
| 80 |
|
&& $From->getOrderStatus() && $From->getOrderStatus()->getId() != OrderStatus::CANCEL) { |
| 81 |
|
if ($stock + $toQuantity < 0) { |
| 82 |
|
$this->throwInvalidItemException(trans('purchase_flow.over_stock', ['%name%' => $ProductClass->formattedProductName()])); |
| 83 |
|
} |
| 84 |
|
// ステータスをキャンセルから対応中に変更した場合 |
| 85 |
|
} elseif ($To->getOrderStatus() && $To->getOrderStatus()->getId() == OrderStatus::IN_PROGRESS |
| 86 |
|
&& $From->getOrderStatus() && $From->getOrderStatus()->getId() == OrderStatus::CANCEL) { |
|
@@ 90-94 (lines=5) @@
|
| 87 |
|
if ($stock - $toQuantity < 0) { |
| 88 |
|
$this->throwInvalidItemException(trans('purchase_flow.over_stock', ['%name%' => $ProductClass->formattedProductName()])); |
| 89 |
|
} |
| 90 |
|
} else { |
| 91 |
|
if ($stock - $quantity < 0) { |
| 92 |
|
$this->throwInvalidItemException(trans('purchase_flow.over_stock', ['%name%' => $ProductClass->formattedProductName()])); |
| 93 |
|
} |
| 94 |
|
} |
| 95 |
|
} |
| 96 |
|
} |
| 97 |
|
|