Skip to content
Snippets Groups Projects
Commit b4733e04 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix tooltip when customer is closed

parent 9bb9d4d3
No related branches found
No related tags found
No related merge requests found
......@@ -1007,7 +1007,15 @@ if ($id > 0)
if (! empty($conf->facture->enabled))
{
if ($user->rights->facture->creer && $object->status==1)
if (empty($user->rights->facture->creer))
{
print '<div class="inline-block divButAction"><a class="butActionRefused" title="'.dol_escape_js($langs->trans("NotAllowed")).'" href="#">'.$langs->trans("AddBill").'</a></div>';
}
else if ($object->status != 1)
{
print '<div class="inline-block divButAction"><a class="butActionRefused" title="'.dol_escape_js($langs->trans("ThirdPartyIsClosed")).'" href="#">'.$langs->trans("AddBill").'</a></div>';
}
else
{
$langs->load("bills");
$langs->load("orders");
......@@ -1022,10 +1030,6 @@ if ($id > 0)
else print '<div class="inline-block divButAction"><a class="butActionRefused" title="'.dol_escape_js($langs->trans("ThirdPartyMustBeEditAsCustomer")).'" href="#">'.$langs->trans("AddBill").'</a></div>';
}
else
{
print '<div class="inline-block divButAction"><a class="butActionRefused" title="'.dol_escape_js($langs->trans("NotAllowed")).'" href="#">'.$langs->trans("AddBill").'</a></div>';
}
}
}
......
......@@ -388,6 +388,7 @@ LastModifiedThirdParties=Latest %s modified third parties
UniqueThirdParties=Total of unique third parties
InActivity=Open
ActivityCeased=Closed
ThirdPartyIsClosed=Third party is closed
ProductsIntoElements=List of products/services into %s
CurrentOutstandingBill=Current outstanding bill
OutstandingBill=Max. for outstanding bill
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment