diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php
index 475072bb8a0..37c8c9848bd 100644
--- a/htdocs/admin/ihm.php
+++ b/htdocs/admin/ihm.php
@@ -52,12 +52,13 @@ if (isset($_POST["action"]) && $_POST["action"] == 'update')
dolibarr_set_const($db, "MAIN_LANG_DEFAULT", $_POST["main_lang_default"]);
dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["main_multilangs"]);
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"]);
- dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["disable_javascript"]);
- dolibarr_set_const($db, "MAIN_DISABLE_AJAX", $_POST["disable_ajax"]);
- dolibarr_set_const($db, "MAIN_POPUP_CALENDAR", $_POST["popup_calendar"]);
+ dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"]);
+ dolibarr_set_const($db, "MAIN_DISABLE_AJAX", $_POST["main_disable_ajax"]);
+ dolibarr_set_const($db, "MAIN_POPUP_CALENDAR", $_POST["main_popup_calendar"]);
+ dolibarr_set_const($db, "MAIN_USE_PREVIEW_TABS", $_POST["main_use_preview_tabs"]);
- dolibarr_set_const($db, "MAIN_SHOW_BUGTRACK_LINK", $_POST["bugtrack"]);
- dolibarr_set_const($db, "MAIN_SHOW_WORKBOARD", $_POST["workboard"]);
+ dolibarr_set_const($db, "MAIN_SHOW_BUGTRACK_LINK", $_POST["main_show_bugtrack_link"]);
+ dolibarr_set_const($db, "MAIN_SHOW_WORKBOARD", $_POST["main_show_workboard"]);
dolibarr_set_const($db, "MAIN_MENU_BARRETOP", $_POST["main_menu_barretop"]);
dolibarr_set_const($db, "MAIN_MENU_BARRELEFT", $_POST["main_menu_barreleft"]);
@@ -118,24 +119,24 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
$var=!$var;
print '
'.$langs->trans("ShowBugTrackLink").' ';
- $html->selectyesnonum('bugtrack',$conf->global->MAIN_SHOW_BUGTRACK_LINK);
+ $html->selectyesnonum('main_show_bugtrack_link',$conf->global->MAIN_SHOW_BUGTRACK_LINK);
print ' ';
$var=!$var;
print ''.$langs->trans("ShowWorkBoard").' ';
- $html->selectyesnonum('workboard',$conf->global->MAIN_SHOW_WORKBOARD);
+ $html->selectyesnonum('main_show_workboard',$conf->global->MAIN_SHOW_WORKBOARD);
print ' ';
// Désactiver javascript
$var=!$var;
print ''.$langs->trans("DisableJavascript").' ';
- $html->selectyesnonum('disable_javascript',isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0);
+ $html->selectyesnonum('main_disable_javascript',isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0);
print ' ';
// Désactiver ajax
$var=!$var;
print ''.$langs->trans("DisableAjax").' ';
- $html->selectyesnonum('disable_ajax',isset($conf->global->MAIN_DISABLE_AJAX)?$conf->global->MAIN_DISABLE_AJAX:1);
+ $html->selectyesnonum('main_disable_ajax',isset($conf->global->MAIN_DISABLE_AJAX)?$conf->global->MAIN_DISABLE_AJAX:1);
print ' ';
// Désactiver le calendrier popup
@@ -145,10 +146,16 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
'0'=>$langs->trans("No"),
'eldy'=>$langs->trans("Yes").' (style eldy)',
'andre'=>$langs->trans("Yes").' (style andre)');
- $html->select_array('popup_calendar',$liste_popup_calendar,$conf->global->MAIN_POPUP_CALENDAR);
+ $html->select_array('main_popup_calendar',$liste_popup_calendar,$conf->global->MAIN_POPUP_CALENDAR);
print ' ('.$langs->trans("AvailableOnlyIfJavascriptNotDisabled").')';
print '';
+ // Activer onglet preview
+ $var=!$var;
+ print ''.$langs->trans("UsePreviewTabs").' ';
+ $html->selectyesnonum('main_use_preview_tabs',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:1);
+ print ' ';
+
print ' ';
@@ -274,6 +281,11 @@ else
else print ($conf->global->MAIN_POPUP_CALENDAR?$langs->trans("Yes").' (style '.$conf->global->MAIN_POPUP_CALENDAR.')':$langs->trans("No"));
print "";
+ // Activer onglet preview
+ $var=!$var;
+ print ''.$langs->trans("UsePreviewTabs").' ';
+ print yn(isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:1)." ";
+
print ' ';
diff --git a/htdocs/chargesociales.class.php b/htdocs/chargesociales.class.php
index c145a95fae8..c265a03070d 100644
--- a/htdocs/chargesociales.class.php
+++ b/htdocs/chargesociales.class.php
@@ -1,6 +1,6 @@
- * Copyright (C) 2004 Laurent Destailleur
+/* Copyright (C) 2002 Rodolphe Quiedeville
+ * Copyright (C) 2004-2007 Laurent Destailleur
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -28,100 +28,6 @@
*/
-/** \class PaiementCharge
- \brief Classe permettant la gestion des paiements des charges
-*/
-class PaiementCharge
-{
- var $db;
-
- var $id;
- var $chid;
- var $paiementtype;
- var $datepaye;
- var $amounts;
- var $num_paiement;
- var $note;
-
- function PaiementCharge($DB) {
- $this->db = $DB;
- return 1;
- }
-
- /**
- * \brief Creation d'un paiement de charge sociale
- * \param user Utilisateur qui crée le paiement
- * \return int <0 si erreur, >0 si ok
- */
- function create($user) {
- $sql_err = 0;
- /*
- * Insertion dans la base
- */
- if ($this->db->begin())
- {
- $total = 0;
- foreach ($this->amounts as $key => $value)
- {
- $facid = $key;
- $value = trim($value);
- $amount = round(price2num($value), 2); // Un round est ok si nb avec '.'
- if (is_numeric($amount)) $total += $amount;
- }
- $total = price2num($total);
-
- if ($total > 0)
- {
- $sql = "INSERT INTO ".MAIN_DB_PREFIX."paiementcharge (fk_charge, datec, datep, amount, fk_typepaiement, num_paiement, note, fk_user_creat)";
- $sql .= " VALUES ($this->chid, now(), $this->datepaye, '$total', $this->paiementtype, '$this->num_paiement', '$this->note', $user->id)";
-
- if ( $this->db->query($sql) )
- {
- $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."paiementcharge");
- }
- else
- {
- $sql_err++;
- dolibarr_syslog("chargessociales::create Echec $sql");
- }
-
- }
-
- if ($total > 0 && $sql_err == 0)
- {
- $this->db->commit();
- return $this->id;
- }
- else
- {
- $this->db->rollback();
- return -1;
- }
-
- }
- }
-
- /**
- * \brief Mise a jour du lien entre le paiement de charge et la ligne dans llx_bank générée
- * \param id_bank Id de la banque
- * \return int 1 ou 0
- */
- function update_fk_bank($id_bank) {
- $sql = "UPDATE llx_paiementcharge set fk_bank = ".$id_bank." where rowid = ".$this->id;
- $result = $this->db->query($sql);
- if ($result)
- {
- return 1;
- }
- else
- {
- print $this->db->error() ." ".$sql;
- return 0;
- }
- }
-}
-
-
/** \class ChargeSociales
\brief Classe permettant la gestion des paiements des charges
La tva collectée n'est calculée que sur les factures payées.
@@ -154,17 +60,20 @@ class ChargeSociales
*/
function fetch($id)
{
- $sql = "SELECT cs.rowid,".$this->db->pdate("cs.date_ech")." as date_ech,".$this->db->pdate("cs.date_pai")." as date_pai";
- $sql .=", cs.libelle as lib, cs.fk_type, cs.amount, cs.paye, ".$this->db->pdate("cs.periode")." as periode, c.libelle";
- $sql .= " FROM ".MAIN_DB_PREFIX."chargesociales as cs, ".MAIN_DB_PREFIX."c_chargesociales as c";
- $sql .= " WHERE cs.fk_type = c.id";
- $sql .=" AND cs.rowid = ".$id;
+ $sql = "SELECT cs.rowid,".$this->db->pdate("cs.date_ech")." as date_ech,".$this->db->pdate("cs.date_pai")." as date_pai,";
+ $sql.= " cs.libelle as lib, cs.fk_type, cs.amount, cs.paye, ".$this->db->pdate("cs.periode")." as periode,";
+ $sql.= " c.libelle";
+ $sql.= " FROM ".MAIN_DB_PREFIX."chargesociales as cs, ".MAIN_DB_PREFIX."c_chargesociales as c";
+ $sql.= " WHERE cs.fk_type = c.id";
+ $sql.= " AND cs.rowid = ".$id;
- if ($this->db->query($sql))
+ dolibarr_syslog("ChargesSociales::fetch sql=".$sql);
+ $resql=$this->db->query($sql);
+ if ($resql)
{
- if ($this->db->num_rows())
+ if ($this->db->num_rows($resql))
{
- $obj = $this->db->fetch_object();
+ $obj = $this->db->fetch_object($resql);
$this->id = $obj->rowid;
$this->date_ech = $obj->date_ech;
@@ -182,15 +91,43 @@ class ChargeSociales
{
return 0;
}
- $this->db->free();
+ $this->db->free($resql);
}
else
{
- print $this->db->error();
- return 0;
+ $this->error=$this->db->error();
+ return -1;
}
}
+
+ /**
+ * \brief Crée une charge sociale
+ * \param user Utilisateur qui crée
+ * \return int <0 si erreur, >0 si ok
+ */
+ function create($user)
+ {
+ $sql = "INSERT INTO ".MAIN_DB_PREFIX."chargesociales (fk_type, libelle, date_ech, periode, amount)";
+ $sql.= " VALUES (".$this->type.",'".addslashes($this->lib)."',";
+ $sql.= "'".$this->date_ech."','".$this->periode."',";
+ $sql.= "'".$this->amount."'";
+ $sql.= ')';
+
+ dolibarr_syslog("ChargesSociales::create sql=".$sql);
+ $resql=$this->db->query($sql);
+ if ($resql)
+ {
+ return 1;
+ }
+ else
+ {
+ $this->error=$this->db->error();
+ return -1;
+ }
+ }
+
+
/**
* \brief Efface un charge sociale
* \param user Utilisateur qui crée le paiement
@@ -199,9 +136,17 @@ class ChargeSociales
function delete($user)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."chargesociales where rowid='".$this->id."'";
- if (! $this->db->query($sql))
+
+ dolibarr_syslog("ChargesSociales::delete sql=".$sql);
+ $resql=$this->db->query($sql);
+ if ($resql)
{
- dolibarr_print_error($this->db);
+ return 1;
+ }
+ else
+ {
+ $this->error=$this->db->error();
+ return -1;
}
}
@@ -238,7 +183,7 @@ class ChargeSociales
*/
function set_payed($rowid)
{
- $sql = "UPDATE ".MAIN_DB_PREFIX."chargesociales set paye=1 WHERE rowid = $rowid ;";
+ $sql = "UPDATE ".MAIN_DB_PREFIX."chargesociales set paye=1 WHERE rowid = ".$rowid;
$return = $this->db->query( $sql);
}
@@ -299,4 +244,102 @@ class ChargeSociales
}
+
+/** \class PaiementCharge
+ \brief Classe permettant la gestion des paiements des charges
+*/
+class PaiementCharge
+{
+ var $db;
+
+ var $id;
+ var $chid;
+ var $paiementtype;
+ var $datepaye;
+ var $amounts;
+ var $num_paiement;
+ var $note;
+
+
+ function PaiementCharge($DB)
+ {
+ $this->db = $DB;
+ return 1;
+ }
+
+ /**
+ * \brief Creation d'un paiement de charge sociale dans la base
+ * \param user Utilisateur qui crée le paiement
+ * \return int <0 si KO, id du paiement crée si OK
+ */
+ function create($user)
+ {
+ $error = 0;
+
+ $this->db->begin();
+
+ $total = 0;
+ foreach ($this->amounts as $key => $value)
+ {
+ $facid = $key;
+ $value = trim($value);
+ $amount = round(price2num($value), 2); // Un round est ok si nb avec '.'
+ if (is_numeric($amount)) $total += $amount;
+ }
+ $total = price2num($total);
+
+ if ($total > 0)
+ {
+ $sql = "INSERT INTO ".MAIN_DB_PREFIX."paiementcharge (fk_charge, datec, datep, amount, fk_typepaiement, num_paiement, note, fk_user_creat)";
+ $sql .= " VALUES ($this->chid, now(), $this->datepaye, '$total', $this->paiementtype, '$this->num_paiement', '$this->note', $user->id)";
+
+ dolibarr_syslog("PaiementCharges::create sql=".$sql);
+ $resql=$this->db->query($sql);
+ if ($resql)
+ {
+ $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."paiementcharge");
+ }
+ else
+ {
+ $error++;
+ }
+
+ }
+
+ if ($total > 0 && ! $error)
+ {
+ $this->db->commit();
+ return $this->id;
+ }
+ else
+ {
+ $this->error=$this->db->error();
+ dolibarr_syslog("PaiementCharges::create ".$this->error);
+ $this->db->rollback();
+ return -1;
+ }
+ }
+
+ /**
+ * \brief Mise a jour du lien entre le paiement de charge et la ligne dans llx_bank générée
+ * \param id_bank Id de la banque
+ * \return int 1 ou 0
+ */
+ function update_fk_bank($id_bank)
+ {
+ $sql = "UPDATE llx_paiementcharge set fk_bank = ".$id_bank." where rowid = ".$this->id;
+ $result = $this->db->query($sql);
+ if ($result)
+ {
+ return 1;
+ }
+ else
+ {
+ $this->error=$this->db->error()." sql=".$sql;
+ return 0;
+ }
+ }
+}
+
+
?>
diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php
index 64f2a410bd6..7c1e1bf5c5d 100755
--- a/htdocs/compta/paiement_charge.php
+++ b/htdocs/compta/paiement_charge.php
@@ -1,5 +1,5 @@
+/* Copyright (C) 2004-2007 Laurent Destailleur
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -319,7 +319,7 @@ if ($_GET["action"] == 'create')
*
*/
- print ' ';
+ print ' ';
print "";
print "\n";
// }
diff --git a/htdocs/compta/sociales/charges.php b/htdocs/compta/sociales/charges.php
index 6f8560ba5c4..ea6b6c658f4 100644
--- a/htdocs/compta/sociales/charges.php
+++ b/htdocs/compta/sociales/charges.php
@@ -1,5 +1,5 @@
+/* Copyright (C) 2004-2007 Laurent Destailleur
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -27,24 +27,22 @@
*/
require("./pre.inc.php");
+require(DOL_DOCUMENT_ROOT."/chargesociales.class.php");
$langs->load("compta");
$langs->load("bills");
-
+// Protection
$user->getrights('compta');
if (!$user->admin && !$user->rights->tax->charges)
accessforbidden();
-require("../../chargesociales.class.php");
-
-llxHeader();
-
-
$chid=isset($_GET["id"])?$_GET["id"]:$_POST["id"];
+
+
/* *************************************************************************** */
/* */
/* Action Classer Payé */
@@ -56,7 +54,29 @@ if ($_GET["action"] == 'payed')
$result = $cha->set_payed($chid);
}
+/*
+ * Suppression d'une charge sociale
+ */
+if ($_GET["action"] == 'del' && $_POST["confirm"] == 'yes')
+{
+ $chargesociales=new ChargeSociales($db);
+ $chargesociales->id=$_GET["id"];
+ $result=$chargesociales->delete($user);
+ if ($result > 0)
+ {
+ Header("Location: index.php");
+ exit;
+ }
+ else
+ {
+ $mesg=''.$chargesociales->error.'
';
+ }
+}
+
+
+
+llxHeader();
/* *************************************************************************** */
/* */
@@ -69,12 +89,13 @@ if ($chid > 0)
$cha = new ChargeSociales($db);
+ /*
+ * Charge
+ */
if ($cha->fetch($chid) > 0)
{
- /*
- * Charge
- */
-
+ if ($mesg) print $mesg.' ';
+
//$head[0][0] = DOL_URL_ROOT.'/comm/propal.php?propalid='.$propal->id;
$head[0][1] = $langs->trans("SocialContribution").": $cha->id";
$h = 1;
@@ -88,7 +109,7 @@ if ($chid > 0)
*/
if ($_GET["action"] == 'delete')
{
- $html->form_confirm("index.php?id=$cha->id&action=del","Supprimer la charge sociale","Etes-vous sûr de vouloir supprimer cette charge sociale ?","confirm_delete");
+ $html->form_confirm($_SERVER["PHP_SELF"]."?id=$cha->id&action=del","Supprimer la charge sociale","Etes-vous sûr de vouloir supprimer cette charge sociale ?","confirm_delete");
print ' ';
}
@@ -98,7 +119,18 @@ if ($chid > 0)
print "".$langs->trans("Type")." $cha->type_libelle ".$langs->trans("Payments")." ";
- print "".$langs->trans("Period")." ".dolibarr_print_date($cha->periode,"%Y")." ";
+ print "".$langs->trans("Period")." ";
+ print "";
+ if ($cha->paye==0)
+ {
+ print " period)."\">";
+ }
+ else
+ {
+ print dolibarr_print_date($cha->periode,"%Y");
+ }
+ print " ";
+
print '';
/*
@@ -135,7 +167,7 @@ if ($chid > 0)
$i++;
}
- if ($fac->paye == 0)
+ if ($cha->paye == 0)
{
print " Total payé: ".price($totalpaye)." ".$langs->trans("Currency".$conf->monnaie)." \n";
print "Réclamé : ".price($cha->amount)." ".$langs->trans("Currency".$conf->monnaie)." \n";
@@ -156,10 +188,11 @@ if ($chid > 0)
print "";
- if ($cha->paye==0) {
- print ''.$langs->trans("Label").' ';
+ if ($cha->paye==0)
+ {
+ print ''.$langs->trans("Label").' ';
print ''.$langs->trans("DateDue")." date_ech)."\"> ";
- print ''.$langs->trans("AmountTTC")." amount\"> ";
+ print ''.$langs->trans("AmountTTC")." amount."\"> ";
}
else {
print ''.$langs->trans("Label").' '.$cha->lib.' ';
@@ -168,7 +201,7 @@ if ($chid > 0)
}
- print ''.$langs->trans("Status").' '.$cha->getLibStatut().' ';
+ print ''.$langs->trans("Status").' '.$cha->getLibStatut(4).' ';
print '';
@@ -208,7 +241,7 @@ if ($chid > 0)
else
{
/* Charge non trouvée */
- print "Charge inexistante ou accés refusé";
+ dolibarr_print_error('',$cha->error);
}
}
diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php
index 0e1e13a0884..88828fe5c9d 100644
--- a/htdocs/compta/sociales/index.php
+++ b/htdocs/compta/sociales/index.php
@@ -1,6 +1,6 @@
- * Copyright (C) 2004-2006 Laurent Destailleur
+ * Copyright (C) 2004-2007 Laurent Destailleur
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -39,9 +39,6 @@ if (!$user->admin && ! $user->rights->tax->charges->lire)
accessforbidden();
-llxHeader();
-
-
$sortfield = isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"];
$sortorder = isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"];
$page = $_GET["page"];
@@ -53,6 +50,11 @@ $offset = $limit * $page ;
if (! $sortfield) $sortfield="c.id";
if (! $sortorder) $sortorder="DESC";
+$year=$_GET["year"];
+$filtre=$_GET["filtre"];
+//if (! $year) { $year=date("Y", time()); }
+
+
/*
* Ajout d'une charge sociale
@@ -60,33 +62,38 @@ if (! $sortorder) $sortorder="DESC";
if ($_POST["action"] == 'add')
{
- if (! $_POST["date"] || ! $_POST["periode"] || ! $_POST["amount"]) {
- $mesg="Erreur: Tous les champs date et montant doivent etre renseignés avec une valeur non vide.
";
- }
- else {
-
- $sql = "INSERT INTO ".MAIN_DB_PREFIX."chargesociales (fk_type, libelle, date_ech, periode, amount) ";
- $sql .= " VALUES (".$_POST["type"].",'".addslashes($_POST["libelle"])."','".$_POST["date"]."','".$_POST["periode"]."','".$_POST["amount"]."');";
-
- if (! $db->query($sql) )
- {
- dolibarr_print_error($db);
- }
- else {
- $mesg="La charge a été ajoutée.
";
- }
- }
-}
-
-/*
- * Suppression d'une charge sociale
- */
-
-if ($_GET["action"] == 'del' && $_POST["confirm"] == 'yes')
-{
- $chargesociales=new ChargeSociales($db);
- $chargesociales->id=$_GET["id"];
- $result=$chargesociales->delete($user);
+ if (! $_POST["date"])
+ {
+ $mesg=''.$langs->trans("ErrorFieldRequired",$langs->transnoentities("DateDue")).'
';
+ }
+ elseif (! $_POST["periode"])
+ {
+ $mesg=''.$langs->trans("ErrorFieldRequired",$langs->transnoentities("Period")).'
';
+ }
+ elseif (! $_POST["amount"])
+ {
+ $mesg=''.$langs->trans("ErrorFieldRequired",$langs->transnoentities("Amount")).'
';
+ }
+ else
+ {
+ $chargesociales=new ChargeSociales($db);
+
+ $chargesociales->type=$_POST["type"];
+ $chargesociales->lib=$_POST["libelle"];
+ $chargesociales->date_ech=$_POST["date"];
+ $chargesociales->period=$_POST["period"];
+ $chargesociales->amount=$_POST["amount"];
+
+ $result=$chargesociales->create($user);
+ if ($result > 0)
+ {
+ $mesg=''.$langs->trans("SocialContributionAdded").'
';
+ }
+ else
+ {
+ $mesg=''.$chargesociales->error.'
';
+ }
+ }
}
@@ -95,9 +102,7 @@ if ($_GET["action"] == 'del' && $_POST["confirm"] == 'yes')
* Affichage liste et formulaire des charges.
*/
-$year=$_GET["year"];
-$filtre=$_GET["filtre"];
-//if (! $year) { $year=date("Y", time()); }
+llxHeader();
print_fiche_titre($langs->trans("SocialContributions"),($year?"".img_previous()." ".$langs->trans("Year")." $year ".img_next()." ":""));
print " \n";
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 66f3c0d202e..8f0f0a4ce84 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -21,6 +21,7 @@ UseSearchToSelectProduct=Use a search form to choose a product (intead of using
NotAvailableWhenAjaxDisabled=Not available when Ajax disabled
JavascriptDisabled=Javascript disabled
UsePopupCalendar=Use popup for dates input
+UsePreviewTabs=Use preview tabs
NextValue=Next value
NextValueForInvoices=Next value (invoices)
NextValueForCreditNotes=Next value (credit notes)
diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang
index 792f67c4333..109236296f7 100644
--- a/htdocs/langs/en_US/other.lang
+++ b/htdocs/langs/en_US/other.lang
@@ -3,7 +3,7 @@ ErrorPasswordDiffers=Passwords differs, please type them again.
ErrorForbidden=Access forbidden. You try to access to a page, area or feature without being in an authenticated session or that is not allowed to your user.
ErrorForbidden2=Permission for this login can be defined by your Dolibarr administrator from menu %s->%s.
ErrorForbidden3=It seems that Dolibarr is not used through an authenticated session. Take a look at Dolibarr setup documentation to know how to manage authentications (htaccess, mod_auth or other...).
-ErrorNoImagickReadimage=Function imagick_readimage is not found in this PHP. No preview can be available.
+ErrorNoImagickReadimage=Function imagick_readimage is not found in this PHP. No preview can be available. Administrators can disable this tab from menu Setup - Display.
ErrorRecordAlreadyExists=Record already exists
ErrorCantReadFile=Failed to read file '%s'
ErrorCantReadDir=Failed to read directory '%s'
diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang
index 2dbb4412f83..f71487bfde1 100644
--- a/htdocs/langs/fr_FR/admin.lang
+++ b/htdocs/langs/fr_FR/admin.lang
@@ -21,6 +21,7 @@ UseSearchToSelectProduct=Utiliser un formulaire de recherche pour choix d'un pro
NotAvailableWhenAjaxDisabled=Non disponible quand Ajax désactivé
JavascriptDisabled=Javascript désactivé
UsePopupCalendar=Utiliser les popups pour la saisie des dates
+UsePreviewTabs=Afficher les onglets "Aperçu"
NextValue=Prochaine valeur
NextValueForInvoices=Prochaine valeur (factures)
NextValueForCreditNotes=Prochaine valeur (avoirs)
diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang
index 566132acef7..2dcf00ebb5c 100644
--- a/htdocs/langs/fr_FR/other.lang
+++ b/htdocs/langs/fr_FR/other.lang
@@ -3,7 +3,7 @@ ErrorPasswordDiffers=Les mots de passe ne sont pas identiques, veuillez les sais
ErrorForbidden=Accès non autorisé. Vous essayez d'accéder à une page, zone ou fonction sans être au sein d'une session authentifiée ou qui n'est pas autorisée pour votre compte utilisateur.
ErrorForbidden2=Les permissions pour ce login peuvent être attribuées par l'administrateur Dolibarr via le menu %s -> %s.
ErrorForbidden3=Dolibarr ne semble pas fonctionner au sein d'une session authentifiée. Consultez la documentation d'installation de Dolibarr pour savoir comment gérer les authentifications (htaccess, mod_auth ou autre...).
-ErrorNoImagickReadimage=La fonction imagick_readimage n'est pas présente sur cette installation de PHP. L'aperçu n'est donc pas disponible.
+ErrorNoImagickReadimage=La fonction imagick_readimage n'est pas présente sur cette installation de PHP. L'aperçu n'est donc pas disponible. Les administrateurs pouvent désactiver cet onglet dans le menu Configuration - Affichage.
ErrorRecordAlreadyExists=Enregistrement déjà existant
ErrorCantReadFile=Echec de lecture du fichier '%s'
ErrorCantReadDir=Echec de lecture du répertoire '%s'