Ajout boite factures brouillons
Suppression des titre de boites vides
This commit is contained in:
parent
2ac462dac5
commit
d2cfae195c
@ -121,7 +121,7 @@ if ($user->societe_id == 0)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Propales
|
* Propales à facturer
|
||||||
*/
|
*/
|
||||||
if ($user->comm > 0 && $conf->commercial )
|
if ($user->comm > 0 && $conf->commercial )
|
||||||
{
|
{
|
||||||
@ -144,12 +144,8 @@ if ($user->comm > 0 && $conf->commercial )
|
|||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Factures
|
* Factures impayées
|
||||||
*/
|
*/
|
||||||
print '<TABLE border="0" cellspacing="0" cellpadding="3" width="100%">';
|
|
||||||
print "<TR class=\"liste_titre\">";
|
|
||||||
print '<td colspan="2">Factures impayées</td>';
|
|
||||||
print "</TR>\n";
|
|
||||||
|
|
||||||
$sql = "SELECT f.facnumber, f.rowid, s.nom FROM llx_facture as f, llx_societe as s WHERE s.idp = f.fk_soc AND f.paye = 0 AND f.fk_statut > 0";
|
$sql = "SELECT f.facnumber, f.rowid, s.nom FROM llx_facture as f, llx_societe as s WHERE s.idp = f.fk_soc AND f.paye = 0 AND f.fk_statut > 0";
|
||||||
if ($socidp)
|
if ($socidp)
|
||||||
@ -162,19 +158,28 @@ if ( $db->query($sql) )
|
|||||||
$num = $db->num_rows();
|
$num = $db->num_rows();
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
while ($i < $num)
|
if ($num)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object( $i);
|
print '<TABLE border="0" cellspacing="0" cellpadding="3" width="100%">';
|
||||||
$var=!$var;
|
print "<TR class=\"liste_titre\">";
|
||||||
print '<tr '.$bc[$var].'><td><a href="facture.php3?facid='.$obj->rowid.'">'.$obj->facnumber."</td><td>".$obj->nom."</tr>";
|
print '<td colspan="2">Factures impayées</td></tr>';
|
||||||
$i++;
|
|
||||||
}
|
while ($i < $num)
|
||||||
|
{
|
||||||
|
$obj = $db->fetch_object( $i);
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'><td><a href="facture.php3?facid='.$obj->rowid.'">'.$obj->facnumber."</td><td>".$obj->nom."</tr>";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
print "</table><br>";
|
||||||
|
}
|
||||||
|
$db->free();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $sql;
|
print $sql;
|
||||||
}
|
}
|
||||||
print "</table><br>";
|
|
||||||
/*
|
/*
|
||||||
* Bookmark
|
* Bookmark
|
||||||
*
|
*
|
||||||
@ -241,6 +246,38 @@ if ( $result ) {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Factures brouillons
|
||||||
|
*/
|
||||||
|
|
||||||
|
$sql = "SELECT f.facnumber, f.rowid, s.nom FROM llx_facture as f, llx_societe as s WHERE s.idp = f.fk_soc AND f.fk_statut = 0";
|
||||||
|
|
||||||
|
if ( $db->query($sql) )
|
||||||
|
{
|
||||||
|
$num = $db->num_rows();
|
||||||
|
$i = 0;
|
||||||
|
|
||||||
|
if ($num)
|
||||||
|
{
|
||||||
|
print '<TABLE border="0" cellspacing="0" cellpadding="3" width="100%">';
|
||||||
|
print '<TR class="liste_titre">';
|
||||||
|
print '<td colspan="2">Factures brouillons</td></tr>';
|
||||||
|
|
||||||
|
while ($i < $num)
|
||||||
|
{
|
||||||
|
$obj = $db->fetch_object( $i);
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'><td><a href="facture.php3?facid='.$obj->rowid.'">'.$obj->facnumber."</td><td>".$obj->nom."</tr>";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
print "</table><br>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $sql;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Factures a payer
|
* Factures a payer
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user