mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Ajout: manquait la ref et le libell du produit dans les listes
This commit is contained in:
parent
852e200479
commit
9c8b4cfeed
|
|
@ -50,11 +50,12 @@ if ($page < 0) $page = 0;
|
|||
$limit = $conf->liste_limit;
|
||||
$offset = $limit * $page ;
|
||||
|
||||
$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_taux, l.fk_code_ventilation, c.intitule, c.numero ";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facturedet as l";
|
||||
$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_taux, l.fk_code_ventilation, c.intitule, c.numero";
|
||||
$sql .= ",p.rowid as product_id, p.ref as product_ref, p.label as product_label";
|
||||
$sql .= " FROM (".MAIN_DB_PREFIX."facturedet as l";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."compta_compte_generaux as c";
|
||||
|
||||
$sql .= " , ".MAIN_DB_PREFIX."compta_compte_generaux as c)";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON (p.rowid = l.fk_product)";
|
||||
$sql .= " WHERE f.rowid = l.fk_facture AND f.fk_statut = 1 AND l.fk_code_ventilation <> 0 ";
|
||||
$sql .= " AND c.rowid = l.fk_code_ventilation";
|
||||
|
||||
|
|
@ -77,15 +78,18 @@ if ($result)
|
|||
|
||||
print '<form method="GET" action="lignes.php">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print "<tr class=\"liste_titre\"><td>Facture</td>";
|
||||
print '<tr class=\"liste_titre\"><td>'.$langs->trans("Invoice").'</td>';
|
||||
print '<td>'.$langs->trans("Ref").'</td>';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Montant").'</td>';
|
||||
print '<td colspan="2" align="center">'.$langs->trans("Compte").'</td>';
|
||||
print '<td align="left">'.$langs->trans("Montant").'</td>';
|
||||
print '<td colspan="2" align="left">'.$langs->trans("Compte").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre"><td><input name="search_facture" size="8" value="'.$_GET["search_facture"].'"></td>';
|
||||
print '<td> </td>';
|
||||
print '<td align="right"> </td>';
|
||||
print '<td align="right"> </td>';
|
||||
print '<td align="center"> </td>';
|
||||
print '<td align="right">';
|
||||
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" alt="'.$langs->trans("Search").'">';
|
||||
|
|
@ -97,14 +101,16 @@ if ($result)
|
|||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
$codeCompta = $objp->numero.' '.stripslashes($objp->intitule);
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$objp->facid.'">'.$objp->facnumber.'</a></td>';
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->product_id.'">'.stripslashes($objp->product_ref).'</td>';
|
||||
print '<td>'.stripslashes($objp->product_label).'</td>';
|
||||
print '<td>'.stripslashes(nl2br($objp->description)).'</td>';
|
||||
print '<td align="right">'.price($objp->price).'</td>';
|
||||
print '<td align="right">'.$objp->numero.'</td>';
|
||||
print '<td align="left">'.stripslashes($objp->intitule).'</td>';
|
||||
print '<td align="left">'.price($objp->price).'</td>';
|
||||
print '<td align="left">'.$codeCompta.'</td>';
|
||||
|
||||
print "</tr>";
|
||||
$i++;
|
||||
|
|
|
|||
|
|
@ -53,9 +53,11 @@ if ($page < 0) $page = 0;
|
|||
$limit = $conf->liste_limit;
|
||||
$offset = $limit * $page ;
|
||||
|
||||
$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, l.price, l.rowid, l.fk_code_ventilation ";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facturedet as l";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, l.price, l.rowid, l.fk_code_ventilation";
|
||||
$sql .= ",p.rowid as product_id, p.ref as product_ref, p.label as product_label";
|
||||
$sql .= " FROM (".MAIN_DB_PREFIX."facturedet as l";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."facture as f)";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON (p.rowid = l.fk_product)";
|
||||
$sql .= " WHERE f.rowid = l.fk_facture AND f.fk_statut = 1 AND fk_code_ventilation = 0";
|
||||
$sql .= " ORDER BY l.rowid DESC ".$db->plimit($limit+1,$offset);
|
||||
|
||||
|
|
@ -68,9 +70,11 @@ if ($result)
|
|||
print_barre_liste("Lignes de facture à ventiler",$page,"liste.php","",$sortfield,$sortorder,'',$num_lignes);
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>Facture</td>';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Invoice").'</td>';
|
||||
print '<td>'.$langs->trans("Ref").'</td>';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td align="right"> </td>';
|
||||
print '<td align="right">'.$langs->trans("Montant").'</td>';
|
||||
print '<td> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
|
@ -82,6 +86,8 @@ if ($result)
|
|||
print "<tr $bc[$var]>";
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$objp->facid.'">'.$objp->facnumber.'</a></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->product_id.'">'.stripslashes($objp->product_ref).'</td>';
|
||||
print '<td>'.stripslashes($objp->product_label).'</td>';
|
||||
print '<td>'.stripslashes(nl2br($objp->description)).'</td>';
|
||||
|
||||
print '<td align="right">';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user