From 19e63684c767a5f2d2bb2cb1e9202eb556813a4d Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Wed, 19 Mar 2025 11:45:15 +0100 Subject: [PATCH] Look and feel v22: Smaller label with tooltip for customs code. --- htdocs/comm/propal/card.php | 4 ++-- htdocs/commande/card.php | 4 ++-- htdocs/compta/facture/card-rec.php | 4 ++-- htdocs/compta/facture/card.php | 4 ++-- htdocs/core/modules/modProduct.class.php | 6 +++--- htdocs/core/modules/modService.class.php | 6 +++--- htdocs/fourn/facture/card-rec.php | 4 ++-- htdocs/langs/en_US/products.lang | 3 ++- htdocs/product/card.php | 6 +++--- htdocs/product/composition/card.php | 4 ++-- 10 files changed, 23 insertions(+), 22 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index e48e4f04830..444fdcfa455 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1373,7 +1373,7 @@ if (empty($reshook)) { $outputlangs->load('products'); } if (!empty($prod->customcode)) { - $tmptxt .= $outputlangs->transnoentitiesnoconv("CustomCode").': '.$prod->customcode; + $tmptxt .= $outputlangs->transnoentitiesnoconv("CustomsCode").': '.$prod->customcode; } if (!empty($prod->customcode) && !empty($prod->country_code)) { $tmptxt .= ' - '; @@ -1383,7 +1383,7 @@ if (empty($reshook)) { } } else { if (!empty($prod->customcode)) { - $tmptxt .= $langs->transnoentitiesnoconv("CustomCode").': '.$prod->customcode; + $tmptxt .= $langs->transnoentitiesnoconv("CustomsCode").': '.$prod->customcode; } if (!empty($prod->customcode) && !empty($prod->country_code)) { $tmptxt .= ' - '; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 62c18aced34..3bee80fb802 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1081,7 +1081,7 @@ if (empty($reshook)) { $outputlangs->load('products'); } if (!empty($prod->customcode)) { - $tmptxt .= $outputlangs->transnoentitiesnoconv("CustomCode").': '.$prod->customcode; + $tmptxt .= $outputlangs->transnoentitiesnoconv("CustomsCode").': '.$prod->customcode; } if (!empty($prod->customcode) && !empty($prod->country_code)) { $tmptxt .= ' - '; @@ -1091,7 +1091,7 @@ if (empty($reshook)) { } } else { if (!empty($prod->customcode)) { - $tmptxt .= $langs->transnoentitiesnoconv("CustomCode").': '.$prod->customcode; + $tmptxt .= $langs->transnoentitiesnoconv("CustomsCode").': '.$prod->customcode; } if (!empty($prod->customcode) && !empty($prod->country_code)) { $tmptxt .= ' - '; diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index 280e80ca3da..073a3fba482 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -669,7 +669,7 @@ if (empty($reshook)) { $outputlangs->load('products'); } if (!empty($prod->customcode)) { - $tmptxt .= $outputlangs->transnoentitiesnoconv("CustomCode").': '.$prod->customcode; + $tmptxt .= $outputlangs->transnoentitiesnoconv("CustomsCode").': '.$prod->customcode; } if (!empty($prod->customcode) && !empty($prod->country_code)) { $tmptxt .= ' - '; @@ -679,7 +679,7 @@ if (empty($reshook)) { } } else { if (!empty($prod->customcode)) { - $tmptxt .= $langs->transnoentitiesnoconv("CustomCode").': '.$prod->customcode; + $tmptxt .= $langs->transnoentitiesnoconv("CustomsCode").': '.$prod->customcode; } if (!empty($prod->customcode) && !empty($prod->country_code)) { $tmptxt .= ' - '; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 33c9a373e97..41174ee6582 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -2430,7 +2430,7 @@ if (empty($reshook)) { $outputlangs->load('products'); } if (!empty($prod->customcode)) { - $tmptxt .= $outputlangs->transnoentitiesnoconv("CustomCode").': '.$prod->customcode; + $tmptxt .= $outputlangs->transnoentitiesnoconv("CustomsCode").': '.$prod->customcode; } if (!empty($prod->customcode) && !empty($prod->country_code)) { $tmptxt .= ' - '; @@ -2440,7 +2440,7 @@ if (empty($reshook)) { } } else { if (!empty($prod->customcode)) { - $tmptxt .= $langs->transnoentitiesnoconv("CustomCode").': '.$prod->customcode; + $tmptxt .= $langs->transnoentitiesnoconv("CustomsCode").': '.$prod->customcode; } if (!empty($prod->customcode) && !empty($prod->country_code)) { $tmptxt .= ' - '; diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index b2ff61b9e58..e0ac6624281 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -205,7 +205,7 @@ class modProduct extends DolibarrModules 'p.rowid' => "Id", 'p.ref' => "Ref", 'p.label' => "Label", 'p.fk_product_type' => 'Type', 'p.tosell' => "OnSell", 'p.tobuy' => "OnBuy", 'p.description' => "Description", 'p.url' => "PublicUrl", - 'p.customcode' => 'CustomCode', 'p.fk_country' => 'IDCountry', + 'p.customcode' => 'CustomsCode', 'p.fk_country' => 'IDCountry', $alias_product_perentity . '.accountancy_code_sell' => "ProductAccountancySellCode", $alias_product_perentity . '.accountancy_code_sell_intra' => "ProductAccountancySellIntraCode", $alias_product_perentity . '.accountancy_code_sell_export' => "ProductAccountancySellExportCode", $alias_product_perentity . '.accountancy_code_buy' => "ProductAccountancyBuyCode", $alias_product_perentity . '.accountancy_code_buy_intra' => "ProductAccountancyBuyIntraCode", $alias_product_perentity . '.accountancy_code_buy_export' => "ProductAccountancyBuyExportCode", @@ -424,7 +424,7 @@ class modProduct extends DolibarrModules $alias_product_perentity . '.accountancy_code_sell_export' => "ProductAccountancySellExportCode", $alias_product_perentity . '.accountancy_code_buy' => "ProductAccountancyBuyCode", $alias_product_perentity . '.accountancy_code_buy_intra' => "ProductAccountancyBuyIntraCode", $alias_product_perentity . '.accountancy_code_buy_export' => "ProductAccountancyBuyExportCode", 'p.note' => "NotePrivate", 'p.note_public' => 'NotePublic', - 'p.weight' => "Weight", 'p.length' => "Length", 'p.surface' => "Surface", 'p.volume' => "Volume", 'p.customcode' => 'CustomCode', + 'p.weight' => "Weight", 'p.length' => "Length", 'p.surface' => "Surface", 'p.volume' => "Volume", 'p.customcode' => 'CustomsCode', 'p.price_base_type' => "PriceBase", 'p.price' => "UnitPriceHT", 'p.price_ttc' => "UnitPriceTTC", 'p.tva_tx' => 'VATRate', 'p.tosell' => "OnSell", 'p.tobuy' => "OnBuy", 'p.datec' => 'DateCreation', 'p.tms' => 'DateModification' ); @@ -505,7 +505,7 @@ class modProduct extends DolibarrModules 'p.tobuy' => "OnBuy*", 'p.description' => "Description", 'p.url' => "PublicUrl", - 'p.customcode' => 'CustomCode', + 'p.customcode' => 'CustomsCode', 'p.fk_country' => 'CountryCode', 'p.accountancy_code_sell' => "ProductAccountancySellCode", 'p.accountancy_code_sell_intra' => "ProductAccountancySellIntraCode", diff --git a/htdocs/core/modules/modService.class.php b/htdocs/core/modules/modService.class.php index f4b7592eb13..498509861a7 100644 --- a/htdocs/core/modules/modService.class.php +++ b/htdocs/core/modules/modService.class.php @@ -161,7 +161,7 @@ class modService extends DolibarrModules 'p.rowid' => "Id", 'p.ref' => "Ref", 'p.label' => "Label", 'p.fk_product_type' => 'Type', 'p.tosell' => "OnSell", 'p.tobuy' => "OnBuy", 'p.description' => "Description", 'p.url' => "PublicUrl", - 'p.customcode' => 'CustomCode', 'p.fk_country' => 'IDCountry', + 'p.customcode' => 'CustomsCode', 'p.fk_country' => 'IDCountry', $alias_product_perentity . '.accountancy_code_sell' => "ProductAccountancySellCode", $alias_product_perentity . '.accountancy_code_sell_intra' => "ProductAccountancySellIntraCode", $alias_product_perentity . '.accountancy_code_sell_export' => "ProductAccountancySellExportCode", $alias_product_perentity . '.accountancy_code_buy' => "ProductAccountancyBuyCode", $alias_product_perentity . '.accountancy_code_buy_intra' => "ProductAccountancyBuyIntraCode", $alias_product_perentity . '.accountancy_code_buy_export' => "ProductAccountancyBuyExportCode", @@ -370,7 +370,7 @@ class modService extends DolibarrModules $alias_product_perentity . '.accountancy_code_sell_export' => "ProductAccountancySellExportCode", $alias_product_perentity . '.accountancy_code_buy' => "ProductAccountancyBuyCode", $alias_product_perentity . '.accountancy_code_buy_intra' => "ProductAccountancyBuyIntraCode", $alias_product_perentity . '.accountancy_code_buy_export' => "ProductAccountancyBuyExportCode", 'p.note' => "NotePrivate", 'p.note_public' => 'NotePublic', - 'p.weight' => "Weight", 'p.length' => "Length", 'p.surface' => "Surface", 'p.volume' => "Volume", 'p.customcode' => 'CustomCode', + 'p.weight' => "Weight", 'p.length' => "Length", 'p.surface' => "Surface", 'p.volume' => "Volume", 'p.customcode' => 'CustomsCode', 'p.price_base_type' => "PriceBase", 'p.price' => "UnitPriceHT", 'p.price_ttc' => "UnitPriceTTC", 'p.tva_tx' => 'VATRate', 'p.tosell' => "OnSell", 'p.tobuy' => "OnBuy", 'p.datec' => 'DateCreation', 'p.tms' => 'DateModification' ); @@ -452,7 +452,7 @@ class modService extends DolibarrModules 'p.tobuy' => "OnBuy*", 'p.description' => "Description", 'p.url' => "PublicUrl", - 'p.customcode' => 'CustomCode', + 'p.customcode' => 'CustomsCode', 'p.fk_country' => 'CountryCode', 'p.accountancy_code_sell' => "ProductAccountancySellCode", 'p.accountancy_code_sell_intra' => "ProductAccountancySellIntraCode", diff --git a/htdocs/fourn/facture/card-rec.php b/htdocs/fourn/facture/card-rec.php index 5e0a9dd1324..3c58f2a4023 100644 --- a/htdocs/fourn/facture/card-rec.php +++ b/htdocs/fourn/facture/card-rec.php @@ -635,7 +635,7 @@ if (empty($reshook)) { $outputlangs->load('products'); } if (!empty($prod->customcode)) { - $tmptxt .= $outputlangs->transnoentitiesnoconv("CustomCode") . ': ' . $prod->customcode; + $tmptxt .= $outputlangs->transnoentitiesnoconv("CustomsCode") . ': ' . $prod->customcode; } if (!empty($prod->customcode) && !empty($prod->country_code)) { $tmptxt .= ' - '; @@ -645,7 +645,7 @@ if (empty($reshook)) { } } else { if (!empty($prod->customcode)) { - $tmptxt .= $langs->transnoentitiesnoconv("CustomCode") . ': ' . $prod->customcode; + $tmptxt .= $langs->transnoentitiesnoconv("CustomsCode") . ': ' . $prod->customcode; } if (!empty($prod->customcode) && !empty($prod->country_code)) { $tmptxt .= ' - '; diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index d08593437dc..534b441fe09 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -173,7 +173,8 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs|Commodity|HS|TARIC code +CustomsCode=Customs nomenclature +CustomsCodeHelp=The code used by customs. Also called the Commodity code, HS code or TARIC code. CountryOrigin=Country of origin RegionStateOrigin=Region of origin StateOrigin=State|Province of origin diff --git a/htdocs/product/card.php b/htdocs/product/card.php index dc2f2c93a7c..268c5caf578 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1742,7 +1742,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio // Custom code if (!getDolGlobalString('PRODUCT_DISABLE_CUSTOM_INFO') && empty($type)) { - print ''.$langs->trans("CustomCode").''; + print ''.$form->textwithpicto($langs->trans("CustomsCode"), $langs->trans("CustomsCodeHelp")).''; // Origin country print ''.$langs->trans("CountryOrigin").''; @@ -2386,7 +2386,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio // Custom code if (!$object->isService() && !getDolGlobalString('PRODUCT_DISABLE_CUSTOM_INFO')) { - print ''.$langs->trans("CustomCode").''; + print ''.$form->textwithpicto($langs->trans("CustomsCode"), $langs->trans("CustomsCodeHelp")).''; // Origin country print ''.$langs->trans("CountryOrigin").''; print ''; @@ -2958,7 +2958,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio // Custom code if (!$object->isService() && !getDolGlobalString('PRODUCT_DISABLE_CUSTOM_INFO')) { - print ''.$langs->trans("CustomCode").''.$object->customcode.''; + print ''.$form->textwithpicto($langs->trans("CustomsCode"), $langs->trans("CustomsCodeHelp")).''.dolPrintHTML($object->customcode).''; // Origin country code print ''.$langs->trans("Origin").''.getCountry($object->country_id, '', $db); diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index 6bbc5a45006..0f8fd31832f 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -632,7 +632,7 @@ if ($id > 0 || !empty($ref)) { // Form with product to add if ((empty($action) || $action == 'view' || $action == 'edit' || $action == 'search' || $action == 're-edit') && ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer'))) { - print '
'; + //print '
'; $rowspan = 1; if (isModEnabled('category')) { @@ -640,7 +640,7 @@ if ($id > 0 || !empty($ref)) { } print load_fiche_titre($langs->trans("ProductToAddSearch"), '', ''); - print '
'; + print ''; print ''; print ''; print '
';