Skip to content
Snippets Groups Projects
Commit fd5f992b authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

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

parents 4c1b485d 12a41d7d
No related branches found
No related tags found
No related merge requests found
......@@ -141,7 +141,7 @@ if ($id > 0 || ! empty($ref))
elseif ($user->rights->facture->lire)
{
$sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client,";
$sql.= " f.facnumber, f.datef, f.paye, f.fk_statut as statut, f.rowid as facid,";
$sql.= " f.facnumber, f.datef, f.paye, f.type, f.fk_statut as statut, f.rowid as facid,";
$sql.= " d.rowid, d.total_ht as total_ht, d.qty"; // We must keep the d.rowid here to not loose record because of the distinct used to ignore duplicate line when link on societe_commerciaux is used
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user ";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
......@@ -233,22 +233,23 @@ if ($id > 0 || ! empty($ref))
while ($i < min($num,$conf->liste_limit))
{
$objp = $db->fetch_object($result);
$invoicestatic->id=$objp->facid;
$invoicestatic->ref=$objp->facnumber;
$societestatic->fetch($objp->socid);
$paiement = $invoicestatic->getSommePaiement();
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>';
$invoicestatic->id=$objp->facid;
$invoicestatic->ref=$objp->facnumber;
print $invoicestatic->getNomUrl(1);
print "</td>\n";
$societestatic->fetch($objp->socid);
print '<td>'.$societestatic->getNomUrl(1).'</td>';
print "<td>".$objp->code_client."</td>\n";
print '<td align="center">';
print dol_print_date($db->jdate($objp->datef),'day')."</td>";
print '<td align="center">'.$objp->qty."</td>\n";
print '<td align="right">'.price($objp->total_ht)."</td>\n";
print '<td align="right">'.$invoicestatic->LibStatut($objp->paye,$objp->statut,5).'</td>';
print '<td align="right">'.$invoicestatic->LibStatut($objp->paye,$objp->statut,5,$paiement,$objp->type).'</td>';
print "</tr>\n";
$i++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment