diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php
index f5a983ac5bb..76441dafd0e 100644
--- a/htdocs/fourn/commande/dispatch.php
+++ b/htdocs/fourn/commande/dispatch.php
@@ -1069,6 +1069,7 @@ if ($id > 0 || !empty($ref)) {
$dispatchBt = empty($conf->reception->enabled) ? $langs->trans("Receive") : $langs->trans("CreateReception");
print '
';
+ print 'id.'">';
print 'global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0));
@@ -178,7 +180,29 @@ if ($reshook < 0) {
}
if (empty($reshook)) {
+ /*
+ $backurlforlist = DOL_URL_ROOT.'/reception/list.php';
+
+ if (empty($backtopage) || ($cancel && empty($id))) {
+ if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
+ if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
+ $backtopage = $backurlforlist;
+ } else {
+ $backtopage = dol_buildpath('/mymodule/myobject_card.php', 1).'?id='.((!empty($id) && $id > 0) ? $id : '__ID__');
+ }
+ }
+ }
+ */
+
if ($cancel) {
+ if (!empty($backtopageforcancel)) {
+ header("Location: ".$backtopageforcancel);
+ exit;
+ } elseif (!empty($backtopage)) {
+ header("Location: ".$backtopage);
+ exit;
+ }
+
$action = '';
}
@@ -760,6 +784,8 @@ if ($action == 'create') {
print '';
print '';
print '';
+ print '';
+ print '';
if (GETPOST('entrepot_id', 'int')) {
print '';
}