From 45b7a911d852f00f6888a45c46e91a422d0a1352 Mon Sep 17 00:00:00 2001 From: Thibault Fiacre <57494317+atm-thibaultf@users.noreply.github.com> Date: Wed, 22 Mar 2023 08:14:58 +0100 Subject: [PATCH 1/2] FIX invoices order on sells journal On sells journal, invoices are ordered by date (datef) but when several invoices have the same date, sometimes they are not ordered by reference. --- htdocs/accountancy/journal/sellsjournal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 84d4b616ec3..e33a13dad48 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -147,7 +147,7 @@ if ($in_bookkeeping == 'notyet') { $sql .= " AND f.rowid NOT IN (SELECT fk_doc FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as ab WHERE ab.doc_type='customer_invoice')"; // $sql .= " AND fd.rowid NOT IN (SELECT fk_docdet FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='customer_invoice')"; // Useless, we save one line for all products with same account } -$sql .= " ORDER BY f.datef"; +$sql .= " ORDER BY f.datef, f.ref"; //print $sql; exit; dol_syslog('accountancy/journal/sellsjournal.php', LOG_DEBUG); From 6a878d9c13f31852317d6fd7be024d048fff26d8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Mar 2023 19:33:51 +0100 Subject: [PATCH 2/2] Fix php warning --- build/generate_filelist_xml.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index 0d9ced5756e..1e36225ee57 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -54,9 +54,12 @@ if (empty($argv[1])) { parse_str($argv[1]); $i=0; +$result = array(); while ($i < $argc) { - if (! empty($argv[$i])) parse_str($argv[$i]); - if (preg_match('/includeconstant=/', $argv[$i])) { + if (!empty($argv[$i])) { + parse_str($argv[$i], $result); // set all params $release, $includecustom, $includeconstant, $buildzip ... + } + if (preg_match('/includeconstant=/', $argv[$i])) { $tmp=explode(':', $includeconstant, 3); // $includeconstant has been set with previous parse_str() if (count($tmp) != 3) { print "Error: Bad parameter includeconstant=".$includeconstant."\n";