Fixed: use object
This commit is contained in:
parent
d16ce7eb96
commit
c5a3b4481e
@ -59,9 +59,6 @@ $contactstatic = new Contact($db);
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
/*
|
|
||||||
* Fiche categorie de client et/ou fournisseur
|
|
||||||
*/
|
|
||||||
if ($socid)
|
if ($socid)
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
@ -70,79 +67,79 @@ if ($socid)
|
|||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
|
|
||||||
$soc = new Societe($db);
|
$object = new Societe($db);
|
||||||
$result = $soc->fetch($socid);
|
$result = $object->fetch($socid);
|
||||||
llxHeader("",$langs->trans("Agenda"),'');
|
llxHeader("",$langs->trans("Agenda"),'');
|
||||||
|
|
||||||
if (! empty($conf->notification->enabled)) $langs->load("mails");
|
if (! empty($conf->notification->enabled)) $langs->load("mails");
|
||||||
$head = societe_prepare_head($soc);
|
$head = societe_prepare_head($object);
|
||||||
|
|
||||||
dol_fiche_head($head, 'agenda', $langs->trans("ThirdParty"),0,'company');
|
dol_fiche_head($head, 'agenda', $langs->trans("ThirdParty"),0,'company');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
print '<tr><td width="25%">'.$langs->trans("ThirdPartyName").'</td><td colspan="3">';
|
print '<tr><td width="25%">'.$langs->trans("ThirdPartyName").'</td><td colspan="3">';
|
||||||
print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom');
|
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$soc->prefix_comm.'</td></tr>';
|
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($soc->client)
|
if ($object->client)
|
||||||
{
|
{
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $langs->trans('CustomerCode').'</td><td colspan="3">';
|
print $langs->trans('CustomerCode').'</td><td colspan="3">';
|
||||||
print $soc->code_client;
|
print $object->code_client;
|
||||||
if ($soc->check_codeclient() <> 0) print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>';
|
if ($object->check_codeclient() <> 0) print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($soc->fournisseur)
|
if ($object->fournisseur)
|
||||||
{
|
{
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $langs->trans('SupplierCode').'</td><td colspan="3">';
|
print $langs->trans('SupplierCode').'</td><td colspan="3">';
|
||||||
print $soc->code_fournisseur;
|
print $object->code_fournisseur;
|
||||||
if ($soc->check_codefournisseur() <> 0) print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>';
|
if ($object->check_codefournisseur() <> 0) print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->barcode->enabled))
|
if (! empty($conf->barcode->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans('Gencod').'</td><td colspan="3">'.$soc->barcode.'</td></tr>';
|
print '<tr><td>'.$langs->trans('Gencod').'</td><td colspan="3">'.$object->barcode.'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">";
|
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">";
|
||||||
dol_print_address($soc->address, 'gmap', 'thirdparty', $soc->id);
|
dol_print_address($object->address, 'gmap', 'thirdparty', $object->id);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
// Zip / Town
|
// Zip / Town
|
||||||
print '<tr><td width="25%">'.$langs->trans('Zip').'</td><td width="25%">'.$soc->zip."</td>";
|
print '<tr><td width="25%">'.$langs->trans('Zip').'</td><td width="25%">'.$object->zip."</td>";
|
||||||
print '<td width="25%">'.$langs->trans('Town').'</td><td width="25%">'.$soc->town."</td></tr>";
|
print '<td width="25%">'.$langs->trans('Town').'</td><td width="25%">'.$object->town."</td></tr>";
|
||||||
|
|
||||||
// Country
|
// Country
|
||||||
if ($soc->country) {
|
if ($object->country) {
|
||||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
|
||||||
$img=picto_from_langcode($soc->country_code);
|
$img=picto_from_langcode($object->country_code);
|
||||||
print ($img?$img.' ':'');
|
print ($img?$img.' ':'');
|
||||||
print $soc->country;
|
print $object->country;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// EMail
|
// EMail
|
||||||
print '<tr><td>'.$langs->trans('EMail').'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans('EMail').'</td><td colspan="3">';
|
||||||
print dol_print_email($soc->email,0,$soc->id,'AC_EMAIL');
|
print dol_print_email($object->email,0,$object->id,'AC_EMAIL');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Web
|
// Web
|
||||||
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3">';
|
||||||
print dol_print_url($soc->url);
|
print dol_print_url($object->url);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Phone / Fax
|
// Phone / Fax
|
||||||
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->phone,$soc->country_code,0,$soc->id,'AC_TEL').'</td>';
|
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($object->phone,$object->country_code,0,$object->id,'AC_TEL').'</td>';
|
||||||
print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($soc->fax,$soc->country_code,0,$soc->id,'AC_FAX').'</td></tr>';
|
print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
@ -171,7 +168,7 @@ if ($socid)
|
|||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
$objthirdparty=$soc;
|
$objthirdparty=$object;
|
||||||
$objcon=new stdClass();
|
$objcon=new stdClass();
|
||||||
|
|
||||||
$out='';
|
$out='';
|
||||||
@ -189,10 +186,10 @@ if ($socid)
|
|||||||
print load_fiche_titre($langs->trans("ActionsOnCompany"),$out,'');
|
print load_fiche_titre($langs->trans("ActionsOnCompany"),$out,'');
|
||||||
|
|
||||||
// List of todo actions
|
// List of todo actions
|
||||||
show_actions_todo($conf,$langs,$db,$soc);
|
show_actions_todo($conf,$langs,$db,$object);
|
||||||
|
|
||||||
// List of done actions
|
// List of done actions
|
||||||
show_actions_done($conf,$langs,$db,$soc);
|
show_actions_done($conf,$langs,$db,$object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user