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";