Some comment in source code
This commit is contained in:
parent
b1422ab368
commit
d66095b246
@ -363,10 +363,12 @@ class ImportCsv extends ModeleImports
|
||||
{
|
||||
// If some values need to be found somewhere than in source file: Might be a rowid found from a fetch on a reference.
|
||||
// This is used when insert must be done when a parent row already exists
|
||||
// $objimport->array_import_convertvalue=array('s.fk_soc'=>array('rule'=>'fetchfromref',file='/societe.class.php','class'=>'Societe','method'=>'fetch'));
|
||||
// TODO
|
||||
|
||||
// If some values need to be found somewhere than in source file: Might be lastinsert id from previous insert
|
||||
// This is used when insert must be done in several tables
|
||||
// $objimport->array_import_convertvalue=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t');
|
||||
// TODO
|
||||
|
||||
// Build SQL request
|
||||
|
||||
@ -247,8 +247,10 @@ class modSociete extends DolibarrModules
|
||||
$this->import_fields_array[$r]=array('s.fk_soc'=>'ThirdPartyName*','s.nom'=>"Name*",'s.prefix_comm'=>"Prefix",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.datec'=>"DateCreation",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"IdProf1",'s.siren'=>"IdProf2",'s.ape'=>"IdProf3",'s.idprof4'=>"IdProf4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Effectif","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus');
|
||||
$this->import_entities_array[$r]=array('s.fk_soc'=>'company'); // We define here only fields that use another picto
|
||||
$this->import_examplevalues_array[$r]=array('t.nom'=>'A third party ref','s.nom'=>"A company",'s.prefix_comm'=>"comp",'s.client'=>'0 or 1','s.fournisseur'=>'0 or 1','s.datec'=>dol_print_date(mktime(),'YYYY-MM-DD'),'s.code_client'=>"CU01-0001",'s.code_fournisseur'=>"SU01-0001",'s.address'=>"61 jump street",'s.cp'=>"123456",'s.ville'=>"Big town",'s.tel'=>"0101010101",'s.fax'=>"0101010102",'s.url'=>"http://mycompany.com",'s.email'=>"test@mycompany.com",'s.siret'=>"",'s.siren'=>"",'s.ape'=>"",'s.idprof4'=>"",'s.tva_intra'=>"FR0123456789",'s.capital'=>"10000",'s.note'=>"This is an example of note for record",'s.fk_typent'=>"2",'s.fk_effectif'=>"3","s.fk_forme_juridique"=>"1",'s.fk_prospectlevel'=>'AAA','s.fk_stcomm'=>'BBB');
|
||||
// If value for some fields need to be found differently than directly in file, we declare rules to find it (might be class and function to find id or might be a lastinsert id).
|
||||
$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('class'=>'Societe','method'=>'fetch'));
|
||||
// If value for some fields are a ref to found the key of parent
|
||||
//$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'fetchfromref',file='/societe.class.php','class'=>'Societe','method'=>'fetch'));
|
||||
// If value for some fields must be the previous inserted record (lastinsertid)
|
||||
//$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t');
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user