mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 09:02:59 +01:00
Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -4474,20 +4474,24 @@ abstract class CommonObject
|
||||
* This function is meant to be called from replaceThirdparty with the appropiate tables
|
||||
* Column name fk_soc MUST be used to identify thirdparties
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id (the thirdparty to delete)
|
||||
* @param int $dest_id New thirdparty id (the thirdparty that will received element of the other)
|
||||
* @param string[] $tables Tables that need to be changed
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id (the thirdparty to delete)
|
||||
* @param int $dest_id New thirdparty id (the thirdparty that will received element of the other)
|
||||
* @param string[] $tables Tables that need to be changed
|
||||
* @param int $ignoreerrors Ignore errors. Return true even if errors. We need this when replacement can fails like for categories (categorie of old thirdparty may already exists on new one)
|
||||
* @return bool
|
||||
*/
|
||||
public static function commonReplaceThirdparty(DoliDB $db, $origin_id, $dest_id, array $tables)
|
||||
public static function commonReplaceThirdparty(DoliDB $db, $origin_id, $dest_id, array $tables, $ignoreerrors=0)
|
||||
{
|
||||
foreach ($tables as $table)
|
||||
{
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.$table.' SET fk_soc = '.$dest_id.' WHERE fk_soc = '.$origin_id;
|
||||
|
||||
if (!$db->query($sql)) {
|
||||
return false;
|
||||
if (! $db->query($sql))
|
||||
{
|
||||
if ($ignoreerrors) return true;
|
||||
//$this->errors = $db->lasterror();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5922,7 +5922,7 @@ class Form
|
||||
/**
|
||||
* Return HTML to show the search and clear seach button
|
||||
*
|
||||
* @param int $addcheckuncheckall Add the check all uncheck al button
|
||||
* @param int $addcheckuncheckall Add the check all uncheck all button
|
||||
* @param string $cssclass CSS class
|
||||
* @param int $calljsfunction 0=default. 1=call function initCheckForSelect() after changing status of checkboxes
|
||||
* @return string
|
||||
|
||||
@@ -1093,8 +1093,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
if (empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)))
|
||||
{
|
||||
$newmenu->add("/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank",$langs->trans("MenuChequeDeposits"),0,$user->rights->banque->cheque, '', $mainmenu, 'checks');
|
||||
$newmenu->add("/compta/paiement/cheque/card.php?leftmenu=checks&action=new&mainmenu=bank",$langs->trans("NewChequeDeposit"),1,$user->rights->banque->cheque);
|
||||
$newmenu->add("/compta/paiement/cheque/list.php?leftmenu=checks&mainmenu=bank",$langs->trans("List"),1,$user->rights->banque->cheque);
|
||||
if (preg_match('/checks/',$leftmenu)) $newmenu->add("/compta/paiement/cheque/card.php?leftmenu=checks_bis&action=new&mainmenu=bank",$langs->trans("NewChequeDeposit"),1,$user->rights->banque->cheque);
|
||||
if (preg_match('/checks/',$leftmenu)) $newmenu->add("/compta/paiement/cheque/list.php?leftmenu=checks_bis&mainmenu=bank",$langs->trans("List"),1,$user->rights->banque->cheque);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user