diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index d9730aeb8d3..0a961d5637f 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -56,6 +56,7 @@ if (! empty($conf->notification->enabled)) $langs->load("mails"); $mesg=''; $error=0; $errors=array(); $action = (GETPOST('action') ? GETPOST('action') : 'view'); +$cancel = GETPOST('cancel'); $backtopage = GETPOST('backtopage','alpha'); $confirm = GETPOST('confirm'); $socid = GETPOST('socid','int'); @@ -98,6 +99,16 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e if (empty($reshook)) { + if ($cancel) + { + $action=''; + if (! empty($backtopage)) + { + header("Location: ".$backtopage); + exit; + } + } + if ($action == 'confirm_merge' && $confirm == 'yes') { $object->fetch($socid); @@ -1273,7 +1284,12 @@ else dol_fiche_end(); print '
'; - print ''; + print ''; + if ($backtopage) + { + print '   '; + print ''; + } print '
'."\n"; print ''."\n";