|
@@ -680,7 +680,11 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|
|
if ($_POST["accountancy_code"] <= 0) $_POST["accountancy_code"]=''; // If empty, we force to null
|
|
|
if ($_POST["accountancy_code_sell"] <= 0) $_POST["accountancy_code_sell"]=''; // If empty, we force to null
|
|
|
if ($_POST["accountancy_code_buy"] <= 0) $_POST["accountancy_code_buy"]=''; // If empty, we force to null
|
|
|
-
|
|
|
+ if ($id == 10 && isset($_POST["code"])) // Spaces are not allowed into code
|
|
|
+ {
|
|
|
+ $_POST["code"]=preg_replace('/\s/','',$_POST["code"]);
|
|
|
+ }
|
|
|
+
|
|
|
// Si verif ok et action add, on ajoute la ligne
|
|
|
if ($ok && GETPOST('actionadd'))
|
|
|
{
|