@@ 347-363 (lines=17) @@ | ||
344 | )); |
|
345 | } |
|
346 | ||
347 | public function actionPaid($id, $idPage) |
|
348 | { |
|
349 | $investment = $this->em->getRepository('\WebCMS\InvestformModule\Entity\Investment')->find($id); |
|
350 | ||
351 | if ($investment->getContractClosed()) { |
|
352 | $investment->setContractPaid($investment->getContractPaid() ? false : true); |
|
353 | ||
354 | $this->em->flush(); |
|
355 | ||
356 | $this->flashMessage('Parameter has been changed.', 'success'); |
|
357 | } else { |
|
358 | $this->flashMessage('Contract must be closed first.', 'error'); |
|
359 | } |
|
360 | $this->forward('default', array( |
|
361 | 'idPage' => $this->actualPage->getId() |
|
362 | )); |
|
363 | } |
|
364 | ||
365 | public function actionClosed($id, $idPage) |
|
366 | { |
|
@@ 365-381 (lines=17) @@ | ||
362 | )); |
|
363 | } |
|
364 | ||
365 | public function actionClosed($id, $idPage) |
|
366 | { |
|
367 | $investment = $this->em->getRepository('\WebCMS\InvestformModule\Entity\Investment')->find($id); |
|
368 | ||
369 | if ($investment->getContractSend()) { |
|
370 | $investment->setContractClosed($investment->getContractClosed() ? false : true); |
|
371 | ||
372 | $this->em->flush(); |
|
373 | ||
374 | $this->flashMessage('Parameter has been changed.', 'success'); |
|
375 | } else { |
|
376 | $this->flashMessage('Contract must be sent first.', 'error'); |
|
377 | } |
|
378 | $this->forward('default', array( |
|
379 | 'idPage' => $this->actualPage->getId() |
|
380 | )); |
|
381 | } |
|
382 | ||
383 | public function actionDefault($idPage) |
|
384 | { |