diff --git a/src/Siwapp/InvoiceBundle/Controller/DefaultController.php b/src/Siwapp/InvoiceBundle/Controller/DefaultController.php index c12d654..766f6df 100644 --- a/src/Siwapp/InvoiceBundle/Controller/DefaultController.php +++ b/src/Siwapp/InvoiceBundle/Controller/DefaultController.php @@ -136,7 +136,10 @@ public function deleteAction($id) public function paymentsAction($invoiceId) { // Return all payments - return array('invoiceId' => $invoiceId); + $em = $this->getDoctrine()->getEntityManager(); + $entities = $em->getRepository('SiwappInvoiceBundle:Payment')->findBy(array('invoice' => $invoiceId)); + + return array('entities' => $entities, 'invoiceId' => $invoiceId); } /** diff --git a/src/Siwapp/InvoiceBundle/Resources/views/Partials/payments.html.twig b/src/Siwapp/InvoiceBundle/Resources/views/Partials/payments.html.twig index fd6ee8a..c2fe5b8 100644 --- a/src/Siwapp/InvoiceBundle/Resources/views/Partials/payments.html.twig +++ b/src/Siwapp/InvoiceBundle/Resources/views/Partials/payments.html.twig @@ -5,9 +5,55 @@