diff --git a/htdocs/partnership/partnership_card.php b/htdocs/partnership/partnership_card.php index f46b608d603..d387f0197a9 100644 --- a/htdocs/partnership/partnership_card.php +++ b/htdocs/partnership/partnership_card.php @@ -166,8 +166,8 @@ if (empty($reshook)) { $fpartnership = new Partnership($db); $partnershipid = $fpartnership->fetch(0, "", $fk_soc); - if($partnershipid > 0){ - setEventMessages($langs->trans('PartnershipAlreadyExist').' : '.$fpartnership->getNomUrl(0,'',1), '', 'errors'); + if ($partnershipid > 0) { + setEventMessages($langs->trans('PartnershipAlreadyExist').' : '.$fpartnership->getNomUrl(0, '', 1), '', 'errors'); $action = ($action == 'add') ? 'create' : 'edit'; } } @@ -226,7 +226,6 @@ if (empty($reshook)) { $error++; } else { $object->reason_decline_or_cancel = GETPOST('reason_decline_or_cancel', 'restricthtml'); - } if (!$error) { @@ -262,7 +261,7 @@ if (empty($reshook)) { $trackid = 'partnership'.$object->id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; - if(!empty($id) && !empty(GETPOST('confirm'))){ + if (!empty($id) && !empty(GETPOST('confirm'))) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } diff --git a/htdocs/societe/partnership.php b/htdocs/societe/partnership.php index 0cb18930030..1ee013f985c 100644 --- a/htdocs/societe/partnership.php +++ b/htdocs/societe/partnership.php @@ -535,14 +535,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if ($permissiontoadd) { print dolGetButtonAction($langs->trans('ShowPartnership'), '', 'default', dol_buildpath('/partnership/partnership_card.php', 1).'?id='.$object->id, '', $permissiontoadd); } - + // Cancel if ($permissiontoadd) { if ($object->status == $object::STATUS_ACCEPTED) { print dolGetButtonAction($langs->trans('Cancel'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=close&token='.newToken(), '', $permissiontoadd); } } - } print ''."\n"; }