Sfoglia il codice sorgente

FIX spaces not allowed into vat code

Laurent Destailleur 8 anni fa
parent
commit
113d4d1665
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 5 1
      htdocs/admin/dict.php

+ 5 - 1
htdocs/admin/dict.php

@@ -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'))
     {