diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index bae2281cbe0573b9f1e78fbf58ef47e5ebef774f..229964c8a7480abbaa973df524351d543248e531 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1087,10 +1087,14 @@ else $head[$h][1] = $langs->trans("CardBill"); $hselected = $h; $h++; - $head[$h][0] = DOL_URL_ROOT.'/compta/facture/apercu.php?facid='.$fac->id; - $head[$h][1] = $langs->trans("Preview"); - $h++; + if ($conf->use_preview_tabs) + { + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/apercu.php?facid='.$fac->id; + $head[$h][1] = $langs->trans("Preview"); + $h++; + } + if ($fac->mode_reglement_code == 'PRE') { $head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$fac->id; diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php index 8c8c111ff599cd81eff2cee18cf8125e0aa29e6d..4bf9d8be4c258d7e9b4bdf2c9e37f806e281088c 100644 --- a/htdocs/compta/facture/apercu.php +++ b/htdocs/compta/facture/apercu.php @@ -81,11 +81,15 @@ if ($_GET["facid"] > 0) $head[$h][0] = DOL_URL_ROOT.'/compta/facture.php?facid='.$fac->id; $head[$h][1] = $langs->trans("CardBill"); $h++; - $head[$h][0] = DOL_URL_ROOT.'/compta/facture/apercu.php?facid='.$fac->id; - $head[$h][1] = $langs->trans("Preview"); - $hselected = $h; - $h++; + if ($conf->use_preview_tabs) + { + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/apercu.php?facid='.$fac->id; + $head[$h][1] = $langs->trans("Preview"); + $hselected = $h; + $h++; + } + if ($fac->mode_reglement_code == 'PRE') { $head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$fac->id; diff --git a/htdocs/compta/facture/info.php b/htdocs/compta/facture/info.php index e57b57ba1157cb87c5a7807b0b45d232e66c7e6e..45506a5b5d37e035b2d89b558e9729fc277a0beb 100644 --- a/htdocs/compta/facture/info.php +++ b/htdocs/compta/facture/info.php @@ -51,9 +51,12 @@ $head[$h][0] = DOL_URL_ROOT.'/compta/facture.php?facid='.$fac->id; $head[$h][1] = $langs->trans("CardBill"); $h++; -$head[$h][0] = DOL_URL_ROOT.'/compta/facture/apercu.php?facid='.$fac->id; -$head[$h][1] = $langs->trans("Preview"); -$h++; +if ($conf->use_preview_tabs) +{ + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/apercu.php?facid='.$fac->id; + $head[$h][1] = $langs->trans("Preview"); + $h++; +} if ($fac->mode_reglement_code == 'PRE') { diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index 721c9598a47906cbfd81097837d523e1a8817514..fd18da3619d9d7afc08e7afd1d97f7a087399e44 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -80,10 +80,14 @@ if ($_GET["facid"]) $head[$h][0] = DOL_URL_ROOT.'/compta/facture.php?facid='.$fac->id; $head[$h][1] = $langs->trans("CardBill"); $h++; - $head[$h][0] = DOL_URL_ROOT.'/compta/facture/apercu.php?facid='.$fac->id; - $head[$h][1] = $langs->trans("Preview"); - $h++; + if ($conf->use_preview_tabs) + { + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/apercu.php?facid='.$fac->id; + $head[$h][1] = $langs->trans("Preview"); + $h++; + } + if ($fac->mode_reglement_code == 'PRE') { $head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$fac->id; diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 771ef7741c4ed83450a377bda3a7001ff7421016..ea6a101f094c5d4f96ea8dd704ddd8afead8daac 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -113,10 +113,13 @@ if ($_GET["facid"] > 0) $head[$h][1] = $langs->trans("CardBill"); $h++; - $head[$h][0] = DOL_URL_ROOT.'/compta/facture/apercu.php?facid='.$fac->id; - $head[$h][1] = $langs->trans("Preview"); - $h++; - + if ($conf->use_preview_tabs) + { + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/apercu.php?facid='.$fac->id; + $head[$h][1] = $langs->trans("Preview"); + $h++; + } + if ($fac->mode_reglement_code == 'PRE') { $head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$fac->id; diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index aa4e587329aafbf3cb1570d78858d03cd937b0e0..f81ad9b61e9f39436ced11f505a36fba6dbdcfcb 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -298,7 +298,7 @@ $conf->actionscomm->dir_output=DOL_DATA_ROOT."/action"; // conf->use_preview_tabs $conf->use_preview_tabs=1; -if (isset($conf->global->USE_PREVIEW_TABS)) $conf->use_preview_tabs=$conf->global->USE_PREVIEW_TABS; +if (isset($conf->global->MAIN_USE_PREVIEW_TABS)) $conf->use_preview_tabs=$conf->global->MAIN_USE_PREVIEW_TABS; // conf->monnaie if (! $conf->global->MAIN_MONNAIE) $conf->global->MAIN_MONNAIE='EUR';