diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 81b0c269c27..8bee24cd23b 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2004-2005 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * @@ -22,10 +22,11 @@ * */ -/** \file htdocs/comm/fiche.php - \ingroup commercial - \brief Onglet client de la fiche societe - \version $Revision$ +/*! + \file htdocs/comm/fiche.php + \ingroup commercial + \brief Onglet client de la fiche societe + \version $Revision$ */ require("./pre.inc.php"); @@ -38,8 +39,7 @@ $langs->load("contracts"); $user->getrights(); -llxHeader(); - +llxHeader('',$langs->trans('CustomerCard')); $sortorder=$_GET["sortorder"]; $sortfield=$_GET["sortfield"]; @@ -52,39 +52,48 @@ if ($sortfield == "") { } -if ($_GET["action"] == 'attribute_prefix') { +if ($_GET["action"] == 'attribute_prefix') +{ $societe = new Societe($db, $_GET["socid"]); $societe->attribute_prefix($db, $_GET["socid"]); } -if ($action == 'recontact') { +if ($action == 'recontact') +{ $dr = mktime(0, 0, 0, $remonth, $reday, $reyear); $sql = "INSERT INTO ".MAIN_DB_PREFIX."soc_recontact (fk_soc, datere, author) VALUES ($socid, $dr,'". $user->login ."')"; $result = $db->query($sql); } -if ($action == 'stcomm') { - if ($stcommid <> 'null' && $stcommid <> $oldstcomm) { - $sql = "INSERT INTO socstatutlog (datel, fk_soc, fk_statut, author) "; - $sql .= " VALUES ('$dateaction',$socid,$stcommid,'" . $user->login . "')"; - $result = @$db->query($sql); - - if ($result) { - $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=$stcommid WHERE idp=$socid"; - $result = $db->query($sql); - } else { - $errmesg = "ERREUR DE DATE !"; +if ($action == 'stcomm') +{ + if ($stcommid <> 'null' && $stcommid <> $oldstcomm) + { + $sql = "INSERT INTO socstatutlog (datel, fk_soc, fk_statut, author) "; + $sql .= " VALUES ('$dateaction',$socid,$stcommid,'" . $user->login . "')"; + $result = @$db->query($sql); + + if ($result) + { + $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=$stcommid WHERE idp=$socid"; + $result = $db->query($sql); + } + else + { + $errmesg = "ERREUR DE DATE !"; + } } - } - if ($actioncommid) { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm (datea, fk_action, fk_soc, fk_user_author) VALUES ('$dateaction',$actioncommid,$socid,'" . $user->id . "')"; - $result = @$db->query($sql); - - if (!$result) { - $errmesg = "ERREUR DE DATE !"; + if ($actioncommid) + { + $sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm (datea, fk_action, fk_soc, fk_user_author) VALUES ('$dateaction',$actioncommid,$socid,'" . $user->id . "')"; + $result = @$db->query($sql); + + if (!$result) + { + $errmesg = "ERREUR DE DATE !"; + } } - } } /* @@ -206,13 +215,13 @@ if ($_socid > 0) print ''; print ''; - print ''; - print "'; + print ''; + print "'; - print ''; + print '
'.$objsoc->cp." ".$objsoc->ville; + print '
'.$objsoc->pays.''; print ''; print '"; @@ -431,6 +440,8 @@ if ($_socid > 0) { print 'Intervention'; } + + print ''.$langs->trans("AddContact").''; print ''; print '
'; @@ -471,7 +482,7 @@ if ($_socid > 0) print ''; print ''; print ''; - print ""; + print ""; print ''; print "";
'.$langs->trans("Name").''; + print '
'.$langs->trans("Name").''; print $objsoc->nom; - print '
".$langs->trans("Address")."".nl2br($objsoc->adresse).'
'.$objsoc->code_client.'
".$langs->trans("Address")."".nl2br($objsoc->adresse); - print '
'.$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("Firstname").' '.$langs->trans("Lastname").''.$langs->trans("Poste").''.$langs->trans("Tel").''.$langs->trans("Fax").''.$langs->trans("EMail").'id."&action=create\">".$langs->trans("AddContact")."