diff --git a/lib/util.php b/lib/util.php index fd3686934..7d337e513 100644 --- a/lib/util.php +++ b/lib/util.php @@ -69,6 +69,34 @@ if (!function_exists('str_contains')) { } } +if (!function_exists('str_to_lower')) { + /** + * Converts a string in the lower-case version. + * + * @param string $string + * + * @return bool + */ + function str_to_lower($string) + { + return S::create($string)->toLowerCase(); + } +} + +if (!function_exists('str_to_upper')) { + /** + * Converts a string in the upper-case version. + * + * @param string $string + * + * @return bool + */ + function str_to_upper($string) + { + return S::create($string)->toUpperCase(); + } +} + if (!function_exists('random_string')) { /** * Generates a string of random characters. diff --git a/modules/articoli/import.php b/modules/articoli/import.php index 6117a66c9..b0510e0ea 100644 --- a/modules/articoli/import.php +++ b/modules/articoli/import.php @@ -123,8 +123,6 @@ return [ 'names' => [ 'Unità di misura', 'Unità misura', - 'unità misura', - 'unità di misura', 'Unit` di misura', 'um', ], @@ -132,18 +130,10 @@ return [ [ 'field' => 'prezzo_acquisto', 'label' => 'Prezzo acquisto', - 'names' => [ - 'Prezzo Acquisto', - 'prezzo acquisto', - ], ], [ 'field' => 'prezzo_vendita', 'label' => 'Prezzo vendita', - 'names' => [ - 'Prezzo Vendita', - 'prezzo vendita', - ], ], [ 'field' => 'peso_lordo', @@ -158,7 +148,7 @@ return [ 'label' => 'Volume (M3)', 'names' => [ 'Volume (M3)', - 'volume', + 'Volume', ], ], [ @@ -168,7 +158,6 @@ return [ 'Categoria', 'id_categoria', 'idcategoria', - 'categoria', ], ], [ diff --git a/modules/custom_fields/edit.php b/modules/custom_fields/edit.php index aaaeabf4e..7502b091d 100644 --- a/modules/custom_fields/edit.php +++ b/modules/custom_fields/edit.php @@ -8,7 +8,7 @@ include_once __DIR__.'/../../core.php'; -
:
+|'.$key.'|
',
+ '_FIELD_' => $value,
+ ]).'|value
',
+ ]).'