add button in order to create intervention from services ordered

This commit is contained in:
Christophe Battarel 2012-12-05 19:07:07 +01:00
parent 0c064c777a
commit b68153ce9a

View File

@ -2221,6 +2221,24 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
}
}
// Create intervention
if ($conf->ficheinter->enabled)
{
$langs->load("interventions");
if ($object->statut > 0 && $object->statut < 3 && $object->getNbOfServicesLines() > 0)
{
if ($user->rights->ficheinter->creer)
{
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fichinter/fiche.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans('AddIntervention').'</a>';
}
else
{
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('AddIntervention').'</a>';
}
}
}
// Reopen a closed order
if ($object->statut == 3)
{