diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php
index 9bb3af6dcbd..82d88089684 100644
--- a/htdocs/comm/action/document.php
+++ b/htdocs/comm/action/document.php
@@ -277,20 +277,14 @@ if ($object->id > 0)
print '
| '.$langs->trans("NbOfAttachedFiles").' | '.count($filearray).' |
';
print '| '.$langs->trans("TotalSizeOfAttachedFiles").' | '.$totalsize.' '.$langs->trans("bytes").' |
';
- print '';
+ print '';
- print '';
+ dol_fiche_end();
- $modulepart = 'actions';
- $permission = $user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create;
- $param = '&id=' . $object->id;
- include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
if ($action != 'edit')
{
- print "
";
-
// Link to agenda views
print '';
print ''."\n";
print '
';
+
+ print '';
+ print "
";
}
+
+
+ $modulepart = 'actions';
+ $permission = $user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create;
+ $param = '&id=' . $object->id;
+ include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
}
else
{
print $langs->trans("ErrorUnknown");
}
-$db->close();
llxFooter();
+
+$db->close();
diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php
index 0d6bebada72..db4212308de 100644
--- a/htdocs/fourn/class/fournisseur.facture.class.php
+++ b/htdocs/fourn/class/fournisseur.facture.class.php
@@ -146,7 +146,7 @@ class FactureFournisseur extends CommonInvoice
*/
function create($user)
{
- global $langs,$conf;
+ global $langs,$conf,$hookmanager;
$error=0;
$now=dol_now();