From e75c56b7366f50e4f0f07569c897e6a299ab87a8 Mon Sep 17 00:00:00 2001 From: engel <> Date: Sat, 8 Apr 2023 08:44:31 +0000 Subject: [PATCH] =?UTF-8?q?Correction=20erreur=20=C3=A9criture=20en=20doub?= =?UTF-8?q?le=20(http://localhost:8080/tktview/ae62f4cde5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FossilOrigin-Name: ada31d7d5a3cc60b40e4bada4afd0eab57ca48eb4bac4b4d5f34fda5f8feca6e --- lib/Utils.php | 21 +++++++++------------ www/admin/index.php | 2 +- www/admin/versements_activites.php | 5 ++++- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/Utils.php b/lib/Utils.php index fac6190..d9416f7 100644 --- a/lib/Utils.php +++ b/lib/Utils.php @@ -63,13 +63,12 @@ class Utils INNER JOIN acc_accounts ON acc_transactions_lines.id_account = acc_accounts.id WHERE - (strftime(%s, acc_transactions.date) = "%d" + (strftime("%%Y", acc_transactions.date) = "%d" AND acc_accounts.%s ) GROUP by acc_accounts.code ORDER by acc_accounts.code', - '"%Y"', $annee, $db->where('code', $op, $comptes) ); @@ -104,14 +103,13 @@ class Utils INNER JOIN acc_accounts ON acc_transactions_lines.id_account = acc_accounts.id WHERE - (strftime(%s, acc_transactions.date) = "%d" + (strftime("%%Y", acc_transactions.date) = "%d" AND acc_accounts.%s ) GROUP BY services_fees.id, acc_accounts.code ORDER BY acc_accounts.code ', - '"%Y"', $annee, $db->where('code', $op, $comptes) ); @@ -170,12 +168,12 @@ class Utils INNER JOIN acc_accounts ON acc_transactions_lines.id_account = acc_accounts.id WHERE - (strftime(%s, acc_transactions.date) = "%d" + (strftime("%%Y", acc_transactions.date) = "%d" AND acc_accounts.%s ) + GROUP BY acc_transactions.id, acc_accounts.id ORDER by %s, acc_accounts.code, acc_transactions.date', - '"%Y"', $annee, $db->where('code', $op, $comptes), $tri @@ -225,7 +223,8 @@ class Utils AND %s ) - ORDER by services_fees.id, %s, acc_accounts.code, acc_transactions.date', + GROUP BY acc_transactions.id, acc_accounts.id + ORDER by %s, acc_accounts.code, acc_transactions.date', $annee, $condition, $tri @@ -265,14 +264,13 @@ class Utils INNER JOIN acc_accounts ON acc_transactions_lines.id_account = acc_accounts.id WHERE - (strftime(%s, acc_transactions.date) = "%d" + (strftime("%%Y", acc_transactions.date) = "%d" AND acc_accounts.%s ) - + GROUP BY acc_transactions.id, acc_accounts.id ORDER by %s, acc_accounts.code, acc_transactions.date ', - '"%Y"', $annee, $db->where('id', 'in', $comptesIsoles), $tri @@ -308,7 +306,7 @@ class Utils INNER JOIN acc_transactions_lines ON acc_transactions_lines.id_transaction = acc_transactions.id WHERE ( - strftime(%s, acc_transactions.date) = "%d" + strftime("%%Y", acc_transactions.date) = "%d" AND acc_transactions_users.id_transaction = acc_transactions.id AND @@ -319,7 +317,6 @@ class Utils ', $tri, $nom, - '"%Y"', $annee ); $donateurs = array(); diff --git a/www/admin/index.php b/www/admin/index.php index 9125c0c..2b4fb14 100644 --- a/www/admin/index.php +++ b/www/admin/index.php @@ -37,7 +37,7 @@ if (null !== $champsNom) // pendant l'année fiscale choisie $_SESSION['comptes'] = Utils::getComptes($_SESSION['annee_recu'], 'like', '7%'); -// liste des activités, cotisations et comptes associés +// liste des activités, tarifs et comptes associés $activitesTarifsComptes = Utils::getTarifsComptes($_SESSION['annee_recu'], 'like', '7%'); $_SESSION['lesTarifs'] = Utils::getTarifs(); $_SESSION['lesActivites'] = Utils::getActivites(); diff --git a/www/admin/versements_activites.php b/www/admin/versements_activites.php index 20aae12..7ffc9ec 100644 --- a/www/admin/versements_activites.php +++ b/www/admin/versements_activites.php @@ -63,12 +63,15 @@ $lesComptes = array_map(fn($elem) : string => $tarifsSelectionnes); # versements des tarifs sélectionnées et de leur compte associé -$_SESSION['lesVersements'] = +if (count($lesTarifs) != 0) +{ + $_SESSION['lesVersements'] = Utils::getVersementsTarifsComptes( $_SESSION['annee_recu'], $lesTarifs, $lesComptes, $champsNom); +} // ajouter les versements sans tarif (tri par nom, compte, date) if (isset($_SESSION['comptesSelectionnes']))