|
@@ -146,6 +146,12 @@ if ($resql)
|
|
|
if ($year) $param.='&year='.$year;
|
|
|
if ($typeid) $param.='&typeid='.$typeid;
|
|
|
|
|
|
+ $newcardbutton='';
|
|
|
+ if($user->rights->tax->charges->creer)
|
|
|
+ {
|
|
|
+ $newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/compta/sociales/card.php?action=create">'.$langs->trans('MenuNewSocialContribution').'</a>';
|
|
|
+ }
|
|
|
+
|
|
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
|
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
@@ -158,11 +164,11 @@ if ($resql)
|
|
|
if ($year)
|
|
|
{
|
|
|
$center=($year?"<a href='index.php?year=".($year-1)."'>".img_previous()."</a> ".$langs->trans("Year")." $year <a href='index.php?year=".($year+1)."'>".img_next()."</a>":"");
|
|
|
- print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit);
|
|
|
+ print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'title_accountancy.png', 0, $newcardbutton, '', $limit);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit);
|
|
|
+ print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy.png', 0, $newcardbutton, '', $limit);
|
|
|
}
|
|
|
|
|
|
if (empty($mysoc->country_id) && empty($mysoc->country_code))
|