mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-13 03:12:35 +01:00
FIX : Can create Proposal on close thridparty #3526
This commit is contained in:
@@ -828,25 +828,25 @@ if ($id > 0)
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if (! empty($conf->propal->enabled) && $user->rights->propal->creer)
|
||||
if (! empty($conf->propal->enabled) && $user->rights->propal->creer && $object->status==1)
|
||||
{
|
||||
$langs->load("propal");
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/comm/propal.php?socid='.$object->id.'&action=create">'.$langs->trans("AddProp").'</a></div>';
|
||||
}
|
||||
|
||||
if (! empty($conf->commande->enabled) && $user->rights->commande->creer)
|
||||
if (! empty($conf->commande->enabled) && $user->rights->commande->creer && $object->status==1)
|
||||
{
|
||||
$langs->load("orders");
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/commande/card.php?socid='.$object->id.'&action=create">'.$langs->trans("AddOrder").'</a></div>';
|
||||
}
|
||||
|
||||
if ($user->rights->contrat->creer)
|
||||
if ($user->rights->contrat->creer && $object->status==1)
|
||||
{
|
||||
$langs->load("contracts");
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/contrat/card.php?socid='.$object->id.'&action=create">'.$langs->trans("AddContract").'</a></div>';
|
||||
}
|
||||
|
||||
if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer)
|
||||
if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer && $object->status==1)
|
||||
{
|
||||
$langs->load("fichinter");
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/fichinter/card.php?socid='.$object->id.'&action=create">'.$langs->trans("AddIntervention").'</a></div>';
|
||||
@@ -855,7 +855,7 @@ if ($id > 0)
|
||||
// Add invoice
|
||||
if ($user->societe_id == 0)
|
||||
{
|
||||
if (! empty($conf->deplacement->enabled))
|
||||
if (! empty($conf->deplacement->enabled) && $object->status==1)
|
||||
{
|
||||
$langs->load("trips");
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/compta/deplacement/card.php?socid='.$object->id.'&action=create">'.$langs->trans("AddTrip").'</a></div>';
|
||||
@@ -863,7 +863,7 @@ if ($id > 0)
|
||||
|
||||
if (! empty($conf->facture->enabled))
|
||||
{
|
||||
if ($user->rights->facture->creer)
|
||||
if ($user->rights->facture->creer && $object->status==1)
|
||||
{
|
||||
$langs->load("bills");
|
||||
$langs->load("orders");
|
||||
|
||||
@@ -1267,7 +1267,7 @@ if ($action == 'create')
|
||||
print '</td>';
|
||||
} else {
|
||||
print '<td colspan="2">';
|
||||
print $form->select_company('', 'socid', 's.client = 1 OR s.client = 2 OR s.client = 3', 1);
|
||||
print $form->select_company('', 'socid', '(s.client = 1 OR s.client = 2 OR s.client = 3) AND status=1', 1);
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>' . "\n";
|
||||
|
||||
Reference in New Issue
Block a user