diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php
index e8bf4f3ef82..b44656c8471 100644
--- a/htdocs/fichinter/fiche.php
+++ b/htdocs/fichinter/fiche.php
@@ -73,7 +73,7 @@ if ($_POST["action"] == 'add')
$fichinter->duree = $_POST["duree"];
$fichinter->projet_id = $_POST["projetidp"];
$fichinter->author = $user->id;
- $fichinter->note = $_POST["note"];
+ $fichinter->description = $_POST["description"];
$fichinter->ref = $_POST["ref"];
$result = $fichinter->create();
@@ -96,7 +96,7 @@ if ($_POST["action"] == 'update')
$fichinter->duree = $_POST["duree"];
$fichinter->projet_id = $_POST["projetidp"];
$fichinter->author = $user->id;
- $fichinter->note = $_POST["note"];
+ $fichinter->description = $_POST["description"];
$fichinter->ref = $_POST["ref"];
$fichinter->update($_POST["id"]);
@@ -210,12 +210,12 @@ if ($_GET["action"] == 'create')
{
// Editeur wysiwyg
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
- $doleditor=new DolEditor('note','',280,'dolibarr_notes','In',true);
+ $doleditor=new DolEditor('description','',280,'dolibarr_notes','In',true);
$doleditor->Create();
}
else
{
- print '';
+ print '';
}
print '';
@@ -301,12 +301,12 @@ elseif ($_GET["action"] == 'edit' && $_GET["id"] > 0)
{
// Editeur wysiwyg
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
- $doleditor=new DolEditor('note',$fichinter->note,280,'dolibarr_notes','In',true);
+ $doleditor=new DolEditor('description',$fichinter->description,280,'dolibarr_notes','In',true);
$doleditor->Create();
}
else
{
- print '';
+ print '';
}
print '';
@@ -369,7 +369,7 @@ elseif ($_GET["id"] > 0)
// Description
print '
| '.$langs->trans("Description").' | ';
print '';
- print nl2br($fichinter->note);
+ print nl2br($fichinter->description);
print ' |
';
print "";
diff --git a/htdocs/fichinter/fichinter.class.php b/htdocs/fichinter/fichinter.class.php
index cf36c93f2f6..00302446d09 100644
--- a/htdocs/fichinter/fichinter.class.php
+++ b/htdocs/fichinter/fichinter.class.php
@@ -47,7 +47,9 @@ class Fichinter extends CommonObject
var $ref;
var $date;
var $duree;
- var $note;
+ var $description
+ var $note_prive;
+ var $note_public;
var $projet_id;
@@ -90,12 +92,12 @@ class Fichinter extends CommonObject
$this->db->begin();
- $sql = "INSERT INTO ".MAIN_DB_PREFIX."fichinter (fk_soc, datei, datec, ref, fk_user_author, note, duree";
+ $sql = "INSERT INTO ".MAIN_DB_PREFIX."fichinter (fk_soc, datei, datec, ref, fk_user_author, description, duree";
if ($this->projet_id) {
$sql .= ",fk_projet";
}
$sql .= ") ";
- $sql .= " VALUES ($this->socid, $this->date, now(), '$this->ref', $this->author, '".addslashes($this->note)."', $this->duree";
+ $sql .= " VALUES ($this->socid, $this->date, now(), '$this->ref', $this->author, '".addslashes($this->description)."', $this->duree";
if ($this->projet_id) {
$sql .= ", ".$this->projet_id;
}
@@ -137,7 +139,7 @@ class Fichinter extends CommonObject
*/
$sql = "UPDATE ".MAIN_DB_PREFIX."fichinter SET ";
$sql .= " datei = ".$this->date;
- $sql .= ", note = '".addslashes($this->note)."'";
+ $sql .= ", description = '".addslashes($this->description)."'";
$sql .= ", duree = ".$this->duree;
$sql .= ", fk_projet = ".$this->projet_id;
$sql .= " WHERE rowid = $id";
@@ -158,7 +160,7 @@ class Fichinter extends CommonObject
*/
function fetch($rowid)
{
- $sql = "SELECT ref,note,fk_soc,fk_statut,duree,".$this->db->pdate(datei)." as di, fk_projet";
+ $sql = "SELECT ref,description,fk_soc,fk_statut,duree,".$this->db->pdate(datei)." as di, fk_projet";
$sql.= " FROM ".MAIN_DB_PREFIX."fichinter WHERE rowid=".$rowid;
dolibarr_syslog("Fichinter.class::fetch rowid=$rowid sql=$sql");
@@ -170,14 +172,14 @@ class Fichinter extends CommonObject
{
$obj = $this->db->fetch_object($resql);
- $this->id = $rowid;
- $this->date = $obj->di;
- $this->duree = $obj->duree;
- $this->ref = $obj->ref;
- $this->note = $obj->note;
- $this->socid = $obj->fk_soc;
- $this->projet_id = $obj->fk_projet;
- $this->statut = $obj->fk_statut;
+ $this->id = $rowid;
+ $this->date = $obj->di;
+ $this->duree = $obj->duree;
+ $this->ref = $obj->ref;
+ $this->description = $obj->description;
+ $this->socid = $obj->fk_soc;
+ $this->projet_id = $obj->fk_projet;
+ $this->statut = $obj->fk_statut;
$this->ref_url = ''.$this->ref.'';
diff --git a/htdocs/fichinter/index.php b/htdocs/fichinter/index.php
index ada9a241900..0ae47501698 100644
--- a/htdocs/fichinter/index.php
+++ b/htdocs/fichinter/index.php
@@ -58,7 +58,7 @@ $pagenext = $page + 1;
llxHeader();
-$sql = "SELECT s.nom,s.rowid as socid, f.ref,".$db->pdate("f.datei")." as dp, f.rowid as fichid, f.fk_statut, f.note, f.duree";
+$sql = "SELECT s.nom,s.rowid as socid, f.ref,".$db->pdate("f.datei")." as dp, f.rowid as fichid, f.fk_statut, f.description, f.duree";
if (!$user->rights->commercial->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."fichinter as f ";
if (!$user->rights->commercial->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@@ -100,7 +100,7 @@ if ($result)
print "";
print "| fichid."\">".img_object($langs->trans("Show"),"task").' '.$objp->ref." | \n";
print ''.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($objp->nom,44)." | \n";
- print ''.nl2br($objp->note).' | ';
+ print ''.nl2br($objp->description).' | ';
print ''.dolibarr_print_date($objp->dp)." | \n";
print ''.price($objp->duree).' | ';
print ''.$fichinter_static->LibStatut($objp->fk_statut,5).' | ';
diff --git a/htdocs/fichinter/rapport.php b/htdocs/fichinter/rapport.php
index 15ed581e3ab..1b13d009111 100644
--- a/htdocs/fichinter/rapport.php
+++ b/htdocs/fichinter/rapport.php
@@ -52,7 +52,7 @@ $offset = $limit * $page ;
$pageprev = $page - 1;
$pagenext = $page + 1;
-$sql = "SELECT s.nom,s.rowid as socid, f.note, f.ref,".$db->pdate("f.datei")." as dp, f.rowid as fichid, f.fk_statut, f.duree";
+$sql = "SELECT s.nom,s.rowid as socid, f.description, f.ref,".$db->pdate("f.datei")." as dp, f.rowid as fichid, f.fk_statut, f.duree";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."fichinter as f ";
$sql .= " WHERE f.fk_soc = s.rowid";
@@ -123,7 +123,7 @@ if ( $db->query($sql) )
print ' ';
print "rowid.$filter."\">".$objp->nom." | \n";
}
- print ''.nl2br($objp->note).' | ';
+ print ''.nl2br($objp->description).' | ';
print "".strftime("%d %B %Y",$objp->dp)." | \n";
print ''.sprintf("%.1f",$objp->duree).' | ';
$DureeTotal += $objp->duree;
diff --git a/mysql/migration/2.1.0-2.2.0.sql b/mysql/migration/2.1.0-2.2.0.sql
index 6bedb2a7306..34bc5d813f2 100644
--- a/mysql/migration/2.1.0-2.2.0.sql
+++ b/mysql/migration/2.1.0-2.2.0.sql
@@ -680,4 +680,8 @@ ALTER TABLE `llx_osc_product` ADD UNIQUE KEY `fk_product` (`fk_product`);
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (120, 'fichinter','internal', 'INTERREPFOLL', 'Responsable suivi de l\'intervention', 1);
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (121, 'fichinter','internal', 'INTERVENING', 'Intervenant', 1);
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (130, 'fichinter','external', 'BILLING', 'Contact client facturation intervention', 1);
-insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (131, 'fichinter','external', 'CUSTOMER', 'Contact client suivi de l\'intervention', 1);
\ No newline at end of file
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (131, 'fichinter','external', 'CUSTOMER', 'Contact client suivi de l\'intervention', 1);
+
+ALTER TABLE llx_fichinter CHANGE note description text DEFAULT NULL;
+ALTER TABLE llx_fichinter ADD COLUMN note_private text DEFAULT NULL after description;
+ALTER TABLE llx_fichinter ADD COLUMN note_public text DEFAULT NULL after note_prive;
\ No newline at end of file
diff --git a/mysql/tables/llx_fichinter.sql b/mysql/tables/llx_fichinter.sql
index fc59fd0134b..68894e4b575 100644
--- a/mysql/tables/llx_fichinter.sql
+++ b/mysql/tables/llx_fichinter.sql
@@ -33,7 +33,9 @@ create table llx_fichinter
fk_user_valid integer, -- valideur de la fiche
fk_statut smallint DEFAULT 0,
duree real,
- note text,
+ descrition text,
+ note_private text,
+ note_public text
UNIQUE INDEX (ref)
)type=innodb;