diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 93035ad912a..74840aa2188 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -1,7 +1,7 @@ - * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2009 Regis Houssin +/* Copyright (C) 2003 Rodolphe Quiedeville + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2009-2012 Regis Houssin * * 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 @@ -50,6 +50,7 @@ class Deplacement extends CommonObject var $socid; var $statut; // 0=draft, 1=validated var $fk_project; + var $extraparams=array(); /** * Constructor @@ -209,7 +210,7 @@ class Deplacement extends CommonObject */ function fetch($id) { - $sql = "SELECT rowid, fk_user, type, fk_statut, km, fk_soc, dated, note, note_public, fk_projet"; + $sql = "SELECT rowid, fk_user, type, fk_statut, km, fk_soc, dated, note, note_public, fk_projet, extraparams"; $sql.= " FROM ".MAIN_DB_PREFIX."deplacement"; $sql.= " WHERE rowid = ".$id; @@ -230,6 +231,8 @@ class Deplacement extends CommonObject $this->note_private = $obj->note; $this->note_public = $obj->note_public; $this->fk_project = $obj->fk_projet; + + $this->extraparams = (array) dol_json_decode($obj->extraparams, true); return 1; } diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/fiche.php index 66680ef089d..f972903844e 100644 --- a/htdocs/compta/deplacement/fiche.php +++ b/htdocs/compta/deplacement/fiche.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * * 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 @@ -70,7 +70,7 @@ if ($action == 'validate' && $user->rights->deplacement->creer) } /* -if ($action == 'unblock' && $user->rights->deplacement->unvalidate) +else if ($action == 'unblock' && $user->rights->deplacement->unvalidate) { $object->fetch($id); if ($object->fk_statut == '1') // Not blocked... @@ -99,7 +99,7 @@ if ($action == 'unblock' && $user->rights->deplacement->unvalidate) } }*/ -if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->deplacement->supprimer) +else if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->deplacement->supprimer) { $result=$object->delete($id); if ($result >= 0) @@ -113,7 +113,7 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->deplaceme } } -if ($action == 'add' && $user->rights->deplacement->creer) +else if ($action == 'add' && $user->rights->deplacement->creer) { if (! $_POST["cancel"]) { @@ -172,7 +172,7 @@ if ($action == 'add' && $user->rights->deplacement->creer) } // Update record -if ($action == 'update' && $user->rights->deplacement->creer) +else if ($action == 'update' && $user->rights->deplacement->creer) { if (empty($_POST["cancel"])) { @@ -206,7 +206,7 @@ if ($action == 'update' && $user->rights->deplacement->creer) } // Set into a project -if ($action == 'classin') +else if ($action == 'classin' && $user->rights->deplacement->creer) { $object->fetch($id); $result=$object->setProject($_POST['projectid']); @@ -214,26 +214,26 @@ if ($action == 'classin') } // Set fields -if ($action == 'setdated') +else if ($action == 'setdated' && $user->rights->deplacement->creer) { $dated=dol_mktime($_POST['datedhour'], $_POST['datedmin'], $_POST['datedsec'], $_POST['datedmonth'], $_POST['datedday'], $_POST['datedyear']); $object->fetch($id); $result=$object->setValueFrom('dated',$dated,'','','date'); if ($result < 0) dol_print_error($db, $object->error); } -if ($action == 'setkm') +else if ($action == 'setkm' && $user->rights->deplacement->creer) { $object->fetch($id); $result=$object->setValueFrom('km',GETPOST('km')); if ($result < 0) dol_print_error($db, $object->error); } -if ($action == 'setnote_public') +else if ($action == 'setnote_public' && $user->rights->deplacement->creer) { $object->fetch($id); $result=$object->setValueFrom('note_public',GETPOST('note_public')); if ($result < 0) dol_print_error($db, $object->error); } -if ($action == 'setnote') +else if ($action == 'setnote' && $user->rights->deplacement->creer) { $object->fetch($id); $result=$object->setValueFrom('note',GETPOST('note')); @@ -424,7 +424,7 @@ else if ($id) print ''; // Ref - print ''; @@ -494,25 +494,11 @@ else if ($id) // Statut print ''; - - // Public note - print '"; - - // Private note - if (! $user->societe_id) - { - print '"; - } - - print "
'.$langs->trans("Ref").''; + print '
'.$langs->trans("Ref").''; print $form->showrefnav($object,'id','',1,'rowid','ref',''); print '
'.$langs->trans("Status").''.$object->getLibStatut(4).'
'; - print $form->editfieldkey("NotePublic",'note_public',$object->note_public,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'ckeditor:dolibarr_notes:600:180'); - print ''; - print $form->editfieldval("NotePublic",'note_public',$object->note_public,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'ckeditor:dolibarr_notes:600:180'); - print "
'; - print $form->editfieldkey("NotePrivate",'note',$object->note_private,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'ckeditor:dolibarr_notes:600:180'); - print ''; - print $form->editfieldval("NotePrivate",'note',$object->note_private,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'ckeditor:dolibarr_notes:600:180'); - print "
"; + + print "
"; + + // Notes + include(DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'); print ''; diff --git a/htdocs/core/ajax/extraparams.php b/htdocs/core/ajax/extraparams.php index 4b18bdfee13..1c573e7c294 100644 --- a/htdocs/core/ajax/extraparams.php +++ b/htdocs/core/ajax/extraparams.php @@ -49,14 +49,17 @@ if(! empty($id) && ! empty($element) && ! empty($htmlelement) && ! empty($type)) dol_syslog("AjaxSetExtraParameters id=".$id." element=".$element." htmlelement=".$htmlelement." type=".$type." value=".$value, LOG_DEBUG); - // For compatibility - if ($element == 'order' || $element == 'commande') { $element = $subelement = 'commande'; } - if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'propal'; } - if ($element == 'facture') { $element = 'compta/facture'; $subelement = 'facture'; } - if ($element == 'contract') { $element = $subelement = 'contrat'; } - if ($element == 'shipping') { $element = $subelement = 'expedition'; } + $classpath = $subelement = $element; - dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); + // For compatibility + if ($element == 'order' || $element == 'commande') { $classpath = $subelement = 'commande'; } + else if ($element == 'propal') { $classpath = 'comm/propal'; $subelement = 'propal'; } + else if ($element == 'facture') { $classpath = 'compta/facture'; $subelement = 'facture'; } + else if ($element == 'contract') { $classpath = $subelement = 'contrat'; } + else if ($element == 'shipping') { $classpath = $subelement = 'expedition'; } + else if ($element == 'deplacement') { $classpath = 'compta/deplacement'; $subelement = 'deplacement'; } + + dol_include_once('/'.$classpath.'/class/'.$subelement.'.class.php'); $classname = ucfirst($subelement); $object = new $classname($db); diff --git a/htdocs/core/lib/fichinter.lib.php b/htdocs/core/lib/fichinter.lib.php index 4f7c5c660f2..165475daf33 100644 --- a/htdocs/core/lib/fichinter.lib.php +++ b/htdocs/core/lib/fichinter.lib.php @@ -60,11 +60,14 @@ function fichinter_prepare_head($object) // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab complete_head_from_modules($conf,$langs,$object,$head,$h,'intervention'); - - $head[$h][0] = DOL_URL_ROOT.'/fichinter/note.php?id='.$object->id; - $head[$h][1] = $langs->trans('Notes'); - $head[$h][2] = 'note'; - $h++; + + if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) + { + $head[$h][0] = DOL_URL_ROOT.'/fichinter/note.php?id='.$object->id; + $head[$h][1] = $langs->trans('Notes'); + $head[$h][2] = 'note'; + $h++; + } $head[$h][0] = DOL_URL_ROOT.'/fichinter/document.php?id='.$object->id; $head[$h][1] = $langs->trans("Documents"); diff --git a/htdocs/core/tpl/notes.tpl.php b/htdocs/core/tpl/notes.tpl.php index ee730e24350..e32933dd888 100644 --- a/htdocs/core/tpl/notes.tpl.php +++ b/htdocs/core/tpl/notes.tpl.php @@ -18,7 +18,10 @@ $hide = $object->extraparams['notes']['showhide']; $module = $object->element; +$note_public = 'note_public'; +$note_private = 'note'; if ($module == 'propal') $module = 'propale'; +else if ($module == 'fichinter') { $module = 'ficheinter'; $note_private = 'note_private'; } ?> @@ -60,14 +63,14 @@ $(document).ready(function() { - editfieldkey("NotePublic",'note_public',$object->note_public,$object,$user->rights->$module->creer,'textarea'); ?> - editfieldval("NotePublic",'note_public',$object->note_public,$object,$user->rights->$module->creer,'textarea'); ?> + editfieldkey("NotePublic",$note_public,$object->note_public,$object,$user->rights->$module->creer,'textarea'); ?> + editfieldval("NotePublic",$note_public,$object->note_public,$object,$user->rights->$module->creer,'textarea'); ?> societe_id) { ?> - editfieldkey("NotePrivate",'note',$object->note_private,$object,$user->rights->$module->creer,'textarea'); ?> - editfieldval("NotePrivate",'note',$object->note_private,$object,$user->rights->$module->creer,'textarea'); ?> + editfieldkey("NotePrivate",$note_private,$object->note_private,$object,$user->rights->$module->creer,'textarea'); ?> + editfieldval("NotePrivate",$note_private,$object->note_private,$object,$user->rights->$module->creer,'textarea'); ?> diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 6917c2b4231..365a7529300 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -54,6 +54,7 @@ class Fichinter extends CommonObject var $note_public; var $fk_project; var $modelpdf; + var $extraparams=array(); var $lines = array(); @@ -213,11 +214,11 @@ class Fichinter extends CommonObject */ function fetch($rowid,$ref='') { - $sql = "SELECT rowid, ref, description, fk_soc, fk_statut,"; - $sql.= " datec,"; - $sql.= " date_valid as datev,"; - $sql.= " tms as datem,"; - $sql.= " duree, fk_projet, note_public, note_private, model_pdf"; + $sql = "SELECT f.rowid, f.ref, f.description, f.fk_soc, f.fk_statut,"; + $sql.= " f.datec,"; + $sql.= " f.date_valid as datev,"; + $sql.= " f.tms as datem,"; + $sql.= " f.duree, f.fk_projet, f.note_public, f.note_private, f.model_pdf, f.extraparams"; $sql.= " FROM ".MAIN_DB_PREFIX."fichinter as f"; if ($ref) $sql.= " WHERE f.ref='".$ref."'"; else $sql.= " WHERE f.rowid=".$rowid; @@ -243,6 +244,8 @@ class Fichinter extends CommonObject $this->note_public = $obj->note_public; $this->note_private = $obj->note_private; $this->modelpdf = $obj->model_pdf; + + $this->extraparams = (array) dol_json_decode($obj->extraparams, true); if ($this->statut == 0) $this->brouillon = 1; diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index a6882b8a785..e3dc490bc6b 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011-2012 Juanjo Menent * * This program is free software; you can redistribute it and/or modify @@ -61,7 +61,7 @@ $object = new Fichinter($db); * Actions */ -if ($action == 'confirm_validate' && $confirm == 'yes') +if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->ficheinter->creer) { $object->fetch($id); $object->fetch_thirdparty(); @@ -89,7 +89,7 @@ if ($action == 'confirm_validate' && $confirm == 'yes') } } -if ($action == 'confirm_modify' && $confirm == 'yes') +else if ($action == 'confirm_modify' && $confirm == 'yes' && $user->rights->ficheinter->creer) { $object->fetch($id); $object->fetch_thirdparty(); @@ -117,7 +117,7 @@ if ($action == 'confirm_modify' && $confirm == 'yes') } } -if ($action == 'add') +else if ($action == 'add' && $user->rights->ficheinter->creer) { $object->socid = $socid; $object->duree = GETPOST('duree','int'); @@ -150,7 +150,7 @@ if ($action == 'add') } } -if ($action == 'update') +else if ($action == 'update' && $user->rights->ficheinter->creer) { $object->fetch($id); @@ -166,7 +166,7 @@ if ($action == 'update') /* * Build doc */ -if ($action == 'builddoc') // En get ou en post +else if ($action == 'builddoc' && $user->rights->ficheinter->creer) // En get ou en post { $object->fetch($id); $object->fetch_thirdparty(); @@ -196,37 +196,35 @@ if ($action == 'builddoc') // En get ou en post } // Set into a project -if ($action == 'classin') +else if ($action == 'classin' && $user->rights->ficheinter->creer) { $object->fetch($id); $result=$object->setProject(GETPOST('projectid','int')); if ($result < 0) dol_print_error($db,$object->error); } -if ($action == 'confirm_delete' && $confirm == 'yes') +else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->ficheinter->supprimer) { - if ($user->rights->ficheinter->supprimer) - { - $object->fetch($id); - $object->delete($user); - } + $object->fetch($id); + $object->delete($user); + Header('Location: '.DOL_URL_ROOT.'/fichinter/list.php?leftmenu=ficheinter'); exit; } -if ($action == 'setdescription') +else if ($action == 'setdescription' && $user->rights->ficheinter->creer) { $object->fetch($id); $result=$object->set_description($user,GETPOST('description','alpha')); if ($result < 0) dol_print_error($db,$object->error); } -if ($action == 'setnote_public') +else if ($action == 'setnote_public' && $user->rights->ficheinter->creer) { $object->fetch($id); $result=$object->update_note_public(GETPOST('note_public','alpha')); if ($result < 0) dol_print_error($db,$object->error); } -if ($action == 'setnote_private') +else if ($action == 'setnote_private' && $user->rights->ficheinter->creer) { $object->fetch($id); $result=$object->update_note(GETPOST('note_private','alpha')); @@ -234,7 +232,7 @@ if ($action == 'setnote_private') } // Add line -if ($action == "addline" && $user->rights->ficheinter->creer) +else if ($action == "addline" && $user->rights->ficheinter->creer) { if (!GETPOST('np_desc','alpha')) { @@ -292,7 +290,7 @@ if ($action == "addline" && $user->rights->ficheinter->creer) } // Classify Billed -if ($action == 'classifybilled') +else if ($action == 'classifybilled' && $user->rights->ficheinter->creer) { $object->fetch($id); $result=$object->setBilled(); @@ -310,7 +308,7 @@ if ($action == 'classifybilled') /* * Mise a jour d'une ligne d'intervention */ -if ($action == 'updateline' && $user->rights->ficheinter->creer && GETPOST('save','alpha') == $langs->trans("Save")) +else if ($action == 'updateline' && $user->rights->ficheinter->creer && GETPOST('save','alpha') == $langs->trans("Save")) { $objectline = new FichinterLigne($db); if ($objectline->fetch(GETPOST('line_id','int')) <= 0) @@ -359,45 +357,40 @@ if ($action == 'updateline' && $user->rights->ficheinter->creer && GETPOST('save /* * Supprime une ligne d'intervention AVEC confirmation */ -if ($action == 'confirm_deleteline' && $confirm == 'yes') +else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->ficheinter->creer) { - if ($user->rights->ficheinter->creer) - { - $objectline = new FichinterLigne($db); - if ($objectline->fetch(GETPOST('line_id','int')) <= 0) - { - dol_print_error($db); - exit; - } - $result=$objectline->deleteline(); - - if ($object->fetch($objectline->fk_fichinter) <= 0) - { - dol_print_error($db); - exit; - } - - // Define output language - $outputlangs = $langs; - $newlang=''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','alpha')) $newlang=GETPOST('lang_id','alpha'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang; - if (! empty($newlang)) - { - $outputlangs = new Translate("",$conf); - $outputlangs->setDefaultLang($newlang); - } - fichinter_create($db, $object, $object->modelpdf, $outputlangs); - } - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); - exit; + $objectline = new FichinterLigne($db); + if ($objectline->fetch(GETPOST('line_id','int')) <= 0) + { + dol_print_error($db); + exit; + } + $result=$objectline->deleteline(); + + if ($object->fetch($objectline->fk_fichinter) <= 0) + { + dol_print_error($db); + exit; + } + + // Define output language + $outputlangs = $langs; + $newlang=''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','alpha')) $newlang=GETPOST('lang_id','alpha'); + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang; + if (! empty($newlang)) + { + $outputlangs = new Translate("",$conf); + $outputlangs->setDefaultLang($newlang); + } + fichinter_create($db, $object, $object->modelpdf, $outputlangs); } /* * Ordonnancement des lignes */ -if ($action == 'up' && $user->rights->ficheinter->creer) +else if ($action == 'up' && $user->rights->ficheinter->creer) { $object->fetch($id); $object->fetch_thirdparty(); @@ -418,7 +411,7 @@ if ($action == 'up' && $user->rights->ficheinter->creer) exit; } -if ($action == 'down' && $user->rights->ficheinter->creer) +else if ($action == 'down' && $user->rights->ficheinter->creer) { $object->fetch($id); $object->fetch_thirdparty(); @@ -861,26 +854,14 @@ else if ($id > 0 || ! empty($ref)) // Statut print ''.$langs->trans("Status").''.$object->getLibStatut(4).''; + + print "
"; - // Public note - print ''; - print $form->editfieldkey("NotePublic",'note_public',$object->note_public,$object,$user->rights->ficheinter->creer,'ckeditor:dolibarr_notes:600:180'); - print ''; - print $form->editfieldval("NotePublic",'note_public',$object->note_public,$object,$user->rights->ficheinter->creer,'ckeditor:dolibarr_notes:600:180'); - print ""; - - // Private note - if (! $user->societe_id) + if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { - print ''; - print $form->editfieldkey("NotePrivate",'note_private',$object->note_private,$object,$user->rights->ficheinter->creer,'ckeditor:dolibarr_notes:600:180'); - print ''; - print $form->editfieldval("NotePrivate",'note_private',$object->note_private,$object,$user->rights->ficheinter->creer,'ckeditor:dolibarr_notes:600:180'); - print ""; + include(DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'); } - print ""; - /* * Lignes d'intervention */ @@ -898,7 +879,7 @@ else if ($id > 0 || ! empty($ref)) if ($num) { - print '
'; + print '
'; print ''; print ''; diff --git a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql index ee814704d27..5f077ce0e46 100755 --- a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql +++ b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql @@ -440,4 +440,6 @@ ALTER TABLE llx_propal ADD COLUMN import_key varchar(14) AFTER fk_demand_reason; ALTER TABLE llx_propal ADD COLUMN extraparams varchar(255) AFTER import_key; ALTER TABLE llx_commande ADD COLUMN extraparams varchar(255) AFTER import_key; ALTER TABLE llx_facture ADD COLUMN extraparams varchar(255) AFTER import_key; +ALTER TABLE llx_fichinter ADD COLUMN extraparams varchar(255) AFTER model_pdf; +ALTER TABLE llx_deplacement ADD COLUMN extraparams varchar(255) AFTER note_public; diff --git a/htdocs/install/mysql/tables/llx_deplacement.sql b/htdocs/install/mysql/tables/llx_deplacement.sql index 46f240e18d5..1e55c9a4a8f 100644 --- a/htdocs/install/mysql/tables/llx_deplacement.sql +++ b/htdocs/install/mysql/tables/llx_deplacement.sql @@ -1,6 +1,6 @@ -- ============================================================================ -- Copyright (C) 2003 Rodolphe Quiedeville --- Copyright (C) 2009-2011 Regis Houssin +-- Copyright (C) 2009-2012 Regis Houssin -- Copyright (C) 2010 Laurent Destailleur -- -- This program is free software; you can redistribute it and/or modify @@ -35,5 +35,7 @@ create table llx_deplacement fk_soc integer, fk_projet integer DEFAULT 0, note text, - note_public text + note_public text, + extraparams varchar(255) -- for stock other parameters with json format + )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_fichinter.sql b/htdocs/install/mysql/tables/llx_fichinter.sql index 049cb27bf7b..e5e1ed9be60 100644 --- a/htdocs/install/mysql/tables/llx_fichinter.sql +++ b/htdocs/install/mysql/tables/llx_fichinter.sql @@ -1,6 +1,6 @@ -- =================================================================== -- Copyright (C) 2001-2007 Rodolphe Quiedeville --- Copyright (C) 2005-2009 Regis Houssin +-- Copyright (C) 2005-2012 Regis Houssin -- -- 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 @@ -19,23 +19,24 @@ create table llx_fichinter ( - rowid integer AUTO_INCREMENT PRIMARY KEY, - fk_soc integer NOT NULL, - fk_projet integer DEFAULT 0, -- projet auquel est rattache la fiche - fk_contrat integer DEFAULT 0, -- contrat auquel est rattache la fiche - ref varchar(30) NOT NULL, -- number - entity integer DEFAULT 1 NOT NULL, -- multi company id - tms timestamp, - datec datetime, -- date de creation - date_valid datetime, -- date de validation - datei date, -- date de livraison du bon d'intervention - fk_user_author integer, -- createur de la fiche - fk_user_valid integer, -- valideur de la fiche - fk_statut smallint DEFAULT 0, - duree real, -- duree totale de l'intervention - description text, - note_private text, - note_public text, - model_pdf varchar(255) + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_soc integer NOT NULL, + fk_projet integer DEFAULT 0, -- projet auquel est rattache la fiche + fk_contrat integer DEFAULT 0, -- contrat auquel est rattache la fiche + ref varchar(30) NOT NULL, -- number + entity integer DEFAULT 1 NOT NULL, -- multi company id + tms timestamp, + datec datetime, -- date de creation + date_valid datetime, -- date de validation + datei date, -- date de livraison du bon d'intervention + fk_user_author integer, -- createur de la fiche + fk_user_valid integer, -- valideur de la fiche + fk_statut smallint DEFAULT 0, + duree real, -- duree totale de l'intervention + description text, + note_private text, + note_public text, + model_pdf varchar(255), + extraparams varchar(255) -- for stock other parameters with json format )ENGINE=innodb;
'.$langs->trans('Description').'