[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 152/218: New function findSide return D if nu
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 152/218: New function findSide return D if number is <0 |
Date: |
Thu, 12 Sep 2019 15:58:58 -0400 (EDT) |
sparkyx pushed a commit to branch entreprise
in repository noalyss.
commit 7b488dfd3964fbf6877b95d222fb6a4876093e03
Author: Dany De Bontridder <address@hidden>
Date: Tue Jan 8 17:53:22 2019 +0100
New function findSide return D if number is <0
---
include/lib/ac_common.php | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/include/lib/ac_common.php b/include/lib/ac_common.php
index c57d20a..ca7d654 100644
--- a/include/lib/ac_common.php
+++ b/include/lib/ac_common.php
@@ -114,6 +114,22 @@ function nb($p_number)
}
/**
+ * return D if the number is smaller than 0 , C if bigger and an empty string
if
+ * equal to 0. Used for displaying saldo D / C (debit / credit )
+ * @param float $p_number
+ */
+function findSide($p_number)
+{
+ $return ='';
+ if ( $p_number > 0 ) {
+ $return ='D';
+ }else {
+ $return =($p_number== 0)?"":"C";
+ }
+ return $return;
+}
+
+/**
* format the number with a sep. for the thousand
* @param $p_number number
* @param $p_dec number of decimal to display
- [Noalyss-commit] [noalyss] 114/218: Currency : purchase oneline + extended html and csv, (continued)
- [Noalyss-commit] [noalyss] 114/218: Currency : purchase oneline + extended html and csv, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 125/218: Merge branch 'master' into r700-currency, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 128/218: Missing bracket, Dany De Bontridder, 2019/09/12
- [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 <=
- [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, 2019/09/12
- [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