From c6b66a9f4ad4f30c23f7624a27accc4007b644ef Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 8 Apr 2013 17:42:24 +0200 Subject: [PATCH] Normalize code --- htdocs/societe/lien.php | 55 ++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/htdocs/societe/lien.php b/htdocs/societe/lien.php index cbb5aed7300..efee8444dea 100644 --- a/htdocs/societe/lien.php +++ b/htdocs/societe/lien.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2011 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -147,7 +147,7 @@ if ($socid) if ($idprof!='-') { print ''.$idprof.''; - print $formcompany->get_input_id_prof(1,'idprof1',$object->idprof1,$object->country_code); + print $object->idprof1; print ''; } else print '  '; @@ -156,7 +156,7 @@ if ($socid) if ($idprof!='-') { print ''.$idprof.''; - print $formcompany->get_input_id_prof(2,'idprof2',$object->idprof2,$object->paycountry_codes_code); + print $object->idprof2; print ''; } else print '  '; @@ -167,7 +167,7 @@ if ($socid) if ($idprof!='-') { print ''.$idprof.''; - print $formcompany->get_input_id_prof(3,'idprof3',$object->idprof3,$object->country_code); + print $object->idprof3; print ''; } else print '  '; @@ -176,7 +176,7 @@ if ($socid) if ($idprof!='-') { print ''.$idprof.''; - print $formcompany->get_input_id_prof(4,'idprof4',$object->idprof4,$object->country_code); + print $object->idprof4; print ''; } else print '  '; @@ -270,48 +270,53 @@ if ($socid) print ''; print ''; print ''; - print ''; + print ''; + print ''; print ''; print ''; print "\n"; print ''; + $societestatic=new Societe($db); + $var=True; - while ($i < min($num,$conf->liste_limit)) { $obj = $db->fetch_object($resql); $var=!$var; - print ""; - print $obj->nom."\n"; + print ""; + print ""; + $societestatic->name=$obj->nom; + $societestatic->id=$obj->socid; + print $societestatic->getNomUrl(1); + print "\n"; print "".$obj->town." \n"; - print "".$langs->getLabelFromKey($db,$obj->code,'c_typent','code','libelle')."\n"; + print ""; + $s=$langs->getLabelFromKey($db,$obj->code,'c_typent','code','libelle'); + if ($s != '-') print $s; + print "\n"; print ''; - if ($obj->client==1) + $x=0; + if ($obj->client==1 || $obj->client==3) { - print $langs->trans("Customer")."\n"; + print $langs->trans("Customer"); + $x++; } - elseif ($obj->client==2) + if ($obj->client==2) { - print $langs->trans("Prospect")."\n"; + if ($x) print '/'; + print $langs->trans("Prospect"); + $x++; } - else - { - print " "; - } - print ""; if ($obj->fournisseur) { + if ($x) print '/'; print $langs->trans("Supplier"); + $x++; } - else - { - print " "; - } - print ''; // Lien S�lectionner - print ''.$langs->trans("Select").''; + print ''.$langs->trans("Add").''; print ''; print ''."\n";