';
- // Name, firstname
- if ($soc->particulier)
- {
- print '| '.$langs->trans('LastName').' | | ';
- print ''.$langs->trans('Prefix').' | |
';
- print '| '.$langs->trans('FirstName').' | | ';
- print ' |
';
- print '| '.$langs->trans("UserTitle").' | ';
- print $formcompany->select_civilite($contact->civilite_id).' | ';
- print ' |
';
- }
- else
- {
- print '| '.$langs->trans('Name').' | | ';
- print ''.$langs->trans('Prefix').' | |
';
- }
+ // Name, firstname
+ if ($soc->particulier)
+ {
+ print '| '.$langs->trans('LastName').' | | ';
+ print ''.$langs->trans('Prefix').' | |
';
+ print '| '.$langs->trans('FirstName').' | | ';
+ print ' |
';
+ print '| '.$langs->trans("UserTitle").' | ';
+ print $formcompany->select_civilite($contact->civilite_id).' | ';
+ print ' |
';
+ }
+ else
+ {
+ print '| '.$langs->trans('Name').' | | ';
+ print ''.$langs->trans('Prefix').' | |
';
+ }
- // Prospect/Customer
- print '| '.$langs->trans('ProspectCustomer').' | | ';
+ // Prospect/Customer
+ print '
| '.$langs->trans('ProspectCustomer').' | | ';
- print ''.$langs->trans('CustomerCode').' | ';
- print '';
+ print ' | '.$langs->trans('CustomerCode').' | ';
+ print '';
- print ' |
';
+ print '';
- // Supplier
- print '';
- print '| '.$langs->trans('Supplier').' | ';
- print $form->selectyesno("fournisseur",$soc->fournisseur,1);
- print ' | ';
- print ''.$langs->trans('SupplierCode').' | ';
- print '';
+ // Supplier
+ print ' |
';
+ print '| '.$langs->trans('Supplier').' | ';
+ print $form->selectyesno("fournisseur",$soc->fournisseur,1);
+ print ' | ';
+ print ''.$langs->trans('SupplierCode').' | ';
+ print '';
- print ' |
';
+ print '';
- // Category
- if ($soc->fournisseur)
- {
- $load = $soc->LoadSupplierCateg();
- if ( $load == 0)
- {
- if (sizeof($soc->SupplierCategories) > 0)
- {
- print '';
- print '| '.$langs->trans('SupplierCategory').' | ';
- print $form->selectarray("fournisseur_categorie",$soc->SupplierCategories,$_POST["fournisseur_categorie"],1);
- print ' |
';
- }
- }
- }
+ // Category
+ if ($soc->fournisseur)
+ {
+ $load = $soc->LoadSupplierCateg();
+ if ( $load == 0)
+ {
+ if (sizeof($soc->SupplierCategories) > 0)
+ {
+ print '';
+ print '| '.$langs->trans('SupplierCategory').' | ';
+ print $form->selectarray("fournisseur_categorie",$soc->SupplierCategories,$_POST["fournisseur_categorie"],1);
+ print ' |
';
+ }
+ }
+ }
- // Barcode
- if ($conf->global->MAIN_MODULE_BARCODE)
- {
- print '| '.$langs->trans('Gencod').' | ';
- print $soc->gencod;
- print ' |
';
- }
+ // Barcode
+ if ($conf->global->MAIN_MODULE_BARCODE)
+ {
+ print '| '.$langs->trans('Gencod').' | ';
+ print $soc->gencod;
+ print ' |
';
+ }
- // Address
- print '| '.$langs->trans('Address').' | |
';
+ // Address
+ print '| '.$langs->trans('Address').' | |
';
- // Zip / Town
- print '| '.$langs->trans('Zip').' | ';
- if ($conf->use_javascript_ajax && $conf->global->MAIN_AUTOFILL_TOWNFROMZIP) print ' ';
- print ' | ';
- print ''.$langs->trans('Town').' | |
';
+ // Zip / Town
+ print '| '.$langs->trans('Zip').' | ';
+ if ($conf->use_javascript_ajax && $conf->global->MAIN_AUTOFILL_TOWNFROMZIP) print ' ';
+ print ' | ';
+ print ''.$langs->trans('Town').' | |
';
- // Country
- print '| '.$langs->trans('Country').' | ';
- $form->select_pays($soc->pays_id,'pays_id',$conf->use_javascript_ajax?' onChange="company_save_refresh_create()"':'');
- if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
- print ' |
';
+ // Country
+ print '| '.$langs->trans('Country').' | ';
+ $form->select_pays($soc->pays_id,'pays_id');
+ if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
+ print ' |
';
- // State
- print '| '.$langs->trans('State').' | ';
- if ($soc->pays_id)
- {
- $formcompany->select_departement($soc->departement_id,$soc->pays_code);
- }
- else
- {
- print $countrynotdefined;
- }
- print ' |
';
+ // State
+ print '| '.$langs->trans('State').' | ';
+ if ($soc->pays_id)
+ {
+ $formcompany->select_departement($soc->departement_id,$soc->pays_code);
+ }
+ else
+ {
+ print $countrynotdefined;
+ }
+ print ' |
';
- // Phone / Fax
- print '| '.$langs->trans('Phone').' | | ';
- print ''.$langs->trans('Fax').' | |
';
+ // Phone / Fax
+ print '| '.$langs->trans('Phone').' | | ';
+ print ''.$langs->trans('Fax').' | |
';
- print '| '.$langs->trans('EMail').($conf->global->SOCIETE_MAIL_REQUIRED?'*':'').' | | ';
- print ''.$langs->trans('Web').' | |
';
+ print '| '.$langs->trans('EMail').($conf->global->SOCIETE_MAIL_REQUIRED?'*':'').' | | ';
+ print ''.$langs->trans('Web').' | |
';
- print '| '.$langs->trans('Capital').' | '.$langs->trans("Currency".$conf->monnaie).' |
';
+ print '| '.$langs->trans('Capital').' | '.$langs->trans("Currency".$conf->monnaie).' |
';
- print '';
- // IdProf1 (SIREN for France)
- $idprof=$langs->transcountry('ProfId1',$soc->pays_code);
- if ($idprof!='-')
- {
- print '| '.$idprof.' | ';
- $soc->show_input_id_prof(1,'idprof1',$soc->siren);
- print ' | ';
- }
- else print ' | | ';
- // IdProf2 (SIRET for France)
- $idprof=$langs->transcountry('ProfId2',$soc->pays_code);
- if ($idprof!='-')
- {
- print ''.$idprof.' | ';
- $soc->show_input_id_prof(2,'idprof2',$soc->siret);
- print ' | ';
- }
- else print ' | | ';
- print '
';
- print '';
- // IdProf3 (APE for France)
- $idprof=$langs->transcountry('ProfId3',$soc->pays_code);
- if ($idprof!='-')
- {
- print '| '.$idprof.' | ';
- $soc->show_input_id_prof(3,'idprof3',$soc->ape);
- print ' | ';
- }
- else print ' | | ';
- // IdProf4 (NU for France)
- $idprof=$langs->transcountry('ProfId4',$soc->pays_code);
- if ($idprof!='-')
- {
- print ''.$idprof.' | ';
- $soc->show_input_id_prof(4,'idprof4',$soc->idprof4);
- print ' | ';
- }
- else print ' | | ';
- print '
';
+ print '';
+ // IdProf1 (SIREN for France)
+ $idprof=$langs->transcountry('ProfId1',$soc->pays_code);
+ if ($idprof!='-')
+ {
+ print '| '.$idprof.' | ';
+ $soc->show_input_id_prof(1,'idprof1',$soc->siren);
+ print ' | ';
+ }
+ else print ' | | ';
+ // IdProf2 (SIRET for France)
+ $idprof=$langs->transcountry('ProfId2',$soc->pays_code);
+ if ($idprof!='-')
+ {
+ print ''.$idprof.' | ';
+ $soc->show_input_id_prof(2,'idprof2',$soc->siret);
+ print ' | ';
+ }
+ else print ' | | ';
+ print '
';
+ print '';
+ // IdProf3 (APE for France)
+ $idprof=$langs->transcountry('ProfId3',$soc->pays_code);
+ if ($idprof!='-')
+ {
+ print '| '.$idprof.' | ';
+ $soc->show_input_id_prof(3,'idprof3',$soc->ape);
+ print ' | ';
+ }
+ else print ' | | ';
+ // IdProf4 (NU for France)
+ $idprof=$langs->transcountry('ProfId4',$soc->pays_code);
+ if ($idprof!='-')
+ {
+ print ''.$idprof.' | ';
+ $soc->show_input_id_prof(4,'idprof4',$soc->idprof4);
+ print ' | ';
+ }
+ else print ' | | ';
+ print '
';
- // Legal Form
- print '| '.$langs->trans('JuridicalStatus').' | ';
- print '';
- if ($soc->pays_id)
- {
- $formcompany->select_forme_juridique($soc->forme_juridique_code,$soc->pays_code);
- }
- else
- {
- print $countrynotdefined;
- }
- print ' |
';
+ // Legal Form
+ print '| '.$langs->trans('JuridicalStatus').' | ';
+ print '';
+ if ($soc->pays_id)
+ {
+ $formcompany->select_forme_juridique($soc->forme_juridique_code,$soc->pays_code);
+ }
+ else
+ {
+ print $countrynotdefined;
+ }
+ print ' |
';
- print '| '.$langs->trans("Type").' | '."\n";
- print $form->selectarray("typent_id",$formcompany->typent_array(0), $soc->typent_id);
- if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
- print ' | ';
- print ''.$langs->trans("Staff").' | ';
- print $form->selectarray("effectif_id",$formcompany->effectif_array(0), $soc->effectif_id);
- if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
- print ' |
';
+ print '| '.$langs->trans("Type").' | '."\n";
+ print $form->selectarray("typent_id",$formcompany->typent_array(0), $soc->typent_id);
+ if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
+ print ' | ';
+ print ''.$langs->trans("Staff").' | ';
+ print $form->selectarray("effectif_id",$formcompany->effectif_array(0), $soc->effectif_id);
+ if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
+ print ' |
';
- if ($conf->global->MAIN_MULTILANGS)
- {
- print '| '.$langs->trans("DefaultLang").' | '."\n";
- $formadmin->select_lang(($soc->default_lang?$soc->default_lang:$conf->global->MAIN_LANG_DEFAULT),'default_lang',0,0,1);
- print ' | ';
- print '
';
- }
+ if ($conf->global->MAIN_MULTILANGS)
+ {
+ print '| '.$langs->trans("DefaultLang").' | '."\n";
+ $formadmin->select_lang(($soc->default_lang?$soc->default_lang:$conf->global->MAIN_LANG_DEFAULT),'default_lang',0,0,1);
+ print ' | ';
+ print '
';
+ }
- // Assujeti TVA
- $html = new Form($db);
- print '| '.$langs->trans('VATIsUsed').' | ';
- print '';
- print $html->selectyesno('assujtva_value',1,1); // Assujeti par defaut en creation
- print ' | ';
- print ''.$langs->trans('VATIntra').' | ';
- print '';
- $s ='';
- $s.=' ';
- if ($conf->use_javascript_ajax)
- {
- $s.=''.$langs->trans("VATIntraCheck").'';
- print $form->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1);
- }
- else
- {
- print $s.'id_pays).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'';
- }
- print ' | ';
+ // Assujeti TVA
+ $html = new Form($db);
+ print '
| '.$langs->trans('VATIsUsed').' | ';
+ print '';
+ print $html->selectyesno('assujtva_value',1,1); // Assujeti par defaut en creation
+ print ' | ';
+ print ''.$langs->trans('VATIntra').' | ';
+ print '';
+ $s ='';
+ $s.=' ';
+ if ($conf->use_javascript_ajax)
+ {
+ $s.=''.$langs->trans("VATIntraCheck").'';
+ print $form->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1);
+ }
+ else
+ {
+ print $s.'id_pays).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'';
+ }
+ print ' | ';
- print '
';
+ print '';
- // Code TVA
- if ($conf->use_javascript_ajax)
- {
- print "\n";
- print '';
- print "\n";
- }
+ // Code TVA
+ if ($conf->use_javascript_ajax)
+ {
+ print "\n";
+ print '';
+ print "\n";
+ }
- // Local Taxes
- if($mysoc->pays_code=='ES')
- {
- if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
- {
- print '| '.$langs->trans("LocalTax1IsUsedES").' | ';
- print $html->selectyesno('localtax1assuj_value',0,1);
- print ' | '.$langs->trans("LocalTax2IsUsedES").' | ';
- print $html->selectyesno('localtax2assuj_value',0,1);
- print ' |
';
+ // Local Taxes
+ if($mysoc->pays_code=='ES')
+ {
+ if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
+ {
+ print '| '.$langs->trans("LocalTax1IsUsedES").' | ';
+ print $html->selectyesno('localtax1assuj_value',0,1);
+ print ' | '.$langs->trans("LocalTax2IsUsedES").' | ';
+ print $html->selectyesno('localtax2assuj_value',0,1);
+ print ' |
';
- }
- elseif($mysoc->localtax1_assuj=="1")
- {
- print '| '.$langs->trans("LocalTax1IsUsedES").' | ';
- print $html->selectyesno('localtax1assuj_value',0,1);
- print ' |
';
- }
- elseif($mysoc->localtax2_assuj=="1")
- {
- print '
| '.$langs->trans("LocalTax2IsUsedES").' | ';
- print $html->selectyesno('localtax2assuj_value',0,1);
- print ' |
';
- }
- }
+ }
+ elseif($mysoc->localtax1_assuj=="1")
+ {
+ print '
| '.$langs->trans("LocalTax1IsUsedES").' | ';
+ print $html->selectyesno('localtax1assuj_value',0,1);
+ print ' |
';
+ }
+ elseif($mysoc->localtax2_assuj=="1")
+ {
+ print '
| '.$langs->trans("LocalTax2IsUsedES").' | ';
+ print $html->selectyesno('localtax2assuj_value',0,1);
+ print ' |
';
+ }
+ }
- if ($user->rights->societe->client->voir)
- {
- // Assign a Name
- print '
';
- print '| '.$langs->trans("AllocateCommercial").' | ';
- print '';
- $form->select_users($soc->commercial_id,'commercial_id',1);
- print ' |
';
- }
+ if ($user->rights->societe->client->voir)
+ {
+ // Assign a Name
+ print '';
+ print '| '.$langs->trans("AllocateCommercial").' | ';
+ print '';
+ $form->select_users($soc->commercial_id,'commercial_id',1);
+ print ' |
';
+ }
- print '| ';
- print '';
- print ' |
'."\n";
+ print '| ';
+ print '';
+ print ' |
'."\n";
- print '
'."\n";
- print ''."\n";
+ print '