Commit 6e65ae81 by Yvon

add BIC to prestataires

parent c2317d81
......@@ -206,6 +206,10 @@ class PrestataireAdmin extends AbstractAdmin
'label' => 'SIRET :',
'required' => false,
])
->add('bic', TextType::class, [
'label' => 'BIC :',
'required' => false,
])
->add('iban', PersonalDataType::class, [
'label' => 'IBAN :',
'required' => false,
......
......@@ -436,6 +436,7 @@ class IndexController extends AbstractController
$user = $form['user']->getData();
$groupe = $form['groupe']->getData();
$configs = $form['config']->getData();
$bic = $form['bic']->getData();
$iban = $form['iban']->getData();
$website = $form['website']->getData();
$groupe->setSiege($siege);
......@@ -446,6 +447,7 @@ class IndexController extends AbstractController
$presta->setRaison('Monnaie locale');
$presta->setDescription('Association gérant la monnaie locale et recevant les cotisations');
$presta->setEnabled(true);
$presta->setBic($bic);
$presta->setIban($iban);
if (!empty($website)) {
$presta->setWeb($website);
......
......@@ -146,6 +146,19 @@ class Prestataire extends AccountableObject implements AccountableInterface
private $iban;
/**
* Bank Identifier Code.
*
* @var string
*
* @ORM\Column(name="bic", type="string", nullable=true)
*
* @Assert\Bic(
* ibanPropertyPath="iban"
* )
*/
private $bic;
/**
* @var string
*
* @ORM\Column(name="siret", type="string", length=50, nullable=true)
......@@ -537,6 +550,26 @@ class Prestataire extends AccountableObject implements AccountableInterface
return $this;
}
/**
* @return string
*/
public function getBic(): ?string
{
return $this->bic;
}
/**
* @param string $bic
*
* @return Prestataire
*/
public function setBic(?string $bic): self
{
$this->bic = $bic;
return $this;
}
/**
* @return string
......
......@@ -29,6 +29,9 @@ class InstallFormType extends AbstractType
'label' => 'CONFIGURATIONS GLOBALES :',
'label_attr' => ['class' => 'font-weight-bold'],
])
->add('bic', TextType::class, [
'label' => "BIC de l'association gérant la MLC :",
])
->add('iban', TextType::class, [
'label' => "IBAN de l'association gérant la MLC :",
])
......
......@@ -66,6 +66,10 @@ class PrestataireInfosFormType extends AbstractType
'label' => 'SIRET :',
'required' => false,
])
->add('bic', TextType::class, [
'label' => 'BIC :',
'required' => false,
])
->add('iban', TextType::class, [
'label' => 'IBAN :',
'required' => false,
......
<?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 Version20240320144059 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}
public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE prestataire ADD bic VARCHAR(8) DEFAULT NULL, CHANGE iban iban LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:personal_data)\'');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE prestataire DROP bic, CHANGE iban iban LONGTEXT CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_general_ci` COMMENT \'(DC2Type:personal_data)\'');
}
}
<?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 Version20240320153828 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}
public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE prestataire CHANGE iban iban LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:personal_data)\', CHANGE bic bic VARCHAR(255) DEFAULT NULL');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE prestataire CHANGE iban iban LONGTEXT CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_general_ci` COMMENT \'(DC2Type:personal_data)\', CHANGE bic bic VARCHAR(8) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_general_ci`');
}
}
......@@ -46,6 +46,7 @@
</div>
{% endif %}
{{ form_row(form.siret) }}
{{ form_row(form.bic) }}
{{ form_row(form.iban) }}
{{ form_row(form.responsable) }}
{{ form_row(form.metier) }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment