This commit is contained in:
Laurent Destailleur 2022-07-16 11:40:38 +02:00
parent c759b56622
commit 2e42f45c99
5 changed files with 9 additions and 11 deletions

View File

@ -90,7 +90,7 @@ class InterfaceNotification extends DolibarrTriggers
*/
public function getListOfManagedEvents()
{
global $conf;
global $conf, $action;
global $hookmanager;
@ -100,6 +100,8 @@ class InterfaceNotification extends DolibarrTriggers
}
$hookmanager->initHooks(array('notification'));
$parameters = array();
$object = new stdClass();
$reshook = $hookmanager->executeHooks('notifsupported', $parameters, $object, $action);
if (empty($reshook)) {
if (!empty($hookmanager->resArray['arrayofnotifsupported'])) {

View File

@ -417,17 +417,19 @@ class ActionsDatapolicy
}
if (GETPOST('socid')) {
/* Removed due to awful harcoded values
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
$societe = new Societe($this->db);
$societe->fetch(GETPOST('socid'));
if (!in_array($object->forme_juridique_code, array(11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005)) && $societe->typent_id != 8) {
if (!empty($object->forme_juridique_code) && !in_array($object->forme_juridique_code, array(11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005)) && $societe->typent_id != 8) {
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
$jsscript .= '<script>';
$jsscript .= "var elementToHide = 'td.societe_extras_datapolicy_opposition_traitement, td.societe_extras_datapolicy_opposition_prospection, td.societe_extras_datapolicy_consentement';".PHP_EOL;
$jsscript .= "$(elementToHide).parent('tr').hide();".PHP_EOL;
$jsscript .= '</script>';
}
*/
}
} elseif ($parameters['currentcontext'] == 'contactcard') {
if (GETPOST('action') == 'create' || GETPOST('action') == 'edit') {

View File

@ -682,6 +682,7 @@ $title = $langs->trans("ThirdParty");
if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) {
$title = $object->name." - ".$langs->trans('PaymentInformation');
}
$help_url = '';
llxHeader('', $title, $help_url);

View File

@ -128,17 +128,10 @@ $contactstatic = new Contact($db);
$userstatic = new User($db);
/* *************************************************************************** */
/* */
/* Mode vue et edition */
/* */
/* *************************************************************************** */
// View and edit
if ($id > 0 || !empty($ref)) {
if ($object->fetch($id, $ref) > 0) {
$soc = new Societe($db);
$soc->fetch($object->socid);
$head = societe_prepare_head($object);
print dol_get_fiche_head($head, 'contact', $langs->trans("ThirdParty"), -1, 'company');

View File

@ -115,7 +115,7 @@ class Stripe extends CommonObject
$tokenstring = $obj->tokenstring;
$tmparray = json_decode($tokenstring);
$key = $tmparray->stripe_user_id;
$key = empty($tmparray->stripe_user_id) ? '' : $tmparray->stripe_user_id;
} else {
$tokenstring = '';
}