[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 05/11: New function findSide return D if numb
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 05/11: New function findSide return D if number is <0 |
Date: |
Fri, 18 Jan 2019 12:24:26 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 6ee78a2a4d41dc1e3b9f9ac68bf97b824841b869
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] branch master updated (0de24ee -> 1971f32), Dany De Bontridder, 2019/01/18
- [Noalyss-commit] [noalyss] 02/11: remove dead code, Dany De Bontridder, 2019/01/18
- [Noalyss-commit] [noalyss] 03/11: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss, Dany De Bontridder, 2019/01/18
- [Noalyss-commit] [noalyss] 04/11: Task #1660 : place the button for the inventory on the top, Dany De Bontridder, 2019/01/18
- [Noalyss-commit] [noalyss] 01/11: For 7.2 , $p_value must be initialized to an array in ISelect, Dany De Bontridder, 2019/01/18
- [Noalyss-commit] [noalyss] 11/11: Translation, Dany De Bontridder, 2019/01/18
- [Noalyss-commit] [noalyss] 07/11: by default jrn is an empty array, Dany De Bontridder, 2019/01/18
- [Noalyss-commit] [noalyss] 10/11: Translation, Dany De Bontridder, 2019/01/18
- [Noalyss-commit] [noalyss] 05/11: New function findSide return D if number is <0,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 06/11: Fix problem with total in balance export, Dany De Bontridder, 2019/01/18
- [Noalyss-commit] [noalyss] 09/11: Translation + use of httpInput, Dany De Bontridder, 2019/01/18
- [Noalyss-commit] [noalyss] 08/11: Task #0001309: Association d'une opération avec elle-même., Dany De Bontridder, 2019/01/18