Пример #1
0
 /**
  * 拒絕退貨
  *
  * @Route("/invoice/{id}/cancel/reject", requirements={"id"="\d+"}, name="admin_invoice_cancel_reject")
  * @ParamConverter("invoice", class="WoojinOrderBundle:Invoice")
  * @Method("PUT")
  */
 public function rejectCancelAction(Invoice $invoice)
 {
     $em = $this->getDoctrine()->getManager();
     $invoice->setStatus(Avenue::IV_GIVE_DONE);
     $em->persist($invoice);
     $em->flush();
     $session = $this->get('session');
     $session->getFlashBag()->add('msg', $invoice->getSn() . '拒絕退貨完成');
     return $this->redirect($this->get('router')->generate('admin_invoice_web_index'));
 }