Commit dd4cf087 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Formulaire pour gérer les numéros de prise en charge et la synchronisation

parent bb83f7a4
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -657,6 +657,18 @@ return [
            'position'    => 50,
            'commentaire' => NULL,
        ],
        'SYNC_PEC'              => [
            'name'        => 'SYNC_PEC',
            'type'        => 'bool',
            'bdd-type'    => 'NUMBER',
            'length'      => 0,
            'scale'       => '0',
            'precision'   => 1,
            'nullable'    => FALSE,
            'default'     => '1',
            'position'    => 62,
            'commentaire' => NULL,
        ],
        'SYNC_STRUCTURE'           => [
            'name'        => 'SYNC_STRUCTURE',
            'type'        => 'bool',
+2 −1
Original line number Diff line number Diff line
@@ -245,7 +245,7 @@ FROM (
      padr.id                                                                                adresse_pays_id,
      s.numero_insee                                                                         numero_insee,
      COALESCE(s.numero_insee_provisoire,i.numero_insee_provisoire,0)                        numero_insee_provisoire,
      COALESCE(s.numero_PEC,'')                                                              numero_pec,
      CASE WHEN i.sync_pec = 0 THEN i.numero_pec ELSE s.numero_pec END                       nunmero_pec,
      s.iban                                                                                 s_iban,
      s.bic                                                                                  s_bic,
      s.rib_hors_sepa                                                                        s_rib_hors_sepa,
@@ -276,6 +276,7 @@ FROM (
      CASE WHEN ssi.type_intervenant_id = isi.type_intervenant_id THEN 1 ELSE 0 END          types_identiques,
      COALESCE(i.sync_statut,1)                                                              sync_statut,
      COALESCE(i.sync_utilisateur_code,1)                                                    sync_utilisateur_code,
      COALESCE(i.sync_pec,1)                                                                 sync_pec,
      CASE WHEN COALESCE(isrc.importable,1) = 1 THEN 0 ELSE 1 END                            intervenant_local,
      CASE WHEN idata.intervenant_id IS NULL THEN 0 ELSE 1 END                               intervenant_donnees,
      CASE WHEN i.histo_destruction IS NULL THEN 0 ELSE 1 END                                intervenant_histo,
+31 −12
Original line number Diff line number Diff line
@@ -211,6 +211,11 @@ class Intervenant implements HistoriqueAwareInterface, ResourceInterface, Import
     */
    protected $syncStructure = true;

    /**
     * @var bool
     */
    protected $syncPec = true;

    /**
     * @var bool
     */
@@ -317,17 +322,6 @@ class Intervenant implements HistoriqueAwareInterface, ResourceInterface, Import




    /**
     * @return int|null
     */
    public function getId(): ?int
    {
        return $this->id;
    }



    /**
     * Constructor
     */
@@ -349,6 +343,16 @@ class Intervenant implements HistoriqueAwareInterface, ResourceInterface, Import



    /**
     * @return int|null
     */
    public function getId (): ?int
    {
        return $this->id;
    }



    /**
     * Retourne la représentation littérale de cet objet.
     *
@@ -1171,6 +1175,22 @@ class Intervenant implements HistoriqueAwareInterface, ResourceInterface, Import



    public function isSyncPec (): bool
    {
        return $this->syncPec;
    }



    public function setSyncPec (bool $syncPec): self
    {
        $this->syncPec = $syncPec;

        return $this;
    }



    /**
     * @return bool
     */
@@ -1674,7 +1694,6 @@ class Intervenant implements HistoriqueAwareInterface, ResourceInterface, Import




    /**
     * Get validation
     *
+1 −0
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@
        <field name="sourceCode" type="string" column="SOURCE_CODE" length="100" nullable="true"/>
        <field name="syncStatut" type="boolean" column="SYNC_STATUT" nullable="false"/>
        <field name="syncStructure" type="boolean" column="SYNC_STRUCTURE" nullable="false"/>
        <field name="syncPec" type="boolean" column="SYNC_PEC" nullable="false"/>
        <field name="syncUtilisateurCode" type="boolean" column="SYNC_UTILISATEUR_CODE" nullable="false"/>
        <field name="irrecevable" type="boolean" column="IRRECEVABLE" nullable="true"/>
        <field name="numeroPec" type="string" column="NUMERO_PEC" length="255" nullable="true"/>
+2 −2
Original line number Diff line number Diff line
@@ -463,7 +463,7 @@ class EditionForm extends AbstractForm

    public function activerEditionAvancee ()
    {
        $elements = ['source', 'code'];
        $elements = ['source', 'code', 'numeroPec', 'numeroInsee'];
        foreach ($this->getElements() as $element) {
            if (in_array($element->getName(), $elements)) {

@@ -487,7 +487,7 @@ class EditionForm extends AbstractForm
                $element->setAttribute('disabled', true);
            }
        } else {
            $noImport = ['syncStatut', 'syncStructure', 'statut', 'structure', 'intervenant-edition-login', 'intervenant-edition-password', 'numeroInsee', 'numeroPec'];
            $noImport = ['syncStatut', 'syncStructure', 'syncPec', 'statut', 'structure', 'intervenant-edition-login', 'intervenant-edition-password'];
            if ($object->getAnnee()->getId() < $this->getServiceContext()->getAnneeImport()->getId()) {
                $noImport[] = 'grade';
            }
Loading