[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 50/218: Protect function nb , return the stri
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 50/218: Protect function nb , return the string if the parameter is not a float |
Date: |
Thu, 12 Sep 2019 15:58:39 -0400 (EDT) |
sparkyx pushed a commit to branch entreprise
in repository noalyss.
commit 2051243c6541ce89244c62167e9fa64b83934743
Author: Dany De Bontridder <address@hidden>
Date: Fri Apr 20 19:25:25 2018 +0200
Protect function nb , return the string if the parameter is not a float
---
include/lib/noalyss_csv.class.php | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/lib/noalyss_csv.class.php
b/include/lib/noalyss_csv.class.php
index 11df760..4eefce8 100644
--- a/include/lib/noalyss_csv.class.php
+++ b/include/lib/noalyss_csv.class.php
@@ -170,7 +170,11 @@ class Noalyss_Csv
{
$p_number=trim($p_number);
if ($p_number=="") {return $p_number;}
- $r=number_format($p_number, 4, $this->sep_dec,'');
+ if ( isNumber($p_number) == 1 ) {
+ $r=number_format($p_number, 4, $this->sep_dec,'');
+ } else {
+ $r=$p_number;
+ }
return $r;
}
private function encode($str)
- [Noalyss-commit] [noalyss] 127/218: Merge commit '3f53de417dd89e9a90a386404f93f8648155e046' into r700-currency, (continued)
- [Noalyss-commit] [noalyss] 127/218: Merge commit '3f53de417dd89e9a90a386404f93f8648155e046' into r700-currency, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 132/218: Translation, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 133/218: Translation, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 134/218: use of httpInput, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 142/218: Currency : Precision 6, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 147/218: Currency : detail operation Purchase , the amount in currency were wrong in the summary, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 148/218: remove commented code, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 152/218: New function findSide return D if number is <0, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 93/218: translate, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 37/218: comment, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 50/218: Protect function nb , return the string if the parameter is not a float,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 52/218: Create invoice : New version of libreoffice use the numeric in another way, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 56/218: Fix todo_list : if list empty , gets an error in php 7.2, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 60/218: Security fix : f_id is a number, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 57/218: Security : direct injection, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 63/218: CFGLED : security fix : remove $_REQUEST, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 64/218: Merge master, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 72/218: Merge branch 'master' into r700-currency, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 83/218: adapt to 7.2 ,init, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 86/218: Currency : show the currency of the ledger when entering info, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 89/218: adapt to 7.2 ,array, Dany De Bontridder, 2019/09/12