parent
d4e8c6bf9a
commit
ac5f5a7cc5
2 changed files with 20 additions and 5 deletions
|
|
@ -1061,6 +1061,21 @@ class Partnership extends CommonObject
|
|||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty($db, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array('partnership');
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the label of the status
|
||||
*
|
||||
|
|
|
|||
|
|
@ -5301,7 +5301,7 @@ class Societe extends CommonObject
|
|||
*/
|
||||
public function mergeCompany($soc_origin_id)
|
||||
{
|
||||
global $langs, $hookmanager, $user, $action;
|
||||
global $conf, $langs, $hookmanager, $user, $action;
|
||||
|
||||
$error = 0;
|
||||
$soc_origin = new Societe($this->db); // The thirdparty that we will delete
|
||||
|
|
@ -5413,16 +5413,16 @@ class Societe extends CommonObject
|
|||
'Account' => '/compta/bank/class/account.class.php',
|
||||
'ConferenceOrBoothAttendee' => '/eventorganization/class/conferenceorboothattendee.class.php'
|
||||
);
|
||||
if ($this->db->DDLListTables($this->db->database_name, 'don')) {
|
||||
if ($this->db->DDLListTables($conf->db->name, $this->db->prefix().'don')) {
|
||||
$objects['Don'] = '/don/class/don.class.php';
|
||||
}
|
||||
if ($this->db->DDLListTables($this->db->database_name, 'partnership')) {
|
||||
if ($this->db->DDLListTables($conf->db->name, $this->db->prefix().'partnership')) {
|
||||
$objects['PartnerShip'] = '/partnership/class/partnership.class.php';
|
||||
}
|
||||
if ($this->db->DDLListTables($this->db->database_name, 'fichinter')) {
|
||||
if ($this->db->DDLListTables($conf->db->name, $this->db->prefix().'fichinter')) {
|
||||
$objects['Fichinter'] = '/fichinter/class/fichinter.class.php';
|
||||
}
|
||||
if ($this->db->DDLListTables($this->db->database_name, 'ticket')) {
|
||||
if ($this->db->DDLListTables($conf->db->name, $this->db->prefix().'ticket')) {
|
||||
$objects['Ticket'] = '/ticket/class/ticket.class.php';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue