Skip to content

Commit

Permalink
feature #231
Browse files Browse the repository at this point in the history
  • Loading branch information
qr committed Dec 2, 2020
1 parent 1a981bf commit 41c9ae6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/Controller/AppDossierController.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ public function createAction(Request $request, EntityManagerInterface $em, Event
$this->addFlash('success', sprintf('Info: Er bestaat al een ander dossier met deze BSN binnen %s', $dossier->getSchuldhulpbureau()->getNaam()));
}

$dossiers = $dossierRepository->findBy(['regasNummer'=>$dossier->getRegasNummer(), 'schuldhulpbureau'=>$dossier->getSchuldhulpbureau()]);
if (count($dossiers) > 1) {
$this->addFlash('success', sprintf('Info: Er bestaat al een ander dossier met dit Regas nummer binnen %s', $dossier->getSchuldhulpbureau()->getNaam()));
}

if (!$allegroCheck) {
$this->addFlash('success', 'Dossier aangemaakt');
} else {
Expand Down
1 change: 0 additions & 1 deletion src/Entity/Dossier.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
/**
* @ORM\Entity(repositoryClass="GemeenteAmsterdam\FixxxSchuldhulp\Repository\DossierRepository")
* @ORM\Table
* @UniqueEntity("regasNummer")
* @UniqueEntity("allegroNummer")
*/
class Dossier
Expand Down

0 comments on commit 41c9ae6

Please sign in to comment.