From 0f297eea96b0b03c963cdffd3da29ca8885d9901 Mon Sep 17 00:00:00 2001 From: HeilDenDus Date: Fri, 14 Nov 2025 15:36:22 +0100 Subject: [PATCH 1/2] add show and filter in fields public and private notes (#36255) --- htdocs/compta/facture/list.php | 11 +++++++ htdocs/fourn/commande/list.php | 14 ++++++-- htdocs/fourn/facture/list.php | 50 +++++++++++++++++++++++++++++ htdocs/reception/list.php | 53 ++++++++++++++++++++++++++++++- htdocs/supplier_proposal/list.php | 48 ++++++++++++++++++++++++++++ 5 files changed, 173 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index ebc30530a06..00bd396e9ac 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -152,6 +152,8 @@ $search_date_valid_endmonth = GETPOSTINT('search_date_valid_endmonth'); $search_date_valid_endyear = GETPOSTINT('search_date_valid_endyear'); $search_date_valid_start = GETPOSTDATE('search_date_valid_start', 'getpost'); $search_date_valid_end = GETPOSTDATE('search_date_valid_end', 'getpostend'); +$search_note_private = GETPOST('search_note_private', 'alpha'); +$search_note_public = GETPOST('search_note_public', 'alpha'); $search_datelimit_startday = GETPOSTINT('search_datelimit_startday'); $search_datelimit_startmonth = GETPOSTINT('search_datelimit_startmonth'); @@ -162,6 +164,7 @@ $search_datelimit_endyear = GETPOSTINT('search_datelimit_endyear'); $search_datelimit_start = GETPOSTDATE('search_datelimit_start', 'getpost'); // Use tzserver because date invoice is a date without hour $search_datelimit_end = GETPOSTDATE('search_datelimit_end', 'getpostend'); + $search_datec_start = GETPOSTDATE('search_datec_start', 'getpost', 'tzuserrel'); $search_datec_end = GETPOSTDATE('search_datec_end', 'getpostend', 'tzuserrel'); $search_datem_start = GETPOSTDATE('search_datem_start', 'getpost', 'tzuserrel'); @@ -993,6 +996,12 @@ if ($search_datelimit_start) { if ($search_datelimit_end) { $sql .= " AND f.date_lim_reglement <= '".$db->idate($search_datelimit_end)."'"; } +if ($search_note_public) { + $sql .= " AND p.note_public LIKE '%".$db->escape($db->escapeforlike($search_note_public))."%'"; +} +if ($search_note_private) { + $sql .= " AND p.note_private LIKE '%".$db->escape($db->escapeforlike($search_note_private))."%'"; +} if ($search_datec_start) { $sql .= " AND f.datec >= '".$db->idate($search_datec_start)."'"; } @@ -1905,11 +1914,13 @@ if (!empty($arrayfields['f.date_closing']['checked'])) { if (!empty($arrayfields['f.note_public']['checked'])) { // Note public print ''; + print ''; print ''; } if (!empty($arrayfields['f.note_private']['checked'])) { // Note private print ''; + print ''; print ''; } if (!empty($arrayfields['f.fk_fac_rec_source']['checked'])) { diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 3dec150bfd6..471285f7c63 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -137,6 +137,8 @@ $search_total_tva = GETPOST('search_total_tva', 'alpha'); $search_total_ttc = GETPOST('search_total_ttc', 'alpha'); $search_multicurrency_code = GETPOST('search_multicurrency_code', 'alpha'); $search_multicurrency_tx = GETPOST('search_multicurrency_tx', 'alpha'); +$search_note_private = GETPOST('search_note_private', 'alpha'); +$search_note_public = GETPOST('search_note_public', 'alpha'); $search_multicurrency_montant_ht = GETPOST('search_multicurrency_montant_ht', 'alpha'); $search_multicurrency_montant_tva = GETPOST('search_multicurrency_montant_tva', 'alpha'); $search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc', 'alpha'); @@ -926,6 +928,12 @@ if ($search_date_delivery_end) { if ($search_date_valid_start) { $sql .= " AND cf.date_valid >= '".$db->idate($search_date_valid_start)."'"; } +if ($search_note_public) { + $sql .= " AND cf.note_public LIKE '%".$db->escape($db->escapeforlike($search_note_public))."%'"; +} +if ($search_date_approve_start) { + $sql .= " AND cf.date_livraison >= '".$db->idate($search_date_approve_start)."'"; +} if ($search_date_valid_end) { $sql .= " AND cf.date_valid <= '".$db->idate($search_date_valid_end)."'"; } @@ -1623,14 +1631,16 @@ if ($resql) { print ''; print ''; } - // Note public if (!empty($arrayfields['cf.note_public']['checked'])) { + // Note public print ''; + print ''; print ''; } - // Note private if (!empty($arrayfields['cf.note_private']['checked'])) { + // Note private print ''; + print ''; print ''; } // Action column diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 807979721e6..adb6ddff8f0 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -100,6 +100,8 @@ $search_vat_reverse_charge = GETPOST('search_vat_reverse_charge', 'alpha'); $search_town = GETPOST('search_town', 'alpha'); $search_zip = GETPOST('search_zip', 'alpha'); $search_state = GETPOST("search_state"); +$search_note_private = GETPOST('search_note_private', 'alpha'); +$search_note_public = GETPOST('search_note_public', 'alpha'); $search_country = GETPOST("search_country", 'aZ09'); $search_type_thirdparty = GETPOST("search_type_thirdparty", 'intcomma'); $search_user = GETPOST('search_user', 'intcomma'); @@ -223,6 +225,8 @@ $arrayfields = array( 'f.datec' => array('label' => "DateCreation", 'checked' => '0', 'position' => 501), 'f.tms' => array('label' => "DateModificationShort", 'checked' => '0', 'position' => 502), 'f.nb_docs' => array('label' => "Documents", 'checked' => '-1', 'position' => 510), + 'f.note_public' => array('label' => 'NotePublic', 'checked' => '0', 'position' => 520, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))), + 'f.note_private' => array('label' => 'NotePrivate', 'checked' => '0', 'position' => 521, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))), 'f.fk_statut' => array('label' => "Status", 'checked' => '1', 'position' => 1000), ); // Extra fields @@ -323,6 +327,8 @@ if (empty($reshook)) { $search_datelimit_endyear = ''; $search_datelimit_start = ''; $search_datelimit_end = ''; + $search_note_private = ''; + $search_note_public = ''; $toselect = array(); $search_array_options = array(); $search_categ_sup = 0; @@ -691,6 +697,12 @@ if ($search_date_start) { if ($search_date_end) { $sql .= " AND f.datef <= '" . $db->idate($search_date_end) . "'"; } +if ($search_note_public) { + $sql .= " AND f.note_public LIKE '%".$db->escape($db->escapeforlike($search_note_public))."%'"; +} +if ($search_note_private) { + $sql .= " AND f.note_private LIKE '%".$db->escape($db->escapeforlike($search_note_private))."%'"; +} if ($search_datelimit_start) { $sql .= " AND f.date_lim_reglement >= '" . $db->idate($search_datelimit_start) . "'"; } @@ -1416,6 +1428,18 @@ if (!empty($arrayfields['f.tms']['checked'])) { print ''; print ''; } +if (!empty($arrayfields['f.note_public']['checked'])) { + // Note public + print ''; + print ''; + print ''; +} +if (!empty($arrayfields['f.note_private']['checked'])) { + // Note private + print ''; + print ''; + print ''; +} // Status if (!empty($arrayfields['f.fk_statut']['checked'])) { print ''; @@ -1599,6 +1623,14 @@ if (!empty($arrayfields['f.tms']['checked'])) { print_liste_field_titre($arrayfields['f.tms']['label'], $_SERVER["PHP_SELF"], "f.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); $totalarray['nbfield']++; } +if (!empty($arrayfields['f.note_public']['checked'])) { + print_liste_field_titre($arrayfields['f.note_public']['label'], $_SERVER["PHP_SELF"], "f.note_public", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + $totalarray['nbfield']++; +} +if (!empty($arrayfields['f.note_private']['checked'])) { + print_liste_field_titre($arrayfields['f.note_private']['label'], $_SERVER["PHP_SELF"], "f.note_private", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + $totalarray['nbfield']++; +} if (!empty($arrayfields['f.fk_statut']['checked'])) { print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "fk_statut,paye,type", "", $param, '', $sortfield, $sortorder, 'center '); $totalarray['nbfield']++; @@ -2144,6 +2176,24 @@ while ($i < $imaxinloop) { $totalarray['nbfield']++; } } + // Note public + if (!empty($arrayfields['f.note_public']['checked'])) { + print ''; + print '
'.dolPrintHTML(dolGetFirstLineOfText($obj->note_public, 5)).'
'; + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Note private + if (!empty($arrayfields['f.note_private']['checked'])) { + print ''; + print '
'.dolPrintHTML(dolGetFirstLineOfText($obj->note_private, 5)).'
'; + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } // Status if (!empty($arrayfields['f.fk_statut']['checked'])) { print ''; diff --git a/htdocs/reception/list.php b/htdocs/reception/list.php index c2863f63a48..04abf5f50f8 100644 --- a/htdocs/reception/list.php +++ b/htdocs/reception/list.php @@ -90,6 +90,8 @@ $search_date_create_end = dol_mktime(23, 59, 59, $search_date_create_endmonth, $ $search_billed = GETPOST("search_billed", 'intcomma'); $search_status = GETPOST('search_status', 'intcomma'); $search_all = GETPOST('search_all', 'alphanohtml'); +$search_note_private = GETPOST('search_note_private', 'alpha'); +$search_note_public = GETPOST('search_note_public', 'alpha'); $limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); @@ -144,6 +146,8 @@ $arrayfields = array( 'e.date_delivery' => array('label' => $langs->trans("DateDeliveryPlanned"), 'checked' => '1'), 'e.datec' => array('label' => $langs->trans("DateCreation"), 'checked' => '0', 'position' => 500), 'e.tms' => array('label' => $langs->trans("DateModificationShort"), 'checked' => '0', 'position' => 500), + 'e.note_public' => array('label' => 'NotePublic', 'checked' => '0', 'position' => 520, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))), + 'e.note_private' => array('label' => 'NotePrivate', 'checked' => '0', 'position' => 521, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))), 'e.fk_statut' => array('label' => $langs->trans("Status"), 'checked' => '1', 'position' => 1000), 'e.billed' => array('label' => $langs->trans("Billed"), 'checked' => '1', 'position' => 1000, 'enabled' => 'getDolGlobalString("WORKFLOW_BILL_ON_RECEPTION") !== "0"') ); @@ -633,7 +637,7 @@ $title = $langs->trans('Receptions'); $helpurl = 'EN:Module_Receptions|FR:Module_Receptions|ES:Módulo_Receptiones'; llxHeader('', $title, $helpurl, '', 0, 0, '', '', '', 'bodyforlist mod-reception page-list'); -$sql = "SELECT e.rowid, e.ref, e.ref_supplier, e.date_reception as date_reception, e.date_delivery as delivery_date, l.date_delivery as date_reception2, e.fk_statut as status, e.billed,"; +$sql = "SELECT e.rowid, e.ref, e.ref_supplier, e.date_reception as date_reception, e.date_delivery as delivery_date, l.date_delivery as date_reception2, e.fk_statut as status, e.billed,e.note_private, e.note_public,"; $sql .= " s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client,"; $sql .= " typent.code as typent_code,"; $sql .= " state.code_departement as state_code, state.nom as state_name,"; @@ -700,6 +704,13 @@ if ($search_date_delivery_end) { if ($search_date_create_start) { $sql .= " AND e.date_creation >= '".$db->idate($search_date_create_start)."'"; } + +if ($search_note_public) { + $sql .= " AND e.note_public LIKE '%".$db->escape($db->escapeforlike($search_note_public))."%'"; +} +if ($search_note_private) { + $sql .= " AND e.note_private LIKE '%".$db->escape($db->escapeforlike($search_note_private))."%'"; +} if ($search_date_create_end) { $sql .= " AND e.date_creation <= '".$db->idate($search_date_create_end)."'"; } @@ -1103,6 +1114,18 @@ if (!empty($arrayfields['e.tms']['checked'])) { print ''; print ''; } +if (!empty($arrayfields['e.note_public']['checked'])) { + // Note public + print ''; + print ''; + print ''; +} +if (!empty($arrayfields['e.note_private']['checked'])) { + // Note private + print ''; + print ''; + print ''; +} // Status if (!empty($arrayfields['e.fk_statut']['checked'])) { print ''; @@ -1194,6 +1217,14 @@ if (!empty($arrayfields['e.tms']['checked'])) { print_liste_field_titre($arrayfields['e.tms']['label'], $_SERVER["PHP_SELF"], "e.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); $totalarray['nbfield']++; } +if (!empty($arrayfields['e.note_public']['checked'])) { + print_liste_field_titre($arrayfields['e.note_public']['label'], $_SERVER["PHP_SELF"], "e.note_public", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + $totalarray['nbfield']++; +} +if (!empty($arrayfields['e.note_private']['checked'])) { + print_liste_field_titre($arrayfields['e.note_private']['label'], $_SERVER["PHP_SELF"], "e.note_private", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + $totalarray['nbfield']++; +} if (!empty($arrayfields['e.fk_statut']['checked'])) { print_liste_field_titre($arrayfields['e.fk_statut']['label'], $_SERVER["PHP_SELF"], "e.fk_statut", "", $param, '', $sortfield, $sortorder, 'right '); $totalarray['nbfield']++; @@ -1230,6 +1261,8 @@ while ($i < $imaxinloop) { $reception->status = $obj->status; $reception->socid = $obj->socid; $reception->billed = $obj->billed; + $reception->note_public = $obj->note_public; + $reception->note_private = $obj->note_private; $reception->fetch_thirdparty(); @@ -1420,6 +1453,24 @@ while ($i < $imaxinloop) { $totalarray['nbfield']++; } } + // Note public + if (!empty($arrayfields['f.note_public']['checked'])) { + print ''; + print '
'.dolPrintHTML(dolGetFirstLineOfText($obj->note_public, 5)).'
'; + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Note private + if (!empty($arrayfields['f.note_private']['checked'])) { + print ''; + print '
'.dolPrintHTML(dolGetFirstLineOfText($obj->note_private, 5)).'
'; + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } // Status if (!empty($arrayfields['e.fk_statut']['checked'])) { print ''.$reception->LibStatut($obj->status, 5).''; diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 15cd1e51ee1..6c6b8b4916b 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -106,6 +106,8 @@ $search_multicurrency_montant_vat = GETPOST('search_multicurrency_montant_vat', $search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc', 'alpha'); $search_project_ref = GETPOST('search_project_ref', 'alpha'); $search_status = GETPOST('search_status', 'intcomma'); +$search_note_private = GETPOST('search_note_private', 'alpha'); +$search_note_public = GETPOST('search_note_public', 'alpha'); $search_product_category = GETPOST('search_product_category', 'int'); $searchCategorySupplierPropalList = GETPOST('search_category_supplier_proposal_list', 'array:int'); $searchCategorySupplierPropalOperator = 0; @@ -211,6 +213,8 @@ $arrayfields = array( 'u.login' => array('label' => $langs->trans("Author"), 'checked' => '1', 'position' => 10), 'sp.datec' => array('label' => $langs->trans("DateCreation"), 'checked' => '0', 'position' => 500), 'sp.tms' => array('label' => $langs->trans("DateModificationShort"), 'checked' => '0', 'position' => 500), + 'sp.note_public' => array('label' => 'NotePublic', 'checked' => '0', 'position' => 520, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))), + 'sp.note_private' => array('label' => 'NotePrivate', 'checked' => '0', 'position' => 521, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))), 'sp.fk_statut' => array('label' => $langs->trans("Status"), 'checked' => '1', 'position' => 1000), ); // Extra fields @@ -452,6 +456,12 @@ if ($search_date_end) { if ($search_date_valid_start) { $sql .= " AND sp.date_valid >= '".$db->idate($search_date_valid_start)."'"; } +if ($search_note_public) { + $sql .= " AND p.note_public LIKE '%".$db->escape($db->escapeforlike($search_note_public))."%'"; +} +if ($search_note_private) { + $sql .= " AND p.note_private LIKE '%".$db->escape($db->escapeforlike($search_note_private))."%'"; +} if ($search_date_valid_end) { $sql .= " AND sp.date_valid <= '".$db->idate($search_date_valid_end)."'"; } @@ -952,6 +962,18 @@ if ($resql) { print ''; print ''; } + if (!empty($arrayfields['sp.note_public']['checked'])) { + // Note public + print ''; + print ''; + print ''; + } + if (!empty($arrayfields['sp.note_private']['checked'])) { + // Note private + print ''; + print ''; + print ''; + } // Status if (!empty($arrayfields['sp.fk_statut']['checked'])) { print ''; @@ -1074,6 +1096,14 @@ if ($resql) { print_liste_field_titre($arrayfields['sp.tms']['label'], $_SERVER["PHP_SELF"], "sp.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap'); $totalarray['nbfield']++; } + if (!empty($arrayfields['sp.note_public']['checked'])) { + print_liste_field_titre($arrayfields['sp.note_public']['label'], $_SERVER["PHP_SELF"], "sp.note_public", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + $totalarray['nbfield']++; + } + if (!empty($arrayfields['sp.note_private']['checked'])) { + print_liste_field_titre($arrayfields['sp.note_private']['label'], $_SERVER["PHP_SELF"], "sp.note_private", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + $totalarray['nbfield']++; + } if (!empty($arrayfields['sp.fk_statut']['checked'])) { print_liste_field_titre($arrayfields['sp.fk_statut']['label'], $_SERVER["PHP_SELF"], "sp.fk_statut", "", $param, '', $sortfield, $sortorder, 'center '); $totalarray['nbfield']++; @@ -1398,6 +1428,24 @@ if ($resql) { $totalarray['nbfield']++; } } + // Note public + if (!empty($arrayfields['f.note_public']['checked'])) { + print ''; + print '
'.dolPrintHTML(dolGetFirstLineOfText($obj->note_public, 5)).'
'; + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Note private + if (!empty($arrayfields['f.note_private']['checked'])) { + print ''; + print '
'.dolPrintHTML(dolGetFirstLineOfText($obj->note_private, 5)).'
'; + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } // Status if (!empty($arrayfields['sp.fk_statut']['checked'])) { print ''.$objectstatic->getLibStatut(5)."\n"; From 664b0acfb7cce1944009875f35630b4e6e5df480 Mon Sep 17 00:00:00 2001 From: Rudi Herouard Date: Fri, 14 Nov 2025 15:53:49 +0100 Subject: [PATCH 2/2] NEW Add SQL table for expensereport line extrafields support (#36251) --- .../install/mysql/migration/22.0.0-23.0.0.sql | 9 +++++++ .../llx_expensereport_det_extrafields.key.sql | 20 ++++++++++++++ .../llx_expensereport_det_extrafields.sql | 26 +++++++++++++++++++ htdocs/install/pgsql/functions/functions.sql | 1 + 4 files changed, 56 insertions(+) create mode 100644 htdocs/install/mysql/tables/llx_expensereport_det_extrafields.key.sql create mode 100644 htdocs/install/mysql/tables/llx_expensereport_det_extrafields.sql diff --git a/htdocs/install/mysql/migration/22.0.0-23.0.0.sql b/htdocs/install/mysql/migration/22.0.0-23.0.0.sql index 72bcb18fd09..a663ad81c0d 100644 --- a/htdocs/install/mysql/migration/22.0.0-23.0.0.sql +++ b/htdocs/install/mysql/migration/22.0.0-23.0.0.sql @@ -357,4 +357,13 @@ ALTER TABLE llx_ecm_files ADD COLUMN geolong double(24,8) DEFAULT NULL; ALTER TABLE llx_ecm_files ADD COLUMN geopoint point DEFAULT NULL; ALTER TABLE llx_ecm_files ADD COLUMN georesultcode varchar(16) NULL; +-- Add table for extrafields lines support on expensereport module +CREATE TABLE llx_expensereport_det_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_object integer NOT NULL, + import_key varchar(14) +) ENGINE=innodb; + -- end of migration diff --git a/htdocs/install/mysql/tables/llx_expensereport_det_extrafields.key.sql b/htdocs/install/mysql/tables/llx_expensereport_det_extrafields.key.sql new file mode 100644 index 00000000000..b36a1e68a40 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_expensereport_det_extrafields.key.sql @@ -0,0 +1,20 @@ +-- =================================================================== +-- Copyright (C) 2025 Rudi Herouard +-- +-- 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 +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- =================================================================== + + +ALTER TABLE llx_expensereport_det_extrafields ADD INDEX idx_expensereport_det_fk_object(fk_object); diff --git a/htdocs/install/mysql/tables/llx_expensereport_det_extrafields.sql b/htdocs/install/mysql/tables/llx_expensereport_det_extrafields.sql new file mode 100644 index 00000000000..1878cf9243c --- /dev/null +++ b/htdocs/install/mysql/tables/llx_expensereport_det_extrafields.sql @@ -0,0 +1,26 @@ +-- =================================================================== +-- Copyright (C) 2025 Rudi Herouard +-- +-- 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 +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- =================================================================== + + +CREATE TABLE llx_expensereport_det_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_object integer NOT NULL, + import_key varchar(14) +) ENGINE=innodb; diff --git a/htdocs/install/pgsql/functions/functions.sql b/htdocs/install/pgsql/functions/functions.sql index 34c4cb1fbf8..3bd648e0c1a 100644 --- a/htdocs/install/pgsql/functions/functions.sql +++ b/htdocs/install/pgsql/functions/functions.sql @@ -108,6 +108,7 @@ CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_entrepot_extrafields CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_events FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_expedition FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_expensereport FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); +CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_expensereport_det_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_facture FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_facture_rec FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();