From ec8be45fa3e60bd0a40761b15f2309c896e73a5c Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 22 Jun 2007 15:13:02 +0000 Subject: [PATCH] Add: ajout de la table fk_contrat afin de pouvoir lier une fiche d'intervention avec un contrat de maintenance par exemple --- htdocs/fichinter/fiche.php | 2 +- mysql/migration/2.1.0-2.2.0.sql | 3 ++- mysql/tables/llx_fichinter.key.sql | 2 +- mysql/tables/llx_fichinter.sql | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index b44656c8471..3df477831d0 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -348,7 +348,7 @@ elseif ($_GET["id"] > 0) print "".$langs->trans("Company")."".$fichinter->client->getNomUrl(1).""; // Date - print ''.$langs->trans("Date").''.dolibarr_print_date($fichinter->date,"day").''; + print ''.$langs->trans("Date").''.dolibarr_print_date($fichinter->date,"daytext").''; // Durée print ''.$langs->trans("Duration").''.$fichinter->duree.''; diff --git a/mysql/migration/2.1.0-2.2.0.sql b/mysql/migration/2.1.0-2.2.0.sql index 761a8c3b70d..a625e78da5f 100644 --- a/mysql/migration/2.1.0-2.2.0.sql +++ b/mysql/migration/2.1.0-2.2.0.sql @@ -685,4 +685,5 @@ insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) v 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_private; -ALTER TABLE llx_fichinter ADD COLUMN tms timestamp after ref; \ No newline at end of file +ALTER TABLE llx_fichinter ADD COLUMN tms timestamp after ref; +ALTER TABLE llx_fichinter ADD COLUMN fk_contrat integer DEFAULT 0 after fk_projet; \ No newline at end of file diff --git a/mysql/tables/llx_fichinter.key.sql b/mysql/tables/llx_fichinter.key.sql index 26ba1623dfa..9078f905204 100644 --- a/mysql/tables/llx_fichinter.key.sql +++ b/mysql/tables/llx_fichinter.key.sql @@ -22,4 +22,4 @@ ALTER TABLE llx_fichinter ADD INDEX idx_fichinter_fk_soc (fk_soc); -ALTER TABLE llx_fichinter ADD CONSTRAINT fk_fichinter_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid); +ALTER TABLE llx_fichinter ADD CONSTRAINT fk_fichinter_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid); diff --git a/mysql/tables/llx_fichinter.sql b/mysql/tables/llx_fichinter.sql index 57448599890..0eee0221075 100644 --- a/mysql/tables/llx_fichinter.sql +++ b/mysql/tables/llx_fichinter.sql @@ -25,6 +25,7 @@ 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 tms timestamp, datec datetime, -- date de creation