Qual: Uniformize name of barcode into "barcode".
This commit is contained in:
parent
b87a29806d
commit
1f37dc906f
@ -66,7 +66,7 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update' && empty($_POST["c
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_MAIL",$_POST["mail"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_WEB",$_POST["web"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOTE",$_POST["note"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_GENCOD",$_POST["gencod"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_GENCOD",$_POST["barcode"],'chaine',0,'',$conf->entity);
|
||||
if ($_FILES["logo"]["tmp_name"])
|
||||
{
|
||||
if (preg_match('/([^\\/:]+)$/i',$_FILES["logo"]["name"],$reg))
|
||||
@ -346,7 +346,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("Gencod").'</td><td>';
|
||||
print '<input name="gencod" size="40" value="'. $conf->global->MAIN_INFO_SOCIETE_GENCOD . '"></td></tr>';
|
||||
print '<input name="barcode" size="40" value="'. $conf->global->MAIN_INFO_SOCIETE_GENCOD . '"></td></tr>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -222,7 +222,7 @@ if ($socid)
|
||||
|
||||
if ($conf->global->MAIN_MODULE_BARCODE)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Gencod').'</td><td colspan="3">'.$soc->gencod.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Gencod').'</td><td colspan="3">'.$soc->barcode.'</td></tr>';
|
||||
}
|
||||
|
||||
// Address
|
||||
|
||||
@ -89,7 +89,7 @@ abstract class CommonDocGenerator
|
||||
'mycompany_web'=>$mysoc->url,
|
||||
'mycompany_juridicalstatus'=>$mysoc->forme_juridique,
|
||||
'mycompany_capital'=>$mysoc->capital,
|
||||
'mycompany_barcode'=>$mysoc->gencod,
|
||||
'mycompany_barcode'=>$mysoc->barcode,
|
||||
'mycompany_idprof1'=>$mysoc->idprof1,
|
||||
'mycompany_idprof2'=>$mysoc->idprof2,
|
||||
'mycompany_idprof3'=>$mysoc->idprof3,
|
||||
@ -121,7 +121,7 @@ abstract class CommonDocGenerator
|
||||
'company_country_code'=>$object->country_code,
|
||||
'company_country'=>$outputlangs->transnoentitiesnoconv("Country".$object->country_code),
|
||||
'company_web'=>$object->url,
|
||||
'company_barcode'=>$object->gencod,
|
||||
'company_barcode'=>$object->barcode,
|
||||
'company_vatnumber'=>$object->tva_intra,
|
||||
'company_customercode'=>$object->code_client,
|
||||
'company_suppliercode'=>$object->code_fournisseur,
|
||||
|
||||
@ -268,11 +268,11 @@ class modSociete extends DolibarrModules
|
||||
$this->import_label[$r]='ImportDataset_company_1';
|
||||
$this->import_icon[$r]='company';
|
||||
$this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'societe'); // List of tables to insert into (insert done in same order)
|
||||
$this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'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','s.default_lang'=>'DefaultLanguage','s.gencod'=>'BarCode');
|
||||
$this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'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','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode');
|
||||
$this->import_entities_array[$r]=array(); // We define here only fields that use another picto
|
||||
$this->import_regex_array[$r]=array('s.status'=>'^[0|1]','s.client'=>'^[0|1|2|3]','s.fournisseur'=>'^[0|1]');
|
||||
//$this->import_regex_array[$r]=array('s.status'=>'^[0|1]','s.client'=>'^[0|1|2|3]','s.fournisseur'=>'^[0|1]','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','s.fk_typent'=>array('rule'=>'fetchidfromcode','file'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch')));
|
||||
$this->import_examplevalues_array[$r]=array('s.nom'=>"MyBigCompany",'s.status'=>"0 (closed) or 1 (active)",'s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','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'=>'PL_MEDIUM','s.fk_stcomm'=>'','s.default_lang'=>'en_US','s.gencod'=>'123456789');
|
||||
$this->import_examplevalues_array[$r]=array('s.nom'=>"MyBigCompany",'s.status'=>"0 (closed) or 1 (active)",'s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','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'=>'PL_MEDIUM','s.fk_stcomm'=>'','s.default_lang'=>'en_US','s.barcode'=>'123456789');
|
||||
|
||||
// Import list of contact and attributes
|
||||
/* $r++;
|
||||
|
||||
@ -103,3 +103,6 @@ ALTER TABLE llx_facture MODIFY ref_client varchar(255);
|
||||
UPDATE llx_societe SET fk_stcomm = 0 WHERE fk_stcomm IS NULL;
|
||||
ALTER TABLE llx_societe MODIFY COLUMN fk_stcomm integer NOT NULL;
|
||||
|
||||
ALTER TABLE llx_societe CHANGE COLUMN gencod barcode varchar(255);
|
||||
ALTER TABLE llx_societe ADD COLUMN fk_barcode_type integer DEFAULT 0;
|
||||
|
||||
|
||||
@ -80,7 +80,7 @@ create table llx_societe
|
||||
tva_assuj tinyint DEFAULT 1, -- assujeti ou non a la TVA
|
||||
localtax1_assuj tinyint DEFAULT 0, -- assujeti ou non a local tax 1
|
||||
localtax2_assuj tinyint DEFAULT 0, -- assujeti ou non a local tax 2
|
||||
gencod varchar(255), -- barcode
|
||||
barcode varchar(255), -- barcode
|
||||
price_level integer NULL, -- level of price for multiprices
|
||||
default_lang varchar(6), -- default language
|
||||
logo varchar(255),
|
||||
|
||||
@ -107,7 +107,7 @@ if ($_GET["socid"])
|
||||
|
||||
if ($conf->global->MAIN_MODULE_BARCODE)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Gencod').'</td><td colspan="3">'.$soc->gencod.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Gencod').'</td><td colspan="3">'.$soc->barcode.'</td></tr>';
|
||||
}
|
||||
|
||||
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">";
|
||||
|
||||
@ -153,7 +153,7 @@ abstract class ActionsCardCommon
|
||||
$this->object->code_client = $_POST["code_client"];
|
||||
$this->object->code_fournisseur = $_POST["code_fournisseur"];
|
||||
$this->object->capital = $_POST["capital"];
|
||||
$this->object->gencod = $_POST["gencod"];
|
||||
$this->object->barcode = $_POST["barcode"];
|
||||
$this->object->canvas = GETPOST("canvas");
|
||||
|
||||
$this->object->tva_assuj = $_POST["assujtva_value"];
|
||||
@ -686,7 +686,7 @@ abstract class ActionsCardCommon
|
||||
$this->object->idprof4 = $_POST["idprof4"];
|
||||
$this->object->typent_id = $_POST["typent_id"];
|
||||
$this->object->effectif_id = $_POST["effectif_id"];
|
||||
$this->object->gencod = $_POST["gencod"];
|
||||
$this->object->barcode = $_POST["barcode"];
|
||||
$this->object->forme_juridique_code = $_POST["forme_juridique_code"];
|
||||
$this->object->default_lang = $_POST["default_lang"];
|
||||
$this->object->commercial_id = $_POST["commercial_id"];
|
||||
|
||||
@ -98,7 +98,7 @@
|
||||
<?php if ($conf->global->MAIN_MODULE_BARCODE) { ?>
|
||||
<tr>
|
||||
<td><?php echo $langs->trans('Gencod'); ?></td>
|
||||
<td colspan="3"><input type="text" name="gencod" value="<?php echo $this->control->tpl['gencod']; ?>"></td>
|
||||
<td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@ -115,7 +115,7 @@ if ($this->control->tpl['fournisseur']) {
|
||||
<?php if ($conf->global->MAIN_MODULE_BARCODE) { ?>
|
||||
<tr>
|
||||
<td><?php echo $langs->trans('Gencod'); ?></td>
|
||||
<td colspan="3"><input type="text" name="gencod" value="<?php echo $this->control->tpl['gencod']; ?>"></td>
|
||||
<td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company');
|
||||
<?php if ($conf->global->MAIN_MODULE_BARCODE) { ?>
|
||||
<tr>
|
||||
<td><?php echo $langs->trans('Gencod'); ?></td>
|
||||
<td colspan="3"><?php echo $this->control->tpl['gencod']; ?></td>
|
||||
<td colspan="3"><?php echo $this->control->tpl['barcode']; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@ -110,7 +110,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']
|
||||
<?php if ($conf->global->MAIN_MODULE_BARCODE) { ?>
|
||||
<tr>
|
||||
<td><?php echo $langs->trans('Gencod'); ?></td>
|
||||
<td colspan="3"><input type="text" name="gencod" value="<?php echo $this->control->tpl['gencod']; ?>"></td>
|
||||
<td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@ -112,7 +112,7 @@ if ($this->control->tpl['fournisseur']) {
|
||||
<?php if ($conf->global->MAIN_MODULE_BARCODE) { ?>
|
||||
<tr>
|
||||
<td><?php echo $langs->trans('Gencod'); ?></td>
|
||||
<td colspan="3"><input type="text" name="gencod" value="<?php echo $this->control->tpl['gencod']; ?>"></td>
|
||||
<td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@ dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company');
|
||||
<?php if ($conf->global->MAIN_MODULE_BARCODE) { ?>
|
||||
<tr>
|
||||
<td><?php echo $langs->trans('Gencod'); ?></td>
|
||||
<td colspan="3"><?php echo $this->control->tpl['gencod']; ?></td>
|
||||
<td colspan="3"><?php echo $this->control->tpl['barcode']; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ class Societe extends CommonObject
|
||||
var $fax;
|
||||
var $email;
|
||||
var $url;
|
||||
var $gencod;
|
||||
var $barcode;
|
||||
|
||||
// 4 identifiants professionnels (leur utilisation depend du pays)
|
||||
var $siren; // IdProf1 - Deprecated
|
||||
@ -437,7 +437,7 @@ class Societe extends CommonObject
|
||||
$this->forme_juridique_code=trim($this->forme_juridique_code);
|
||||
|
||||
//Gencod
|
||||
$this->gencod=trim($this->gencod);
|
||||
$this->barcode=trim($this->barcode);
|
||||
|
||||
// For automatic creation
|
||||
if ($this->code_client == -1) $this->get_codeclient($this->prefix_comm,0);
|
||||
@ -505,7 +505,7 @@ class Societe extends CommonObject
|
||||
|
||||
$sql .= ",client = " . ($this->client?$this->client:0);
|
||||
$sql .= ",fournisseur = " . ($this->fournisseur?$this->fournisseur:0);
|
||||
$sql .= ",gencod = ".($this->gencod?"'".$this->gencod."'":"null");
|
||||
$sql .= ",barcode = ".($this->barcode?"'".$this->barcode."'":"null");
|
||||
$sql .= ",default_lang = ".($this->default_lang?"'".$this->default_lang."'":"null");
|
||||
$sql .= ",logo = ".($this->logo?"'".$this->logo."'":"null");
|
||||
|
||||
@ -637,7 +637,7 @@ class Societe extends CommonObject
|
||||
$sql .= ', s.fk_typent as typent_id';
|
||||
$sql .= ', s.fk_effectif as effectif_id';
|
||||
$sql .= ', s.fk_forme_juridique as forme_juridique_code';
|
||||
$sql .= ', s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur, s.parent, s.gencod';
|
||||
$sql .= ', s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur, s.parent, s.barcode';
|
||||
$sql .= ', s.fk_departement, s.fk_pays, s.fk_stcomm, s.remise_client, s.mode_reglement, s.cond_reglement, s.tva_assuj';
|
||||
$sql .= ', s.localtax1_assuj, s.localtax2_assuj, s.fk_prospectlevel, s.default_lang, s.logo';
|
||||
$sql .= ', s.import_key';
|
||||
@ -736,7 +736,7 @@ class Societe extends CommonObject
|
||||
$this->code_compta = $obj->code_compta;
|
||||
$this->code_compta_fournisseur = $obj->code_compta_fournisseur;
|
||||
|
||||
$this->gencod = $obj->gencod;
|
||||
$this->barcode = $obj->barcode;
|
||||
|
||||
$this->tva_assuj = $obj->tva_assuj;
|
||||
$this->tva_intra = $obj->tva_intra;
|
||||
|
||||
@ -135,7 +135,7 @@ if (empty($reshook))
|
||||
$object->code_client = $_POST["code_client"];
|
||||
$object->code_fournisseur = $_POST["code_fournisseur"];
|
||||
$object->capital = $_POST["capital"];
|
||||
$object->gencod = $_POST["gencod"];
|
||||
$object->barcode = $_POST["barcode"];
|
||||
|
||||
$object->tva_intra = $_POST["tva_intra"];
|
||||
$object->tva_assuj = $_POST["assujtva_value"];
|
||||
@ -535,7 +535,7 @@ else
|
||||
$object->email = $_POST["email"];
|
||||
$object->url = $_POST["url"];
|
||||
$object->capital = $_POST["capital"];
|
||||
$object->gencod = $_POST["gencod"];
|
||||
$object->barcode = $_POST["barcode"];
|
||||
$object->idprof1 = $_POST["idprof1"];
|
||||
$object->idprof2 = $_POST["idprof2"];
|
||||
$object->idprof3 = $_POST["idprof3"];
|
||||
@ -757,7 +757,7 @@ else
|
||||
// Barcode
|
||||
if ($conf->global->MAIN_MODULE_BARCODE)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Gencod').'</td><td colspan="3"><input type="text" name="gencod" value="'.$object->gencod.'">';
|
||||
print '<tr><td>'.$langs->trans('Gencod').'</td><td colspan="3"><input type="text" name="barcode" value="'.$object->barcode.'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -1040,7 +1040,7 @@ else
|
||||
$object->idprof4=$_POST["idprof4"];
|
||||
$object->typent_id=$_POST["typent_id"];
|
||||
$object->effectif_id=$_POST["effectif_id"];
|
||||
$object->gencod=$_POST["gencod"];
|
||||
$object->barcode=$_POST["barcode"];
|
||||
$object->forme_juridique_code=$_POST["forme_juridique_code"];
|
||||
$object->default_lang=$_POST["default_lang"];
|
||||
|
||||
@ -1201,7 +1201,7 @@ else
|
||||
// Barcode
|
||||
if ($conf->global->MAIN_MODULE_BARCODE)
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans('Gencod').'</td><td colspan="3"><input type="text" name="gencod" value="'.$object->gencod.'">';
|
||||
print '<tr><td valign="top">'.$langs->trans('Gencod').'</td><td colspan="3"><input type="text" name="barcode" value="'.$object->barcode.'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -1515,7 +1515,7 @@ else
|
||||
// Barcode
|
||||
if ($conf->global->MAIN_MODULE_BARCODE)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Gencod').'</td><td colspan="'.(2+($object->logo?0:1)).'">'.$object->gencod.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Gencod').'</td><td colspan="'.(2+($object->logo?0:1)).'">'.$object->barcode.'</td></tr>';
|
||||
}
|
||||
|
||||
// Address
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
"Name* (s.nom)";"Status (s.status)";"Customer* (s.client)";"Supplier* (s.fournisseur)";"DateCreation (s.datec)";"CustomerCode (s.code_client)";"SupplierCode (s.code_fournisseur)";"Address (s.address)";"Zip (s.cp)";"Town (s.ville)";"Phone (s.tel)";"Fax (s.fax)";"Url (s.url)";"Email (s.email)";"IdProf1 (s.siret)";"IdProf2 (s.siren)";"IdProf3 (s.ape)";"IdProf4 (s.idprof4)";"VATIntraShort (s.tva_intra)";"Capital (s.capital)";"Note (s.note)";"ThirdPartyType (s.fk_typent)";"Effectif (s.fk_effectif)";"JuridicalStatus (s.fk_forme_juridique)";"ProspectLevel (s.fk_prospectlevel)";"ProspectStatus (s.fk_stcomm)";"DefaultLanguage (s.default_lang)";"BarCode (s.gencod)"
|
||||
"Name* (s.nom)";"Status (s.status)";"Customer* (s.client)";"Supplier* (s.fournisseur)";"DateCreation (s.datec)";"CustomerCode (s.code_client)";"SupplierCode (s.code_fournisseur)";"Address (s.address)";"Zip (s.cp)";"Town (s.ville)";"Phone (s.tel)";"Fax (s.fax)";"Url (s.url)";"Email (s.email)";"IdProf1 (s.siret)";"IdProf2 (s.siren)";"IdProf3 (s.ape)";"IdProf4 (s.idprof4)";"VATIntraShort (s.tva_intra)";"Capital (s.capital)";"Note (s.note)";"ThirdPartyType (s.fk_typent)";"Effectif (s.fk_effectif)";"JuridicalStatus (s.fk_forme_juridique)";"ProspectLevel (s.fk_prospectlevel)";"ProspectStatus (s.fk_stcomm)";"DefaultLanguage (s.default_lang)";"BarCode (s.barcode)"
|
||||
"MyBigCompanyImport1";1;3;1;01/01/00;"CU01-0001";"SU01-0001";"61 jump street";123456;"Big town";101010101;101010102;"http://mycompany.com";"test@mycompany.com";;;;;"FR0123456789";10000;"This is an example of note for record";2;3;1;"PL_MEDIUM";1;"en_US";123456789
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user