[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 05/13: Task #0002327 Warning if saldo incorre
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 05/13: Task #0002327 Warning if saldo incorrect |
Date: |
Sun, 28 Jan 2024 09:05:26 -0500 (EST) |
sparkyx pushed a commit to branch devel
in repository noalyss.
commit 2f0334d9a40e637afa6e46ea7516e5f73b4647d2
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sat Jan 27 16:23:57 2024 +0100
Task #0002327 Warning if saldo incorrect
---
include/class/acc_account_ledger.class.php | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/include/class/acc_account_ledger.class.php
b/include/class/acc_account_ledger.class.php
index d4f20e663..61d33887e 100644
--- a/include/class/acc_account_ledger.class.php
+++ b/include/class/acc_account_ledger.class.php
@@ -304,6 +304,18 @@ class Acc_Account_Ledger
}
return $this->name;
}
+ /*!
+ * \brief Return the type of a account
+ * \returns string ACT,ACTINV,CHA,CHAINV,CON,PAS,PRO
+ */
+ function get_type()
+ {
+ $type=$this->db->get_value(
+ "select pcm_type from tmp_pcmn where
+ pcm_val=$1",array($this->id));
+ return $type;
+ }
+
/*!\brief check if the poste exist in the tmp_pcmn
*\return the number of line (normally 1 or 0)
*/
@@ -446,6 +458,20 @@ class Acc_Account_Ledger
$rep="";
+ $type =$this->get_type();
+ // label warning if the saldo is incorrect
+ $label="";
+ if (in_array($type,array('CHA','ACT','PASINV','PROINV')) &&
$tot_deb<$tot_cred)
+ {
+
+ $label.=_("Solde créditeur au lieu de débiteur").'<span
class="icon"></span>';
+ }
+ if (in_array($type,array('PRO','PAS','ACTINV','CHAINV')) &&
$tot_deb>$tot_cred)
+ {
+
+ $label.=_("Solde débiteur au lieu de créditeur")." ".'<span
class="icon"></span>';
+ }
+ echo '<span class="notice">'.$label.'</span>';
if ( $from_div == 1)
echo "<TABLE id=\"tbpopup\" class=\"resultfooter\"
style=\"border-collapse:separate;margin:1%;width:98%;\">";
@@ -570,6 +596,8 @@ class Acc_Account_Ledger
echo '</tbody>';
echo "</table>";
+ if ( DEBUGNOALYSS>1) echo \Noalyss\Dbg::hidden_info("variable",
get_defined_vars());
+ if ( DEBUGNOALYSS>1) echo \Noalyss\Dbg::hidden_info("this", $this);
return;
}
- [Noalyss-commit] [noalyss] branch devel updated (f8baa9b30 -> 5c6b3ccdb), dwm, 2024/01/28
- [Noalyss-commit] [noalyss] 04/13: remove access global var Cosmetic disconnect, dwm, 2024/01/28
- [Noalyss-commit] [noalyss] 09/13: Task #2326: Suivi : possibilité de charger plusieurs documents, dwm, 2024/01/28
- [Noalyss-commit] [noalyss] 10/13: Correct merge, dwm, 2024/01/28
- [Noalyss-commit] [noalyss] 05/13: Task #0002327 Warning if saldo incorrect,
dwm <=
- [Noalyss-commit] [noalyss] 01/13: Cosmetic : follow-up comment, dwm, 2024/01/28
- [Noalyss-commit] [noalyss] 02/13: Reconnect if session expired, dwm, 2024/01/28
- [Noalyss-commit] [noalyss] 03/13: Bug : MY_REPORT was not respected, dwm, 2024/01/28
- [Noalyss-commit] [noalyss] 11/13: Task #2332 : cosmetique cache liste fichiers, dwm, 2024/01/28
- [Noalyss-commit] [noalyss] 12/13: Upgrade.sql devenu upgrade192.sql, dwm, 2024/01/28
- [Noalyss-commit] [noalyss] 07/13: Correct CSS, dwm, 2024/01/28
- [Noalyss-commit] [noalyss] 13/13: Task #2332 : cosmetique cache liste fichiers, dwm, 2024/01/28
- [Noalyss-commit] [noalyss] 06/13: Task #2332: Suivi : ajout fichier lié aux commentaires, dwm, 2024/01/28
- [Noalyss-commit] [noalyss] 08/13: Improve tools debug, dwm, 2024/01/28