From 04c5f0eaf1e6c5b71a51d243ba34fef6d7604f01 Mon Sep 17 00:00:00 2001 From: Bart Elferink Date: Tue, 15 Sep 2020 11:20:07 +0200 Subject: [PATCH 1/7] added signals for taxes, removed some documents from view --- src/Entity/Dossier.php | 7 +- src/Entity/Voorlegger.php | 80 +++++++++++++++++++ src/Form/Type/VoorleggerBelastingFormType.php | 11 +++ src/Migrations/Version20200818095526.php | 4 + src/Migrations/Version20200915083734.php | 31 +++++++ src/Migrations/Version20200915084350.php | 37 +++++++++ templates/Dossier/detailVoorlegger.html.twig | 2 +- .../partial.dossierDashboard.html.twig | 4 +- ...tial.voorleggerAangifteBelasting.html.twig | 17 +++- ...tial.voorleggerSchuldenoverzicht.html.twig | 2 +- 10 files changed, 188 insertions(+), 7 deletions(-) create mode 100644 src/Migrations/Version20200915083734.php create mode 100644 src/Migrations/Version20200915084350.php diff --git a/src/Entity/Dossier.php b/src/Entity/Dossier.php index 5a13b2e8..cdea0cad 100644 --- a/src/Entity/Dossier.php +++ b/src/Entity/Dossier.php @@ -778,9 +778,12 @@ public function getDocumentenByOnderwerp($onderwerp) * * @return \GemeenteAmsterdam\FixxxSchuldhulp\Entity\DossierDocument[]|\Doctrine\Common\Collections\ArrayCollection */ - public function getNietVerwijderdeDocumentenByOnderwerp($onderwerp) + public function getNietVerwijderdeDocumentenByOnderwerp($onderwerp, $zonderSchulditem = false) { - return $this->documenten->filter(function (DossierDocument $dossierDocument) use ($onderwerp) { + return $this->documenten->filter(function (DossierDocument $dossierDocument) use ($onderwerp, $zonderSchulditem) { + if ($zonderSchulditem && null !== $dossierDocument->getSchuldItem()) { + return false; + } return $dossierDocument->getOnderwerp() === $onderwerp && $dossierDocument->getDocument()->isInPrullenbak() === false; }); } diff --git a/src/Entity/Voorlegger.php b/src/Entity/Voorlegger.php index 8b4b1a56..6e1ad83f 100644 --- a/src/Entity/Voorlegger.php +++ b/src/Entity/Voorlegger.php @@ -947,6 +947,24 @@ class Voorlegger */ private $aangifteBelastingdienst; + /** + * @var integer|null + * @ORM\Column(type="smallint", nullable=true) + */ + private $aangifteBelastingdienstMadi; + + /** + * @var integer|null + * @ORM\Column(type="smallint", nullable=true) + */ + private $aangifteBelastingdienstGka; + + /** + * @var boolean|null + * @ORM\Column(type="boolean", nullable=true) + */ + private $aangifteBelastingdienstNvt; + // --- public function __construct() @@ -1063,6 +1081,9 @@ public function __construct() $this->toeslagenKinderopvang = false; $this->toeslagenKindgebondenBudget = false; $this->aangifteBelastingdienst = false; + $this->aangifteBelastingdienstMadi = self::STATUS_MADI_OPEN; + $this->aangifteBelastingdienstGka = false; + $this->aangifteBelastingdienstNvt = false; } public function getId() @@ -2490,4 +2511,63 @@ public function setAangifteBelastingdienst(?bool $aangifteBelastingdienst): Voor return $this; } + + /** + * @return int|null + */ + public function getAangifteBelastingdienstMadi(): ?int + { + return $this->aangifteBelastingdienstMadi; + } + + /** + * @param int|null $aangifteBelastingdienstMadi + * @return Voorlegger + */ + public function setAangifteBelastingdienstMadi(?int $aangifteBelastingdienstMadi): Voorlegger + { + $this->aangifteBelastingdienstMadi = $aangifteBelastingdienstMadi; + + return $this; + } + + /** + * @return int|null + */ + public function getAangifteBelastingdienstGka(): ?int + { + return $this->aangifteBelastingdienstGka; + } + + /** + * @param int|null $aangifteBelastingdienstGka + * @return Voorlegger + */ + public function setAangifteBelastingdienstGka(?int $aangifteBelastingdienstGka): Voorlegger + { + $this->aangifteBelastingdienstGka = $aangifteBelastingdienstGka; + + return $this; + } + + /** + * @return bool|null + */ + public function getAangifteBelastingdienstNvt(): ?bool + { + return $this->aangifteBelastingdienstNvt; + } + + /** + * @param bool|null $aangifteBelastingdienstNvt + * @return Voorlegger + */ + public function setAangifteBelastingdienstNvt(?bool $aangifteBelastingdienstNvt): Voorlegger + { + $this->aangifteBelastingdienstNvt = $aangifteBelastingdienstNvt; + + return $this; + } + + } diff --git a/src/Form/Type/VoorleggerBelastingFormType.php b/src/Form/Type/VoorleggerBelastingFormType.php index c9a7932e..4b5f6a9a 100644 --- a/src/Form/Type/VoorleggerBelastingFormType.php +++ b/src/Form/Type/VoorleggerBelastingFormType.php @@ -28,6 +28,17 @@ class VoorleggerBelastingFormType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { + $builder->add('aangifteBelastingdienstMadi', MadiStatusFormType::class, [ + 'required' => true, + 'disabled' => $options['disable_group'] === 'gka' + ]); + $builder->add('aangifteBelastingdienstGka', GkaStatusFormType::class, [ + 'required' => true, + 'disabled' => $options['disable_group'] === 'madi' + ]); + $builder->add('aangifteBelastingdienstNvt', CheckboxType::class, [ + 'required' => false + ]); $builder->add('aangifteBelastingdienst', CheckboxType::class, [ 'required' => false, 'label' => 'Aangifte ingediend' diff --git a/src/Migrations/Version20200818095526.php b/src/Migrations/Version20200818095526.php index de588c34..b46e0374 100644 --- a/src/Migrations/Version20200818095526.php +++ b/src/Migrations/Version20200818095526.php @@ -15,6 +15,10 @@ public function up(Schema $schema) : void // this up() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + $this->addSql('UPDATE gebruiker SET email = \'gka1@test.nl\' WHERE username = \'gka1\''); + $this->addSql('UPDATE gebruiker SET email = \'madi1@test.nl\' WHERE username = \'madi1\''); + $this->addSql('UPDATE gebruiker SET email = \'admin1@test.nl\' WHERE username = \'admin1\''); + $this->addSql('CREATE UNIQUE INDEX uq_email ON gebruiker (email)'); } diff --git a/src/Migrations/Version20200915083734.php b/src/Migrations/Version20200915083734.php new file mode 100644 index 00000000..5682776e --- /dev/null +++ b/src/Migrations/Version20200915083734.php @@ -0,0 +1,31 @@ +abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + + $this->addSql('ALTER TABLE voorlegger ADD aangifte_belastingdienst_ontvangen_madi SMALLINT DEFAULT NULL'); + $this->addSql('ALTER TABLE voorlegger ADD aangifte_belastingdienst_ontvangen_gka SMALLINT DEFAULT NULL'); + } + + public function down(Schema $schema) : void + { + // this down() migration is auto-generated, please modify it to your needs + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + + $this->addSql('CREATE SCHEMA public'); + $this->addSql('ALTER TABLE voorlegger DROP aangifte_belastingdienst_ontvangen_madi'); + $this->addSql('ALTER TABLE voorlegger DROP aangifte_belastingdienst_ontvangen_gka'); + } +} diff --git a/src/Migrations/Version20200915084350.php b/src/Migrations/Version20200915084350.php new file mode 100644 index 00000000..2b2ec924 --- /dev/null +++ b/src/Migrations/Version20200915084350.php @@ -0,0 +1,37 @@ +abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + + $this->addSql('ALTER TABLE voorlegger ADD aangifte_belastingdienst_madi SMALLINT DEFAULT NULL'); + $this->addSql('ALTER TABLE voorlegger ADD aangifte_belastingdienst_gka SMALLINT DEFAULT NULL'); + $this->addSql('ALTER TABLE voorlegger ADD aangifte_belastingdienst_nvt BOOLEAN DEFAULT NULL'); + $this->addSql('ALTER TABLE voorlegger DROP aangifte_belastingdienst_ontvangen_madi'); + $this->addSql('ALTER TABLE voorlegger DROP aangifte_belastingdienst_ontvangen_gka'); + } + + public function down(Schema $schema) : void + { + // this down() migration is auto-generated, please modify it to your needs + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + + $this->addSql('CREATE SCHEMA public'); + $this->addSql('ALTER TABLE voorlegger ADD aangifte_belastingdienst_ontvangen_madi SMALLINT DEFAULT NULL'); + $this->addSql('ALTER TABLE voorlegger ADD aangifte_belastingdienst_ontvangen_gka SMALLINT DEFAULT NULL'); + $this->addSql('ALTER TABLE voorlegger DROP aangifte_belastingdienst_madi'); + $this->addSql('ALTER TABLE voorlegger DROP aangifte_belastingdienst_gka'); + $this->addSql('ALTER TABLE voorlegger DROP aangifte_belastingdienst_nvt'); + } +} diff --git a/templates/Dossier/detailVoorlegger.html.twig b/templates/Dossier/detailVoorlegger.html.twig index cfe320f6..0c4692dc 100644 --- a/templates/Dossier/detailVoorlegger.html.twig +++ b/templates/Dossier/detailVoorlegger.html.twig @@ -61,13 +61,13 @@ {% include 'Dossier/partial.voorleggerMeterstandenEnergie.html.twig' with {'form': voorleggerForm.meterstandenEnergie, 'dossier': dossier, 'title': 'Meterstanden energie'} only %} {% include 'Dossier/partial.voorleggerWaternet.html.twig' with {'form': voorleggerForm.waternet, 'dossier': dossier, 'title': 'Waternet'} only %} {% include 'Dossier/partial.voorleggerRetourbewijsModem.html.twig' with {'form': voorleggerForm.retourbewijsModem, 'dossier': dossier, 'title': 'Retourbewijs modem'} only %} + {% include 'Dossier/partial.voorleggerAangifteBelasting.html.twig' with {'form': voorleggerForm.belasting, 'dossier': dossier, 'title': 'Aangifte belastingdienst'} only %}

Onderbewindstelling of budgetbeheer

{% include 'Dossier/partial.voorleggerBeschikkingOnderBewindstelling.html.twig' with {'form': voorleggerForm.beschikkingOnderBewindstelling, 'dossier': dossier, 'title': 'Beschikking onderbewindstelling'} only %} {% include 'Dossier/partial.voorleggerBudgetbeheer.html.twig' with {'form': voorleggerForm.budgetbeheer, 'dossier': dossier, 'title': 'Budgetbeheer'} only %} {% include 'Dossier/partial.voorleggerGereserveerdeGelden.html.twig' with {'form': voorleggerForm.gereserveerdeGelden, 'dossier': dossier, 'title': 'Gereserveerde gelden'} only %}

Overige

{% include 'Dossier/partial.voorleggerOverigeDocumenten.html.twig' with {'form': voorleggerForm.overigeDocumenten, 'dossier': dossier, 'title': 'Overige documenten'} only %} - {% include 'Dossier/partial.voorleggerAangifteBelasting.html.twig' with {'form': voorleggerForm.belasting, 'dossier': dossier, 'title': 'Aangifte belastingdienst'} only %} {% include 'Dossier/partial.voorleggerCorrespondentie.html.twig' with {'form': voorleggerForm.correspondentie, 'dossier': dossier, 'title': 'Correspondentie van GKA'} only %} diff --git a/templates/Dossier/partial.dossierDashboard.html.twig b/templates/Dossier/partial.dossierDashboard.html.twig index ac5c55ed..227393d1 100644 --- a/templates/Dossier/partial.dossierDashboard.html.twig +++ b/templates/Dossier/partial.dossierDashboard.html.twig @@ -209,5 +209,5 @@ - - \ No newline at end of file + + \ No newline at end of file diff --git a/templates/Dossier/partial.voorleggerAangifteBelasting.html.twig b/templates/Dossier/partial.voorleggerAangifteBelasting.html.twig index ee61c069..bd9c1193 100644 --- a/templates/Dossier/partial.voorleggerAangifteBelasting.html.twig +++ b/templates/Dossier/partial.voorleggerAangifteBelasting.html.twig @@ -1,7 +1,13 @@ {% import 'partial.macros.html.twig' as tools %} {% set dossierDocumenten = dossier.getNietVerwijderdeDocumentenByOnderwerpen(['belasting']) %} -
+
@@ -13,6 +19,7 @@ {{ dossierDocumenten|length }}
{% endif %} + {% include 'Dossier/partial.statusChanger.html.twig' with {'show_nvt': true} %}
@@ -20,6 +27,14 @@
+
Status: + {{ form_row(form.aangifteBelastingdienstMadi) }} + {{ form_row(form.aangifteBelastingdienstGka) }} +
+
+ {{ form_row(form.aangifteBelastingdienstNvt) }} +
+ {% include 'Dossier/partial.statusChanger.html.twig' with {'show_nvt': true} %}

{{ title }}


diff --git a/templates/Dossier/partial.voorleggerSchuldenoverzicht.html.twig b/templates/Dossier/partial.voorleggerSchuldenoverzicht.html.twig index 0a7a5459..648ef605 100644 --- a/templates/Dossier/partial.voorleggerSchuldenoverzicht.html.twig +++ b/templates/Dossier/partial.voorleggerSchuldenoverzicht.html.twig @@ -1,5 +1,5 @@ {% import 'partial.macros.html.twig' as tools %} -{% set dossierDocumenten = dossier.getNietVerwijderdeDocumentenByOnderwerp('schuldenoverzicht') %} +{% set dossierDocumenten = dossier.getNietVerwijderdeDocumentenByOnderwerp('schuldenoverzicht', true) %}
clientBurgelijkeStaatSinds; + } + + /** + * @param \DateTime|null $clientBurgelijkeStaatSinds + * @return Dossier + */ + public function setClientBurgelijkeStaatSinds(?\DateTime $clientBurgelijkeStaatSinds): Dossier + { + $this->clientBurgelijkeStaatSinds = $clientBurgelijkeStaatSinds; + + return $this; + } } diff --git a/src/Form/ChangeDossierClientType.php b/src/Form/ChangeDossierClientType.php index 16c3aa7b..9c49e425 100644 --- a/src/Form/ChangeDossierClientType.php +++ b/src/Form/ChangeDossierClientType.php @@ -140,6 +140,15 @@ public function buildForm(FormBuilderInterface $builder, array $options): void 'choices' => Dossier::getBurgelijkeStaatOpties() ]); + $builder->add('clientBurgelijkeStaatSinds', DateType::class, [ + 'label' => 'Burgelijke staat sinds', + 'required' => false, + 'html5' => false, + 'attr' => ['data-decorator' => 'rome'], + 'format' => 'dd-MM-yyyy', + 'widget' => 'single_text', + ]); + $builder->add('clientKinderen', CollectionType::class, [ 'label' => 'Geboortedatum inwonende kind(eren)', 'allow_add' => true, diff --git a/src/Form/Type/DetailDossierAdditionalFormType.php b/src/Form/Type/DetailDossierAdditionalFormType.php index 0f59e038..d6473207 100644 --- a/src/Form/Type/DetailDossierAdditionalFormType.php +++ b/src/Form/Type/DetailDossierAdditionalFormType.php @@ -55,6 +55,15 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'choices' => Dossier::getBurgelijkeStaatOpties() ]); + $builder->add('clientBurgelijkeStaatSinds', DateType::class, [ + 'label' => 'Burgelijke staat sinds', + 'required' => false, + 'html5' => false, + 'attr' => ['data-decorator' => 'rome'], + 'format' => 'dd-MM-yyyy', + 'widget' => 'single_text', + ]); + $builder->add('clientKinderen', CollectionType::class, [ 'label' => 'Geboortedatum inwonende kind(eren)', 'allow_add' => true, diff --git a/src/Migrations/Version20200915092230.php b/src/Migrations/Version20200915092230.php new file mode 100644 index 00000000..ca15fc4a --- /dev/null +++ b/src/Migrations/Version20200915092230.php @@ -0,0 +1,29 @@ +abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + + $this->addSql('ALTER TABLE dossier ADD client_burgelijke_staat_sinds TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL'); + } + + public function down(Schema $schema) : void + { + // this down() migration is auto-generated, please modify it to your needs + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + + $this->addSql('CREATE SCHEMA public'); + $this->addSql('ALTER TABLE dossier DROP client_burgelijke_staat_sinds'); + } +} diff --git a/templates/DocumentPlus/export.html.twig b/templates/DocumentPlus/export.html.twig index f4e6f8ab..47f76de7 100644 --- a/templates/DocumentPlus/export.html.twig +++ b/templates/DocumentPlus/export.html.twig @@ -84,6 +84,8 @@ Burgelijke staat: {{ dossier.clientBurgelijkeStaat }} + Burgelijke staat sinds: + {{ dossier.clientBurgelijkeStaatSinds }} Geboortedatum inwonende kinderen: {{ dossier.clientKinderen|json_encode }} diff --git a/templates/Dossier/createAddtional.html.twig b/templates/Dossier/createAddtional.html.twig index 3e97c0fd..8fb16af4 100644 --- a/templates/Dossier/createAddtional.html.twig +++ b/templates/Dossier/createAddtional.html.twig @@ -26,6 +26,7 @@

Gezinssamenstelling

{{ form_row(form.clientBurgelijkeStaat, {'attr': {'form_row_class': 'form-row__wide form-row--no-label-margin', 'class': 'radio-group radio-group__vertical'}}) }} + {{ form_row(form.clientBurgelijkeStaatSinds, {'attr': {'form_row_class': 'form-row__wide'}}) }} {% do form.clientKinderen.setRendered %}
diff --git a/templates/Dossier/partial.clientForm.html.twig b/templates/Dossier/partial.clientForm.html.twig index 6e8cfbb9..a7a58818 100644 --- a/templates/Dossier/partial.clientForm.html.twig +++ b/templates/Dossier/partial.clientForm.html.twig @@ -24,6 +24,7 @@

Gezinssamenstelling

{{ form_row(form.clientBurgelijkeStaat, {'attr': {'form_row_class': 'form-row__wide', 'class': 'radio-group radio-group__vertical'}}) }} +{{ form_row(form.clientBurgelijkeStaatSinds, {'attr': {'form_row_class': 'form-row__wide'}}) }} {% do form.clientKinderen.setRendered %}
diff --git a/templates/Dossier/partial.dossierDashboard.html.twig b/templates/Dossier/partial.dossierDashboard.html.twig index 227393d1..6a3daefd 100644 --- a/templates/Dossier/partial.dossierDashboard.html.twig +++ b/templates/Dossier/partial.dossierDashboard.html.twig @@ -84,7 +84,7 @@
Burgelijke staat
-
{% if dossier.clientBurgelijkeStaat %}{{ dossier.clientBurgelijkeStaat }}{% else %}-{% endif %}
+
{% if dossier.clientBurgelijkeStaat %}{{ dossier.clientBurgelijkeStaat }}{% if dossier.clientBurgelijkeStaatSinds %} ({{ dossier.clientBurgelijkeStaatSinds|date('d-m-Y') }}){% endif %}{% else %}-{% endif %}
Geboortedatum inwonende kind(eren)
{% if dossier.clientKinderen %}{{ dossier.clientKinderen|length }} kinderen:
From e1f5d3397689c969795497659d1325b8e972a6ac Mon Sep 17 00:00:00 2001 From: Bart Elferink Date: Tue, 15 Sep 2020 11:40:33 +0200 Subject: [PATCH 3/7] handtekening onder excel --- src/Controller/AppDossierController.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Controller/AppDossierController.php b/src/Controller/AppDossierController.php index b7635743..516668c2 100644 --- a/src/Controller/AppDossierController.php +++ b/src/Controller/AppDossierController.php @@ -1146,6 +1146,8 @@ private function schuldenAsExcel(Dossier $dossier): Spreadsheet $sheet->getStyleByColumnAndRow(1, 1, 8, 1)->getFont()->setBold(true); + $rowIndex = 0; + foreach (array_values($dossier->getSchuldItemsNotInPrullenbak()->toArray()) as $rowIndex => $schuldItem) { /** @var $schuldItem SchuldItem */ $rowIndex = $rowIndex + 2; // one-based instead of zero-based and one for the header @@ -1181,6 +1183,11 @@ private function schuldenAsExcel(Dossier $dossier): Spreadsheet $sheet->setCellValueByColumnAndRow(3, $rowIndex, $dossier->getSumSchuldItemsNotInPrullenbak()); $sheet->getStyleByColumnAndRow(3, $rowIndex)->getNumberFormat()->setFormatCode('"€"#,##0.00_-'); + $rowIndex = $rowIndex+4; + + $sheet->setCellValueByColumnAndRow(1, $rowIndex, 'Naam:'); + $sheet->setCellValueByColumnAndRow(4, $rowIndex, 'Datum:'); + $sheet->setCellValueByColumnAndRow(6, $rowIndex, 'Handtekening:'); $sheet->getColumnDimensionByColumn(1)->setAutoSize(true); $sheet->getColumnDimensionByColumn(2)->setAutoSize(true); From 8f799eb6b371b5e269b7844ec0836c9e7d7e5484 Mon Sep 17 00:00:00 2001 From: Bart Elferink Date: Tue, 15 Sep 2020 11:45:22 +0200 Subject: [PATCH 4/7] aantekening overige documenten --- src/Form/Type/VoorleggerOverigeDocumentenFormType.php | 9 +++++++++ .../partial.voorleggerOverigeDocumenten.html.twig | 3 +++ 2 files changed, 12 insertions(+) diff --git a/src/Form/Type/VoorleggerOverigeDocumentenFormType.php b/src/Form/Type/VoorleggerOverigeDocumentenFormType.php index 77d269b4..9847f122 100644 --- a/src/Form/Type/VoorleggerOverigeDocumentenFormType.php +++ b/src/Form/Type/VoorleggerOverigeDocumentenFormType.php @@ -40,6 +40,15 @@ public function buildForm(FormBuilderInterface $builder, array $options) new Valid() ] ]); + + $builder->add('aantekening', CreateAantekeningFormType::class, [ + 'mapped' => false, + 'required' => false, + 'constraints' => [ + new Valid() + ] + ]); + $builder->add('removeFile', CollectionType::class, [ 'mapped' => false, 'entry_type' => HiddenType::class, diff --git a/templates/Dossier/partial.voorleggerOverigeDocumenten.html.twig b/templates/Dossier/partial.voorleggerOverigeDocumenten.html.twig index fd07ff57..98a6e36e 100644 --- a/templates/Dossier/partial.voorleggerOverigeDocumenten.html.twig +++ b/templates/Dossier/partial.voorleggerOverigeDocumenten.html.twig @@ -26,6 +26,9 @@
{% include 'partial.files-container.html.twig' with {'form_elm': form.file, 'defaultDocumentNaam': 'Overige documenten'} only %} {% include 'partial.files-list.html.twig' with {'dossierDocumenten': dossierDocumenten, 'removeFile': form.removeFile} only %} +

Aantekeningen

+ {{ form_row(form.aantekening) }} + {% include 'Dossier/partial.aantekeningen.html.twig' with {'aantekeningen': dossier.getAantekeningenByOnderwerp('overigeDocumenten')} only %}
{% include 'Dossier/partial.documentViewer.html.twig' %}
From c97f903bc89b68c632785592af048069d333d9d8 Mon Sep 17 00:00:00 2001 From: Bart Elferink Date: Tue, 15 Sep 2020 11:46:56 +0200 Subject: [PATCH 5/7] tekst toegevoegd bij meterstanden --- .../Dossier/partial.voorleggerMeterstandenEnergie.html.twig | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/Dossier/partial.voorleggerMeterstandenEnergie.html.twig b/templates/Dossier/partial.voorleggerMeterstandenEnergie.html.twig index 77039a0b..1918f649 100644 --- a/templates/Dossier/partial.voorleggerMeterstandenEnergie.html.twig +++ b/templates/Dossier/partial.voorleggerMeterstandenEnergie.html.twig @@ -40,6 +40,7 @@
+ Alleen invullen indien er een achterstand is bij de huidige leverancier. {{ form_row(form.energieBedrijf) }} {{ form_row(form.energieBedrijfKlantnummer) }} {{ form_row(form.energieBedrijfDatumOpname) }} From 759a38813cad38cad8fa368bf33c7fc0dd66c536 Mon Sep 17 00:00:00 2001 From: Bart Elferink Date: Tue, 15 Sep 2020 12:59:42 +0200 Subject: [PATCH 6/7] schuld in omschrijving --- doc/modified_schuldhulpservice.wsdl | 2 +- src/Allegro/SchuldHulpAlt/TSchuld.php | 4 +++- src/Service/AllegroService.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/modified_schuldhulpservice.wsdl b/doc/modified_schuldhulpservice.wsdl index ee793156..9ddfaf2c 100644 --- a/doc/modified_schuldhulpservice.wsdl +++ b/doc/modified_schuldhulpservice.wsdl @@ -2167,7 +2167,7 @@ - + diff --git a/src/Allegro/SchuldHulpAlt/TSchuld.php b/src/Allegro/SchuldHulpAlt/TSchuld.php index 2785bc65..16f380d7 100644 --- a/src/Allegro/SchuldHulpAlt/TSchuld.php +++ b/src/Allegro/SchuldHulpAlt/TSchuld.php @@ -38,12 +38,14 @@ class TSchuld /** * @param string $Naam * @param float $Schuld + * @param string $Omschrijving * @param int $CodeEiser */ - public function __construct($Naam, $Schuld, $CodeEiser) + public function __construct($Naam, $Schuld, $Omschrijving, $CodeEiser) { $this->Naam = $Naam; $this->Schuld = $Schuld; + $this->Omschrijving = $Omschrijving; $this->CodeEiser = $CodeEiser; } diff --git a/src/Service/AllegroService.php b/src/Service/AllegroService.php index 2719b5ad..392a9454 100644 --- a/src/Service/AllegroService.php +++ b/src/Service/AllegroService.php @@ -396,7 +396,7 @@ private function mapSchulden(Dossier $dossier): SchuldArray $codeEiser = null === $item->getSchuldeiser()->getAllegroCode() ? self::ONBEKENDE_SCHULDEISER : $item->getSchuldeiser()->getAllegroCode(); - $schuld = new TSchuld($item->getSchuldeiser()->getBedrijfsnaam(), $item->getBedrag(), $codeEiser); + $schuld = new TSchuld($item->getSchuldeiser()->getBedrijfsnaam(), 1, $item->getBedrag(), $codeEiser); if (null !== $item->getReferentie() && strlen($item->getReferentie())) { $schuld->setReferentie($item->getReferentie()); From f8810f12914e06e94c5fe62c1cb695f7f574a779 Mon Sep 17 00:00:00 2001 From: Bart Elferink Date: Tue, 15 Sep 2020 13:08:02 +0200 Subject: [PATCH 7/7] JSS --- src/Entity/Voorlegger.php | 25 ++++++++++++++++ ...erOndertekendAanvraagFormulierFormType.php | 14 +++++---- src/Migrations/Version20200915110221.php | 29 +++++++++++++++++++ src/Service/AllegroService.php | 2 +- ...ggerOndertekendAanvraagFormulier.html.twig | 1 + 5 files changed, 65 insertions(+), 6 deletions(-) create mode 100644 src/Migrations/Version20200915110221.php diff --git a/src/Entity/Voorlegger.php b/src/Entity/Voorlegger.php index 6e1ad83f..ee235b9d 100644 --- a/src/Entity/Voorlegger.php +++ b/src/Entity/Voorlegger.php @@ -965,6 +965,12 @@ class Voorlegger */ private $aangifteBelastingdienstNvt; + /** + * @var boolean|null + * @ORM\Column(type="boolean", nullable=true) + */ + private $jongerenSchuldenvrijeStart; + // --- public function __construct() @@ -1084,6 +1090,7 @@ public function __construct() $this->aangifteBelastingdienstMadi = self::STATUS_MADI_OPEN; $this->aangifteBelastingdienstGka = false; $this->aangifteBelastingdienstNvt = false; + $this->jongerenSchuldenvrijeStart = false; } public function getId() @@ -2569,5 +2576,23 @@ public function setAangifteBelastingdienstNvt(?bool $aangifteBelastingdienstNvt) return $this; } + /** + * @return bool|null + */ + public function getJongerenSchuldenvrijeStart(): ?bool + { + return $this->jongerenSchuldenvrijeStart; + } + + /** + * @param bool|null $jongerenSchuldenvrijeStart + * @return Voorlegger + */ + public function setJongerenSchuldenvrijeStart(?bool $jongerenSchuldenvrijeStart): Voorlegger + { + $this->jongerenSchuldenvrijeStart = $jongerenSchuldenvrijeStart; + + return $this; + } } diff --git a/src/Form/Type/VoorleggerOndertekendAanvraagFormulierFormType.php b/src/Form/Type/VoorleggerOndertekendAanvraagFormulierFormType.php index ec05dd1b..bf5825e3 100644 --- a/src/Form/Type/VoorleggerOndertekendAanvraagFormulierFormType.php +++ b/src/Form/Type/VoorleggerOndertekendAanvraagFormulierFormType.php @@ -18,11 +18,11 @@ use Symfony\Component\Validator\Constraints\Length; use Symfony\Component\Validator\Constraints\NotBlank; use Symfony\Component\Validator\Constraints\File; -use Symfony\Component\Form\FormInterface; +use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\Extension\Core\Type\CollectionType; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvents; -use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\Constraints\Valid; class VoorleggerOndertekendAanvraagFormulierFormType extends AbstractType { @@ -36,9 +36,13 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'required' => true, 'disabled' => $options['disable_group'] === 'madi' ]); + $builder->add('jongerenSchuldenvrijeStart', CheckboxType::class, [ + 'required' => false, + 'label' => 'Jongeren Schuldenvrije Start (JSS)' + ]); $builder->add('aanvullendeInformatie', TextareaType::class, [ 'required' => false - ]); + ]); $builder->add('file', CollectionType::class, [ 'mapped' => false, 'entry_type' => DocumentFormType::class, @@ -72,13 +76,13 @@ public function buildForm(FormBuilderInterface $builder, array $options) unset($data['file']['__name__']); unset($data['removeFile']['__name__']); $event->setData($data); - }); + }); } public function configureOptions(OptionsResolver $resolver) { $resolver->setDefault('data_class', Voorlegger::class); $resolver->setDefault('choice_translation_domain', false); - $resolver->setDefault('disable_group', null); + $resolver->setDefault('disable_group', null); } } \ No newline at end of file diff --git a/src/Migrations/Version20200915110221.php b/src/Migrations/Version20200915110221.php new file mode 100644 index 00000000..321ea6e7 --- /dev/null +++ b/src/Migrations/Version20200915110221.php @@ -0,0 +1,29 @@ +abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + + $this->addSql('ALTER TABLE voorlegger ADD jongeren_schuldenvrije_start BOOLEAN DEFAULT NULL'); + } + + public function down(Schema $schema) : void + { + // this down() migration is auto-generated, please modify it to your needs + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + + $this->addSql('CREATE SCHEMA public'); + $this->addSql('ALTER TABLE voorlegger DROP jongeren_schuldenvrije_start'); + } +} diff --git a/src/Service/AllegroService.php b/src/Service/AllegroService.php index 392a9454..fa3abe07 100644 --- a/src/Service/AllegroService.php +++ b/src/Service/AllegroService.php @@ -264,7 +264,7 @@ public function sendAanvraag(Dossier $dossier): bool $aanvraag = new \GemeenteAmsterdam\FixxxSchuldhulp\Allegro\SchuldHulpAlt\TAanvraag2SR($bedrijfsCode, $aanvrager, false, $gezin, $kinderen, $aanvraagSchuldbedrag, count($dossier->getSchuldItemsNotInPrullenbak()), 0, 0, 0, - false, false, false, true, true, + false, false, $dossier->getVoorlegger()->getJongerenSchuldenvrijeStart(), true, true, true); $schulden = $this->mapSchulden($dossier); diff --git a/templates/Dossier/partial.voorleggerOndertekendAanvraagFormulier.html.twig b/templates/Dossier/partial.voorleggerOndertekendAanvraagFormulier.html.twig index 6959a4d5..0cf6c252 100644 --- a/templates/Dossier/partial.voorleggerOndertekendAanvraagFormulier.html.twig +++ b/templates/Dossier/partial.voorleggerOndertekendAanvraagFormulier.html.twig @@ -36,6 +36,7 @@
+ {{ form_row(form.jongerenSchuldenvrijeStart) }} {{ form_row(form.aanvullendeInformatie) }} {% include 'partial.files-container.html.twig' with {'form_elm': form.file, 'defaultDocumentNaam': 'Ondertekend aanvraagformulier'} only %} {% include 'partial.files-list.html.twig' with {'dossierDocumenten': dossierDocumenten, 'removeFile': form.removeFile} only %}