<commit_before><?php

class DeclarantDocument
{
    protected $document;

    public function __construct(acCouchdbDocument $document)
    {
        $this->document = $document;
    }
    
    public function getIdentifiant()
    {
        return $this->document->identifiant;
    }

    public function getDeclarant()
    {
        return $this->document->declarant;
    }
    
    public function getEtablissementObject() {
       
        return EtablissementClient::getInstance()->findByIdentifiant($this->getIdentifiant());
    }

    public function storeDeclarant()
    {
        $etb = $this->getEtablissementObject();
        $declarant = $this->getDeclarant();
        $declarant->nom = $etb->nom;
        $declarant->cvi = $etb->cvi;
        $declarant->num_accise = $etb->no_accises;
        $declarant->num_tva_intracomm = $etb->no_tva_intracommunautaire;
        $declarant->adresse = $etb->siege->adresse;        
        $declarant->commune = $etb->siege->commune;
        $declarant->code_postal = $etb->siege->code_postal;
        $declarant->num_chai = 'NUM CHAI 0000';
    }
}<commit_msg>Ajout de la raison sociale dans les declarant (declarant est utilisé maintenant par la facturation en remplacement du "client" -> viti ou négo)<commit_after><?php

class DeclarantDocument
{
    protected $document;

    public function __construct(acCouchdbDocument $document)
    {
        $this->document = $document;
    }
    
    public function getIdentifiant()
    {
        return $this->document->identifiant;
    }

    public function getDeclarant()
    {
        return $this->document->declarant;
    }
    
    public function getEtablissementObject() {
       
        return EtablissementClient::getInstance()->findByIdentifiant($this->getIdentifiant());
    }

    public function storeDeclarant()
    {
        $etb = $this->getEtablissementObject();
        $declarant = $this->getDeclarant();
        $declarant->nom = $etb->nom;
        $declarant->cvi = $etb->cvi;
        $declarant->num_accise = $etb->no_accises;
        $declarant->num_tva_intracomm = $etb->no_tva_intracommunautaire;
        $declarant->adresse = $etb->siege->adresse;        
        $declarant->commune = $etb->siege->commune;
        $declarant->code_postal = $etb->siege->code_postal;
        $declarant->num_chai = 'NUM CHAI 0000';
        $declarant->raison_sociale = $etb->raison_sociale;
    }
}
{'fraction_non_alphanumeric': 0.12806652806652807, 'fraction_numerical': 0.0033264033264033266, 'mean_word_length': 2.7535101404056164, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 60, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1893513', 'n_tokens_mistral': 820, 'n_tokens_neox': 774, 'n_words': 125}