- public function canShip()
- {
- if ($this->canUnhold() || $this->isPaymentReview()) {
- return false;
- }
-
- if ($this->getIsVirtual() || $this->isCanceled()) {
- return false;
- }
-
- if ($this->getActionFlag(self::ACTION_FLAG_SHIP) === false) {
- return false;
- }
-
- foreach ($this->getAllItems() as $item) {
- if ($item->getQtyToShip() > 0 && !$item->getIsVirtual() && !$item->getLockedDoShip()) {
- return true;
- }
- }
- return false;
- }