noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 20/29: Bug fix : sent emails not counted prop


From: dwm
Subject: [Noalyss-commit] [noalyss] 20/29: Bug fix : sent emails not counted properly
Date: Sat, 6 Jan 2024 05:59:15 -0500 (EST)

sparkyx pushed a commit to branch devel
in repository noalyss.

commit fe6b45c42bce0ddd2c912b375df943a477c0ce2d
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sun Dec 24 11:57:13 2023 +0100

    Bug fix : sent emails not counted properly
---
 include/class/acc_ledger.class.php | 2 +-
 include/class/sendmail.class.php   | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/class/acc_ledger.class.php 
b/include/class/acc_ledger.class.php
index 267b5f79b..01f1b7c3c 100644
--- a/include/class/acc_ledger.class.php
+++ b/include/class/acc_ledger.class.php
@@ -1943,7 +1943,7 @@ class Acc_Ledger  extends jrn_def_sql
             $empl->get_by_qcode($e_mp_qcode);
             if ($empl->empty_attribute(ATTR_DEF_ACCOUNT)==true)
             {
-                throw new Exception(_("Celui qui paie n' a pas de poste 
comptable"),
+                throw new Exception(_("Le moyen de paiement choisi n'a pas de 
poste comptable"),
                 20);
             }
             /* get the account and explode if necessary */
diff --git a/include/class/sendmail.class.php b/include/class/sendmail.class.php
index f06248651..d8cc8567d 100644
--- a/include/class/sendmail.class.php
+++ b/include/class/sendmail.class.php
@@ -109,6 +109,7 @@ class Sendmail extends  Sendmail_Core
 
         $email_sent = $p_repo->get_value ('select de_sent_email from 
dossier_sent_email where dos_id = $1 and de_date=$2',
             array($p_dossier_id,$p_date));
+        if ($email_sent == "") return 0;
         return $email_sent;
 
 
@@ -123,7 +124,7 @@ class Sendmail extends  Sendmail_Core
     {
         if ( $p_dossier == -1) return ;
         $email_sent = $this->get_email_sent($p_repo,$p_dossier,$p_date);
-        if (  $email_sent == 0 ){
+        if (  empty($email_sent) ){
             $p_repo->exec_sql("insert into 
public.dossier_sent_email(de_sent_email,dos_id,de_date) values($1,$2,$3)",
                 array(1,$p_dossier,$p_date));
             return;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]