';
-
- // Name
- print '| '.$langs->trans('Name').' | ';
- print '';
- print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom');
- print ' |
';
-
- print '| '.$langs->trans('Prefix').' | '.$soc->prefix_comm.' |
';
-
- if ($soc->client)
- {
- print '| ';
- print $langs->trans('CustomerCode').' | ';
- print $soc->code_client;
- if ($soc->check_codeclient() <> 0) print ' ('.$langs->trans("WrongCustomerCode").')';
- print ' |
';
- }
-
- if ($soc->fournisseur) {
- print '| ';
- print $langs->trans('SupplierCode').' | ';
- print $soc->code_fournisseur;
- if ($soc->check_codefournisseur() <> 0) print ' ('.$langs->trans("WrongSupplierCode").')';
- print ' |
';
- }
-
- if ($conf->global->MAIN_MODULE_BARCODE)
- {
- print '| '.$langs->trans('Gencod').' | '.$soc->gencod.' |
';
- }
-
- print "| ".$langs->trans('Address')." | ".nl2br($soc->address)." |
";
-
- print '| '.$langs->trans('Zip').' | '.$soc->cp." | ";
- print ''.$langs->trans('Town').' | '.$soc->ville." |
";
-
- // Country
- print '| '.$langs->trans("Country").' | ';
- $img=picto_from_langcode($soc->pays_code);
- if ($soc->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$soc->pays,$langs->trans("CountryIsInEEC"),1,0);
- else print ($img?$img.' ':'').$soc->pays;
- print ' |
';
-
- // Department
- print '| '.$langs->trans('State').' | '.$soc->departement.' | ';
-
- print '
| '.$langs->trans('Phone').' | '.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id,'AC_TEL').' | ';
- print ''.$langs->trans('Fax').' | '.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id,'AC_FAX').' |
';
-
- // EMail
- print '| '.$langs->trans('EMail').' | ';
- print dol_print_email($soc->email,0,$soc->id,'AC_EMAIL');
- print ' | ';
-
- // Web
- print ''.$langs->trans('Web').' | ';
- print dol_print_url($soc->url);
- print ' |
';
-
- // ProfId1 (SIREN for France)
- $profid=$langs->transcountry('ProfId1',$soc->pays_code);
- if ($profid!='-')
- {
- print '| '.$profid.' | ';
- print $soc->siren;
- if ($soc->siren)
- {
- if ($soc->id_prof_check(1,$soc) > 0) print ' '.$soc->id_prof_url(1,$soc);
- else print ' ('.$langs->trans("ErrorWrongValue").')';
- }
- print ' | ';
- }
- else print '
| | | ';
- // ProfId2 (SIRET for France)
- $profid=$langs->transcountry('ProfId2',$soc->pays_code);
- if ($profid!='-')
- {
- print ''.$profid.' | ';
- print $soc->siret;
- if ($soc->siret)
- {
- if ($soc->id_prof_check(2,$soc) > 0) print ' '.$soc->id_prof_url(2,$soc);
- else print ' ('.$langs->trans("ErrorWrongValue").')';
- }
- print ' |
';
- }
- else print ' | | ';
-
- // ProfId3 (APE for France)
- $profid=$langs->transcountry('ProfId3',$soc->pays_code);
- if ($profid!='-')
- {
- print '| '.$profid.' | ';
- print $soc->ape;
- if ($soc->ape)
- {
- if ($soc->id_prof_check(3,$soc) > 0) print ' '.$soc->id_prof_url(3,$soc);
- else print ' ('.$langs->trans("ErrorWrongValue").')';
- }
- print ' | ';
- }
- else print '
| | | ';
- // ProfId4 (NU for France)
- $profid=$langs->transcountry('ProfId4',$soc->pays_code);
- if ($profid!='-')
- {
- print ''.$profid.' | ';
- print $soc->idprof4;
- if ($soc->idprof4)
- {
- if ($soc->id_prof_check(4,$soc) > 0) print ' '.$soc->id_prof_url(4,$soc);
- else print ' ('.$langs->trans("ErrorWrongValue").')';
- }
- print ' |
';
- }
- else print ' | | ';
-
- // VAT payers
- $html = new Form($db);
- print '| ';
- print $langs->trans('VATIsUsed');
- print ' | ';
- print yn($soc->tva_assuj);
- print ' | ';
-
- // VAT Code
- if ($conf->use_javascript_ajax)
- {
- print "\n";
- print '';
- print "\n";
- }
- print ''.$langs->trans('VATIntra').' | ';
- if ($soc->tva_intra)
- {
- $s='';
- $s.=$soc->tva_intra;
- $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').'';
- }
- }
- else
- {
- print ' ';
- }
- print ' | ';
-
- print '
';
-
- // Local Taxes
- if($mysoc->pays_code=='ES')
- {
- if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
- {
- print '| '.$langs->trans("LocalTax1IsUsedES").' | ';
- print yn($soc->localtax1_assuj);
- print ' | '.$langs->trans("LocalTax2IsUsedES").' | ';
- print yn($soc->localtax2_assuj);
- print ' |
';
-
- }
- elseif($mysoc->localtax1_assuj=="1")
- {
- print '| '.$langs->trans("LocalTax1IsUsedES").' | ';
- print yn($soc->localtax1_assuj);
- print ' |
';
- }
- elseif($mysoc->localtax2_assuj=="1")
- {
- print '
| '.$langs->trans("LocalTax2IsUsedES").' | ';
- print yn($soc->localtax2_assuj);
- print ' |
';
- }
- }
-
- // Capital
- print '
| '.$langs->trans('Capital').' | ';
- if ($soc->capital) print $soc->capital.' '.$langs->trans("Currency".$conf->monnaie);
- else print ' ';
- print ' |
';
-
- // Legal
- print '| '.$langs->trans('JuridicalStatus').' | '.$soc->forme_juridique.' |
';
-
- // Type + Staff
- $arr = $formcompany->typent_array(1);
- $soc->typent= $arr[$soc->typent_code];
- print '| '.$langs->trans("Type").' | '.$soc->typent.' | '.$langs->trans("Staff").' | '.$soc->effectif.' |
';
-
- // Default language
- if ($conf->global->MAIN_MULTILANGS)
- {
- require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
- print '| '.$langs->trans("DefaultLang").' | ';
- //$s=picto_from_langcode($soc->default_lang);
- //print ($s?$s.' ':'');
- $langs->load("languages");
- $labellang = ($soc->default_lang?$langs->trans('Language_'.$soc->default_lang):'');
- print $labellang;
- print ' |
';
- }
-
- // Ban
- print '';
- print '| ';
- print $langs->trans('RIB');
- print ' | | ';
- if ($user->rights->societe->creer)
- print ''.img_edit().'';
- else
- print ' ';
- print ' | ';
- print ' | ';
- print '';
- print $soc->display_rib();
- print ' |
';
-
- // Parent company
- print '';
- print '| ';
- print $langs->trans('ParentCompany');
- print ' | | ';
- if ($user->rights->societe->creer)
- print ''.img_edit() .'';
- else
- print ' ';
- print ' | ';
- print ' | ';
- print '';
- if ($soc->parent)
- {
- $socm = new Societe($db);
- $socm->fetch($soc->parent);
- print $socm->getNomUrl(1).' '.($socm->code_client?"(".$socm->code_client.")":"");
- print $socm->ville?' - '.$socm->ville:'';
- }
- else {
- print $langs->trans("NoParentCompany");
- }
- print ' |
';
-
- // Commercial
- print '';
- print '| ';
- print $langs->trans('SalesRepresentatives');
- print ' | | ';
- if ($user->rights->societe->creer)
- print ''.img_edit().'';
- else
- print ' ';
- print ' | ';
- print ' | ';
- print '';
-
- $sql = "SELECT count(sc.rowid) as nb";
- $sql.= " FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc";
- $sql.= " WHERE sc.fk_soc =".$soc->id;
-
- $resql = $db->query($sql);
- if ($resql)
- {
- $num = $db->num_rows($resql);
- $obj = $db->fetch_object($resql);
- print $obj->nb?($obj->nb):$langs->trans("NoSalesRepresentativeAffected");
- }
- else {
- dol_print_error($db);
- }
- print ' |
';
-
- // Module Adherent
- if ($conf->adherent->enabled)
- {
- $langs->load("members");
- print '| '.$langs->trans("LinkedToDolibarrMember").' | ';
- print '';
- $adh=new Adherent($db);
- $result=$adh->fetch('','',$soc->id);
- if ($result > 0)
- {
- $adh->ref=$adh->getFullName($langs);
- print $adh->getNomUrl(1);
- }
- else
- {
- print $langs->trans("UserNotLinkedToMember");
- }
- print ' | ';
- print "
\n";
- }
-
- print '
';
- print '