Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2013-10-27 02:27:32 +02:00
commit 870f7ada45
3 changed files with 6 additions and 3 deletions

View File

@ -141,7 +141,7 @@ if (! $sortorder) $sortorder='DESC';
$limit = $conf->liste_limit;
$sql = 'SELECT s.rowid, s.nom, s.town, s.client, ';
$sql = 'SELECT s.rowid, s.nom, s.town, s.client, s.code_client';
$sql.= 'p.rowid as propalid, p.note_private, p.total_ht, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,';
if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,";
$sql.= ' u.login';
@ -368,6 +368,7 @@ if ($result)
$companystatic->id=$objp->rowid;
$companystatic->nom=$objp->nom;
$companystatic->client=$objp->client;
$companystatic->code_client=$objp->code_client;
print '<td>';
print $companystatic->getNomUrl(1,'customer');
print '</td>';

View File

@ -143,7 +143,7 @@ else $sql = 'SELECT DISTINCT';
$sql.= ' f.rowid as facid, f.facnumber, f.ref_client, f.type, f.note_private, f.increment, f.total as total_ht, f.tva as total_tva, f.total_ttc,';
$sql.= ' f.datef as df, f.date_lim_reglement as datelimite,';
$sql.= ' f.paye as paye, f.fk_statut,';
$sql.= ' s.nom, s.rowid as socid';
$sql.= ' s.nom, s.rowid as socid, s.code_client, s.client ';
if (! $sall) $sql.= ', SUM(pf.amount) as am'; // To be able to sort on status
$sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s';
$sql.= ', '.MAIN_DB_PREFIX.'facture as f';
@ -390,6 +390,8 @@ if ($resql)
$thirdparty=new Societe($db);
$thirdparty->id=$objp->socid;
$thirdparty->nom=$objp->nom;
$thirdparty->client=$objp->client;
$thirdparty->code_client=$objp->code_client;
print $thirdparty->getNomUrl(1,'customer');
print '</td>';

View File

@ -800,7 +800,7 @@ class Form
while ($i < $num)
{
$obj = $this->db->fetch_object($resql);
$label='';
if ($conf->global->SOCIETE_ADD_REF_IN_LIST) {
if (($obj->client) && (!empty($obj->code_client))) {
$label = $obj->code_client. ' - ';