/* * View */ $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('',$langs->trans("ThirdParty"),$help_url); $form = new Form($db); if ($_GET["socid"]) { $soc = new Societe($db); $soc->id = $_GET["socid"]; $result=$soc->fetch($_GET["socid"]); $head=societe_prepare_head2($soc); dol_fiche_head($head, 'salesrepresentative', $langs->trans("ThirdParty"),0,'company'); /* * Fiche societe en mode visu */ print '<table class="border" width="100%">'; print '<tr><td width="20%">'.$langs->trans('ThirdPartyName').'</td>'; print '<td colspan="3">'; print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom'); print '</td></tr>'; print '<tr>';
} else { header("Location: " . $_SERVER["PHP_SELF"] . "?socid=" . $socid); exit; } } /* * View */ $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $langs->trans("ThirdParty"), $help_url); $form = new Form($db); if (!empty($socid)) { $object = new Societe($db); $result = $object->fetch($socid); $action = 'view'; $head = societe_prepare_head2($object); dol_fiche_head($head, 'salesrepresentative', $langs->trans("ThirdParty"), 0, 'company'); dol_banner_tab($object, 'socid', '', $user->societe_id ? 0 : 1, 'rowid', 'nom'); print '<div class="fichecenter">'; print '<div class="underbanner clearboth"></div>'; print '<table class="border centpercent">'; print '<tr>'; print '<td class="titlefield" width="25%">' . $langs->trans('CustomerCode') . '</td><td' . (empty($conf->global->SOCIETE_USEPREFIX) ? ' colspan="3"' : '') . '>'; print $object->code_client; if ($object->check_codeclient() != 0) { print ' ' . $langs->trans("WrongCustomerCode"); } print '</td>'; if (!empty($conf->global->SOCIETE_USEPREFIX)) { print '<td>' . $langs->trans('Prefix') . '</td><td>' . $object->prefix_comm . '</td>'; }