From d76f689bc2ae5023310b6c2c5b9cff412ca2a650 Mon Sep 17 00:00:00 2001 From: CODE42 FR Date: Tue, 10 Sep 2024 16:38:33 +0200 Subject: [PATCH 1/2] [#29371] Fixed : Php wanring on separate type extra field update (#30910) Co-authored-by: TREBUCHET --- htdocs/core/class/extrafields.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 32a2c5ee228..7c32a8f901a 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -643,6 +643,8 @@ class ExtraFields { global $action, $hookmanager; + $result = 0; + if ($elementtype == 'thirdparty') { $elementtype = 'societe'; } From 303e9ed891579ea1169b419190a9e4ca5047e649 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Sep 2024 14:01:31 +0200 Subject: [PATCH 2/2] Debug v20 --- htdocs/compta/facture/card.php | 2 +- htdocs/core/tpl/extrafields_view.tpl.php | 2 +- htdocs/societe/card.php | 12 ++++++------ htdocs/societe/tpl/linesalesrepresentative.tpl.php | 2 +- htdocs/theme/eldy/global.inc.php | 3 +++ 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 511b6f69697..1bf2b413e8e 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -4669,7 +4669,7 @@ if ($action == 'create') { print ''; // Type - print '
'.$langs->trans('Type').''; + print '
'.$langs->trans('Type').''; print $object->getLibType(2); if ($object->subtype > 0) { print ' '.$object->getSubtypeLabel('facture'); diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index ac3fea2ca4a..0c9bac901b7 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -130,7 +130,7 @@ if (empty($reshook) && !empty($object->table_element) && isset($extrafields->att } print '>'; $extrafields_collapse_num_old = $extrafields_collapse_num; - print ''; + print ''; print ''; print ''; diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 6b6636b5795..783258014f7 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -2571,7 +2571,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio if (isModEnabled('accounting')) { // Accountancy_code_sell - print ''; + print ''; print ''; @@ -2583,7 +2583,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio print ''; } else { // For external software // Accountancy_code_sell - print ''; + print ''; print ''; @@ -2920,7 +2920,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio if (isModEnabled('category') && $user->hasRight('categorie', 'lire')) { // Customer if ($object->prospect || $object->client || getDolGlobalString('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT')) { - print ''; + print ''; print '"; @@ -2928,7 +2928,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio // Supplier if (((isModEnabled("fournisseur") && $user->hasRight('fournisseur', 'lire') && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD')) || (isModEnabled("supplier_order") && $user->hasRight('supplier_order', 'lire')) || (isModEnabled("supplier_invoice") && $user->hasRight('supplier_invoice', 'lire'))) && $object->fournisseur) { - print ''; + print ''; print '"; @@ -2937,7 +2937,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio // Third-Party Type - print '
'.$langs->trans("ProductAccountancySellCode").'
'.$langs->trans("ProductAccountancySellCode").''; print $formaccounting->select_account($object->accountancy_code_sell, 'accountancy_code_sell', 1, '', 1, 1); print '
'.$langs->trans("ProductAccountancySellCode").'
'.$langs->trans("ProductAccountancySellCode").''; print '
'.$langs->trans("CustomersCategoriesShort").'
'.$langs->trans("CustomersCategoriesShort").''; print $form->showCategories($object->id, Categorie::TYPE_CUSTOMER, 1); print "
'.$langs->trans("SuppliersCategoriesShort").'
'.$langs->trans("SuppliersCategoriesShort").''; print $form->showCategories($object->id, Categorie::TYPE_SUPPLIER, 1); print "
'; + print '
'; print ''; if ($action != 'editthirdpartytype' && $user->hasRight('societe', 'creer')) { print ''; @@ -2954,7 +2954,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio } // Legal - print ''; + print ''; // Capital print ''; } print '
'.$langs->trans('ThirdPartyType').'id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'
'.$langs->trans('JuridicalStatus').''.$object->forme_juridique.'
'.$langs->trans('JuridicalStatus').''.dolPrintHTML($object->forme_juridique).'
'.$langs->trans('Capital').''; diff --git a/htdocs/societe/tpl/linesalesrepresentative.tpl.php b/htdocs/societe/tpl/linesalesrepresentative.tpl.php index fa766a17d5c..4891798d398 100644 --- a/htdocs/societe/tpl/linesalesrepresentative.tpl.php +++ b/htdocs/societe/tpl/linesalesrepresentative.tpl.php @@ -34,7 +34,7 @@ if ($action != 'editsalesrepresentatives' && $user->hasRight('societe', 'creer') print '
'; -print '
'; +print ''; if ($action == 'editsalesrepresentatives') { print '
'; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index b610ecb9fc8..15ec4611f64 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -4225,6 +4225,9 @@ table.liste tr, table.noborder tr, div.noborder form { table.liste th, table.noborder th, table.noborder tr.liste_titre td, table.noborder tr.box_titre td { padding: 6px 10px 6px 12px; /* t r b l */ } +table.tableforfield td, .tagtr.table-border-row .tagtd { + padding: 2px 4px 2px 10px; /* t r b l */ +} table.liste td, table.noborder td, div.noborder form div, table.tableforservicepart1 td, table.tableforservicepart2 td { padding: 6px 10px 6px 12px; /* t r b l */ /* line-height: 22px; This create trouble on cell login on list of last events of a contract*/