From a8d3fd8db2dee3efaef6c3ebd5d58ac21c7bfea4 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Mon, 7 Apr 2025 14:05:02 +0200 Subject: [PATCH] Fix CI --- htdocs/fourn/facture/card-rec.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/htdocs/fourn/facture/card-rec.php b/htdocs/fourn/facture/card-rec.php index 04e7a427052..b85de2b3891 100644 --- a/htdocs/fourn/facture/card-rec.php +++ b/htdocs/fourn/facture/card-rec.php @@ -324,9 +324,6 @@ if (empty($reshook)) { setEventMessages($object->error, $object->errors, 'errors'); } } - } elseif ($action == 'setlabel' && $permissiontoadd) { - // Set bank account - $result = $object->setValueFrom('libelle', $label, '', null, 'text', '', $user); } elseif ($action == 'setbankaccount' && $permissiontoadd) { // Set bank account $result = $object->setBankAccount(GETPOSTINT('fk_account')); @@ -394,15 +391,8 @@ if (empty($reshook)) { // Multicurrency rate $result = $object->setMulticurrencyRate((float) price2num(GETPOST('multicurrency_tx')), GETPOSTINT('calculation_mode')); } elseif ($action == 'setlabel' && $permissiontoadd) { - // Set label - $object->fetch($id); - $object->label = GETPOST('label'); - $object->label = $object->label; - $result = $object->update($user); - - if ($result < 0) { - dol_print_error($db); - } + // Set bank account + $result = $object->setValueFrom('libelle', $label, '', null, 'text', '', $user); } // Delete line