';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
// Status
if (!empty($arrayfields['f.fk_statut']['checked'])) {
print '
';
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();
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 '