[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 148/162: New function findSide return D if nu
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 148/162: New function findSide return D if number is <0 |
Date: |
Sat, 11 Jul 2020 13:24:08 -0400 (EDT) |
sparkyx pushed a commit to annotated tag E-4
in repository noalyss.
commit 7b488dfd3964fbf6877b95d222fb6a4876093e03
Author: Dany De Bontridder <dany@alchimerys.be>
AuthorDate: 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] 141/162: Currency : the meaning is : 1 euro is worth xxx Currency , so we divide the amount with the currency rate to compute the EUR value, (continued)
- [Noalyss-commit] [noalyss] 141/162: Currency : the meaning is : 1 euro is worth xxx Currency , so we divide the amount with the currency rate to compute the EUR value, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 143/162: Currency : detail operation Purchase , the amount in currency were wrong in the summary, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 132/162: Translation, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 138/162: Currency : Precision 6, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 142/162: Currency : history for accounting , correct amount in currency, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 144/162: remove commented code, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 145/162: Currency : purchase, save all detail also in currency, fix problem with the advance payment, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 146/162: Currency : detail operation Sale , the amount in currency were wrong in the summary, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 139/162: Currency : precision 6, display default currency , protect used currency against delete, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 147/162: Task #1660 : place the button for the inventory on the top, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 148/162: New function findSide return D if number is <0,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 155/162: Protect parameters, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 156/162: PHP 7.2 incomptability : sizeof of not array, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 158/162: PHP 7.2 mistyped command, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 159/162: Currency Show currency info for MISC, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 151/162: Task #0001309: Association d'une opération avec elle-même., Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 153/162: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss into r700-currency, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 149/162: Fix problem with total in balance export, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 150/162: by default jrn is an empty array, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 152/162: Merge branch 'r700-currency' of gitlab.noalyss.eu:noalyss/noalyss into r700-currency, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 154/162: Currency : because of Misc Operation, the tiers must also be saved into operation_currency. Fix also PRINTJRN for currency, Dany De Bontridder, 2020/07/11