Browse Source

Maintenance #1073

feature/souke
Guillaume Bourgeois 1 year ago
parent
commit
2462c03ebe
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      producer/controllers/OrderController.php

+ 2
- 1
producer/controllers/OrderController.php View File

@@ -558,12 +558,13 @@ class OrderController extends ProducerBaseController
{
$orderManager = $this->getOrderManager();
$order = $this->getOrderManager()->findOneOrderById($id);
$orderManager->initOrder($order);

if (!$order) {
throw new \yii\web\NotFoundHttpException('Commande introuvable');
}

$orderManager->initOrder($order);

if (!$orderManager->isOrderStateOpen($order)) {
throw new UserException('Vous ne pouvez plus annuler cette commande.');
}

Loading…
Cancel
Save