diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index 55434d4de2ef6..0f9213fc2529f 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -229,8 +229,9 @@ $sql.= ", entity"; $sql.= " FROM ".MAIN_DB_PREFIX."const"; $sql.= " WHERE entity IN (".$user->entity.",".$conf->entity.")"; -if ((empty($user->entity) || $user->admin) && $debug) {} // to force for superadmin -else $sql.= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits +if ((empty($user->entity) || $user->admin) && $debug) {} // to force for superadmin to debug +else if (! GETPOST('visible') || GETPOST('visible') != 'all') $sql.= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits +if (GETPOST('name')) $sql.=natural_search("name", GETPOST('name')); $sql.= " ORDER BY entity, name ASC"; dol_syslog("Const::listConstant", LOG_DEBUG); diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index b6505f19e4eb0..b73d2281a3a1e 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1380,6 +1380,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; } + // Line of interventions if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) { print '
'; @@ -1556,9 +1557,9 @@ print ' '; print "\n"; - $var=false; + $var=true; - print '\n"; + print '\n"; print ''; // editeur wysiwyg require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 67750a18aae49..6d1b24a2bc137 100755 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1397,7 +1397,7 @@ UseSearchToSelectProduct=Use a search form to choose a product (rather than a dr UseEcoTaxeAbility=Support Eco-Taxe (WEEE) SetDefaultBarcodeTypeProducts=Default barcode type to use for products SetDefaultBarcodeTypeThirdParties=Default barcode type to use for third parties -UseUnits=Support units +UseUnits=Define a unit of measure for Quantity during order, proposal or invoice lines edition ProductCodeChecker= Module for product code generation and checking (product or service) ProductOtherConf= Product / Service configuration ##### Syslog ##### diff --git a/htdocs/langs/fr_FR/products.lang b/htdocs/langs/fr_FR/products.lang index c3e20457a798b..b1bb18289cc49 100644 --- a/htdocs/langs/fr_FR/products.lang +++ b/htdocs/langs/fr_FR/products.lang @@ -296,3 +296,4 @@ PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files IncludingProductWithTag=Including product with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer +DefaultUnitToShow=Default unit to show \ No newline at end of file diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 20f3361fac128..ec60f691e0561 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -952,6 +952,15 @@ print ''; } + // Units + if($conf->global->PRODUCT_USE_UNITS) + { + print ''.$langs->trans('DefaultUnitToShow').''; + print ''; + print $form->selectUnits('','units'); + print ''; + } + // Custom code if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO)) { @@ -988,15 +997,6 @@ print ""; } - // Units - if($conf->global->PRODUCT_USE_UNITS) - { - print ''.$langs->trans('Unit').''; - print ''; - print $form->selectUnits("units"); - print ''; - } - print ''; print '
'; @@ -1223,7 +1223,7 @@ print ''; } else - { + { // Weight print ''.$langs->trans("Weight").''; print ' '; @@ -1245,6 +1245,14 @@ print $formproduct->select_measuring_units("volume_units", "volume", $object->volume_units); print ''; } + // Units + if($conf->global->PRODUCT_USE_UNITS) + { + print ''.$langs->trans('DefaultUnitToShow').''; + print ''; + print $form->selectUnits($object->fk_unit, 'units'); + print ''; + } // Custom code if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO)) @@ -1286,15 +1294,6 @@ print ""; } - // Units - if($conf->global->PRODUCT_USE_UNITS) - { - print ''.$langs->trans('Unit').''; - print ''; - print $form->selectUnits($object->fk_unit); - print ''; - } - print ''; print '
'; @@ -1567,7 +1566,7 @@ { $unit = $object->getLabelOfUnit(); - print ''.$langs->trans('Unit').''; + print ''.$langs->trans('DefaultUnitToShow').''; if ($unit !== '') { print $langs->trans($unit); }