From 8906df343a5bf644dba4e1e20d0fbfdbc6dd8771 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 Mar 2024 16:01:41 +0100 Subject: [PATCH] NEW Add option THIRDPARTY_MIN_NB_PROF_ID and THIRDPARTY_MAX_NB_PROF_ID --- dev/translation/dynamic_translation_keys.lst | 13 ++- .../sanity_check_trans_missing_unused.sh | 2 +- htdocs/admin/company.php | 28 +++---- htdocs/core/class/html.formother.class.php | 2 +- htdocs/langs/en_US/companies.lang | 83 ------------------- htdocs/societe/card.php | 21 +++-- htdocs/theme/eldy/global.inc.php | 11 ++- htdocs/theme/md/style.css.php | 9 +- 8 files changed, 50 insertions(+), 119 deletions(-) diff --git a/dev/translation/dynamic_translation_keys.lst b/dev/translation/dynamic_translation_keys.lst index 47ab2e14a79..2dcd99eafbc 100644 --- a/dev/translation/dynamic_translation_keys.lst +++ b/dev/translation/dynamic_translation_keys.lst @@ -2650,9 +2650,7 @@ ProductsOrServicesTranslations ProductsPipeServices ProductsPricePerCustomer ProfId10 -ProfId10FR ProfId10Short -ProfId10ShortFR ProfId1ShortCM ProfId1ShortFR ProfId2ShortCM @@ -2663,14 +2661,15 @@ ProfId4ShortCM ProfId4ShortFR ProfId5ShortCM ProfId5ShortFR -ProfId6ShortCM -ProfId6ShortFR +ProfId1Short +ProfId2Short +ProfId3Short +ProfId4Short +ProfId5Short +ProfId6Short ProfId7Short -ProfId7ShortFR ProfId8Short -ProfId8ShortFR ProfId9Short -ProfId9ShortFR ProformaBill ProjectCreatedByEmailCollector ProjectHasNoCategory diff --git a/dev/translation/sanity_check_trans_missing_unused.sh b/dev/translation/sanity_check_trans_missing_unused.sh index 459f59117a5..b003127d5be 100755 --- a/dev/translation/sanity_check_trans_missing_unused.sh +++ b/dev/translation/sanity_check_trans_missing_unused.sh @@ -129,7 +129,7 @@ if [ -s "${MISSING_AND_UNUSED_FILE}" ] ; then echo "## :warning: Unused Translations may match ->trans(\$key.'SomeString')." echo "## You can add such dynamic keys to $(basename "$DYNAMIC_KEYS_SRC_FILE")" echo "## so that they are ignored for this report." - echo "## :warning: Unused Translations may be commented in the code" + echo "## :warning: Unused Translations may also be commented in the code" echo "## You can add such 'disabled' keys to $(basename "$EXCLUDE_KEYS_SRC_FILE")" echo "## so that they are ignored for this report." echo diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index f07961486c6..1a5a68fc085 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -652,7 +652,7 @@ print ''; if ($langs->transcountry("ProfId1", $mysoc->country_code) != '-') { print ''; if (!empty($mysoc->country_code)) { - print ''; + print ''; } else { print $countrynotdefined; } @@ -663,7 +663,7 @@ if ($langs->transcountry("ProfId1", $mysoc->country_code) != '-') { if ($langs->transcountry("ProfId2", $mysoc->country_code) != '-') { print ''; if (!empty($mysoc->country_code)) { - print ''; + print ''; } else { print $countrynotdefined; } @@ -674,7 +674,7 @@ if ($langs->transcountry("ProfId2", $mysoc->country_code) != '-') { if ($langs->transcountry("ProfId3", $mysoc->country_code) != '-') { print ''; if (!empty($mysoc->country_code)) { - print ''; + print ''; } else { print $countrynotdefined; } @@ -685,7 +685,7 @@ if ($langs->transcountry("ProfId3", $mysoc->country_code) != '-') { if ($langs->transcountry("ProfId4", $mysoc->country_code) != '-') { print ''; if (!empty($mysoc->country_code)) { - print ''; + print ''; } else { print $countrynotdefined; } @@ -696,7 +696,7 @@ if ($langs->transcountry("ProfId4", $mysoc->country_code) != '-') { if ($langs->transcountry("ProfId5", $mysoc->country_code) != '-') { print ''; if (!empty($mysoc->country_code)) { - print ''; + print ''; } else { print $countrynotdefined; } @@ -707,7 +707,7 @@ if ($langs->transcountry("ProfId5", $mysoc->country_code) != '-') { if ($langs->transcountry("ProfId6", $mysoc->country_code) != '-') { print ''; if (!empty($mysoc->country_code)) { - print ''; + print ''; } else { print $countrynotdefined; } @@ -716,9 +716,9 @@ if ($langs->transcountry("ProfId6", $mysoc->country_code) != '-') { // ProfId7 if ($langs->transcountry("ProfId7", $mysoc->country_code) != '-') { - print ''; + print ''; if (!empty($mysoc->country_code)) { - print ''; + print ''; } else { print $countrynotdefined; } @@ -727,9 +727,9 @@ if ($langs->transcountry("ProfId7", $mysoc->country_code) != '-') { // ProfId8 if ($langs->transcountry("ProfId8", $mysoc->country_code) != '-') { - print ''; + print ''; if (!empty($mysoc->country_code)) { - print ''; + print ''; } else { print $countrynotdefined; } @@ -738,9 +738,9 @@ if ($langs->transcountry("ProfId8", $mysoc->country_code) != '-') { // ProfId9 if ($langs->transcountry("ProfId9", $mysoc->country_code) != '-') { - print ''; + print ''; if (!empty($mysoc->country_code)) { - print ''; + print ''; } else { print $countrynotdefined; } @@ -749,9 +749,9 @@ if ($langs->transcountry("ProfId9", $mysoc->country_code) != '-') { // ProfId10 if ($langs->transcountry("ProfId10", $mysoc->country_code) != '-') { - print ''; + print ''; if (!empty($mysoc->country_code)) { - print ''; + print ''; } else { print $countrynotdefined; } diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 86f850f7cdf..b0f25e98872 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -1271,7 +1271,7 @@ class FormOther $selectboxlist .= ''; $selectboxlist .= ''; $selectboxlist .= ''; - $selectboxlist .= Form::selectarray('boxcombo', $arrayboxtoactivatelabel, -1, $langs->trans("ChooseBoxToAdd").'...', 0, 0, '', 0, 0, 0, 'ASC', 'maxwidth150onsmartphone hideonprint', 0, 'hidden selected', 0, 0); + $selectboxlist .= Form::selectarray('boxcombo', $arrayboxtoactivatelabel, -1, $langs->trans("ChooseBoxToAdd").'...', 0, 0, '', 0, 0, 0, 'ASC', 'maxwidth300 hideonprint', 0, 'hidden selected', 0, 0); if (empty($conf->use_javascript_ajax)) { $selectboxlist .= ' '; } diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 526483b1339..d1ca72b826a 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -135,180 +135,97 @@ ProfId9=Professional ID 9 ProfId10=Professional ID 10 ProfId1AR=Prof Id 1 (CUIT/CUIL) ProfId2AR=Prof Id 2 (Revenu brutes) -ProfId3AR=- -ProfId4AR=- -ProfId5AR=- -ProfId6AR=- ProfId1AT=Prof Id 1 (USt.-IdNr) ProfId2AT=Prof Id 2 (USt.-Nr) ProfId3AT=Prof Id 3 (Handelsregister-Nr.) -ProfId4AT=- ProfId5AT=EORI number -ProfId6AT=- ProfId1AU=Prof Id 1 (ABN) -ProfId2AU=- -ProfId3AU=- -ProfId4AU=- -ProfId5AU=- -ProfId6AU=- ProfId1BE=Prof Id 1 (Professional number) -ProfId2BE=- -ProfId3BE=- -ProfId4BE=- ProfId5BE=EORI number -ProfId6BE=- -ProfId1BR=- ProfId2BR=IE (Inscricao Estadual) ProfId3BR=IM (Inscricao Municipal) ProfId4BR=CPF #ProfId5BR=CNAE #ProfId6BR=INSS ProfId1CH=UID-Nummer -ProfId2CH=- ProfId3CH=Prof Id 1 (Federal number) ProfId4CH=Prof Id 2 (Commercial Record number) ProfId5CH=EORI number -ProfId6CH=- ProfId1CL=Prof Id 1 (R.U.T.) -ProfId2CL=- -ProfId3CL=- -ProfId4CL=- -ProfId5CL=- -ProfId6CL=- ProfId1CM=Id. prof. 1 (Trade Register) ProfId2CM=Id. prof. 2 (Taxpayer No.) ProfId3CM=Id. prof. 3 (No. of Creation decree) ProfId4CM=Id. prof. 4 (No. of Deposit certificate) ProfId5CM=Id. prof. 5 (Others) -ProfId6CM=- ProfId1ShortCM=Trade Register ProfId2ShortCM=Taxpayer No. ProfId3ShortCM=No. of Creation decree ProfId4ShortCM=No. of Deposit certificate ProfId5ShortCM=Others -ProfId6ShortCM=- ProfId1CO=Prof Id 1 (R.U.T.) -ProfId2CO=- -ProfId3CO=- -ProfId4CO=- -ProfId5CO=- -ProfId6CO=- ProfId1DE=Prof Id 1 (USt.-IdNr) ProfId2DE=Prof Id 2 (USt.-Nr) ProfId3DE=Prof Id 3 (Handelsregister-Nr.) -ProfId4DE=- ProfId5DE=EORI number -ProfId6DE=- ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) ProfId5ES=Prof Id 5 (EORI number) -ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) ProfId5FR=Prof Id 5 (numéro EORI) -ProfId6FR=- -ProfId7FR=- -ProfId8FR=- -ProfId9FR=- -ProfId10FR=- ProfId1ShortFR=SIREN ProfId2ShortFR=SIRET ProfId3ShortFR=NAF ProfId4ShortFR=RCS ProfId5ShortFR=EORI -ProfId6ShortFR=- -ProfId7ShortFR=- -ProfId8ShortFR=- -ProfId9ShortFR=- -ProfId10ShortFR=- ProfId1GB=Registration Number -ProfId2GB=- ProfId3GB=SIC -ProfId4GB=- -ProfId5GB=- -ProfId6GB=- ProfId1HN=Id prof. 1 (RTN) -ProfId2HN=- -ProfId3HN=- -ProfId4HN=- -ProfId5HN=- -ProfId6HN=- ProfId1IN=Prof Id 1 (TIN) ProfId2IN=Prof Id 2 (PAN) ProfId3IN=Prof Id 3 (SRVC TAX) ProfId4IN=Prof Id 4 ProfId5IN=Prof Id 5 -ProfId6IN=- -ProfId1IT=- -ProfId2IT=- -ProfId3IT=- -ProfId4IT=- ProfId5IT=EORI number -ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) -ProfId3LU=- -ProfId4LU=- ProfId5LU=EORI number -ProfId6LU=- ProfId1MA=Id prof. 1 (R.C.) ProfId2MA=Id prof. 2 (Patente) ProfId3MA=Id prof. 3 (I.F.) ProfId4MA=Id prof. 4 (C.N.S.S.) ProfId5MA=Id prof. 5 (I.C.E.) -ProfId6MA=- ProfId1MX=Prof Id 1 (R.F.C). ProfId2MX=Prof Id 2 (R..P. IMSS) ProfId3MX=Prof Id 3 (Professional Charter) -ProfId4MX=- -ProfId5MX=- -ProfId6MX=- ProfId1NL=KVK nummer -ProfId2NL=- -ProfId3NL=- ProfId4NL=Burgerservicenummer (BSN) ProfId5NL=EORI number -ProfId6NL=- ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) ProfId5PT=Prof Id 5 (EORI number) -ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA -ProfId3SN=- -ProfId4SN=- -ProfId5SN=- -ProfId6SN=- ProfId1TN=Prof Id 1 (RC) ProfId2TN=Prof Id 2 (Fiscal matricule) ProfId3TN=Prof Id 3 (Douane code) ProfId4TN=Prof Id 4 (BAN) -ProfId5TN=- -ProfId6TN=- ProfId1US=Prof Id (FEIN) -ProfId2US=- -ProfId3US=- -ProfId4US=- -ProfId5US=- -ProfId6US=- ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) ProfId5RO=Prof Id 5 (EORI number) -ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) ProfId3RU=Prof Id 3 (KPP) ProfId4RU=Prof Id 4 (OKPO) -ProfId5RU=- -ProfId6RU=- ProfId1UA=Prof Id 1 (EDRPOU) ProfId2UA=Prof Id 2 (DRFO) ProfId3UA=Prof Id 3 (INN) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 7db221036f3..39cbc75b199 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1539,9 +1539,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio $i = 1; $j = 0; $NBCOLS = ($conf->browser->layout == 'phone' ? 1 : 2); - while ($i <= 6) { + $NBPROFIDMIN = getDolGlobalInt('THIRDPARTY_MIN_NB_PROF_ID', 2); + $NBPROFIDMAX = getDolGlobalInt('THIRDPARTY_MAX_NB_PROF_ID', 6); + while ($i <= $NBPROFIDMAX) { $idprof = $langs->transcountry('ProfId'.$i, $object->country_code); - if ($idprof != '-') { + if ($idprof != '-' && ($i <= $NBPROFIDMIN || !empty($langs->tab_translate['ProfId'.$i.$object->country_code]))) { $key = 'idprof'.$i; if (($j % $NBCOLS) == 0) { @@ -2281,9 +2283,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio $i = 1; $j = 0; $NBCOLS = ($conf->browser->layout == 'phone' ? 1 : 2); - while ($i <= 6) { + $NBPROFIDMIN = getDolGlobalInt('THIRDPARTY_MIN_NB_PROF_ID', 2); + $NBPROFIDMAX = getDolGlobalInt('THIRDPARTY_MAX_NB_PROF_ID', 6); + while ($i <= $NBPROFIDMAX) { $idprof = $langs->transcountry('ProfId'.$i, $object->country_code); - if ($idprof != '-') { + if ($idprof != '-' && ($i <= $NBPROFIDMIN || !empty($langs->tab_translate['ProfId'.$i.$object->country_code]))) { $key = 'idprof'.$i; if (($j % $NBCOLS) == 0) { @@ -2705,10 +2709,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio // Prof ids $i = 1; $j = 0; - while ($i <= 6) { + $NBPROFIDMIN = getDolGlobalInt('THIRDPARTY_MIN_NB_PROF_ID', 2); + $NBPROFIDMAX = getDolGlobalInt('THIRDPARTY_MAX_NB_PROF_ID', 6); + while ($i <= $NBPROFIDMAX) { $idprof = $langs->transcountry('ProfId'.$i, $object->country_code); - if ($idprof != '-') { - //if (($j % 2) == 0) print ''; + if ($idprof != '-' && ($i <= $NBPROFIDMIN || !empty($langs->tab_translate['ProfId'.$i.$object->country_code]))) { print ''; print ''.$idprof.''; $key = 'idprof'.$i; @@ -2723,13 +2728,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio } } print ''; - //if (($j % 2) == 1) print ''; print ''; $j++; } $i++; } - //if ($j % 2 == 1) print ''; // This fields are used to know VAT to include in an invoice when the thirdparty is making a sale, so when it is a supplier. diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index dfdf1bc9439..ee97261191a 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -3961,6 +3961,13 @@ table.liste tr:last-of-type td, table.noborder:not(#tablelines):not(#tableliness border-bottom-color: var(--colortopbordertitle1); border-bottom-style: solid; } +/* CSS to remove the interline border */ +table.nointerlines tr:not(:last-child) td { + border-bottom: unset !important; + border-top: unset !important; +} + + /* div.tabBar div.fichehalfright table.noborder:not(.margintable):not(.paymenttable):not(.lastrecordtable):last-of-type { border-bottom: 1px solid var(--colortopbordertitle1); @@ -4019,10 +4026,10 @@ table.liste tr, table.noborder tr, div.noborder form { min-height: 20px; } table.liste th, table.noborder th, table.noborder tr.liste_titre td, table.noborder tr.box_titre td { - padding: 7px 8px 7px 8px; /* t r b l */ + padding: 7px 10px 7px 12px; /* t r b l */ } table.liste td, table.noborder td, div.noborder form div, table.tableforservicepart1 td, table.tableforservicepart2 td { - padding: 8px 6px 8px 6px; /* t r b l */ + padding: 8px 10px 8px 12px; /* t r b l */ /* line-height: 22px; This create trouble on cell login on list of last events of a contract*/ height: 22px; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 129015d839b..d569b99b6b3 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -4086,6 +4086,11 @@ table.paddingtopbottomonly tr td { padding-top: 1px; padding-bottom: 2px; } +/* CSS to remove the interline border */ +table.nointerlines tr:not(:last-child) td { + border-bottom: unset !important; + border-top: unset !important; +} .liste_titre_filter { background: var(--colorbacktitle1) !important; @@ -4117,11 +4122,11 @@ tr#trlinefordates td { } table.liste th, table.noborder th, table.noborder tr.liste_titre td, table.noborder tr.box_titre td { - padding: 8px 6px 8px 6px; /* t r b l */ + padding: 8px 8px 8px 10px; /* t r b l */ } table.liste td, table.noborder td, div.noborder form div, table.tableforservicepart1 td, table.tableforservicepart2 td { - padding: 4px 6px 4px 6px; /* t r b l */ + padding: 4px 8px 4px 10px; /* t r b l */ height: 22px; } table.liste tr.trkanban td {