diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index aaedd3d0bb9..bb8529f61c4 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -1159,7 +1159,18 @@ if ($_GET['propalid'] > 0)
print ' - '.nl2br($objp->product);
print '
';
}
- print '';
+ if ($conf->fckeditor->enabled)
+ {
+ require_once(DOL_DOCUMENT_ROOT."/includes/fckeditor/fckeditor.php");
+ $oFCKeditor = new FCKeditor('desc');
+ $oFCKeditor->Value = $objp->description;
+ $oFCKeditor->Create() ;
+ }
+ else
+ {
+ print '';
+ }
+ print '';
print '
';
if($societe->tva_assuj == "0")
print '0';
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 918d795da26..c8c657a069e 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -2203,7 +2203,7 @@ else
}
// On vérifie si la facture est supprimable. Si oui, on propose bouton supprimer
- if ($fac->is_erasable() && $user->rights->facture->supprimer && $_GET['action'] != 'delete')
+ if ($fac->statut == 0 && $fac->is_erasable() && $user->rights->facture->supprimer && $_GET['action'] != 'delete')
{
print 'id.'&action=delete">'.$langs->trans('Delete').'';
}
diff --git a/htdocs/conf/conf.class.php b/htdocs/conf/conf.class.php
index 51d83b0aed3..f758209858a 100644
--- a/htdocs/conf/conf.class.php
+++ b/htdocs/conf/conf.class.php
@@ -270,6 +270,8 @@ class Conf
$this->export->dir_ouput=DOL_DATA_ROOT."/export";
// Module ldap
$this->ldap->enabled=defined("MAIN_MODULE_LDAP")?MAIN_MODULE_LDAP:0;
+ // Module FCKeditor
+ $this->fckeditor->enabled=defined("MAIN_MODULE_FCKEDITOR")?MAIN_MODULE_FCKEDITOR:0;
/*
diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php
index 95d665c84e0..6b583cb1664 100644
--- a/htdocs/master.inc.php
+++ b/htdocs/master.inc.php
@@ -146,6 +146,7 @@ $langs->setPhpLang($conf->global->MAIN_LANG_DEFAULT);
* Pour MagpieRss: MAGPIERSS_PATH
* Pour JPGraph: JPGRAPH_PATH
* Pour NuSOAP: NUSOAP_PATH
+ * Pour TCPDF: TCPDF_PATH
*/
// Les path racines
if (! defined('FPDF_PATH')) { define('FPDF_PATH', DOL_DOCUMENT_ROOT .'/includes/fpdf/fpdf/'); }
@@ -155,8 +156,11 @@ if (! defined('PHPLOT_PATH')) { define('PHPLOT_PATH', DOL_DOCUMEN
if (! defined('MAGPIERSS_PATH')) { define('MAGPIERSS_PATH', DOL_DOCUMENT_ROOT .'/includes/magpierss/'); }
if (! defined('JPGRAPH_PATH')) { define('JPGRAPH_PATH', DOL_DOCUMENT_ROOT .'/includes/jpgraph/'); }
if (! defined('NUSOAP_PATH')) { define('NUSOAP_PATH', DOL_DOCUMENT_ROOT .'/includes/nusoap/lib/'); }
+if (! defined('TCPDF_PATH')) { define('TCPDF_PATH', DOL_DOCUMENT_ROOT .'/includes/fpdf/tcpdf/'); }
// Les autres path
-if (! defined('FPDF_FONTPATH')) { define('FPDF_FONTPATH', FPDF_PATH . 'font/'); }
+if (! defined('FPDF_FONTPATH') && ! $conf->fckeditor->enabled){
+ define('FPDF_FONTPATH', FPDF_PATH . 'font/');
+}else{ define('FPDF_FONTPATH', TCPDF_PATH . 'fonts/');}
if (! defined('MAGPIE_DIR')) { define('MAGPIE_DIR', MAGPIERSS_PATH); }
if (! defined('MAGPIE_CACHE_DIR')) { define('MAGPIE_CACHE_DIR', DOL_DATA_ROOT .'/rsscache'); }
diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php
index d27049360fb..46f4182153f 100644
--- a/htdocs/product/fiche.php
+++ b/htdocs/product/fiche.php
@@ -450,7 +450,18 @@ if ($_GET["action"] == 'create' && $user->rights->produit->creer)
// Description
print ' | | '.$langs->trans("Description").' | ';
- print ' |
";
if ($_GET["type"] == 1)
@@ -753,9 +764,22 @@ if ($_GET["id"] || $_GET["ref"])
// Description
print '| '.$langs->trans("Description").' | ';
- print ' |
";
+ print "\n";
+ if ($conf->fckeditor->enabled)
+ {
+ require_once(DOL_DOCUMENT_ROOT."/includes/fckeditor/fckeditor.php");
+ $oFCKeditor = new FCKeditor('desc');
+ $oFCKeditor->Value = $product->description;
+ $oFCKeditor->Create() ;
+ }
+ else
+ {
+ print '";
+ print "";
+ }
+ print "\n";
if ($product->type == 1)
{