Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9

This commit is contained in:
Laurent Destailleur 2016-10-16 18:34:31 +02:00
commit ab34885a89
3 changed files with 28 additions and 22 deletions

View File

@ -504,6 +504,10 @@ class ImportCsv extends ModeleImports
} }
if (empty($newval)) $arrayrecord[($key-1)]['type']=-1; // If we get empty value, we will use "null" if (empty($newval)) $arrayrecord[($key-1)]['type']=-1; // If we get empty value, we will use "null"
} }
elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='numeric')
{
$newval = price2num($newval);
}
//print 'Val to use as insert is '.$newval.'<br>'; //print 'Val to use as insert is '.$newval.'<br>';
} }

View File

@ -405,7 +405,8 @@ class modSociete extends DolibarrModules
's.code_client'=>array('rule'=>'getcustomercodeifauto'), 's.code_client'=>array('rule'=>'getcustomercodeifauto'),
's.code_fournisseur'=>array('rule'=>'getsuppliercodeifauto'), 's.code_fournisseur'=>array('rule'=>'getsuppliercodeifauto'),
's.code_compta'=>array('rule'=>'getcustomeraccountancycodeifauto'), 's.code_compta'=>array('rule'=>'getcustomeraccountancycodeifauto'),
's.code_compta_fournisseur'=>array('rule'=>'getsupplieraccountancycodeifauto') 's.code_compta_fournisseur'=>array('rule'=>'getsupplieraccountancycodeifauto'),
's.capital'=>array('rule'=>'numeric')
); );
//$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t'); //$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t');
$this->import_regex_array[$r]=array('s.status'=>'^[0|1]','s.client'=>'^[0|1|2|3]','s.fournisseur'=>'^[0|1]','s.fk_typent'=>'id@'.MAIN_DB_PREFIX.'c_typent','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]( [0-9][0-9]:[0-9][0-9]:[0-9][0-9])?$'); $this->import_regex_array[$r]=array('s.status'=>'^[0|1]','s.client'=>'^[0|1|2|3]','s.fournisseur'=>'^[0|1]','s.fk_typent'=>'id@'.MAIN_DB_PREFIX.'c_typent','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]( [0-9][0-9]:[0-9][0-9]:[0-9][0-9])?$');

View File

@ -342,6 +342,7 @@ $sql.= " st.libelle as stcomm, s.fk_stcomm as stcomm_id, s.fk_prospectlevel, s.p
$sql.= " s.siren as idprof1, s.siret as idprof2, ape as idprof3, idprof4 as idprof4, s.fk_pays,"; $sql.= " s.siren as idprof1, s.siret as idprof2, ape as idprof3, idprof4 as idprof4, s.fk_pays,";
$sql.= " s.tms as date_update, s.datec as date_creation,"; $sql.= " s.tms as date_update, s.datec as date_creation,";
$sql.= " typent.code as typent_code"; $sql.= " typent.code as typent_code";
$sql.= " ,s.code_compta,s.code_compta_fournisseur";
// We'll need these fields in order to filter by sale (including the case where the user can only see his prospects) // We'll need these fields in order to filter by sale (including the case where the user can only see his prospects)
if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user";
// We'll need these fields in order to filter by categ // We'll need these fields in order to filter by categ