Modif look
This commit is contained in:
parent
cb5784d376
commit
895924a40e
@ -812,11 +812,11 @@ else
|
|||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num_lignes = $db->num_rows();
|
||||||
$i = 0; $total = 0;
|
$i = 0; $total = 0;
|
||||||
|
|
||||||
echo '<TABLE border="0" width="100%" cellspacing="0" cellpadding="3">';
|
echo '<TABLE border="0" width="100%" cellspacing="0" cellpadding="3">';
|
||||||
if ($num)
|
if ($num_lignes)
|
||||||
{
|
{
|
||||||
print "<TR class=\"liste_titre\">";
|
print "<TR class=\"liste_titre\">";
|
||||||
print '<td width="54%">Description</td>';
|
print '<td width="54%">Description</td>';
|
||||||
@ -828,7 +828,7 @@ else
|
|||||||
print "</TR>\n";
|
print "</TR>\n";
|
||||||
}
|
}
|
||||||
$var=True;
|
$var=True;
|
||||||
while ($i < $num)
|
while ($i < $num_lignes)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object( $i);
|
$objp = $db->fetch_object( $i);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -930,110 +930,78 @@ else
|
|||||||
* Fin Ajout ligne
|
* Fin Ajout ligne
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if ($user->societe_id == 0)
|
|
||||||
{
|
|
||||||
print '<p><table id="actions" width="100%"><tr>';
|
|
||||||
|
|
||||||
// Supprimer
|
|
||||||
if ($fac->statut == 0 && $user->rights->facture->supprimer)
|
|
||||||
{
|
|
||||||
print "<td align=\"center\" width=\"20%\"><a href=\"$PHP_SELF?facid=$fac->id&action=delete\">Supprimer</a></td>";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Valider
|
if ($user->societe_id == 0 && $_GET["action"] <> 'valid')
|
||||||
if ($fac->statut == 0 && $fac->total_ht > 0)
|
{
|
||||||
|
print "<br><div class=\"tabsAction\">\n";
|
||||||
|
|
||||||
|
// Valider
|
||||||
|
if ($fac->statut == 0 && $num_lignes > 0)
|
||||||
{
|
{
|
||||||
if ($user->rights->facture->valider)
|
if ($user->rights->facture->valider)
|
||||||
{
|
{
|
||||||
print "<td align=\"center\" width=\"20%\"><a href=\"$PHP_SELF?facid=$fac->id&action=valid\">Valider</a></td>";
|
print "<a class=\"tabAction\" href=\"$PHP_SELF?facid=$fac->id&action=valid\">Valider</a>";
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<td align="center" width="20%">-</td>';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
// Générer
|
// Générer
|
||||||
if ($fac->statut == 1 && ($fac->paye == 0 || $user->admin))
|
if ($fac->statut == 1 && ($fac->paye == 0 || $user->admin) && $user->rights->facture->creer)
|
||||||
{
|
|
||||||
if ($user->rights->facture->creer)
|
|
||||||
{
|
{
|
||||||
if ($fac->paye == 0) {
|
if ($fac->paye == 0)
|
||||||
print "<td align=\"center\" width=\"20%\"><a href=\"facture.php?facid=$fac->id&action=pdf\">Générer la facture</a></td>";
|
{
|
||||||
}
|
print "<a class=\"tabAction\" href=\"facture.php?facid=$fac->id&action=pdf\">Générer la facture</a>";
|
||||||
else {
|
}
|
||||||
print "<td align=\"center\" width=\"20%\"><a href=\"facture.php?facid=$fac->id&action=pdf\">Regénérer la facture</a></td>";
|
else
|
||||||
}
|
{
|
||||||
}
|
print "<a class=\"tabAction\" href=\"facture.php?facid=$fac->id&action=pdf\">Regénérer la facture</a>";
|
||||||
else
|
}
|
||||||
{
|
|
||||||
print '<td align="center" width="20%">-</td>';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<td align="center" width="20%">-</td>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Envoyer
|
// Supprimer
|
||||||
if ($fac->statut == 1 && abs($resteapayer) > 0 && $user->rights->facture->envoyer)
|
if ($fac->statut == 0 && $user->rights->facture->supprimer)
|
||||||
{
|
{
|
||||||
print "<td align=\"center\" width=\"20%\"><a href=\"$PHP_SELF?facid=$fac->id&action=presend\">Envoyer</a></td>";
|
print "<a class=\"tabAction\" href=\"facture.php?facid=$fac->id&action=delete\">Supprimer</a>";
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print "<td align=\"center\" width=\"20%\">-</td>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Envoyer une relance
|
// Envoyer
|
||||||
|
if ($fac->statut == 1 && abs($resteapayer) > 0 && $user->rights->facture->envoyer)
|
||||||
|
{
|
||||||
|
print "<a class=\"tabAction\" href=\"$PHP_SELF?facid=$fac->id&action=presend\">Envoyer</a>";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Envoyer une relance
|
||||||
if ($fac->statut == 1 && $resteapayer > 0 && $user->rights->facture->envoyer)
|
if ($fac->statut == 1 && $resteapayer > 0 && $user->rights->facture->envoyer)
|
||||||
{
|
{
|
||||||
print "<td align=\"center\" width=\"20%\"><a href=\"$PHP_SELF?facid=$fac->id&action=prerelance\">Envoyer une relance</a></td>";
|
print "<a class=\"tabAction\" href=\"$PHP_SELF?facid=$fac->id&action=prerelance\">Envoyer une relance</a>";
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<td align="center" width="20%">-</td>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Emettre paiement
|
// Emettre paiement
|
||||||
if ($fac->statut == 1 && $resteapayer > 0 && $user->rights->facture->paiement)
|
if ($fac->statut == 1 && $resteapayer > 0 && $user->rights->facture->paiement)
|
||||||
{
|
{
|
||||||
print '<td align="center" width="20%">';
|
print '<a class=\"tabAction\" href="paiement.php?facid='.$fac->id.'&action=create">Emettre un paiement</a>';
|
||||||
print '<a href="paiement.php?facid='.$fac->id.'&action=create">Emettre un paiement</a></td>';
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
// Classer 'payé'
|
||||||
|
if ($fac->statut == 1 && abs($resteapayer) == 0
|
||||||
|
&& $fac->paye == 0 && $user->rights->facture->paiement)
|
||||||
{
|
{
|
||||||
print '<td align="center" width="20%">-</td>';
|
print "<a class=\"tabAction\" href=\"$PHP_SELF?facid=$fac->id&action=payed\">Classer 'Payée'</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Classer 'payé'
|
|
||||||
if ($fac->statut == 1 && abs($resteapayer) == 0 && $fac->paye == 0)
|
|
||||||
{
|
|
||||||
if ($user->rights->facture->paiement)
|
|
||||||
{
|
|
||||||
print "<td align=\"center\" width=\"20%\"><a href=\"$PHP_SELF?facid=$fac->id&action=payed\">Classer 'Payée'</a></td>";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<td align="center" width="20%">-</td>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récurrente
|
// Récurrente
|
||||||
if (! defined("FACTURE_DISABLE_RECUR")) // Possibilité de désactiver les factures récurrentes
|
if (! defined("FACTURE_DISABLE_RECUR")) // Possibilité de désactiver les factures récurrentes
|
||||||
{
|
{
|
||||||
if ($fac->statut > 0)
|
if ($fac->statut > 0)
|
||||||
{
|
{
|
||||||
print '<td align="center" width="20%"><a href="facture/fiche-rec.php?facid='.$fac->id.'&action=create">Récurrente</a></td>';
|
print '<a class="tabAction" href="facture/fiche-rec.php?facid='.$fac->id.'&action=create">Récurrente</a>';
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<td align="center" width="20%">-</td>';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</tr></table>";
|
print "</div>";
|
||||||
|
|
||||||
}
|
}
|
||||||
print "<p>\n";
|
print "<p>\n";
|
||||||
|
|
||||||
@ -1057,7 +1025,6 @@ else
|
|||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
print '</td><td valign="top" width="50%">';
|
print '</td><td valign="top" width="50%">';
|
||||||
print_titre("Actions");
|
|
||||||
/*
|
/*
|
||||||
* Liste des actions
|
* Liste des actions
|
||||||
*
|
*
|
||||||
@ -1071,6 +1038,8 @@ else
|
|||||||
$num = $db->num_rows();
|
$num = $db->num_rows();
|
||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
|
print_titre("Actions");
|
||||||
|
|
||||||
$i = 0; $total = 0;
|
$i = 0; $total = 0;
|
||||||
print '<table border="1" cellspacing="0" cellpadding="4" width="100%">';
|
print '<table border="1" cellspacing="0" cellpadding="4" width="100%">';
|
||||||
print "<tr $bc[$var]><td>Date</td><td>Action</td></tr>\n";
|
print "<tr $bc[$var]><td>Date</td><td>Action</td></tr>\n";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user