From 9747efe050e23df10bc29f825c053bf0ec4699cb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 24 Mar 2022 14:09:46 +0100 Subject: [PATCH] Fix phpcs --- htdocs/compta/prelevement/card.php | 1 - htdocs/variants/card.php | 12 ++++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index 0b1b82998b2..a56ba593a9c 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -312,7 +312,6 @@ if ($id > 0 || $ref) { $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { - if (empty($object->date_trans)) { if ($object->type == 'bank-transfer') print dolGetButtonAction($langs->trans("SetToStatusSent"), '', 'default', 'card.php?action=settransmitted&token='.newToken().'&id='.$object->id, '', $user->rights->paymentbybanktransfer->send); else print dolGetButtonAction($langs->trans("SetToStatusSent"), '', 'default', 'card.php?action=settransmitted&token='.newToken().'&id='.$object->id, '', $user->rights->prelevement->bons->send); diff --git a/htdocs/variants/card.php b/htdocs/variants/card.php index 1a97c2252df..68bb8d60998 100644 --- a/htdocs/variants/card.php +++ b/htdocs/variants/card.php @@ -191,10 +191,8 @@ if ($action == 'create') { print ''; dol_set_focus('input[name="label"]'); -} - -// Part to edit record -elseif (($id || $ref) && $action == 'edit') { +} elseif (($id || $ref) && $action == 'edit') { + // Part to edit record print load_fiche_titre($langs->trans("ProductAttribute"), '', 'object_' . $object->picto); print '
'; @@ -224,10 +222,8 @@ elseif (($id || $ref) && $action == 'edit') { print ''; print '
'; -} - -// Part to show record -elseif ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { +} elseif ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { + // Part to show record $res = $object->fetch_optionals(); $head = productAttributePrepareHead($object);