Browse Source

Processus de commandes

feature/export_comptable
Fab 4 years ago
parent
commit
166fed5909
2 changed files with 2 additions and 7 deletions
  1. +2
    -4
      ShopBundle/Controller/Backend/OrderController.php
  2. +0
    -3
      ShopBundle/Services/OrderUtils.php

+ 2
- 4
ShopBundle/Controller/Backend/OrderController.php View File

if ($formOrderStatus->isSubmitted() && $formOrderStatus->isValid()) { if ($formOrderStatus->isSubmitted() && $formOrderStatus->isValid()) {


if($orderShop = $this->orderUtils->setOrderStatus($formOrderStatus->get('orderStatus')->getData(), $orderShop)){ if($orderShop = $this->orderUtils->setOrderStatus($formOrderStatus->get('orderStatus')->getData(), $orderShop)){
$this->persistEntity($orderShop);
$this->em->flush();
$this->addFlash('success', 'La commande a bien été modifié.'); $this->addFlash('success', 'La commande a bien été modifié.');
} }
}else{ }else{
$this->em->persist($orderReductionCart); $this->em->persist($orderReductionCart);
$this->em->flush(); $this->em->flush();


$response['status'] = 'success'; $response['status'] = 'success';
$response['message'] = 'La réduction a bien été ajouté'; $response['message'] = 'La réduction a bien été ajouté';


]); ]);
} }


}
}

+ 0
- 3
ShopBundle/Services/OrderUtils.php View File



$orderShop = $this->setOrderStatus('cart', $orderShop); $orderShop = $this->setOrderStatus('cart', $orderShop);


$this->em->persist($orderShop);
$this->em->flush();

return $orderShop; return $orderShop;
} }



Loading…
Cancel
Save