diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index e5f55808475..ea3d01721a2 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -33,9 +33,9 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT ."/expedition/mods/pdf/ModelePdfExpedition.class.php"); -require_once(DOL_DOCUMENT_ROOT."/product.class.php"); -require_once(DOL_DOCUMENT_ROOT."/propal.class.php"); -require_once(DOL_DOCUMENT_ROOT."/product/stock/entrepot.class.php"); +if ($conf->produit->enabled) require_once(DOL_DOCUMENT_ROOT."/product.class.php"); +if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT."/propal.class.php"); +if ($conf->stock->enabled) require_once(DOL_DOCUMENT_ROOT."/product/stock/entrepot.class.php"); $langs->load("companies"); $langs->load("bills"); @@ -168,7 +168,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post * */ -llxHeader('','Fiche expedition','ch-expedition.html',$form_search); +llxHeader('',$langs->trans('Sending'),'Expedition'); $html = new Form($db); @@ -436,9 +436,6 @@ else if ($expedition->id > 0) { - $author = new User($db); - $author->id = $expedition->user_author_id; - $author->fetch(); $commande = New Commande($db); $commande->fetch($expedition->commande_id); diff --git a/htdocs/livraison/fiche.php b/htdocs/livraison/fiche.php index 67f0ec645bc..2b6e9cd0659 100644 --- a/htdocs/livraison/fiche.php +++ b/htdocs/livraison/fiche.php @@ -30,10 +30,10 @@ */ require("./pre.inc.php"); -require_once(DOL_DOCUMENT_ROOT."/product.class.php"); -require_once(DOL_DOCUMENT_ROOT."/expedition/expedition.class.php"); require_once(DOL_DOCUMENT_ROOT."/livraison/livraison.class.php"); require_once(DOL_DOCUMENT_ROOT."/livraison/mods/modules_livraison.php"); +if ($conf->produit->enabled) require_once(DOL_DOCUMENT_ROOT."/product.class.php"); +if ($conf->expedition_bon->enabled) require_once(DOL_DOCUMENT_ROOT."/expedition/expedition.class.php"); if ($conf->stock->enabled) require_once(DOL_DOCUMENT_ROOT."/product/stock/entrepot.class.php"); $langs->load("sendings"); @@ -68,7 +68,7 @@ if ($_POST["action"] == 'add') $livraison->note = $_POST["note"]; $livraison->commande_id = $_POST["commande_id"]; - if (!$conf->expedition->enabled && $conf->stock->enabled) + if (!$conf->expedition_bon->enabled && $conf->stock->enabled) { $expedition->entrepot_id = $_POST["entrepot_id"]; } @@ -120,7 +120,7 @@ if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes') $livraison->fetch($_GET["id"]); $expedition_id = $_GET["expid"]; $livraison->delete(); - if ($conf->expedition->enabled) + if ($conf->expedition_bon->enabled) { Header("Location: ".DOL_URL_ROOT.'/expedition/fiche.php?id='.$expedition_id); } @@ -162,6 +162,8 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post * */ +llxHeader('',$langs->trans('Delivery'),'Livraison'); + $html = new Form($db); /********************************************************************* @@ -171,8 +173,7 @@ $html = new Form($db); *********************************************************************/ if ($_GET["action"] == 'create') { - llxHeader('','Fiche expedition','ch-expedition.html',$form_search); - + print_titre($langs->trans("CreateADeliveryOrder")); if ($mesg) @@ -191,7 +192,7 @@ if ($_GET["action"] == 'create') $author->id = $commande->user_author_id; $author->fetch(); - if (!$conf->expedition->enabled && $conf->stock->enabled) + if (!$conf->expedition_bon->enabled && $conf->stock->enabled) { $entrepot = new Entrepot($db); } @@ -202,7 +203,7 @@ if ($_GET["action"] == 'create') print '