Fix: link must not be visible if module disabled
This commit is contained in:
parent
c228302039
commit
dbaaa44c76
@ -2681,20 +2681,22 @@ elseif (! empty($object->id))
|
||||
}
|
||||
|
||||
// Create bill
|
||||
if (! empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->statut != 9)) // 2 means accepted
|
||||
if (! empty($conf->facture->enabled))
|
||||
{
|
||||
if ($user->rights->fournisseur->facture->creer)
|
||||
if (! empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->statut != 9)) // 2 means accepted
|
||||
{
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>';
|
||||
if ($user->rights->fournisseur->facture->creer)
|
||||
{
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>';
|
||||
}
|
||||
|
||||
//if ($user->rights->fournisseur->commande->creer && $object->statut > 2)
|
||||
//{
|
||||
// print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>';
|
||||
//}
|
||||
}
|
||||
|
||||
//if ($user->rights->fournisseur->commande->creer && $object->statut > 2)
|
||||
//{
|
||||
// print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>';
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
// Create a remote order using WebService only if module is activated
|
||||
if (! empty($conf->syncsupplierwebservices->enabled) && $object->statut >= 2) // 2 means accepted
|
||||
{
|
||||
|
||||
@ -316,7 +316,7 @@ if ($resql)
|
||||
print "</table>\n";
|
||||
print "</form>\n";
|
||||
|
||||
print '<br>'.img_help(1,'').' '.$langs->trans("ToBillSeveralOrderSelectCustomer", $langs->transnoentitiesnoconv("CreateInvoiceForThisCustomer")).'<br>';
|
||||
if (! empty($conf->facture->enable)) print '<br>'.img_help(1,'').' '.$langs->trans("ToBillSeveralOrderSelectCustomer", $langs->transnoentitiesnoconv("CreateInvoiceForThisCustomer")).'<br>';
|
||||
|
||||
$db->free($resql);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user