Skip to content

Commit

Permalink
Merge pull request #984 from inbaz/develop
Browse files Browse the repository at this point in the history
fix paid action
  • Loading branch information
BigAndini authored Jul 18, 2017
2 parents fe5991e + 76f3dd5 commit a57bee0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions module/Admin/src/Admin/Controller/OrderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -875,10 +875,9 @@ public function paidAction() {
$statusPaid = $entityManager->getRepository('ErsBase\Entity\Status')
->findOneBy(array('value' => 'paid'));

foreach($order->getItems() as $item) {
$item->setStatus($statusPaid);
$entityManager->persist($item);
}
$statusService = $this->getServiceLocator()
->get('ErsBase\Service\StatusService');
$statusService->setOrderStatus($order, $statusPaid, false);

$entityManager->flush();

Expand Down

0 comments on commit a57bee0

Please sign in to comment.