noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 09/27: fixup! fixup! New Task 1728: Aide à l


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 09/27: fixup! fixup! New Task 1728: Aide à l'encodage - Journaux négatifs (note de crédit)
Date: Wed, 4 Sep 2019 15:24:53 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 98c3a84b161b539ba0aba004c731caf5533eb92b
Author: Dany De Bontridder <address@hidden>
Date:   Thu Aug 29 00:04:42 2019 +0200

    fixup! fixup! New Task 1728: Aide à l'encodage - Journaux négatifs (note de 
crédit)
---
 include/class/acc_ledger.class.php | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/class/acc_ledger.class.php 
b/include/class/acc_ledger.class.php
index 165f792..bf72b57 100644
--- a/include/class/acc_ledger.class.php
+++ b/include/class/acc_ledger.class.php
@@ -2357,10 +2357,12 @@ class Acc_Ledger extends jrn_def_sql
             {
                 throw new Exception(_('Choix du type de journal est 
obligatoire'));
             }
-            if ($negative_amount == 1 && trim($negative_warning)=="") {
+             if (isset( $negative_warning) && $negative_amount == 1 && 
trim($negative_warning)=="") {
+
                 throw new Exception(_("Avertissement ne peut être vide"));
             }
-            if ( $negative_amount <> 0 && $negative_amount <> 1 ){
+           if ( isset( $negative_amount)  && $negative_amount <> 0 && 
$negative_amount <> 1 ){
+
                   throw new Exception(_("Valeur invalide"));
             }
         }
@@ -2391,8 +2393,8 @@ class Acc_Ledger extends jrn_def_sql
         $this->jrn_deb_max_line=($min_row<1)?1:$min_row;
         $this->jrn_def_description=$p_description;
         $this->jrn_enable=$jrn_enable;
-        $this->jrn_def_negative_amount=$negative_amount;
-        $this->jrn_def_negative_warning=$negative_warning;
+        
$this->jrn_def_negative_amount=(isset($negative_amount))?$negative_amount:'0';
+        $this->jrn_def_negative_warning=(isset 
($negative_warning))?$negative_warning:_("Attention, ce journal doit utiliser 
des montants négatifs");
         
         switch ($this->jrn_def_type)
         {



reply via email to

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