Fix: Formulaire ajout charges n'était plus visible

This commit is contained in:
Laurent Destailleur 2006-08-20 21:09:23 +00:00
parent e33b47a3c6
commit f5f1c44ab2
2 changed files with 132 additions and 131 deletions

View File

@ -65,12 +65,12 @@ if ($_GET["action"] == 'payed')
/* */ /* */
/* *************************************************************************** */ /* *************************************************************************** */
if ($chid > 0) if ($chid > 0)
{ {
$html = new Form($db); $html = new Form($db);
$cha = new ChargeSociales($db); $cha = new ChargeSociales($db);
if ( $cha->fetch($chid) > 0) if ($cha->fetch($chid) > 0)
{ {
/* /*
* Charge * Charge
@ -147,7 +147,9 @@ if ($chid > 0)
} }
print "</table>"; print "</table>";
$db->free(); $db->free();
} else { }
else
{
dolibarr_print_error($db); dolibarr_print_error($db);
} }
print "</td>"; print "</td>";
@ -174,8 +176,8 @@ if ($chid > 0)
print '</div>'; print '</div>';
if (! $_GET["action"]) { if (! $_GET["action"])
{
/* /*
* Boutons actions * Boutons actions
*/ */
@ -183,26 +185,25 @@ if ($chid > 0)
print "<div class=\"tabsAction\">\n"; print "<div class=\"tabsAction\">\n";
// Supprimer // Supprimer
if ($cha->paye == 0 && $totalpaye <=0 && $user->rights->compta->charges) if ($cha->paye == 0 && $totalpaye <=0 && $user->rights->tax->charges->supprimer)
{ {
print "<a class=\"butDelete\" href=\"charges.php?id=$cha->id&amp;action=delete\">".$langs->trans("Delete")."</a>"; print "<a class=\"butDelete\" href=\"charges.php?id=$cha->id&amp;action=delete\">".$langs->trans("Delete")."</a>";
} }
// Emettre paiement // Emettre paiement
if ($cha->paye == 0 && round($resteapayer) > 0 && $user->rights->compta->charges) if ($cha->paye == 0 && round($resteapayer) > 0 && $user->rights->tax->charges->creer)
{ {
print "<a class=\"tabAction\" href=\"../paiement_charge.php?id=$cha->id&amp;action=create\">".$langs->trans("DoPaiement")."</a>"; print "<a class=\"tabAction\" href=\"../paiement_charge.php?id=$cha->id&amp;action=create\">".$langs->trans("DoPaiement")."</a>";
} }
// Classer 'payé' // Classer 'payé'
if ($cha->paye == 0 && round($resteapayer) <=0 && $user->rights->compta->charges) if ($cha->paye == 0 && round($resteapayer) <=0 && $user->rights->tax->charges->creer)
{ {
print "<a class=\"tabAction\" href=\"charges.php?id=$cha->id&amp;action=payed\">".$langs->trans("ClassifyPayed")."</a>"; print "<a class=\"tabAction\" href=\"charges.php?id=$cha->id&amp;action=payed\">".$langs->trans("ClassifyPayed")."</a>";
} }
print "</div>"; print "</div>";
} }
} }
else else
{ {
@ -213,5 +214,5 @@ if ($chid > 0)
$db->close(); $db->close();
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>"); llxFooter('$Date$ - $Revision$');
?> ?>