From bcb4919aa8819ba4f9d33ef204e795b8252e0d86 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 17 Nov 2022 17:40:14 +0530 Subject: [PATCH 1/4] BUG FIXED #22883 --- htdocs/compta/resultat/clientfourn.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index f4babff9572..1aefd6cf71a 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -301,7 +301,7 @@ if ($modecompta == 'BOOKKEEPING') { if (!empty($date_start) && !empty($date_end)) { $sql .= " AND f.doc_date >= '".$db->idate($date_start)."' AND f.doc_date <= '".$db->idate($date_end)."'"; } - $sql .= " GROUP BY pcg_type DESC"; + $sql .= " GROUP BY pcg_type ORDER BY pcg_type DESC"; if ($showaccountdetail == 'no') { $sql .= ", name, socid"; // group by "accounting group" (INCOME/EXPENSE), then "customer". } From 435b82bbc8d8a4700fd662335bbad559a7d964a0 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 18 Nov 2022 19:03:39 +0530 Subject: [PATCH 2/4] #22883 --- htdocs/compta/resultat/clientfourn.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 1aefd6cf71a..57d3afe5552 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -301,7 +301,7 @@ if ($modecompta == 'BOOKKEEPING') { if (!empty($date_start) && !empty($date_end)) { $sql .= " AND f.doc_date >= '".$db->idate($date_start)."' AND f.doc_date <= '".$db->idate($date_end)."'"; } - $sql .= " GROUP BY pcg_type ORDER BY pcg_type DESC"; + $sql .= " GROUP BY pcg_type"; if ($showaccountdetail == 'no') { $sql .= ", name, socid"; // group by "accounting group" (INCOME/EXPENSE), then "customer". } From b77f63bc5c2172d2984c924a663f08d57b925de2 Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Wed, 23 Nov 2022 11:24:29 +0100 Subject: [PATCH 3/4] FIX : $sign is useless --- htdocs/compta/facture/tpl/linkedobjectblock.tpl.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php index c70416fec6e..92204520b35 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php @@ -72,13 +72,9 @@ foreach ($linkedObjectBlock as $key => $objectlink) { print ''.dol_print_date($objectlink->date, 'day').''; print ''; if (!empty($objectlink) && $objectlink->element == 'facture' && $user->hasRight('facture', 'lire')) { - $sign = 1; - if ($objectlink->type == Facture::TYPE_CREDIT_NOTE) { - $sign = -1; - } if ($objectlink->statut != 3) { // If not abandonned - $total = $total + $sign * $objectlink->total_ht; + $total += $objectlink->total_ht; echo price($objectlink->total_ht); } else { echo ''.price($objectlink->total_ht).''; From 1a8dbd75ead26306fb97f87c2be8f55d7986b953 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 23 Nov 2022 16:59:40 +0100 Subject: [PATCH 4/4] Fix update socialnetworks --- htdocs/adherents/class/adherent.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 8a313ea4496..ae8b04da46b 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -704,7 +704,7 @@ class Adherent extends CommonObject $sql .= ", state_id = ".($this->state_id > 0 ? $this->db->escape($this->state_id) : "null"); $sql .= ", email = '".$this->db->escape($this->email)."'"; $sql .= ", url = ".(!empty($this->url) ? "'".$this->db->escape($this->url)."'" : "null"); - $sql .= ", socialnetworks = '".$this->db->escape(json_encode($this->socialnetworks))."'"; + $sql .= ", socialnetworks = ".($this->socialnetworks ? "'".$this->db->escape(json_encode($this->socialnetworks))."'" : "null"); $sql .= ", phone = ".($this->phone ? "'".$this->db->escape($this->phone)."'" : "null"); $sql .= ", phone_perso = ".($this->phone_perso ? "'".$this->db->escape($this->phone_perso)."'" : "null"); $sql .= ", phone_mobile = ".($this->phone_mobile ? "'".$this->db->escape($this->phone_mobile)."'" : "null");