Fix missing properties

This commit is contained in:
Laurent Destailleur (aka Eldy)
2025-02-14 02:09:59 +01:00
parent fb1e3151c2
commit eeb8907f33
3 changed files with 21 additions and 5 deletions

View File

@@ -96,13 +96,12 @@ class Adherent extends CommonObject
/**
* @var string
* @deprecated Use $civility_code
* @see $civility_code
* @deprecated Use $civility_code
*/
public $civility_id;
/**
* @var string The civility code, not an integer (ex: 'MR', 'MME', 'MLE', etc.)
* @var string The civility code, not an integer (ex: 'MR', 'MME', 'MLE', 'DR', etc.)
*/
public $civility_code;

View File

@@ -653,9 +653,15 @@ abstract class CommonObject
/**
* @var string The civility code, not an integer
* @deprecated Use $civlity_code
*/
public $civility_id;
/**
* @var string The civility code, not an integer
*/
public $civility_code;
// Dates
/**
* @var integer|''|null Object creation date

View File

@@ -849,6 +849,16 @@ class Societe extends CommonObject
*/
public $accountancy_code_buy;
/**
* @var string Main currency code of company
*/
public $currency_code;
/**
* @var string Main currency label of company
*/
public $currency;
// Multicurrency
/**
* @var int Multicurrency ID
@@ -4442,7 +4452,7 @@ class Societe extends CommonObject
public function create_from_member(Adherent $member, $socname = '', $socalias = '', $customercode = '')
{
// phpcs:enable
global $conf, $user, $langs;
global $user, $langs;
dol_syslog(get_class($this)."::create_from_member", LOG_DEBUG);
$fullname = $member->getFullName($langs);
@@ -4497,7 +4507,8 @@ class Societe extends CommonObject
// Fill fields needed by contact
$this->name_bis = $member->lastname;
$this->firstname = $member->firstname;
$this->civility_id = $member->civility_id;
$this->civility_id = (empty($member->civility_code) ? $member->civility_id : $member->civility_code);
$this->civility_code = (empty($member->civility_code) ? $member->civility_id : $member->civility_code);
dol_syslog("We ask to create a contact/address too", LOG_DEBUG);
$result = $this->create_individual($user);