use dol_getIdFromCode for TE_PRIVATE

This commit is contained in:
daraelmin 2021-03-29 22:15:28 +02:00
parent b6d03dcad0
commit 57b15c1821

View File

@ -3795,7 +3795,8 @@ class Societe extends CommonObject
$this->client = 1; // A member is a customer by default
$this->code_client = ($customercode ? $customercode : -1);
$this->code_fournisseur = -1;
$this->typent_id = ($member->morphy == 'phy' ? 8 : 0); // The type of thirdparty is private (individual) if the member is human (phy)
$this->typent_code = ($member->morphy == 'phy' ? 'TE_PRIVATE' : 0);
$this->typent_id = dol_getIdFromCode($this->db, $this->typent_code, 'c_typent', 'id', 'code');
$this->db->begin();