Skip to content

Commit

Permalink
Merge pull request #215 from Amsterdam/dpsecure
Browse files Browse the repository at this point in the history
Diverse verbeteringen
  • Loading branch information
maartendekeizer authored Sep 25, 2020
2 parents 748cb53 + f8810f1 commit 2cd7877
Show file tree
Hide file tree
Showing 26 changed files with 354 additions and 17 deletions.
2 changes: 1 addition & 1 deletion doc/modified_schuldhulpservice.wsdl
Original file line number Diff line number Diff line change
Expand Up @@ -2167,7 +2167,7 @@
</xs:element>
<xs:element name="Referentie" minOccurs="0" type="xs:string">
</xs:element>
<xs:element name="Omschrijving" minOccurs="0" type="xs:string">
<xs:element name="Omschrijving" type="xs:string">
</xs:element>
<xs:element name="CodeEiser" type="xs:int">
</xs:element>
Expand Down
4 changes: 3 additions & 1 deletion src/Allegro/SchuldHulpAlt/TSchuld.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
7 changes: 7 additions & 0 deletions src/Controller/AppDossierController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
31 changes: 29 additions & 2 deletions src/Entity/Dossier.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ class Dossier
*/
private $clientBurgelijkeStaat;

/**
* @var \DateTime|null
* @ORM\Column(type="datetime", nullable=true)
*/
private $clientBurgelijkeStaatSinds;

/**
* @var array
* @ORM\Column(type="json", nullable=true)
Expand Down Expand Up @@ -778,9 +784,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;
});
}
Expand Down Expand Up @@ -1150,4 +1159,22 @@ public function setSendToAllegro(?\DateTime $sendToAllegro): Dossier
return $this;
}

/**
* @return \DateTime|null
*/
public function getClientBurgelijkeStaatSinds(): ?\DateTime
{
return $this->clientBurgelijkeStaatSinds;
}

/**
* @param \DateTime|null $clientBurgelijkeStaatSinds
* @return Dossier
*/
public function setClientBurgelijkeStaatSinds(?\DateTime $clientBurgelijkeStaatSinds): Dossier
{
$this->clientBurgelijkeStaatSinds = $clientBurgelijkeStaatSinds;

return $this;
}
}
105 changes: 105 additions & 0 deletions src/Entity/Voorlegger.php
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,30 @@ 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;

/**
* @var boolean|null
* @ORM\Column(type="boolean", nullable=true)
*/
private $jongerenSchuldenvrijeStart;

// ---

public function __construct()
Expand Down Expand Up @@ -1063,6 +1087,10 @@ public function __construct()
$this->toeslagenKinderopvang = false;
$this->toeslagenKindgebondenBudget = false;
$this->aangifteBelastingdienst = false;
$this->aangifteBelastingdienstMadi = self::STATUS_MADI_OPEN;
$this->aangifteBelastingdienstGka = false;
$this->aangifteBelastingdienstNvt = false;
$this->jongerenSchuldenvrijeStart = false;
}

public function getId()
Expand Down Expand Up @@ -2490,4 +2518,81 @@ 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;
}

/**
* @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;
}

}
9 changes: 9 additions & 0 deletions src/Form/ChangeDossierClientType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
9 changes: 9 additions & 0 deletions src/Form/Type/DetailDossierAdditionalFormType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
11 changes: 11 additions & 0 deletions src/Form/Type/VoorleggerBelastingFormType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
14 changes: 9 additions & 5 deletions src/Form/Type/VoorleggerOndertekendAanvraagFormulierFormType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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,
Expand Down Expand Up @@ -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);
}
}
9 changes: 9 additions & 0 deletions src/Form/Type/VoorleggerOverigeDocumentenFormType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions src/Migrations/Version20200818095526.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = \'[email protected]\' WHERE username = \'gka1\'');
$this->addSql('UPDATE gebruiker SET email = \'[email protected]\' WHERE username = \'madi1\'');
$this->addSql('UPDATE gebruiker SET email = \'[email protected]\' WHERE username = \'admin1\'');

$this->addSql('CREATE UNIQUE INDEX uq_email ON gebruiker (email)');
}

Expand Down
31 changes: 31 additions & 0 deletions src/Migrations/Version20200915083734.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20200915083734 extends AbstractMigration
{
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('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');
}
}
Loading

0 comments on commit 2cd7877

Please sign in to comment.