Fix merge of 2 record.

This commit is contained in:
Laurent Destailleur 2021-03-01 21:56:14 +01:00
parent 6e61ae8e56
commit 5b771eb798
3 changed files with 35 additions and 0 deletions

View File

@ -1090,4 +1090,21 @@ class Don extends CommonObject
return 0;
}
}
/**
* Function used to replace a thirdparty id with another one.
*
* @param DoliDB $db Database handler
* @param int $origin_id Old third-party id
* @param int $dest_id New third-party id
* @return bool
*/
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
{
$tables = array(
'don'
);
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
}
}

View File

@ -204,4 +204,21 @@ class Fournisseur extends Societe
}
return $arr;
}
/**
* Function used to replace a thirdparty id with another one.
*
* @param DoliDB $db Database handler
* @param int $origin_id Old third-party id
* @param int $dest_id New third-party id
* @return bool
*/
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
{
$tables = array(
'facture_fourn'
);
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
}
}

View File

@ -232,6 +232,7 @@ if (empty($reshook))
// TODO Mutualise the list into object societe.class.php
$objects = array(
'Adherent' => '/adherents/class/adherent.class.php',
'Don' => '/don/class/don.class.php',
'Societe' => '/societe/class/societe.class.php',
//'Categorie' => '/categories/class/categorie.class.php',
'ActionComm' => '/comm/action/class/actioncomm.class.php',