Fix: Intra VAt value was not cleaned
This commit is contained in:
parent
202cb38e55
commit
59efd19d2f
@ -29,7 +29,7 @@
|
|||||||
\version $Id$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Pour compatibilit<69> lors de l'upgrade
|
// For compatibility during upgrade
|
||||||
if (! defined('DOL_DOCUMENT_ROOT')) define('DOL_DOCUMENT_ROOT', '..');
|
if (! defined('DOL_DOCUMENT_ROOT')) define('DOL_DOCUMENT_ROOT', '..');
|
||||||
if (! defined('ADODB_DATE_VERSION')) include_once(DOL_DOCUMENT_ROOT."/includes/adodbtime/adodb-time.inc.php");
|
if (! defined('ADODB_DATE_VERSION')) include_once(DOL_DOCUMENT_ROOT."/includes/adodbtime/adodb-time.inc.php");
|
||||||
|
|
||||||
@ -100,17 +100,19 @@ function unaccent_isostring($str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Nettoie chaine de caractere de caracteres speciaux
|
* \brief Nettoie chaine de caractere de caracteres speciaux
|
||||||
\remarks Fonction appelee par exemple pour definir un nom de fichier depuis un identifiant chaine libre
|
* \remarks Fonction appelee par exemple pour definir un nom de fichier depuis un identifiant chaine libre
|
||||||
\param str Chaine a nettoyer
|
* \param str String to clean
|
||||||
\return string Chaine nettoyee (A-Z_)
|
* \param newstr String to replace bad chars by
|
||||||
|
* \return string String cleaned (a-zA-Z_)
|
||||||
*/
|
*/
|
||||||
function sanitize_string($str)
|
function sanitize_string($str,$newstr='_')
|
||||||
{
|
{
|
||||||
$forbidden_chars_to_underscore=array(" ","'","/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
|
$forbidden_chars_to_underscore=array(" ","'","/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
|
||||||
//$forbidden_chars_to_remove=array("(",")");
|
//$forbidden_chars_to_remove=array("(",")");
|
||||||
$forbidden_chars_to_remove=array();
|
$forbidden_chars_to_remove=array();
|
||||||
return str_replace($forbidden_chars_to_underscore,"_",str_replace($forbidden_chars_to_remove,"",$str));
|
|
||||||
|
return str_replace($forbidden_chars_to_underscore,$newstr,str_replace($forbidden_chars_to_remove,"",$str));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -334,7 +334,7 @@ class Societe extends CommonObject
|
|||||||
$this->prefix_comm=trim($this->prefix_comm);
|
$this->prefix_comm=trim($this->prefix_comm);
|
||||||
|
|
||||||
$this->tva_assuj=trim($this->tva_assuj);
|
$this->tva_assuj=trim($this->tva_assuj);
|
||||||
$this->tva_intra=trim($this->tva_intra);
|
$this->tva_intra=sanitize_string($this->tva_intra,'');
|
||||||
|
|
||||||
$this->capital=trim($this->capital);
|
$this->capital=trim($this->capital);
|
||||||
if (strlen($this->capital) == 0) $this->capital = 0;
|
if (strlen($this->capital) == 0) $this->capital = 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user