From 61f1146e2c24f588f0d6ab5d03b46961ac366d4c Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Fri, 14 Jan 2005 14:56:04 +0000 Subject: [PATCH] Bugfix --- htdocs/comm/fiche.php | 188 ++++++++++++++++++++++-------------------- 1 file changed, 97 insertions(+), 91 deletions(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index fc053e3cff3..b336d9b0402 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -174,96 +174,96 @@ if ($_socid > 0) $h++; } - $head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$objsoc->id; - $head[$h][1] = $langs->trans("Note"); - $h++; - - if ($user->societe_id == 0) + $head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$objsoc->id; + $head[$h][1] = $langs->trans("Note"); + $h++; + + if ($user->societe_id == 0) { - $head[$h][0] = DOL_URL_ROOT.'/docsoc.php?socid='.$objsoc->id; - $head[$h][1] = $langs->trans("Documents"); - $h++; + $head[$h][0] = DOL_URL_ROOT.'/docsoc.php?socid='.$objsoc->id; + $head[$h][1] = $langs->trans("Documents"); + $h++; } - - $head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$objsoc->id; - $head[$h][1] = $langs->trans("Notifications"); - $h++; - - if (file_exists(DOL_DOCUMENT_ROOT.'/sl/')) - { - $head[$h][0] = DOL_URL_ROOT.'/sl/fiche.php?id='.$objsoc->id; - $head[$h][1] = 'Fiche catalogue'; - $h++; - } - - if ($user->societe_id == 0) - { - $head[$h][0] = DOL_URL_ROOT."/comm/index.php?socidp=$objsoc->id&action=add_bookmark"; - $head[$h][1] = 'Bookmark'; - $head[$h][2] = 'image'; - $h++; - } - - dolibarr_fiche_head($head, $hselected, $objsoc->nom); - - /* - * - * - */ - print ''; - print '\n"; - - //if ($conf->propal->enabled) { - + + $head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$objsoc->id; + $head[$h][1] = $langs->trans("Notifications"); + $h++; + + if (file_exists(DOL_DOCUMENT_ROOT.'/sl/')) + { + $head[$h][0] = DOL_URL_ROOT.'/sl/fiche.php?id='.$objsoc->id; + $head[$h][1] = 'Fiche catalogue'; + $h++; + } + + if ($user->societe_id == 0) + { + $head[$h][0] = DOL_URL_ROOT."/comm/index.php?socidp=$objsoc->id&action=add_bookmark"; + $head[$h][1] = 'Bookmark'; + $head[$h][2] = 'image'; + $h++; + } + + dolibarr_fiche_head($head, $hselected, $objsoc->nom); + + /* + * + * + */ + print '
'; - print ''; - - print ''; - print "'; - - print ''; - print ''; - - print ''; - print '"; - - print ""; - print '"; - - print ""; - print '"; - print ''; - - print ''; - print ''; - - print "
'.$langs->trans("Name").''; - print $objsoc->nom; - print '
".$langs->trans("Address")."".nl2br($objsoc->adresse).'
'.$langs->trans('Zip').' / '.$langs->trans('Town').''.$objsoc->cp." ".$objsoc->ville.'
'.$langs->trans('Country').''.$objsoc->pays.'
'.$langs->trans("Phone").''.dolibarr_print_phone($objsoc->tel).' Fax'.dolibarr_print_phone($objsoc->fax).' 
'.$langs->trans("Web")."url\">$objsoc->url 
".$langs->trans("ProfIdSiren")."siren\">$objsoc->siren '.$langs->trans("Prefix").''; - if ($objsoc->prefix_comm) - { - print $objsoc->prefix_comm; - } - else - { - print "[id&action=attribute_prefix\">Attribuer]"; - } - - print "
".$langs->trans("Type")." $objsoc->typentEffectif$objsoc->effectif
'; - print $langs->trans("CustomerDiscount").''.$objsoc->remise_client." %'; - print img_edit("Modifier la remise"); - print ""; - print '
Remise exceptionnelles'; - print ''; - print img_edit("Modifier la remise"); - print ""; - print '
"; - - print "
"; - - /* - * - */ - print "
'; + print '\n"; + + //if ($conf->propal->enabled) { + print '
'; + print ''; + + print ''; + print "'; + + print ''; + print ''; + + print ''; + print '"; + + print ""; + print '"; + + print ""; + print '"; + print ''; + + print ''; + print ''; + + print "
'.$langs->trans("Name").''; + print $objsoc->nom; + print '
".$langs->trans("Address")."".nl2br($objsoc->adresse).'
'.$langs->trans('Zip').' / '.$langs->trans('Town').''.$objsoc->cp." ".$objsoc->ville.'
'.$langs->trans('Country').''.$objsoc->pays.'
'.$langs->trans("Phone").''.dolibarr_print_phone($objsoc->tel).' Fax'.dolibarr_print_phone($objsoc->fax).' 
'.$langs->trans("Web")."url\">$objsoc->url 
".$langs->trans("ProfIdSiren")."siren\">$objsoc->siren '.$langs->trans("Prefix").''; + if ($objsoc->prefix_comm) + { + print $objsoc->prefix_comm; + } + else + { + print "[id&action=attribute_prefix\">Attribuer]"; + } + + print "
".$langs->trans("Type")." $objsoc->typentEffectif$objsoc->effectif
'; + print $langs->trans("CustomerDiscount").''.$objsoc->remise_client." %'; + print img_edit("Modifier la remise"); + print ""; + print '
Remise exceptionnelles'; + print ''; + print img_edit("Modifier la remise"); + print ""; + print '
"; + + print "
"; + + /* + * + */ + print "
'; /* @@ -370,7 +370,9 @@ if ($_socid > 0) } $db->free(); print "
"; - } else { + } + else + { dolibarr_print_error($db); } @@ -457,9 +459,13 @@ if ($_socid > 0) print ' '; print ""; - $sql = "SELECT p.idp, p.name, p.firstname, p.poste, p.phone, p.fax, p.email, p.note FROM ".MAIN_DB_PREFIX."socpeople as p WHERE p.fk_soc = $objsoc->id ORDER by p.datec"; + $sql = "SELECT p.idp, p.name, p.firstname, p.poste, p.phone, p.fax, p.email, p.note "; + $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p"; + $sql .= " WHERE p.fk_soc = $objsoc->id ORDER by p.datec"; + $result = $db->query($sql); $i = 0 ; $num = $db->num_rows(); $tag = True; + while ($i < $num) { $obj = $db->fetch_object(); @@ -485,7 +491,7 @@ if ($_socid > 0) if (strlen($obj->phone) && $user->clicktodial_enabled == 1) { - print ''; + print ''; print img_phone_out("Appel émis") ; } print '';