New : disallow social contribution modification if paid

This commit is contained in:
Maxime Kohlhaas 2015-03-10 14:49:36 +01:00
parent db4bbf46fc
commit f90df57dc5

View File

@ -483,7 +483,7 @@ if ($id > 0)
print "<div class=\"tabsAction\">\n"; print "<div class=\"tabsAction\">\n";
// Edit // Edit
if ($user->rights->tax->charges->creer) if ($object->paye == 0 && $user->rights->tax->charges->creer)
{ {
print "<a class=\"butAction\" href=\"".DOL_URL_ROOT."/compta/sociales/charges.php?id=$object->id&amp;action=edit\">".$langs->trans("Modify")."</a>"; print "<a class=\"butAction\" href=\"".DOL_URL_ROOT."/compta/sociales/charges.php?id=$object->id&amp;action=edit\">".$langs->trans("Modify")."</a>";
} }
@ -517,7 +517,7 @@ if ($id > 0)
} }
else else
{ {
/* Charge non trouv<75> */ /* Social contribution not found */
dol_print_error('',$object->error); dol_print_error('',$object->error);
} }
} }