src/Evo/Infrastructure/MappingORM/Organization.php line 128

Open in your IDE?
  1. <?php
  2. namespace Evo\Infrastructure\MappingORM;
  3. use ApiPlatform\Core\Annotation\ApiFilter;
  4. use ApiPlatform\Core\Annotation\ApiResource;
  5. use ApiPlatform\Core\Annotation\ApiSubresource;
  6. use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\BooleanFilter;
  7. use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\DateFilter;
  8. use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\OrderFilter;
  9. use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
  10. use ApiPlatform\Core\Serializer\Filter\GroupFilter;
  11. use ApiPlatform\Core\Serializer\Filter\PropertyFilter;
  12. use App\DTO\ClientBaseExport;
  13. use App\Enum\DocumentStatusEnum;
  14. use App\Enum\DocumentTypeOrganizationEnum;
  15. use App\Enum\LegalRepresentativeQualityTypeEnum;
  16. use App\Enum\OrganizationStatusEnum;
  17. use App\Enum\OrganizationStatusPayedEnum;
  18. use App\Enum\PersonTypeEnum;
  19. use App\Enum\ProductKeyEnum;
  20. use App\Enum\VATRateEnum;
  21. use App\Service\SubscriptionUtils;
  22. use Doctrine\Common\Collections\ArrayCollection;
  23. use Doctrine\Common\Collections\Collection;
  24. use Doctrine\Common\Collections\Criteria;
  25. use Doctrine\ORM\Mapping as ORM;
  26. use Doctrine\ORM\PersistentCollection;
  27. use Symfony\Component\Serializer\Annotation\Groups;
  28. use Symfony\Component\Serializer\Annotation\MaxDepth;
  29. use Symfony\Component\Validator\Constraints as Assert;
  30. /**
  31.  * @ApiResource(
  32.  *     mercure={"normalization_context"={"groups"="admin_orga_list"}},
  33.  *     attributes={
  34.  *         "normalization_context"={"groups"={"read_organization"}, "enable_max_depth"=true},
  35.  *         "denormalization_context"={"groups"={"write_organization"}}
  36.  *     },
  37.  *     collectionOperations={
  38.  *         "get",
  39.  *         "post",
  40.  *         "validation_kyc"={
  41.  *             "method"="GET",
  42.  *             "path"="/{status}/validationkyc/document",
  43.  *             "security"="is_granted('ROLE_ADMIN')"
  44.  *         },
  45.  *         "validation_kyc_postal_power"={
  46.  *              "method"="GET",
  47.  *              "path"="/validationkyc/postalpower",
  48.  *              "security"="is_granted('ROLE_ADMIN')"
  49.  *          },
  50.  *          "validation_kyc_kbis"={
  51.  *              "method"="GET",
  52.  *              "path"="/validationkyc/kbis",
  53.  *              "security"="is_granted('ROLE_ADMIN')"
  54.  *          },
  55.  *          "impaye"={
  56.  *              "method"="GET",
  57.  *              "path"="/organizations/impaye",
  58.  *              "security"="is_granted('ROLE_ADMIN')"
  59.  *          },
  60.  *          "impaye_export"={
  61.  *              "method"="GET",
  62.  *              "path"="/organizations/impaye/export",
  63.  *              "formats"={"csv"={"text/csv"}},
  64.  *              "pagination_enabled"=false,
  65.  *              "security"="is_granted('ROLE_ADMIN')"
  66.  *          },
  67.  *          "global_search"={
  68.  *              "method"="GET",
  69.  *              "path"="/organizations/search",
  70.  *              "normalization_context"={"groups"={"admin_orga_list"}, "enable_max_depth"=true},
  71.  *              "security"="is_granted('ROLE_ADMIN')"
  72.  *          },
  73.  *          "client_base_export"={
  74.  *              "method"="GET",
  75.  *              "path"="/clients/export",
  76.  *              "formats"={"csv"={"text/csv"}},
  77.  *              "pagination_enabled"=false,
  78.  *              "output"=ClientBaseExport::class,
  79.  *              "normalization_context"={"groups"={"client-base-export"}},
  80.  *              "security"="is_granted('ROLE_SUPER_ADMIN')"
  81.  *          },
  82.  *          "ibml_organization_list"={
  83.  *              "method"="GET",
  84.  *              "path"="/show/all/organization-ibml",
  85.  *              "security"="is_granted('ROLE_ADMIN')"
  86.  *          },
  87.  *          "comparison_kyc"={
  88.  *              "method"="GET",
  89.  *              "path"="/comparisonkyc/{id}",
  90.  *              "security"="is_granted('ROLE_ADMIN')",
  91.  *              "paginationEnabled"=false
  92.  *          }
  93.  *     },
  94.  *     itemOperations={
  95.  *          "get",
  96.  *          "put",
  97.  *     }
  98.  * )
  99.  * @ApiFilter(
  100.  *     SearchFilter::class,
  101.  *     properties={
  102.  *              "id":"exact",
  103.  *              "users.lastname":"partial",
  104.  *              "users.firstname":"partial",
  105.  *              "users.email":"partial",
  106.  *              "users.phoneNumber":"partial",
  107.  *              "legalName": "partial",
  108.  *              "invoiceToken": "exact",
  109.  *              "SIRET": "start",
  110.  *              "bal": "exact",
  111.  *              "status": "exact",
  112.  *              "store.id": "exact",
  113.  *              "statusInvoicePayed":"exact",
  114.  *              "legalRepresentatives.person.familyName": "partial",
  115.  *              "legalRepresentatives.person.givenName": "partial"
  116.  *              }
  117.  *     )
  118.  * @ApiFilter(PropertyFilter::class)
  119.  * @ApiFilter(OrderFilter::class, arguments={"orderParameterName"="order"})
  120.  * @ApiFilter(GroupFilter::class, arguments={"parameterName": "groups", "overrideDefaultGroups": true})
  121.  * @ApiFilter(BooleanFilter::class, properties={"isNewImmatriculation"})
  122.  * @ApiFilter(DateFilter::class, properties={"createdAt"})
  123.  * @ORM\Entity(repositoryClass="App\Repository\OrganizationRepository")
  124.  */
  125. class Organization
  126. {
  127.     /**
  128.      * @Groups({
  129.      *      "admin_orga_list",
  130.      *      "admin:orga:select",
  131.      *      "read_organization",
  132.      *      "read_letter_forward",
  133.      *      "read_search",
  134.      *      "read_document",
  135.      *      "admin:doc:list",
  136.      *      "read_invoice",
  137.      *      "admin:invoice:read",
  138.      *      "admin:read:letter",
  139.      *      "read_quote",
  140.      *      "admin:quote:read",
  141.      *      "read_user",
  142.      *      "write_user",
  143.      *     "read_credit_note",
  144.      *     "admin:cn:read",
  145.      *     "read:activity",
  146.      *     "admin:user:read",
  147.      *     "read_potential_case",
  148.      *     "read_letter",
  149.      *     "read_comparisonkyc",
  150.      *     "pappers_activity",
  151.      *     "pappers_activity_list"
  152.      * })
  153.      * @ORM\Id()
  154.      * @ORM\GeneratedValue()
  155.      * @ORM\Column(type="integer")
  156.      */
  157.     private ?int $id null;
  158.     /**
  159.      * @Groups({"admin_orga_list", "read_organization", "write_organization"})
  160.      * @ORM\ManyToMany(targetEntity="User", inversedBy="organizations", cascade={"persist"})
  161.      * @ORM\JoinColumn(nullable=false)
  162.      */
  163.     private ?Collection $users;
  164.     /**
  165.      * @Groups({"read_organization", "write_organization"})
  166.      * @MaxDepth(1)
  167.      * @ORM\ManyToMany(targetEntity="Evo\Infrastructure\MappingORM\Associate", inversedBy="organizations", cascade={"persist"})
  168.      */
  169.     private ?Collection $associates;
  170.     // Ne pas ajouter "read_organization" : problématique de performances
  171.     /**
  172.      * @Groups({"write_organization", "read_search", "read_export_organization", "admin_orga_list", "pappers_activity"})
  173.      * @ORM\ManyToMany(targetEntity="Evo\Infrastructure\MappingORM\LegalRepresentative", inversedBy="organizations", cascade={"persist"})
  174.      * @MaxDepth(1)
  175.      * @ORM\JoinColumn(nullable=false)
  176.      */
  177.     private ?Collection $legalRepresentatives;
  178.     /**
  179.      * @Groups({"read_organization", "write_organization"})
  180.      * @MaxDepth(1)
  181.      * @ORM\ManyToMany(targetEntity="Evo\Infrastructure\MappingORM\Auditor", inversedBy="organizations", cascade={"persist"})
  182.      * @ORM\JoinColumn(nullable=false)
  183.      */
  184.     private ?Collection $auditors;
  185.     // Ne pas ajouter "read_organization" : problématique de performances
  186.     /**
  187.      * @Groups({"write_organization"})
  188.      * @ORM\OneToMany(targetEntity="Evo\Infrastructure\MappingORM\Document", mappedBy="organization", cascade={"persist"})
  189.      * @ORM\JoinColumn(nullable=false)
  190.      */
  191.     private Collection $documents;
  192.     /**
  193.      * @Groups({"read_organization", "write_organization", "read_search"})
  194.      * @MaxDepth(1)
  195.      * @ORM\OneToOne(targetEntity="Evo\Infrastructure\MappingORM\PostalAddress", cascade={"persist"})
  196.      */
  197.     private ?PostalAddress $address null;
  198.     /**
  199.      * @Groups({
  200.      *     "admin_orga_list",
  201.      *     "admin:orga:select",
  202.      *     "read_organization",
  203.      *     "write_organization",
  204.      *     "read_search",
  205.      *     "read_lead",
  206.      *     "read_export_organization",
  207.      *     "read_document",
  208.      *     "admin:doc:list",
  209.      *     "admin:read:letter",
  210.      *     "read_invoice",
  211.      *     "admin:invoice:read",
  212.      *     "read_quote",
  213.      *     "admin:quote:read",
  214.      *     "read_credit_note",
  215.      *     "admin:cn:read",
  216.      *     "admin:user:read",
  217.      *     "read_potential_case",
  218.      *     "read_zappier_letter",
  219.      *     "read_zappier_invoice",
  220.      *     "read_letter",
  221.      *     "read_comparisonkyc",
  222.      *     "read_letter_forward",
  223.      *     "read:activity",
  224.      *     "pappers_activity",
  225.      *     "pappers_activity_list"
  226.      * })
  227.      * @ORM\Column(type="string", length=150, nullable=true)
  228.      */
  229.     private $legalName;
  230.     /**
  231.      * @Groups({"read_organization", "write_organization", "read_search"})
  232.      * @ORM\Column(type="string", length=150, nullable=true)
  233.      */
  234.     private $telephone;
  235.     /**
  236.      * @Groups({"read_organization", "write_organization"})
  237.      * @ORM\Column(type="string", length=150, nullable=true)
  238.      */
  239.     private $vatID;
  240.     /**
  241.      * @Assert\Choice(callback={"App\Enum\LegalStatusTypeEnum", "getChoices"})
  242.      * @Groups({"read_organization", "write_organization", "read_search", "read_document", "admin:doc:list", "admin_orga_list", "pappers_activity"})
  243.      * @ORM\Column(type="string", length=150, nullable=true)
  244.      */
  245.     private ?string $legalStatus null;
  246.     /**
  247.      * @Groups({"read_organization", "write_organization"})
  248.      * @ORM\Column(type="text", nullable=true)
  249.      */
  250.     private $purpose;
  251.     /**
  252.      * @Groups({"read_organization", "write_organization"})
  253.      * @ORM\Column(type="datetime", nullable=true)
  254.      */
  255.     private ?\DateTimeInterface $foundingDate null;
  256.     /**
  257.      * @Groups({"read_organization", "write_organization"})
  258.      * @ORM\Column(type="datetime", nullable=true)
  259.      */
  260.     private ?\DateTimeInterface $fiscalDate null;
  261.     /**
  262.      * @Groups({"read_organization", "write_organization"})
  263.      * @ORM\Column(type="datetime", nullable=true)
  264.      */
  265.     private ?\DateTimeInterface $fiscalDateEnd null;
  266.     /**
  267.      * @Groups({"read_organization", "write_organization"})
  268.      * @ORM\Column(type="datetime", nullable=true)
  269.      */
  270.     private ?\DateTimeInterface $firstFiscalDate null;
  271.     /**
  272.      * @Groups({"read_organization", "write_organization"})
  273.      * @ORM\Column(type="datetime", nullable=true)
  274.      */
  275.     private ?\DateTimeInterface $firstFiscalDateEnd null;
  276.     /**
  277.      * @Groups({"read_organization", "write_organization", "read_search", "admin_orga_list", "read:activity", "pappers_activity"})
  278.      * @ORM\Column(type="string", length=150, nullable=true)
  279.      */
  280.     private $headQuartersAddressType;
  281.     /**
  282.      * @Groups({"read_organization", "write_organization"})
  283.      * @ORM\Column(type="string", length=150, nullable=true)
  284.      */
  285.     private $legalRepresentativeAddressType;
  286.     /**
  287.      * @Groups({"read_organization", "write_organization"})
  288.      * @ORM\Column(type="float", nullable=true)
  289.      */
  290.     private ?float $shareCapital null;
  291.     /**
  292.      * @Groups({"read_organization", "write_organization"})
  293.      * @ORM\Column(type="string", length=150, nullable=true)
  294.      */
  295.     private $shareCapitalType;
  296.     /**
  297.      * @Groups({"read_organization", "write_organization"})
  298.      * @ORM\Column(type="float", nullable=true)
  299.      */
  300.     private ?float $shareCapitalFixedAmount null;
  301.     /**
  302.      * @Groups({"read_organization", "write_organization"})
  303.      * @ORM\Column(type="integer", nullable=true)
  304.      */
  305.     private ?int $sharesCount null;
  306.     /**
  307.      * @Groups({"read_organization", "write_organization"})
  308.      * @ORM\Column(type="string", length=255, nullable=true)
  309.      */
  310.     private ?string $bankChoice null;
  311.     /**
  312.      * @Groups({"read_organization", "write_organization"})
  313.      * @ORM\Column(type="string", length=255, nullable=true)
  314.      */
  315.     private ?string $registrationSource null;
  316.     /**
  317.      * @Groups({"read_organization", "write_organization"})
  318.      * @ORM\Column(type="string", length=255, nullable=true)
  319.      */
  320.     private ?string $commercialCourtRegistry null;
  321.     /**
  322.      * @Groups({"read_organization", "write_organization"})
  323.      * @ORM\ManyToOne(targetEntity="Evo\Infrastructure\MappingORM\Accountant", inversedBy="organizations", cascade={"persist"})
  324.      */
  325.     private ?Accountant $accountant null;
  326.     /**
  327.      * @Groups({"write_organization"})
  328.      * @ORM\OneToMany(targetEntity="Evo\Infrastructure\MappingORM\Letter", mappedBy="organization")
  329.      */
  330.     private ?Collection $letters;
  331.     /**
  332.      * @Groups({"read_organization", "write_organization"})
  333.      * @ORM\ManyToOne(targetEntity="Evo\Infrastructure\MappingORM\OrganizationSector", inversedBy="organizations")
  334.      */
  335.     private ?OrganizationSector $sector null;
  336.     /**
  337.      * @Groups({"read_organization", "write_organization"})
  338.      * @ORM\Column(type="string", length=255, nullable=true)
  339.      */
  340.     private ?string $sectorOther null;
  341.     /**
  342.      * @Groups({"read_organization", "write_organization"})
  343.      * @ORM\Column(type="string", length=255, nullable=true)
  344.      */
  345.     private ?string $RCS null;
  346.     /**
  347.      * @Groups({"admin_orga_list", "read_organization", "write_organization", "read_search", "read_lead", "read_document", "admin:doc:list", "admin:orga:select", "admin:user:read"})
  348.      * @ORM\Column(type="string", length=255, nullable=true)
  349.      */
  350.     private ?string $status null;
  351.     /**
  352.      * @Groups({"read_organization", "write_organization", "read_search", "read:activity", "pappers_activity", "pappers_activity_list"})
  353.      * @ORM\Column(type="string", length=255, nullable=true)
  354.      * @Assert\Email
  355.      */
  356.     private ?string $email null;
  357.     /**
  358.      * @Groups({"read_organization", "write_organization", "read_search", "admin:orga:select", "admin_orga_list"})
  359.      * @ORM\ManyToOne(targetEntity="Evo\Infrastructure\MappingORM\Store", inversedBy="organizations")
  360.      */
  361.     private ?Store $store null;
  362.     /**
  363.      * @Groups({"read_organization", "write_organization"})
  364.      * @ORM\Column(type="string", nullable=true)
  365.      */
  366.     private ?string $mandatary null;
  367.     /**
  368.      * @Groups({
  369.      *     "admin_orga_list",
  370.      *     "read_organization",
  371.      *     "write_organization",
  372.      *     "read_search",
  373.      *     "read_export_organization",
  374.      *     "admin:read:letter"
  375.      * })
  376.      * @ORM\Column(type="string", nullable=true)
  377.      */
  378.     private ?string $bal null;
  379.     /**
  380.      * @Groups({"read_organization", "write_organization", "read_search"})
  381.      * @ORM\Column(type="string", nullable=true)
  382.      */
  383.     private ?string $forwardingFrequency null;
  384.     /**
  385.      * @Groups({"read_organization", "write_organization", "read_search"})
  386.      * @MaxDepth(1)
  387.      * @ORM\OneToOne(targetEntity="Evo\Infrastructure\MappingORM\PostalAddress", cascade={"persist"})
  388.      */
  389.     private ?PostalAddress $forwardingAddress null;
  390.     /**
  391.      * @Groups({"read_organization", "write_organization"})
  392.      * @ORM\Column(type="string", length=255, nullable=true)
  393.      */
  394.     private ?string $forwardingAddressName null;
  395.     /**
  396.      * @Groups({"read_organization", "write_organization", "read_search", "read_export_organization", "pappers_activity"})
  397.      * @ORM\Column(type="string", nullable=true)
  398.      */
  399.     private $alternateName;
  400.     /**
  401.      * @Groups({"read_organization", "write_organization", "read_search"})
  402.      * @ORM\Column(type="datetime", nullable=true)
  403.      */
  404.     private ?\DateTimeInterface $domiciliationStartDate null;
  405.     /**
  406.      * @Groups({"read_organization", "admin_orga_list", "read_potential_case"})
  407.      * @ORM\Column(name="created_at", type="datetime", nullable=true)
  408.      */
  409.     private $createdAt;
  410.     /**
  411.      * @MaxDepth(1)
  412.      * @ORM\OneToMany(targetEntity="Evo\Infrastructure\MappingORM\LetterForward", mappedBy="organization", cascade={"persist"})
  413.      * @ORM\JoinColumn(nullable=true)
  414.      */
  415.     private ?Collection $forwardedLetters;
  416.     /**
  417.      * @Groups({"read_organization", "write_organization"})
  418.      * @ORM\Column(type="datetime", nullable=true)
  419.      */
  420.     private ?\DateTimeInterface $terminationDate null;
  421.     /**
  422.      * @Groups({"read_organization", "write_organization"})
  423.      * @ORM\Column(type="string", length=255, nullable=true)
  424.      */
  425.     private ?string $terminationReason null;
  426.     /**
  427.      * @Groups({"read_organization", "write_organization"})
  428.      * @ORM\Column(type="string", length=255, nullable=true)
  429.      */
  430.     private ?string $terminationReasonOther null;
  431.     /**
  432.      * @Groups({"read_organization", "write_organization", "read_search"})
  433.      * @ORM\OneToMany(targetEntity="Evo\Infrastructure\MappingORM\Mandatary", mappedBy="organization", cascade={"persist"})
  434.      */
  435.     private ?Collection $mandataries;
  436.     /**
  437.      * @Groups({"read_organization", "write_organization", "read_potential_case"})
  438.      * @ORM\ManyToOne(targetEntity="Evo\Infrastructure\MappingORM\Organization", inversedBy="organizationsPrescribed")
  439.      */
  440.     private $prescriber;
  441.     /**
  442.      * @Groups({"read_organization", "write_organization"})
  443.      * @ORM\OneToMany(targetEntity="Evo\Infrastructure\MappingORM\Organization", mappedBy="prescriber")
  444.      */
  445.     private ?Collection $organizationsPrescribed;
  446.     /**
  447.      * @Groups({"write_organization"})
  448.      * @ORM\OneToMany(targetEntity="Evo\Infrastructure\MappingORM\Invoice", mappedBy="organization")
  449.      */
  450.     private ?Collection $invoices;
  451.     /**
  452.      * @Groups({"write_organization"})
  453.      * @ORM\OneToMany(targetEntity="Evo\Infrastructure\MappingORM\Quote", mappedBy="organization")
  454.      */
  455.     private ?Collection $quotes;
  456.     /**
  457.      * @Groups({"read_organization", "write_organization", "admin_orga_list"})
  458.      * @ORM\Column(type="string", length=255, nullable=true)
  459.      */
  460.     private ?string $SIRET null;
  461.     /**
  462.      * @Groups({
  463.      *     "read_organization",
  464.      *      "write_organization",
  465.      *      "read_search",
  466.      *      "read_lead",
  467.      *      "admin_orga_list"
  468.      * })
  469.      * @ORM\Column(type="boolean")
  470.      */
  471.     private $isNewImmatriculation 0;
  472.     /**
  473.      * @Groups({"read_organization", "write_organization", "read_lead"})
  474.      * @ORM\Column(type="boolean")
  475.      */
  476.     private $isNewDomiciliation 0;
  477.     /**
  478.      * @Groups({"read_organization", "write_organization"})
  479.      * @ORM\OneToMany(targetEntity="Evo\Infrastructure\MappingORM\Order", mappedBy="organization", cascade={"persist"})
  480.      */
  481.     private ?Collection $orders;
  482.     /**
  483.      * @Groups({"read_organization", "write_organization", "admin:invoice:read"})
  484.      * @ORM\Column(type="string", length=255, nullable=true)
  485.      */
  486.     private ?string $mandatID null;
  487.     /**
  488.      * @ORM\OneToMany(targetEntity="Evo\Infrastructure\MappingORM\DocumentHistory", mappedBy="organization")
  489.      */
  490.     private ?Collection $documentHistories;
  491.     /**
  492.      * @Assert\Choice(callback={"App\Enum\OrganizationConversionReasonEnum", "getChoices"})
  493.      * @Groups({"read_organization", "write_organization"})
  494.      * @ORM\Column(type="string", length=255, nullable=true)
  495.      */
  496.     private ?string $conversionReason null;
  497.     /**
  498.      * @Groups({"read_organization", "write_organization"})
  499.      * @ORM\Column(type="boolean")
  500.      */
  501.     private $statusIsForced 0;
  502.     /**
  503.      * @Groups({"read_organization", "write_organization"})
  504.      * @ORM\Column(type="string", length=255, nullable=true)
  505.      */
  506.     private ?string $uniqId null;
  507.     /**
  508.      * @Groups({"read_organization", "write_organization"})
  509.      * @ORM\Column(type="string", length=255, nullable=true)
  510.      */
  511.     private ?string $iban null;
  512.     /**
  513.      * @Groups({"read_organization", "write_organization"})
  514.      * @ORM\Column(type="string", length=255, nullable=true)
  515.      */
  516.     private ?string $referenceGocardless null;
  517.     /**
  518.      * @Groups({"read_organization", "write_organization"})
  519.      * @ORM\Column(type="boolean")
  520.      */
  521.     private $isForwardingActive 1;
  522.     /**
  523.      * @Groups({"read_organization", "write_organization"})
  524.      * @ORM\Column(type="string", length=255)
  525.      */
  526.     private ?string $VATRate VATRateEnum::VAT_20;
  527.     /**
  528.      * @Groups({"read_organization", "write_organization"})
  529.      * @ORM\Column(type="boolean", nullable=true)
  530.      */
  531.     private $isImported;
  532.     /**
  533.      * @Groups({"read_organization", "write_organization"})
  534.      * @ORM\Column(type="float")
  535.      */
  536.     private $creditNotesAmount 0;
  537.     /**
  538.      * @ORM\OneToMany(targetEntity="Evo\Infrastructure\MappingORM\CreditNote", mappedBy="organization")
  539.      */
  540.     private ?Collection $creditNotes;
  541.     /**
  542.      * @ORM\Column(type="float", nullable=true)
  543.      */
  544.     private ?float $availableCredits null;
  545.     /**
  546.      * @Groups({"read_organization"})
  547.      * @ORM\Column(type="string", length=255, nullable=true, unique=true)
  548.      */
  549.     private ?string $invoiceToken null;
  550.     /**
  551.      * @Groups({"read_organization", "write_organization", "read_notification_preference", "write_notification_preference"})
  552.      * @ORM\OneToOne(targetEntity="Evo\Infrastructure\MappingORM\NotificationPreference", inversedBy="organization", cascade={"persist", "remove"})
  553.      */
  554.     private ?NotificationPreference $notificationPreference null;
  555.     /**
  556.      * @Groups({"read_organization", "write_organization"})
  557.      * @ORM\Column(type="string", length=255, nullable=true)
  558.      */
  559.     private ?string $shareCapitalFreePercentage null;
  560.     /**
  561.      * @Groups({"read_organization", "write_organization",  "admin_orga_list", "read_potential_case"})
  562.      * @ORM\Column(type="boolean")
  563.      */
  564.     private $isPrescriber false;
  565.     /**
  566.      * @Groups({"read_organization", "write_organization"})
  567.      * @ORM\Column(type="boolean", nullable=true)
  568.      */
  569.     private $haveAccountant;
  570.     /**
  571.      * @Groups({"read_organization", "write_organization", "read_discount", "write_discount"})
  572.      * @ORM\ManyToOne(targetEntity="Evo\Infrastructure\MappingORM\DiscountCode", inversedBy="organizations")
  573.      */
  574.     private ?DiscountCode $discountCode null;
  575.     /**
  576.      * @Groups({"read_organization", "write_organization", "write_lead"})
  577.      * @ORM\OneToOne(targetEntity="Evo\Infrastructure\MappingORM\Lead", mappedBy="organization", cascade={"persist", "remove"})
  578.      */
  579.     private ?Lead $lead null;
  580.     /**
  581.      * @Groups({"read_organization", "write_organization", "read_search", "read_lead"})
  582.      * @ORM\Column(type="string", length=255, nullable=true)
  583.      */
  584.     private ?string $statusImmatriculation null;
  585.     /**
  586.      * @Groups({"read_organization", "write_organization"})
  587.      * @ORM\ManyToOne(targetEntity="Evo\Infrastructure\MappingORM\PrescriberSource", inversedBy="organization")
  588.      */
  589.     private ?PrescriberSource $prescriberSource null;
  590.     /**
  591.      * @Groups({"read_organization", "write_organization"})
  592.      * @ORM\Column(type="boolean", nullable=true)
  593.      */
  594.     private $isExemptTVA false;
  595.     /**
  596.      * @Groups({"read_organization", "write_organization", "read_search"})
  597.      * @ORM\Column(type="string", length=255, nullable=true)
  598.      */
  599.     private ?string $projectStage null;
  600.     /**
  601.      * @Groups({"admin_orga_list", "read_organization", "write_organization"})
  602.      * @ORM\Column(type="string")
  603.      */
  604.     private ?string $statusInvoicePayed OrganizationStatusPayedEnum::NO_INVOICES;
  605.     /**
  606.      * @Groups({"read_organization", "write_organization"})
  607.      * @ORM\Column(type="datetime", nullable=true)
  608.      */
  609.     private ?\DateTimeInterface $dateMaxUnpaid null;
  610.     /**
  611.      * @Groups({"read_organization", "write_organization"})
  612.      * @ORM\Column(type="boolean", nullable=true)
  613.      */
  614.     private $isHaveAuditor false;
  615.     /**
  616.      * @Groups({"read_organization", "write_organization"})
  617.      * @ORM\Column(type="string", length=100, nullable=true)
  618.      */
  619.     private ?string $benefitImposition null;
  620.     /**
  621.      * @Groups({"read_organization", "write_organization"})
  622.      * @ORM\Column(type="string", length=255, nullable=true)
  623.      */
  624.     private ?string $benefitImpositionOption null;
  625.     /**
  626.      * @Groups({"read_organization", "write_organization"})
  627.      * @ORM\Column(type="string", length=255, nullable=true)
  628.      */
  629.     private ?string $vatTaxeRegim null;
  630.     /**
  631.      * @Groups({"read_organization", "write_organization"})
  632.      * @ORM\Column(type="string", length=255, nullable=true)
  633.      */
  634.     private ?string $vatTaxeRegimeOption null;
  635.     /**
  636.      * @Groups({"read_organization", "write_organization"})
  637.      * @ORM\Column(type="datetime", nullable=true)
  638.      */
  639.     private ?\DateTimeInterface $prolongationDateKYC null;
  640.     /**
  641.      * @Groups({"read_organization", "write_organization"})
  642.      * @ORM\ManyToOne(targetEntity="Evo\Infrastructure\MappingORM\ReasonUnpaid", inversedBy="organizations")
  643.      */
  644.     private ?ReasonUnpaid $reasonUnpaid null;
  645.     /**
  646.      * @Groups({"read_organization", "write_organization"})
  647.      * @ORM\ManyToOne(targetEntity="Evo\Infrastructure\MappingORM\ReasonRIBInactive", inversedBy="organizations")
  648.      */
  649.     private ?ReasonRIBInactive $reasonRIBInactive null;
  650.     /**
  651.      * @Groups({"read_organization", "write_organization"})
  652.      * @ORM\Column(type="string", length=255, nullable=true)
  653.      */
  654.     private ?string $statusTransfert null;
  655.     /**
  656.      * @Groups({"read_organization", "write_organization"})
  657.      * @ORM\Column(type="boolean", nullable=true)
  658.      */
  659.     private $isNewTransfert 0;
  660.     /**
  661.      * @Groups({"read_organization", "write_organization", "read_search"})
  662.      * @ORM\Column(type="string", length=255, nullable=true)
  663.      */
  664.     private ?string $specialRequestBal null;
  665.     /**
  666.      * @Groups({"read_organization", "write_organization"})
  667.      * @ORM\Column(type="string", length=100, nullable=true)
  668.      */
  669.     private $tracFin;
  670.     /**
  671.      * @Groups({"read_organization", "write_organization"})
  672.      * @ORM\Column(type="text", nullable=true)
  673.      */
  674.     private ?string $tracFinNote null;
  675.     /**
  676.      * @Groups({"read_organization", "write_organization"})
  677.      * @ORM\Column(type="string", length=255, nullable=true)
  678.      */
  679.     private $packImat;
  680.     /**
  681.      * @Groups({"read_organization", "write_organization"})
  682.      * @ORM\Column(type="boolean", nullable=true)
  683.      */
  684.     private $isAuthorizePrescriber 0;
  685.     /**
  686.      * @Groups({"read_organization", "write_organization"})
  687.      * @ORM\Column(type="boolean", nullable=true)
  688.      */
  689.     private $isAttachedToPrescriber;
  690.     /**
  691.      * @ORM\Column(type="boolean", nullable=true)
  692.      */
  693.     private $isEmptybal;
  694.     /**
  695.      * @Groups({"read_organization", "write_organization"})
  696.      * @ORM\Column(type="boolean", nullable=true, options={"default" : true})
  697.      */
  698.     private $isAuthorizedDebit true;
  699.     /**
  700.      * @Groups({"read_organization", "write_organization"})
  701.      * @ORM\Column(type="string", length=255, nullable=true)
  702.      */
  703.     private ?string $historyNavTunnel null;
  704.     /**
  705.      * @ORM\OneToMany(targetEntity=ActivityLog::class, mappedBy="organization")
  706.      */
  707.     private ?Collection $activityLogs;
  708.     /**
  709.      * @ApiSubresource()
  710.      * @Groups({"read_organization", "write_organization", "admin_orga_list"})
  711.      * @ORM\OneToMany(targetEntity=Subscription::class, mappedBy="organization", cascade={"persist"})
  712.      */
  713.     private Collection $subscriptions;
  714.     /**
  715.      * @Groups({"read_organization", "write_organization"})
  716.      * @ORM\Column(type="text", nullable=true)
  717.      */
  718.     private ?string $note null;
  719.     /**
  720.      * @Groups({"read_organization", "write_organization"})
  721.      * @ORM\Column(type="text", nullable=true)
  722.      */
  723.     private ?string $reasonChange null;
  724.     /**
  725.      * @ORM\Column(type="string", length=255, nullable=true)
  726.      */
  727.     private ?string $previousPack null;
  728.     /**
  729.      * @ORM\Column(type="array", nullable=true)
  730.      */
  731.     private $zapierHookUrl = [];
  732.     /**
  733.      * @Groups({"read_organization", "write_organization"})
  734.      * @ORM\Column(type="string", length=255, nullable=true)
  735.      */
  736.     private ?string $sigle null;
  737.     /**
  738.      * @Groups({"read_organization", "write_organization"})
  739.      * @ORM\Column(type="string", length=255, nullable=true)
  740.      */
  741.     private ?string $enseigne null;
  742.     /**
  743.      * @Groups({"read_organization", "write_organization"})
  744.      * @ORM\Column(type="text", nullable=true)
  745.      */
  746.     private ?string $corporateObject null;
  747.     /**
  748.      * @Groups({"read_organization", "write_organization"})
  749.      * @ORM\Column(type="string", length=255, nullable=true)
  750.      */
  751.     private ?string $placeKnowDigidom null;
  752.     /**
  753.      * @Groups({"read_organization", "write_organization"})
  754.      * @ORM\Column(type="string", length=255, nullable=true)
  755.      */
  756.     private ?string $otherPlaceKnownDigidom null;
  757.     /**
  758.      * @Groups({"read_organization", "write_organization"})
  759.      * @ORM\Column(type="string", length=255, nullable=true)
  760.      */
  761.     private ?string $bankName null;
  762.     /**
  763.      * @Groups({"read_organization", "write_organization"})
  764.      * @ORM\Column(type="string", length=255, nullable=true)
  765.      */
  766.     private ?string $titulaire null;
  767.     /**
  768.      * @Groups({"read_organization", "write_organization"})
  769.      * @ORM\Column(type="boolean", nullable=true, options={"default" : false})
  770.      */
  771.     private $isInvalidEmail false;
  772.     /**
  773.      * @Groups({"read_organization", "write_organization"})
  774.      * @ORM\Column(type="boolean", nullable=true, options={"default" : false})
  775.      */
  776.     private $isInvalidPhoneNumber false;
  777.     /**
  778.      * @Groups({"read_organization", "write_organization"})
  779.      * @ORM\Column(type="string", length=255, nullable=true)
  780.      */
  781.     private ?string $specialCustomerType null;
  782.     /**
  783.      * @ORM\OneToOne(targetEntity=IbmlOrganizationConfiguration::class, mappedBy="organization", cascade={"persist", "remove"})
  784.      */
  785.     private ?IbmlOrganizationConfiguration $ibmlOrganizationConfiguration null;
  786.     /**
  787.      * @ORM\ManyToMany(targetEntity="Evo\Infrastructure\MappingORM\PotentialCase", mappedBy="organizations")
  788.      */
  789.     private ?Collection $potentialCases;
  790.     /**
  791.      * @ORM\OneToMany(targetEntity=CommercialGesture::class, mappedBy="organization")
  792.      */
  793.     private ?Collection $commercialGestures;
  794.     /**
  795.      * @Groups({"admin_orga_list", "read_organization", "write_organization"})
  796.      * @ORM\ManyToOne(targetEntity=ProfessionDetail::class, inversedBy="organizations")
  797.      */
  798.     private ?ProfessionDetail $activityCategory null;
  799.     /**
  800.      * @ORM\ManyToOne(targetEntity=Organization::class, inversedBy="godSons")
  801.      */
  802.     private $referralSource;
  803.     /**
  804.      * @ORM\OneToMany(targetEntity=Organization::class, mappedBy="referralSource")
  805.      */
  806.     private ?Collection $godSons;
  807.     /**
  808.      * @Groups({"admin_orga_list", "read_organization", "write_organization"})
  809.      * @ORM\Column(type="string", length=255, nullable=true)
  810.      */
  811.     private ?string $encryptedParentId null;
  812.     /**
  813.      * @ORM\Column(type="boolean", nullable=true)
  814.      */
  815.     private $isReferralProcessFinished true;
  816.     /**
  817.      * @Groups({"admin_orga_list", "read_organization", "write_organization"})
  818.      * @ORM\Column(type="boolean", nullable=true)
  819.      */
  820.     private $isDigidomAccountant;
  821.     /**
  822.      * @Groups({"admin_orga_list", "read_organization", "write_organization"})
  823.      * @ORM\ManyToOne(targetEntity=ActivityDomain::class, inversedBy="organizations")
  824.      */
  825.     private ?ActivityDomain $activityDomain null;
  826.     /**
  827.      * @ORM\Column(type="boolean", options={"default": false})
  828.      */
  829.     private bool $isSurveillance false;
  830.     /**
  831.      * @Groups({"read_organization"})
  832.      * @ORM\Column(type="json", nullable=true)
  833.      */
  834.     private ?array $beneficialOwners = [];
  835.     /**
  836.      * @ORM\Column(type="string", length=4, nullable=true)
  837.      */
  838.     private ?string $accountsSubmissionLastYear null;
  839.     /**
  840.      * @ORM\OneToOne(targetEntity=ProcessYousign::class, mappedBy="organization", cascade={"persist"})
  841.      */
  842.     private ?ProcessYousign $processYousign null;
  843.     public function __construct()
  844.     {
  845.         $this->users = new ArrayCollection();
  846.         $this->associates = new ArrayCollection();
  847.         $this->legalRepresentatives = new ArrayCollection();
  848.         $this->auditors = new ArrayCollection();
  849.         $this->documents = new ArrayCollection();
  850.         $this->letters = new ArrayCollection();
  851.         $this->status OrganizationStatusEnum::NEW;
  852.         $this->forwardedLetters = new ArrayCollection();
  853.         $this->mandataries = new ArrayCollection();
  854.         $this->organizationsPrescribed = new ArrayCollection();
  855.         $this->invoices = new ArrayCollection();
  856.         $this->quotes = new ArrayCollection();
  857.         $this->orders = new ArrayCollection();
  858.         $this->documentHistories = new ArrayCollection();
  859.         $this->creditNotes = new ArrayCollection();
  860.         $this->activityLogs = new ArrayCollection();
  861.         $this->subscriptions = new ArrayCollection();
  862.         $this->createdAt = new \DateTime();
  863.         $this->potentialCases = new ArrayCollection();
  864.         $this->commercialGestures = new ArrayCollection();
  865.         $this->godSons = new ArrayCollection();
  866.     }
  867.     public function __toString()
  868.     {
  869.         return (null !== $this->getLegalName()) ? $this->getLegalName().' '.$this->getLegalStatus() : (string) $this->getID();
  870.     }
  871.     public function getLegalName(): ?string
  872.     {
  873.         return $this->legalName;
  874.     }
  875.     public function setLegalName($legalName): self
  876.     {
  877.         $this->legalName $legalName;
  878.         return $this;
  879.     }
  880.     public function getLegalStatus(): ?string
  881.     {
  882.         return $this->legalStatus;
  883.     }
  884.     public function setLegalStatus(?string $legalStatus): self
  885.     {
  886.         $this->legalStatus $legalStatus;
  887.         return $this;
  888.     }
  889.     public function getId(): ?int
  890.     {
  891.         return $this->id;
  892.     }
  893.     public function getUsers(): array
  894.     {
  895.         $currentUser array_filter($this->users->getValues(), function (User $user) {
  896.             return $user->getEmail() === $this->getEmail();
  897.         });
  898.         $otherUser array_filter($this->users->getValues(), function (User $user) {
  899.             return $user->getEmail() !== $this->getEmail();
  900.         });
  901.         return array_merge($currentUser$otherUser);
  902.     }
  903.     public function setUsers(?Collection $users): Organization
  904.     {
  905.         $this->users $users;
  906.         return $this;
  907.     }
  908.     /**
  909.      * @return Organization
  910.      */
  911.     public function addUser(User $user)
  912.     {
  913.         if (!$this->users->contains($user)) {
  914.             $this->users->add($user);
  915.         }
  916.         return $this;
  917.     }
  918.     /**
  919.      * @return Organization
  920.      */
  921.     public function removeUser(User $user)
  922.     {
  923.         $this->users->removeElement($user);
  924.         return $this;
  925.     }
  926.     public function getTelephone(): ?string
  927.     {
  928.         return $this->telephone;
  929.     }
  930.     public function setTelephone($telephone): self
  931.     {
  932.         $this->telephone $telephone;
  933.         return $this;
  934.     }
  935.     public function getVatID(): ?string
  936.     {
  937.         return $this->vatID;
  938.     }
  939.     public function setVatID($vatID): self
  940.     {
  941.         $this->vatID $vatID;
  942.         return $this;
  943.     }
  944.     public function getAddress(): ?PostalAddress
  945.     {
  946.         return $this->address;
  947.     }
  948.     public function setAddress(PostalAddress $address): self
  949.     {
  950.         $this->address $address;
  951.         return $this;
  952.     }
  953.     public function getPurpose(): ?string
  954.     {
  955.         return $this->purpose;
  956.     }
  957.     public function setPurpose($purpose): self
  958.     {
  959.         $this->purpose $purpose;
  960.         return $this;
  961.     }
  962.     public function getFoundingDate(): ?\DateTimeInterface
  963.     {
  964.         return $this->foundingDate;
  965.     }
  966.     public function setFoundingDate(?\DateTimeInterface $foundingDate): self
  967.     {
  968.         $this->foundingDate $foundingDate;
  969.         return $this;
  970.     }
  971.     public function getFiscalDate(): ?\DateTimeInterface
  972.     {
  973.         return $this->fiscalDate;
  974.     }
  975.     public function setFiscalDate(?\DateTimeInterface $fiscalDate): self
  976.     {
  977.         $this->fiscalDate $fiscalDate;
  978.         return $this;
  979.     }
  980.     public function getFiscalDateEnd(): ?\DateTimeInterface
  981.     {
  982.         return $this->fiscalDateEnd;
  983.     }
  984.     public function setFiscalDateEnd(?\DateTimeInterface $fiscalDateEnd): self
  985.     {
  986.         $this->fiscalDateEnd $fiscalDateEnd;
  987.         return $this;
  988.     }
  989.     public function getFirstFiscalDateEnd(): ?\DateTimeInterface
  990.     {
  991.         return $this->firstFiscalDateEnd;
  992.     }
  993.     public function setFirstFiscalDateEnd(?\DateTimeInterface $firstFiscalDateEnd): self
  994.     {
  995.         $this->firstFiscalDateEnd $firstFiscalDateEnd;
  996.         return $this;
  997.     }
  998.     public function getHeadQuartersAddressType(): ?string
  999.     {
  1000.         return $this->headQuartersAddressType;
  1001.     }
  1002.     public function setHeadQuartersAddressType($headQuartersAddressType): self
  1003.     {
  1004.         $this->headQuartersAddressType $headQuartersAddressType;
  1005.         return $this;
  1006.     }
  1007.     public function getLegalRepresentativeAddressType(): ?string
  1008.     {
  1009.         return $this->legalRepresentativeAddressType;
  1010.     }
  1011.     public function setLegalRepresentativeAddressType($legalRepresentativeAddressType): self
  1012.     {
  1013.         $this->legalRepresentativeAddressType $legalRepresentativeAddressType;
  1014.         return $this;
  1015.     }
  1016.     public function getShareCapital(): ?float
  1017.     {
  1018.         return $this->shareCapital;
  1019.     }
  1020.     public function setShareCapital(float $shareCapital): self
  1021.     {
  1022.         $this->shareCapital $shareCapital;
  1023.         return $this;
  1024.     }
  1025.     public function getShareCapitalType(): ?string
  1026.     {
  1027.         return $this->shareCapitalType;
  1028.     }
  1029.     public function setShareCapitalType($shareCapitalType): self
  1030.     {
  1031.         $this->shareCapitalType $shareCapitalType;
  1032.         return $this;
  1033.     }
  1034.     public function getShareCapitalFixedAmount(): ?float
  1035.     {
  1036.         return $this->shareCapitalFixedAmount;
  1037.     }
  1038.     public function setShareCapitalFixedAmount(float $shareCapitalFixedAmount): self
  1039.     {
  1040.         $this->shareCapitalFixedAmount $shareCapitalFixedAmount;
  1041.         return $this;
  1042.     }
  1043.     public function getSharesCount(): ?int
  1044.     {
  1045.         return $this->sharesCount;
  1046.     }
  1047.     public function setSharesCount(int $sharesCount): self
  1048.     {
  1049.         $this->sharesCount $sharesCount;
  1050.         return $this;
  1051.     }
  1052.     /**
  1053.      * @return Collection|Associate[]
  1054.      */
  1055.     public function getAssociates(): Collection
  1056.     {
  1057.         return $this->associates;
  1058.     }
  1059.     public function addAssociate(Associate $associate): self
  1060.     {
  1061.         if (!$this->associates->contains($associate)) {
  1062.             $this->associates[] = $associate;
  1063.         }
  1064.         return $this;
  1065.     }
  1066.     public function removeAssociate(Associate $associate): self
  1067.     {
  1068.         if ($this->associates->contains($associate)) {
  1069.             $this->associates->removeElement($associate);
  1070.         }
  1071.         return $this;
  1072.     }
  1073.     public function addLegalRepresentative(LegalRepresentative $legalRepresentative): self
  1074.     {
  1075.         if (!$this->legalRepresentatives->contains($legalRepresentative)) {
  1076.             $this->legalRepresentatives[] = $legalRepresentative;
  1077.         }
  1078.         return $this;
  1079.     }
  1080.     public function removeLegalRepresentative(LegalRepresentative $legalRepresentative): self
  1081.     {
  1082.         if ($this->legalRepresentatives->contains($legalRepresentative)) {
  1083.             $this->legalRepresentatives->removeElement($legalRepresentative);
  1084.         }
  1085.         return $this;
  1086.     }
  1087.     /**
  1088.      * @return Collection|Auditor[]
  1089.      */
  1090.     public function getAuditors(): Collection
  1091.     {
  1092.         return $this->auditors;
  1093.     }
  1094.     public function addAuditor(Auditor $auditor): self
  1095.     {
  1096.         if (!$this->auditors->contains($auditor)) {
  1097.             $this->auditors[] = $auditor;
  1098.         }
  1099.         return $this;
  1100.     }
  1101.     public function removeAuditor(Auditor $auditor): self
  1102.     {
  1103.         if ($this->auditors->contains($auditor)) {
  1104.             $this->auditors->removeElement($auditor);
  1105.         }
  1106.         return $this;
  1107.     }
  1108.     /**
  1109.      * @return Document[]
  1110.      */
  1111.     public function getAllDocuments()
  1112.     {
  1113.         $documentsLR = [];
  1114.         $documentsOrganization $this->getDocuments();
  1115.         foreach ($this->getLegalRepresentatives() as $legalRepresentative) {
  1116.             foreach ($legalRepresentative->getDocuments() as $document) {
  1117.                 $documentsLR[] = $document;
  1118.             }
  1119.         }
  1120.         $arrayCollection = new ArrayCollection(array_merge_recursive($documentsLR$documentsOrganization));
  1121.         return $arrayCollection->getValues();
  1122.     }
  1123.     public function getDocuments(): array
  1124.     {
  1125.         return $this->documents->getValues();
  1126.     }
  1127.     public function getDocumentsByType(array $types): array
  1128.     {
  1129.         return $this->documents->filter(function (Document $document) use ($types) {
  1130.             return in_array($document->getType(), $types);
  1131.         })->getValues();
  1132.     }
  1133.     /**
  1134.      * @return LegalRepresentative[]|Collection
  1135.      */
  1136.     public function getLegalRepresentatives()
  1137.     {
  1138.         return $this->legalRepresentatives;
  1139.     }
  1140.     /**
  1141.      * @return Organization
  1142.      */
  1143.     public function addDocument(Document $document)
  1144.     {
  1145.         if (!$this->documents->contains($document)) {
  1146.             $document->setOrganization($this);
  1147.             $this->documents->add($document);
  1148.         }
  1149.         return $this;
  1150.     }
  1151.     public function getFirstFiscalDate(): ?\DateTimeInterface
  1152.     {
  1153.         return $this->firstFiscalDate;
  1154.     }
  1155.     public function setFirstFiscalDate(?\DateTimeInterface $firstFiscalDate): self
  1156.     {
  1157.         $this->firstFiscalDate $firstFiscalDate;
  1158.         return $this;
  1159.     }
  1160.     public function getPresident()
  1161.     {
  1162.         foreach ($this->getLegalRepresentatives() as $legalRepresentative) {
  1163.             if (LegalRepresentativeQualityTypeEnum::CHAIRMAN == $legalRepresentative->getQuality()) {
  1164.                 return $legalRepresentative;
  1165.             }
  1166.         }
  1167.         return null;
  1168.     }
  1169.     public function getGeneralManagers()
  1170.     {
  1171.         $list = [];
  1172.         foreach ($this->getLegalRepresentatives() as $legalRepresentative) {
  1173.             if (LegalRepresentativeQualityTypeEnum::GENERAL_MANAGER == $legalRepresentative->getQuality()) {
  1174.                 $list[] = $legalRepresentative;
  1175.             }
  1176.         }
  1177.         return $list;
  1178.     }
  1179.     public function getFirstNameLegalRepresentative(): ?string
  1180.     {
  1181.         if (!$this->getLegalRepresentatives()->isEmpty()) {
  1182.             return $this->getLegalRepresentatives()->first()->getPerson()->getGivenName();
  1183.         }
  1184.         return null;
  1185.     }
  1186.     public function getLegalRepresentative()
  1187.     {
  1188.         foreach ($this->getLegalRepresentatives() as $legalRepresentative) {
  1189.             if (in_array($legalRepresentative->getQuality(),
  1190.                 [LegalRepresentativeQualityTypeEnum::MANAGERLegalRepresentativeQualityTypeEnum::CHAIRMAN])) {
  1191.                 $firstname '-';
  1192.                 $lastname '-';
  1193.                 if (null !== $legalRepresentative->getPerson()) {
  1194.                     if (PersonTypeEnum::PHYSICAL === $legalRepresentative->getPerson()->getType()) {
  1195.                         $firstname $legalRepresentative->getPerson()->getGivenName();
  1196.                         $lastname $legalRepresentative->getPerson()->getFamilyName();
  1197.                     } else {
  1198.                         $firstname $legalRepresentative->getPerson()->getLegalName();
  1199.                         $lastname '('.$legalRepresentative->getPerson()->getLegalStatus().')';
  1200.                     }
  1201.                 }
  1202.                 return $firstname.' '.$lastname;
  1203.             }
  1204.         }
  1205.         return null;
  1206.     }
  1207.     public function getPhysicalManagers()
  1208.     {
  1209.         return array_filter($this->getManagers(), function (LegalRepresentative $legalRepresentative) {
  1210.             return $legalRepresentative->getPerson()
  1211.                 && PersonTypeEnum::PHYSICAL == $legalRepresentative->getPerson()->getType();
  1212.         });
  1213.     }
  1214.     public function getManagers()
  1215.     {
  1216.         $list = [];
  1217.         foreach ($this->getLegalRepresentatives() as $legalRepresentative) {
  1218.             if (in_array($legalRepresentative->getQuality(), [
  1219.                 LegalRepresentativeQualityTypeEnum::MANAGER,
  1220.                 LegalRepresentativeQualityTypeEnum::CO_MANAGER,
  1221.             ], true)) {
  1222.                 $list[] = $legalRepresentative;
  1223.             }
  1224.         }
  1225.         return $list;
  1226.     }
  1227.     public function getBankChoice(): ?string
  1228.     {
  1229.         return $this->bankChoice;
  1230.     }
  1231.     public function setBankChoice(?string $bankChoice): self
  1232.     {
  1233.         $this->bankChoice $bankChoice;
  1234.         return $this;
  1235.     }
  1236.     public function getRegistrationSource(): ?string
  1237.     {
  1238.         return $this->registrationSource;
  1239.     }
  1240.     public function setRegistrationSource(?string $registrationSource): self
  1241.     {
  1242.         $this->registrationSource $registrationSource;
  1243.         return $this;
  1244.     }
  1245.     public function getCommercialCourtRegistry(): ?string
  1246.     {
  1247.         return $this->commercialCourtRegistry;
  1248.     }
  1249.     public function setCommercialCourtRegistry(?string $commercialCourtRegistry): self
  1250.     {
  1251.         $this->commercialCourtRegistry $commercialCourtRegistry;
  1252.         return $this;
  1253.     }
  1254.     public function getAccountant(): ?Accountant
  1255.     {
  1256.         return $this->accountant;
  1257.     }
  1258.     public function setAccountant(?Accountant $accountant): self
  1259.     {
  1260.         $this->accountant $accountant;
  1261.         return $this;
  1262.     }
  1263.     /**
  1264.      * @return Collection|Letter[]
  1265.      */
  1266.     public function getLetters(): Collection
  1267.     {
  1268.         return $this->letters;
  1269.     }
  1270.     public function addLetter(Letter $letter): self
  1271.     {
  1272.         if (!$this->letters->contains($letter)) {
  1273.             $this->letters->add($letter);
  1274.             $letter->setOrganization($this);
  1275.         }
  1276.         return $this;
  1277.     }
  1278.     public function removeLetter(Letter $letter): self
  1279.     {
  1280.         if ($this->letters->contains($letter)) {
  1281.             $this->letters->removeElement($letter);
  1282.             // set the owning side to null (unless already changed)
  1283.             if ($letter->getOrganization() === $this) {
  1284.                 $letter->setOrganization(null);
  1285.             }
  1286.         }
  1287.         return $this;
  1288.     }
  1289.     public function getSector(): ?OrganizationSector
  1290.     {
  1291.         return $this->sector;
  1292.     }
  1293.     public function setSector(?OrganizationSector $sector): self
  1294.     {
  1295.         $this->sector $sector;
  1296.         return $this;
  1297.     }
  1298.     public function getSectorOther(): ?string
  1299.     {
  1300.         return $this->sectorOther;
  1301.     }
  1302.     public function setSectorOther(?string $sectorOther): self
  1303.     {
  1304.         $this->sectorOther $sectorOther;
  1305.         return $this;
  1306.     }
  1307.     public function getRCS(): ?string
  1308.     {
  1309.         return $this->RCS;
  1310.     }
  1311.     public function setRCS(?string $RCS): self
  1312.     {
  1313.         $this->RCS $RCS;
  1314.         return $this;
  1315.     }
  1316.     public function getStatus(): ?string
  1317.     {
  1318.         return $this->status;
  1319.     }
  1320.     /**
  1321.      * @Groups({"read_search"})
  1322.      */
  1323.     public function getStatusTranslated(): ?string
  1324.     {
  1325.         return $this->status;
  1326.     }
  1327.     public function setStatus(?string $status): self
  1328.     {
  1329.         $this->status $status;
  1330.         return $this;
  1331.     }
  1332.     public function getEmail(): ?string
  1333.     {
  1334.         return $this->email;
  1335.     }
  1336.     public function setEmail(?string $email): self
  1337.     {
  1338.         $this->email $email;
  1339.         return $this;
  1340.     }
  1341.     public function getStore(): ?Store
  1342.     {
  1343.         return $this->store;
  1344.     }
  1345.     public function setStore(?Store $store): self
  1346.     {
  1347.         $this->store $store;
  1348.         return $this;
  1349.     }
  1350.     /**
  1351.      * @return ?string
  1352.      */
  1353.     public function getBal()
  1354.     {
  1355.         return $this->bal;
  1356.     }
  1357.     /**
  1358.      * @param string $bal
  1359.      *
  1360.      * @return Organization
  1361.      */
  1362.     public function setBal($bal)
  1363.     {
  1364.         $this->bal $bal;
  1365.         return $this;
  1366.     }
  1367.     /**
  1368.      * @Groups({"read_search", "read_organization"})
  1369.      */
  1370.     public function getPostalPowerAllowed(): bool
  1371.     {
  1372.         $criteria Criteria::create()
  1373.             ->where(Criteria::expr()->eq('type'DocumentTypeOrganizationEnum::POSTAL_POWER_OF_ATTORNEY))
  1374.             ->andWhere(Criteria::expr()->eq('status'DocumentStatusEnum::APPROVED));
  1375.         if ($this->documents instanceof PersistentCollection) {
  1376.             $matchingDocuments $this->documents->matching($criteria);
  1377.             return $matchingDocuments->count() > 0;
  1378.         }
  1379.         return false;
  1380.     }
  1381.     /**
  1382.      * @return ?string
  1383.      */
  1384.     public function getForwardingFrequency()
  1385.     {
  1386.         return $this->forwardingFrequency;
  1387.     }
  1388.     /**
  1389.      * @param string $forwardingFrequency
  1390.      *
  1391.      * @return Organization
  1392.      */
  1393.     public function setForwardingFrequency($forwardingFrequency)
  1394.     {
  1395.         $this->forwardingFrequency $forwardingFrequency;
  1396.         return $this;
  1397.     }
  1398.     public function getForwardingAddress(): ?PostalAddress
  1399.     {
  1400.         return $this->forwardingAddress;
  1401.     }
  1402.     public function setForwardingAddress(PostalAddress $forwardingAddress): self
  1403.     {
  1404.         $this->forwardingAddress $forwardingAddress;
  1405.         return $this;
  1406.     }
  1407.     public function getAlternateName()
  1408.     {
  1409.         return $this->alternateName;
  1410.     }
  1411.     /**
  1412.      * @return Organization
  1413.      */
  1414.     public function setAlternateName($alternateName)
  1415.     {
  1416.         $this->alternateName $alternateName;
  1417.         return $this;
  1418.     }
  1419.     public function getForwardingAddressName(): ?string
  1420.     {
  1421.         return $this->forwardingAddressName;
  1422.     }
  1423.     public function setForwardingAddressName(?string $forwardingAddressName): self
  1424.     {
  1425.         $this->forwardingAddressName $forwardingAddressName;
  1426.         return $this;
  1427.     }
  1428.     public function getDomiciliationStartDate(): ?\DateTimeInterface
  1429.     {
  1430.         return $this->domiciliationStartDate;
  1431.     }
  1432.     public function setDomiciliationStartDate(?\DateTimeInterface $domiciliationStartDate): self
  1433.     {
  1434.         $this->domiciliationStartDate $domiciliationStartDate;
  1435.         return $this;
  1436.     }
  1437.     public function getCreatedAt(): ?\DateTimeInterface
  1438.     {
  1439.         return $this->createdAt;
  1440.     }
  1441.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  1442.     {
  1443.         $this->createdAt $createdAt;
  1444.         return $this;
  1445.     }
  1446.     /**
  1447.      * @return Collection|LetterForward[]
  1448.      */
  1449.     public function getForwardedLetters(): Collection
  1450.     {
  1451.         return $this->forwardedLetters;
  1452.     }
  1453.     public function addForwardedLetter(LetterForward $forwardedLetter): self
  1454.     {
  1455.         if (!$this->forwardedLetters->contains($forwardedLetter)) {
  1456.             $this->forwardedLetters[] = $forwardedLetter;
  1457.             $forwardedLetter->setOrganization($this);
  1458.         }
  1459.         return $this;
  1460.     }
  1461.     public function removeForwardedLetter(LetterForward $forwardedLetter): self
  1462.     {
  1463.         if ($this->forwardedLetters->contains($forwardedLetter)) {
  1464.             $this->forwardedLetters->removeElement($forwardedLetter);
  1465.             // set the owning side to null (unless already changed)
  1466.             if ($forwardedLetter->getOrganization() === $this) {
  1467.                 $forwardedLetter->setOrganization(null);
  1468.             }
  1469.         }
  1470.         return $this;
  1471.     }
  1472.     public function getTerminationDate(): ?\DateTimeInterface
  1473.     {
  1474.         return $this->terminationDate;
  1475.     }
  1476.     public function setTerminationDate(?\DateTimeInterface $terminationDate): self
  1477.     {
  1478.         $this->terminationDate $terminationDate;
  1479.         return $this;
  1480.     }
  1481.     public function getTerminationReason(): ?string
  1482.     {
  1483.         return $this->terminationReason;
  1484.     }
  1485.     public function setTerminationReason(?string $terminationReason): self
  1486.     {
  1487.         $this->terminationReason $terminationReason;
  1488.         return $this;
  1489.     }
  1490.     public function getTerminationReasonOther(): ?string
  1491.     {
  1492.         return $this->terminationReasonOther;
  1493.     }
  1494.     public function setTerminationReasonOther(?string $terminationReasonOther): self
  1495.     {
  1496.         $this->terminationReasonOther $terminationReasonOther;
  1497.         return $this;
  1498.     }
  1499.     /**
  1500.      * @return Collection|Mandatary[]
  1501.      */
  1502.     public function getMandataries(): Collection
  1503.     {
  1504.         return $this->mandataries;
  1505.     }
  1506.     public function addMandatary(Mandatary $mandatary): self
  1507.     {
  1508.         if (!$this->mandataries->contains($mandatary)) {
  1509.             $this->mandataries[] = $mandatary;
  1510.             $mandatary->setOrganization($this);
  1511.         }
  1512.         return $this;
  1513.     }
  1514.     public function removeMandatary(Mandatary $mandatary): self
  1515.     {
  1516.         if ($this->mandataries->contains($mandatary)) {
  1517.             $this->mandataries->removeElement($mandatary);
  1518.             // set the owning side to null (unless already changed)
  1519.             if ($mandatary->getOrganization() === $this) {
  1520.                 $mandatary->setOrganization(null);
  1521.             }
  1522.         }
  1523.         return $this;
  1524.     }
  1525.     /**
  1526.      * @return string
  1527.      */
  1528.     public function getMandatary()
  1529.     {
  1530.         return $this->mandatary;
  1531.     }
  1532.     /**
  1533.      * @param string $mandatary
  1534.      *
  1535.      * @return Organization
  1536.      */
  1537.     public function setMandatary($mandatary)
  1538.     {
  1539.         $this->mandatary $mandatary;
  1540.         return $this;
  1541.     }
  1542.     /**
  1543.      * @return Collection|self[]
  1544.      */
  1545.     public function getOrganizationsPrescribed(): Collection
  1546.     {
  1547.         return $this->organizationsPrescribed;
  1548.     }
  1549.     public function addOrganizationsPrescribed(self $organizationsPrescribed): self
  1550.     {
  1551.         if (!$this->organizationsPrescribed->contains($organizationsPrescribed)) {
  1552.             $this->organizationsPrescribed[] = $organizationsPrescribed;
  1553.             $organizationsPrescribed->setPrescriber($this);
  1554.         }
  1555.         return $this;
  1556.     }
  1557.     public function removeOrganizationsPrescribed(self $organizationsPrescribed): self
  1558.     {
  1559.         if ($this->organizationsPrescribed->contains($organizationsPrescribed)) {
  1560.             $this->organizationsPrescribed->removeElement($organizationsPrescribed);
  1561.             // set the owning side to null (unless already changed)
  1562.             if ($organizationsPrescribed->getPrescriber() === $this) {
  1563.                 $organizationsPrescribed->setPrescriber(null);
  1564.             }
  1565.         }
  1566.         return $this;
  1567.     }
  1568.     public function getPrescriber(): ?self
  1569.     {
  1570.         return $this->prescriber;
  1571.     }
  1572.     public function setPrescriber(?self $prescriber): self
  1573.     {
  1574.         $this->prescriber $prescriber;
  1575.         return $this;
  1576.     }
  1577.     /**
  1578.      * @return Collection|Invoice[]
  1579.      */
  1580.     public function getInvoices(): Collection
  1581.     {
  1582.         return $this->invoices;
  1583.     }
  1584.     public function addInvoice(Invoice $invoice): self
  1585.     {
  1586.         if (!$this->invoices->contains($invoice)) {
  1587.             $this->invoices[] = $invoice;
  1588.             $invoice->setOrganization($this);
  1589.         }
  1590.         return $this;
  1591.     }
  1592.     public function removeInvoice(Invoice $invoice): self
  1593.     {
  1594.         if ($this->invoices->contains($invoice)) {
  1595.             $this->invoices->removeElement($invoice);
  1596.             // set the owning side to null (unless already changed)
  1597.             if ($invoice->getOrganization() === $this) {
  1598.                 $invoice->setOrganization(null);
  1599.             }
  1600.         }
  1601.         return $this;
  1602.     }
  1603.     /**
  1604.      * @return Collection|Quote[]
  1605.      */
  1606.     public function getQuotes(): Collection
  1607.     {
  1608.         return $this->quotes;
  1609.     }
  1610.     public function addQuote(Quote $quote): self
  1611.     {
  1612.         if (!$this->quotes->contains($quote)) {
  1613.             $this->quotes[] = $quote;
  1614.             $quote->setOrganization($this);
  1615.         }
  1616.         return $this;
  1617.     }
  1618.     public function removeQuote(Quote $quote): self
  1619.     {
  1620.         if ($this->quotes->contains($quote)) {
  1621.             $this->quotes->removeElement($quote);
  1622.             // set the owning side to null (unless already changed)
  1623.             if ($quote->getOrganization() === $this) {
  1624.                 $quote->setOrganization(null);
  1625.             }
  1626.         }
  1627.         return $this;
  1628.     }
  1629.     public function getSIRET(): ?string
  1630.     {
  1631.         return $this->SIRET;
  1632.     }
  1633.     public function setSIRET(?string $SIRET): self
  1634.     {
  1635.         $this->SIRET $SIRET;
  1636.         return $this;
  1637.     }
  1638.     public function getIsNewImmatriculation(): ?bool
  1639.     {
  1640.         return $this->isNewImmatriculation;
  1641.     }
  1642.     public function setIsNewImmatriculation(bool $isNewImmatriculation): self
  1643.     {
  1644.         $this->isNewImmatriculation $isNewImmatriculation;
  1645.         return $this;
  1646.     }
  1647.     /**
  1648.      * @Groups({"read_search"})
  1649.      *
  1650.      * @deprecated don't use this refer to subscriptionUtils
  1651.      * Is override, don't forget declare the groups in OrganizationNormalizer
  1652.      */
  1653.     public function getPack(): ?string
  1654.     {
  1655.         if ($this->getSubscriptions()->toArray()) {
  1656.             $packs '';
  1657.             foreach ($this->getSubscriptions() as $subscription) {
  1658.                 $subscription->getPack() ? $packs .= $subscription->getPack().',' '';
  1659.             }
  1660.             return $packs;
  1661.         }
  1662.         return null;
  1663.     }
  1664.     public function getIsNewDomiciliation(): ?bool
  1665.     {
  1666.         return $this->isNewDomiciliation;
  1667.     }
  1668.     public function setIsNewDomiciliation(bool $isNewDomiciliation): self
  1669.     {
  1670.         $this->isNewDomiciliation $isNewDomiciliation;
  1671.         return $this;
  1672.     }
  1673.     /**
  1674.      * @return Collection|Order[]
  1675.      */
  1676.     public function getOrders(): Collection
  1677.     {
  1678.         return $this->orders;
  1679.     }
  1680.     public function addOrder(Order $order): self
  1681.     {
  1682.         if (!$this->orders->contains($order)) {
  1683.             $this->orders[] = $order;
  1684.             $order->setOrganization($this);
  1685.         }
  1686.         return $this;
  1687.     }
  1688.     public function removeOrder(Order $order): self
  1689.     {
  1690.         if ($this->orders->contains($order)) {
  1691.             $this->orders->removeElement($order);
  1692.             // set the owning side to null (unless already changed)
  1693.             if ($order->getOrganization() === $this) {
  1694.                 $order->setOrganization(null);
  1695.             }
  1696.         }
  1697.         return $this;
  1698.     }
  1699.     public function getMandatID(): ?string
  1700.     {
  1701.         return $this->mandatID;
  1702.     }
  1703.     public function setMandatID(?string $mandatID): self
  1704.     {
  1705.         $this->mandatID $mandatID;
  1706.         return $this;
  1707.     }
  1708.     /**
  1709.      * @return Collection|DocumentHistory[]
  1710.      */
  1711.     public function getDocumentHistories(): Collection
  1712.     {
  1713.         return $this->documentHistories;
  1714.     }
  1715.     public function addDocumentHistory(DocumentHistory $documentHistory): self
  1716.     {
  1717.         if (!$this->documentHistories->contains($documentHistory)) {
  1718.             $this->documentHistories[] = $documentHistory;
  1719.             $documentHistory->setOrganization($this);
  1720.         }
  1721.         return $this;
  1722.     }
  1723.     public function removeDocumentHistory(DocumentHistory $documentHistory): self
  1724.     {
  1725.         if ($this->documentHistories->contains($documentHistory)) {
  1726.             $this->documentHistories->removeElement($documentHistory);
  1727.             // set the owning side to null (unless already changed)
  1728.             if ($documentHistory->getOrganization() === $this) {
  1729.                 $documentHistory->setOrganization(null);
  1730.             }
  1731.         }
  1732.         return $this;
  1733.     }
  1734.     public function getConversionReason(): ?string
  1735.     {
  1736.         return $this->conversionReason;
  1737.     }
  1738.     public function setConversionReason(?string $conversionReason): self
  1739.     {
  1740.         $this->conversionReason $conversionReason;
  1741.         return $this;
  1742.     }
  1743.     public function getStatusIsForced(): ?bool
  1744.     {
  1745.         return $this->statusIsForced;
  1746.     }
  1747.     public function setStatusIsForced(bool $statusIsForced): self
  1748.     {
  1749.         $this->statusIsForced $statusIsForced;
  1750.         return $this;
  1751.     }
  1752.     /**
  1753.      * @return int|string|null
  1754.      */
  1755.     public function getUniqId()
  1756.     {
  1757.         if ($this->uniqId) {
  1758.             return $this->uniqId;
  1759.         }
  1760.         return $this->id;
  1761.     }
  1762.     public function setUniqId(?string $uniqId): self
  1763.     {
  1764.         $this->uniqId $uniqId;
  1765.         return $this;
  1766.     }
  1767.     public function getIban(): ?string
  1768.     {
  1769.         return $this->iban;
  1770.     }
  1771.     public function setIban(?string $iban): self
  1772.     {
  1773.         $this->iban $iban;
  1774.         return $this;
  1775.     }
  1776.     public function getReferenceGocardless(): ?string
  1777.     {
  1778.         return $this->referenceGocardless;
  1779.     }
  1780.     public function setReferenceGocardless(?string $referenceGocardless): self
  1781.     {
  1782.         $this->referenceGocardless $referenceGocardless;
  1783.         return $this;
  1784.     }
  1785.     public function getIsForwardingActive(): ?bool
  1786.     {
  1787.         return $this->isForwardingActive;
  1788.     }
  1789.     public function setIsForwardingActive(bool $isForwardingActive): self
  1790.     {
  1791.         $this->isForwardingActive $isForwardingActive;
  1792.         return $this;
  1793.     }
  1794.     public function getVATRate(): ?string
  1795.     {
  1796.         return $this->VATRate;
  1797.     }
  1798.     public function setVATRate(string $VATRate): self
  1799.     {
  1800.         $this->VATRate $VATRate;
  1801.         return $this;
  1802.     }
  1803.     public function getIsImported(): ?bool
  1804.     {
  1805.         return $this->isImported;
  1806.     }
  1807.     public function setIsImported(?bool $isImported): self
  1808.     {
  1809.         $this->isImported $isImported;
  1810.         return $this;
  1811.     }
  1812.     public function getCreditNotesAmount(): ?float
  1813.     {
  1814.         return $this->creditNotesAmount;
  1815.     }
  1816.     public function setCreditNotesAmount(float $creditNotesAmount): self
  1817.     {
  1818.         $this->creditNotesAmount $creditNotesAmount;
  1819.         return $this;
  1820.     }
  1821.     /**
  1822.      * @return Collection|CreditNote[]
  1823.      */
  1824.     public function getCreditNotes(): Collection
  1825.     {
  1826.         return $this->creditNotes;
  1827.     }
  1828.     public function addCreditNote(CreditNote $creditNote): self
  1829.     {
  1830.         if (!$this->creditNotes->contains($creditNote)) {
  1831.             $this->creditNotes[] = $creditNote;
  1832.             $creditNote->setOrganization($this);
  1833.         }
  1834.         return $this;
  1835.     }
  1836.     public function removeCreditNote(CreditNote $creditNote): self
  1837.     {
  1838.         if ($this->creditNotes->contains($creditNote)) {
  1839.             $this->creditNotes->removeElement($creditNote);
  1840.             // set the owning side to null (unless already changed)
  1841.             if ($creditNote->getOrganization() === $this) {
  1842.                 $creditNote->setOrganization(null);
  1843.             }
  1844.         }
  1845.         return $this;
  1846.     }
  1847.     public function getAvailableCredits(): ?float
  1848.     {
  1849.         return $this->availableCredits;
  1850.     }
  1851.     public function setAvailableCredits(?float $availableCredits): self
  1852.     {
  1853.         $this->availableCredits $availableCredits;
  1854.         return $this;
  1855.     }
  1856.     public function getInvoiceToken(): ?string
  1857.     {
  1858.         return $this->invoiceToken;
  1859.     }
  1860.     public function setInvoiceToken(?string $invoiceToken): self
  1861.     {
  1862.         $this->invoiceToken $invoiceToken;
  1863.         return $this;
  1864.     }
  1865.     public function getNotificationPreference(): ?NotificationPreference
  1866.     {
  1867.         return $this->notificationPreference;
  1868.     }
  1869.     public function setNotificationPreference(?NotificationPreference $notificationPreference): self
  1870.     {
  1871.         $this->notificationPreference $notificationPreference;
  1872.         return $this;
  1873.     }
  1874.     public function getShareCapitalFreePercentage(): ?string
  1875.     {
  1876.         return $this->shareCapitalFreePercentage;
  1877.     }
  1878.     public function setShareCapitalFreePercentage(?string $shareCapitalFreePercentage): self
  1879.     {
  1880.         $this->shareCapitalFreePercentage $shareCapitalFreePercentage;
  1881.         return $this;
  1882.     }
  1883.     public function getIsPrescriber(): ?bool
  1884.     {
  1885.         return $this->isPrescriber;
  1886.     }
  1887.     public function setIsPrescriber(bool $isPrescriber): self
  1888.     {
  1889.         $this->isPrescriber $isPrescriber;
  1890.         return $this;
  1891.     }
  1892.     public function getHaveAccountant(): ?bool
  1893.     {
  1894.         return $this->haveAccountant;
  1895.     }
  1896.     public function setHaveAccountant(?bool $haveAccountant): self
  1897.     {
  1898.         $this->haveAccountant $haveAccountant;
  1899.         return $this;
  1900.     }
  1901.     public function getDiscountCode(): ?DiscountCode
  1902.     {
  1903.         return $this->discountCode;
  1904.     }
  1905.     public function setDiscountCode(?DiscountCode $discountCode): self
  1906.     {
  1907.         $this->discountCode $discountCode;
  1908.         return $this;
  1909.     }
  1910.     public function getLead(): ?Lead
  1911.     {
  1912.         return $this->lead;
  1913.     }
  1914.     public function setLead(?Lead $lead): self
  1915.     {
  1916.         $this->lead $lead;
  1917.         // set (or unset) the owning side of the relation if necessary
  1918.         $newOrganization null === $lead null $this;
  1919.         if (null !== $lead && $lead->getOrganization() !== $newOrganization) {
  1920.             $lead->setOrganization($newOrganization);
  1921.         }
  1922.         return $this;
  1923.     }
  1924.     public function getStatusImmatriculation(): ?string
  1925.     {
  1926.         return $this->statusImmatriculation;
  1927.     }
  1928.     public function setStatusImmatriculation(?string $statusImmatriculation): self
  1929.     {
  1930.         $this->statusImmatriculation $statusImmatriculation;
  1931.         return $this;
  1932.     }
  1933.     public function getPrescriberSource(): ?PrescriberSource
  1934.     {
  1935.         return $this->prescriberSource;
  1936.     }
  1937.     public function setPrescriberSource(?PrescriberSource $prescriberSource): self
  1938.     {
  1939.         $this->prescriberSource $prescriberSource;
  1940.         return $this;
  1941.     }
  1942.     public function getIsExemptTVA(): ?bool
  1943.     {
  1944.         return $this->isExemptTVA;
  1945.     }
  1946.     public function setIsExemptTVA(?bool $isExemptTVA): self
  1947.     {
  1948.         $this->isExemptTVA $isExemptTVA;
  1949.         return $this;
  1950.     }
  1951.     public function getProjectStage(): ?string
  1952.     {
  1953.         return $this->projectStage;
  1954.     }
  1955.     public function setProjectStage(?string $projectStage): self
  1956.     {
  1957.         $this->projectStage $projectStage;
  1958.         return $this;
  1959.     }
  1960.     public function getStatusInvoicePayed(): ?string
  1961.     {
  1962.         return $this->statusInvoicePayed;
  1963.     }
  1964.     public function setStatusInvoicePayed(string $statusInvoicePayed): self
  1965.     {
  1966.         $this->statusInvoicePayed $statusInvoicePayed;
  1967.         return $this;
  1968.     }
  1969.     public function getDateMaxUnpaid(): ?\DateTimeInterface
  1970.     {
  1971.         return $this->dateMaxUnpaid;
  1972.     }
  1973.     public function setDateMaxUnpaid(?\DateTimeInterface $dateMaxUnpaid): self
  1974.     {
  1975.         $this->dateMaxUnpaid $dateMaxUnpaid;
  1976.         return $this;
  1977.     }
  1978.     public function getIsHaveAuditor(): ?bool
  1979.     {
  1980.         return $this->isHaveAuditor;
  1981.     }
  1982.     public function setIsHaveAuditor(?bool $isHaveAuditor): self
  1983.     {
  1984.         $this->isHaveAuditor $isHaveAuditor;
  1985.         return $this;
  1986.     }
  1987.     public function getBenefitImposition(): ?string
  1988.     {
  1989.         return $this->benefitImposition;
  1990.     }
  1991.     public function setBenefitImposition(?string $benefitImposition): self
  1992.     {
  1993.         $this->benefitImposition $benefitImposition;
  1994.         return $this;
  1995.     }
  1996.     public function getBenefitImpositionOption(): ?string
  1997.     {
  1998.         return $this->benefitImpositionOption;
  1999.     }
  2000.     public function setBenefitImpositionOption(?string $benefitImpositionOption): self
  2001.     {
  2002.         $this->benefitImpositionOption $benefitImpositionOption;
  2003.         return $this;
  2004.     }
  2005.     public function getVatTaxeRegim(): ?string
  2006.     {
  2007.         return $this->vatTaxeRegim;
  2008.     }
  2009.     public function setVatTaxeRegim(?string $vatTaxeRegim): self
  2010.     {
  2011.         $this->vatTaxeRegim $vatTaxeRegim;
  2012.         return $this;
  2013.     }
  2014.     public function getVatTaxeRegimeOption(): ?string
  2015.     {
  2016.         return $this->vatTaxeRegimeOption;
  2017.     }
  2018.     public function setVatTaxeRegimeOption(?string $vatTaxeRegimeOption): self
  2019.     {
  2020.         $this->vatTaxeRegimeOption $vatTaxeRegimeOption;
  2021.         return $this;
  2022.     }
  2023.     public function getProlongationDateKYC(): ?\DateTimeInterface
  2024.     {
  2025.         return $this->prolongationDateKYC;
  2026.     }
  2027.     public function setProlongationDateKYC(?\DateTimeInterface $prolongationDateKYC): self
  2028.     {
  2029.         $this->prolongationDateKYC $prolongationDateKYC;
  2030.         return $this;
  2031.     }
  2032.     public function getReasonUnpaid(): ?ReasonUnpaid
  2033.     {
  2034.         return $this->reasonUnpaid;
  2035.     }
  2036.     public function setReasonUnpaid(?ReasonUnpaid $reasonUnpaid): self
  2037.     {
  2038.         $this->reasonUnpaid $reasonUnpaid;
  2039.         return $this;
  2040.     }
  2041.     public function getReasonRIBInactive(): ?ReasonRIBInactive
  2042.     {
  2043.         return $this->reasonRIBInactive;
  2044.     }
  2045.     public function setReasonRIBInactive(?ReasonRIBInactive $reasonRIBInactive): self
  2046.     {
  2047.         $this->reasonRIBInactive $reasonRIBInactive;
  2048.         return $this;
  2049.     }
  2050.     public function getStatusTransfert(): ?string
  2051.     {
  2052.         return $this->statusTransfert;
  2053.     }
  2054.     public function setStatusTransfert(?string $statusTransfert): self
  2055.     {
  2056.         $this->statusTransfert $statusTransfert;
  2057.         return $this;
  2058.     }
  2059.     public function getIsNewTransfert(): ?bool
  2060.     {
  2061.         return $this->isNewTransfert;
  2062.     }
  2063.     public function setIsNewTransfert(?bool $isNewTransfert): self
  2064.     {
  2065.         $this->isNewTransfert $isNewTransfert;
  2066.         return $this;
  2067.     }
  2068.     public function getSpecialRequestBal(): ?string
  2069.     {
  2070.         return $this->specialRequestBal;
  2071.     }
  2072.     public function setSpecialRequestBal(?string $specialRequestBal): self
  2073.     {
  2074.         $this->specialRequestBal $specialRequestBal;
  2075.         return $this;
  2076.     }
  2077.     public function getPackImat()
  2078.     {
  2079.         return $this->packImat;
  2080.     }
  2081.     public function setPackImat($packImat): self
  2082.     {
  2083.         $this->packImat $packImat;
  2084.         return $this;
  2085.     }
  2086.     public function getIsAuthorizePrescriber(): ?bool
  2087.     {
  2088.         return $this->isAuthorizePrescriber;
  2089.     }
  2090.     public function getTracFin(): ?string
  2091.     {
  2092.         return $this->tracFin;
  2093.     }
  2094.     public function setTracFin(?string $tracFin): self
  2095.     {
  2096.         $this->tracFin $tracFin;
  2097.         return $this;
  2098.     }
  2099.     public function getTracFinNote(): ?string
  2100.     {
  2101.         return $this->tracFinNote;
  2102.     }
  2103.     public function setTracFinNote(?string $tracFinNote): self
  2104.     {
  2105.         $this->tracFinNote $tracFinNote;
  2106.         return $this;
  2107.     }
  2108.     public function setIsAuthorizePrescriber(?bool $isAuthorizePrescriber): self
  2109.     {
  2110.         $this->isAuthorizePrescriber $isAuthorizePrescriber;
  2111.         return $this;
  2112.     }
  2113.     public function isAttachedToPrescriber(): ?bool
  2114.     {
  2115.         return $this->isAttachedToPrescriber;
  2116.     }
  2117.     public function setIsAttachedToPrescriber(?bool $isAttachedToPrescriber): self
  2118.     {
  2119.         $this->isAttachedToPrescriber $isAttachedToPrescriber;
  2120.         return $this;
  2121.     }
  2122.     public function getIsEmptybal(): ?bool
  2123.     {
  2124.         return $this->isEmptybal;
  2125.     }
  2126.     public function setIsEmptybal(?bool $isEmptybal): self
  2127.     {
  2128.         $this->isEmptybal $isEmptybal;
  2129.         return $this;
  2130.     }
  2131.     public function getIsAuthorizedDebit(): ?bool
  2132.     {
  2133.         return $this->isAuthorizedDebit;
  2134.     }
  2135.     public function setIsAuthorizedDebit(?bool $isAuthorizedDebit): self
  2136.     {
  2137.         $this->isAuthorizedDebit $isAuthorizedDebit;
  2138.         return $this;
  2139.     }
  2140.     public function getHistoryNavTunnel(): ?string
  2141.     {
  2142.         return $this->historyNavTunnel;
  2143.     }
  2144.     public function setHistoryNavTunnel(?string $historyNavTunnel): self
  2145.     {
  2146.         $this->historyNavTunnel $historyNavTunnel;
  2147.         return $this;
  2148.     }
  2149.     /**
  2150.      * @return Collection|Subscription[]
  2151.      */
  2152.     public function getSubscriptions(): Collection
  2153.     {
  2154.         return $this->subscriptions;
  2155.     }
  2156.     public function addSubscription(Subscription $subscription): self
  2157.     {
  2158.         if (!$this->subscriptions->contains($subscription)) {
  2159.             $this->subscriptions->add($subscription);
  2160.             $subscription->setOrganization($this);
  2161.             $_SESSION['add_subscription'] = true;
  2162.         }
  2163.         return $this;
  2164.     }
  2165.     public function removeSubscription(Subscription $subscription): self
  2166.     {
  2167.         // set the owning side to null (unless already changed)
  2168.         if ($this->subscriptions->removeElement($subscription) && $subscription->getOrganization() === $this) {
  2169.             $subscription->setOrganization(null);
  2170.             $_SESSION['remove_subscription'] = true;
  2171.         }
  2172.         return $this;
  2173.     }
  2174.     /**
  2175.      * @return Collection|ActivityLog[]
  2176.      */
  2177.     public function getActivityLogs(): Collection
  2178.     {
  2179.         return $this->activityLogs;
  2180.     }
  2181.     public function addActivityLog(ActivityLog $activityLog): self
  2182.     {
  2183.         if (!$this->activityLogs->contains($activityLog)) {
  2184.             $this->activityLogs[] = $activityLog;
  2185.             $activityLog->setOrganization($this);
  2186.         }
  2187.         return $this;
  2188.     }
  2189.     public function removeActivityLog(ActivityLog $activityLog): self
  2190.     {
  2191.         // set the owning side to null (unless already changed)
  2192.         if ($this->activityLogs->removeElement($activityLog) && $activityLog->getOrganization() === $this) {
  2193.             $activityLog->setOrganization(null);
  2194.         }
  2195.         return $this;
  2196.     }
  2197.     public function getNote(): ?string
  2198.     {
  2199.         return $this->note;
  2200.     }
  2201.     public function setNote(?string $note): self
  2202.     {
  2203.         $this->note $note;
  2204.         return $this;
  2205.     }
  2206.     public function getReasonChange(): ?string
  2207.     {
  2208.         return $this->reasonChange;
  2209.     }
  2210.     public function setReasonChange(?string $reasonChange): self
  2211.     {
  2212.         $this->reasonChange $reasonChange;
  2213.         return $this;
  2214.     }
  2215.     public function getPreviousPack(): ?string
  2216.     {
  2217.         return $this->previousPack;
  2218.     }
  2219.     public function setPreviousPack(?string $previousPack): self
  2220.     {
  2221.         $this->previousPack $previousPack;
  2222.         return $this;
  2223.     }
  2224.     public function getZapierHookUrl(): ?array
  2225.     {
  2226.         return $this->zapierHookUrl;
  2227.     }
  2228.     public function setZapierHookUrl(array $zapierHookUrl): self
  2229.     {
  2230.         $this->zapierHookUrl $zapierHookUrl;
  2231.         return $this;
  2232.     }
  2233.     public function getSigle(): ?string
  2234.     {
  2235.         return $this->sigle;
  2236.     }
  2237.     public function setSigle(?string $sigle): self
  2238.     {
  2239.         $this->sigle $sigle;
  2240.         return $this;
  2241.     }
  2242.     public function getEnseigne(): ?string
  2243.     {
  2244.         return $this->enseigne;
  2245.     }
  2246.     public function setEnseigne(?string $enseigne): self
  2247.     {
  2248.         $this->enseigne $enseigne;
  2249.         return $this;
  2250.     }
  2251.     public function getCorporateObject(): ?string
  2252.     {
  2253.         return $this->corporateObject;
  2254.     }
  2255.     public function setCorporateObject(?string $corporateObject): self
  2256.     {
  2257.         $this->corporateObject $corporateObject;
  2258.         return $this;
  2259.     }
  2260.     public function getPlaceKnowDigidom(): ?string
  2261.     {
  2262.         return $this->placeKnowDigidom;
  2263.     }
  2264.     public function setPlaceKnowDigidom(?string $placeKnowDigidom): self
  2265.     {
  2266.         $this->placeKnowDigidom $placeKnowDigidom;
  2267.         return $this;
  2268.     }
  2269.     public function getOtherPlaceKnownDigidom(): ?string
  2270.     {
  2271.         return $this->otherPlaceKnownDigidom;
  2272.     }
  2273.     public function setOtherPlaceKnownDigidom(?string $otherPlaceKnownDigidom): self
  2274.     {
  2275.         $this->otherPlaceKnownDigidom $otherPlaceKnownDigidom;
  2276.         return $this;
  2277.     }
  2278.     public function getBankName(): ?string
  2279.     {
  2280.         return $this->bankName;
  2281.     }
  2282.     public function setBankName(?string $bankName): self
  2283.     {
  2284.         $this->bankName $bankName;
  2285.         return $this;
  2286.     }
  2287.     public function getTitulaire(): ?string
  2288.     {
  2289.         return $this->titulaire;
  2290.     }
  2291.     public function setTitulaire(?string $titulaire): self
  2292.     {
  2293.         $this->titulaire $titulaire;
  2294.         return $this;
  2295.     }
  2296.     public function getIsInvalidEmail(): ?bool
  2297.     {
  2298.         return $this->isInvalidEmail;
  2299.     }
  2300.     public function setIsInvalidEmail(?bool $isInvalidEmail): self
  2301.     {
  2302.         $this->isInvalidEmail $isInvalidEmail;
  2303.         return $this;
  2304.     }
  2305.     public function getIsInvalidPhoneNumber(): ?bool
  2306.     {
  2307.         return $this->isInvalidPhoneNumber;
  2308.     }
  2309.     public function setIsInvalidPhoneNumber(?bool $isInvalidPhoneNumber): self
  2310.     {
  2311.         $this->isInvalidPhoneNumber $isInvalidPhoneNumber;
  2312.         return $this;
  2313.     }
  2314.     public function getSpecialCustomerType(): ?string
  2315.     {
  2316.         return $this->specialCustomerType;
  2317.     }
  2318.     public function setSpecialCustomerType(?string $specialCustomerType): self
  2319.     {
  2320.         $this->specialCustomerType $specialCustomerType;
  2321.         return $this;
  2322.     }
  2323.     public function getIbmlOrganizationConfiguration(): ?IbmlOrganizationConfiguration
  2324.     {
  2325.         return $this->ibmlOrganizationConfiguration;
  2326.     }
  2327.     public function setIbmlOrganizationConfiguration(IbmlOrganizationConfiguration $ibmlOrganizationConfiguration): self
  2328.     {
  2329.         // set the owning side of the relation if necessary
  2330.         if ($ibmlOrganizationConfiguration->getOrganization() !== $this) {
  2331.             $ibmlOrganizationConfiguration->setOrganization($this);
  2332.         }
  2333.         $this->ibmlOrganizationConfiguration $ibmlOrganizationConfiguration;
  2334.         return $this;
  2335.     }
  2336.     public function getPotentialCases(): Collection
  2337.     {
  2338.         return $this->potentialCases;
  2339.     }
  2340.     public function addPotentitialCase(PotentialCase $potentialCase): self
  2341.     {
  2342.         if (!$this->potentialCases->contains($potentialCase)) {
  2343.             $this->potentialCases[] = $potentialCase;
  2344.             $potentialCase->addOrganization($this);
  2345.         }
  2346.         return $this;
  2347.     }
  2348.     public function removePotentialCase(PotentialCase $potentialCase): self
  2349.     {
  2350.         if ($this->potentialCases->removeElement($potentialCase)) {
  2351.             $potentialCase->removeOrganization($this);
  2352.         }
  2353.         return $this;
  2354.     }
  2355.     /**
  2356.      * @return Collection|CommercialGesture[]
  2357.      */
  2358.     public function getCommercialGestures(): Collection
  2359.     {
  2360.         return $this->commercialGestures;
  2361.     }
  2362.     public function addCommercialGesture(CommercialGesture $commercialGesture): self
  2363.     {
  2364.         if (!$this->commercialGestures->contains($commercialGesture)) {
  2365.             $this->commercialGestures[] = $commercialGesture;
  2366.             $commercialGesture->setOrganization($this);
  2367.         }
  2368.         return $this;
  2369.     }
  2370.     public function removeCommercialGesture(CommercialGesture $commercialGesture): self
  2371.     {
  2372.         // set the owning side to null (unless already changed)
  2373.         if ($this->commercialGestures->removeElement($commercialGesture) && $commercialGesture->getOrganization() === $this) {
  2374.             $commercialGesture->setOrganization(null);
  2375.         }
  2376.         return $this;
  2377.     }
  2378.     public function getActivityCategory(): ?ProfessionDetail
  2379.     {
  2380.         return $this->activityCategory;
  2381.     }
  2382.     public function setActivityCategory(?ProfessionDetail $activityCategory): self
  2383.     {
  2384.         $this->activityCategory $activityCategory;
  2385.         return $this;
  2386.     }
  2387.     public function getReferralSource(): ?self
  2388.     {
  2389.         return $this->referralSource;
  2390.     }
  2391.     public function setReferralSource(?self $referralSource): self
  2392.     {
  2393.         $this->referralSource $referralSource;
  2394.         return $this;
  2395.     }
  2396.     /**
  2397.      * @return Collection<int, self>
  2398.      */
  2399.     public function getGodSons(): Collection
  2400.     {
  2401.         return $this->godSons;
  2402.     }
  2403.     public function addGodSon(self $godSon): self
  2404.     {
  2405.         if (!$this->godSons->contains($godSon)) {
  2406.             $this->godSons[] = $godSon;
  2407.             $godSon->setReferralSource($this);
  2408.         }
  2409.         return $this;
  2410.     }
  2411.     public function removeGodSon(self $godSon): self
  2412.     {
  2413.         // set the owning side to null (unless already changed)
  2414.         if ($this->godSons->removeElement($godSon) && $godSon->getReferralSource() === $this) {
  2415.             $godSon->setReferralSource(null);
  2416.         }
  2417.         return $this;
  2418.     }
  2419.     public function getEncryptedParentId(): ?string
  2420.     {
  2421.         return $this->encryptedParentId;
  2422.     }
  2423.     public function setEncryptedParentId(?string $encryptedParentId): self
  2424.     {
  2425.         $this->encryptedParentId $encryptedParentId;
  2426.         return $this;
  2427.     }
  2428.     public function getIsReferralProcessFinished(): ?bool
  2429.     {
  2430.         return $this->isReferralProcessFinished;
  2431.     }
  2432.     public function setIsReferralProcessFinished(?bool $isReferralProcessFinished): self
  2433.     {
  2434.         $this->isReferralProcessFinished $isReferralProcessFinished;
  2435.         return $this;
  2436.     }
  2437.     public function getIsDigidomAccountant(): ?bool
  2438.     {
  2439.         return $this->isDigidomAccountant;
  2440.     }
  2441.     public function setIsDigidomAccountant(?bool $isDigidomAccountant): self
  2442.     {
  2443.         $this->isDigidomAccountant $isDigidomAccountant;
  2444.         return $this;
  2445.     }
  2446.     public function getActivityDomain(): ?ActivityDomain
  2447.     {
  2448.         return $this->activityDomain;
  2449.     }
  2450.     public function setActivityDomain(?ActivityDomain $activityDomain): self
  2451.     {
  2452.         $this->activityDomain $activityDomain;
  2453.         return $this;
  2454.     }
  2455.     /**
  2456.      * @Groups({"read_search_signature"})
  2457.      */
  2458.     public function getNumberOfLetterParcel(): int
  2459.     {
  2460.         return 0;
  2461.     }
  2462.     public function getIsSurveillance(): bool
  2463.     {
  2464.         return $this->isSurveillance;
  2465.     }
  2466.     public function setIsSurveillance(bool $isSurveillance): self
  2467.     {
  2468.         $this->isSurveillance $isSurveillance;
  2469.         return $this;
  2470.     }
  2471.     /**
  2472.      * @Groups({"read_zappier_letter"})
  2473.      * Virtual property to check if the organization is authorized to use Zappier for letter
  2474.      * Check if the organization has a subscription DOM with the product type SCAN_ENVELOPPE
  2475.      * and if the subscription is not blocked
  2476.      */
  2477.     public function isAuthorizedToUseZappierForLetter(): bool
  2478.     {
  2479.         $subscription SubscriptionUtils::getDomSubscription($this);
  2480.         if (!$subscription) {
  2481.             return false;
  2482.         }
  2483.         return !$subscription->isHasBlockedService() && SubscriptionUtils::hasProductType($subscriptionProductKeyEnum::SCAN_ENVELOPPE);
  2484.     }
  2485.     public function getBeneficialOwners(): ?array
  2486.     {
  2487.         return $this->beneficialOwners;
  2488.     }
  2489.     public function setBeneficialOwners(?array $beneficialOwners): void
  2490.     {
  2491.         $this->beneficialOwners $beneficialOwners;
  2492.     }
  2493.     public function getHistory(): array
  2494.     {
  2495.         return [];
  2496.     }
  2497.     public static function createFixture(array $data): self
  2498.     {
  2499.         $self = (new self());
  2500.         $self->store $data['store'] ?? null;
  2501.         $self->legalName $data['legalName'] ?: null;
  2502.         $self->status $data['status'] ?? 'CLIENT OK';
  2503.         $self->legalStatus $data['legalStatus'] ?: null;
  2504.         $self->SIRET $data['siren'] ?: null;
  2505.         $self->bal $data['bal'] ?: null;
  2506.         $self->domiciliationStartDate $data['domiciliationStartDate'] ?? null;
  2507.         $self->headQuartersAddressType $data['headQuartersAddressType'] ?? null;
  2508.         $self->VATRate $data['VATRate'] ?? '20';
  2509.         $self->isExemptTVA $data['isExemptTVA'] ?? false;
  2510.         $self->forwardingFrequency $data['forwardingFrequency'] ?? 'WEEKLY';
  2511.         $self->haveAccountant $data['haveAccountant'] ?? false;
  2512.         $self->iban $data['iban'] ?? 'FR7630001007941234567890185';
  2513.         $self->isNewDomiciliation $data['isNewDomiciliation'] ?? false;
  2514.         $self->mandatID $data['mandatID'] ?? '123456789';
  2515.         $self->referenceGocardless $data['referenceGocardless'] ?? '123456789';
  2516.         return $self;
  2517.     }
  2518.     public function getAccountsSubmissionLastYear(): ?string
  2519.     {
  2520.         return $this->accountsSubmissionLastYear;
  2521.     }
  2522.     public function setAccountsSubmissionLastYear(?string $accountsSubmissionLastYear): self
  2523.     {
  2524.         $this->accountsSubmissionLastYear $accountsSubmissionLastYear;
  2525.         return $this;
  2526.     }
  2527.     public function getProcessYousign(): ?ProcessYousign
  2528.     {
  2529.         return $this->processYousign;
  2530.     }
  2531.     public function setProcessYousign(?ProcessYousign $processYousign): Organization
  2532.     {
  2533.         $this->processYousign $processYousign;
  2534.         return $this;
  2535.     }
  2536. }