From 6b463d9ffa5cd63fd7f52622cdcdbe8f5014a395 Mon Sep 17 00:00:00 2001
From: sparkyx
Date: Sun, 2 Feb 2025 14:49:56 +0100
Subject: [PATCH] Balance :Show type of accounting
---
html/css/style-classic7.css | 22 ++++++++++++++--------
include/balance.inc.php | 12 ++++++++++++
include/class/acc_balance.class.php | 1 +
3 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/html/css/style-classic7.css b/html/css/style-classic7.css
index 72df0db79..59f2f1ab4 100644
--- a/html/css/style-classic7.css
+++ b/html/css/style-classic7.css
@@ -3847,6 +3847,7 @@ h2.h-section {
.nav-level3 .nav-link.active::after {
background-color:yellow;
}
+
/***
* Animate menu
*
@@ -3901,18 +3902,23 @@ h2.h-section {
* Info after UpgradeCore
*/
#info_admin {
- font-size:140%;
+ font-size: 140%;
text-align: center;
background-color: red;
- display:block;
- position:fixed;
- top:15rem;
- left:15%;
+ display: block;
+ position: fixed;
+ top: 15rem;
+ left: 15%;
width: 70%;
- padding:2.5em;
- border-radius:0.5em;
- scale:1.1;
+ padding: 2.5em;
+ border-radius: 0.5em;
+ scale: 1.1;
color: ghostwhite;
opacity: 0.9;
+ }
+ .text-70 {
+ font-size:70% !important;
+ vertical-align: super;
+
}
\ No newline at end of file
diff --git a/include/balance.inc.php b/include/balance.inc.php
index e8e17307c..fde6ca91f 100644
--- a/include/balance.inc.php
+++ b/include/balance.inc.php
@@ -190,6 +190,14 @@ echo '
';
echo '';
echo _("Avec la balance de l'année précédente")." ".$previous_exc->input();
echo '
';
+echo '';
+echo _('Indiquer le type de poste');
+echo '',_("actif, passif,charge,..."),'';
+// var $type_account int value 0 => no shown, 1=> show it
+$type_account=new ICheckBox('type_account',1);
+if ($http->request('type_account','string',0)==1) $type_account->selected=true;
+echo $type_account->input();
+echo '
';
echo '';
?>
@@ -311,6 +319,7 @@ if ( isset($_GET['view'] ) )
$previous=(isset($_GET['previous_exc']))?1:0;
$from_periode=$http->get("from_periode","number");
$to_periode=$http->get("to_periode","number");
+ // var $row array from Acc_Balance->get_row
$row=$bal->get_row($from_periode,$to_periode,$previous);
$previous= (isset ($row[0]['sum_cred_previous']))?1:0;
@@ -439,6 +448,9 @@ if ( isset($_GET['view'] ) )
echo td($view_history);
// label + warning if the saldo is incorrect
$label=$r['label'];
+ if ( $type_account->selected ) {
+ $label .= sprintf("(%s)",$r['type']);
+ }
if (isset ($r['type']) && in_array($r['type'],array('CHA','ACT','PASINV','PROINV')) && $r['sum_deb']<$r['sum_cred'])
{
diff --git a/include/class/acc_balance.class.php b/include/class/acc_balance.class.php
index ade248830..071f48398 100644
--- a/include/class/acc_balance.class.php
+++ b/include/class/acc_balance.class.php
@@ -52,6 +52,7 @@ class Acc_Balance
* array of
* - $a['poste']
* - $a['label']
+ * - $a['type'] string pcm_type actif, passif...
* - $a['sum_deb']
* - $a['sum_cred']
* - $a['solde_deb']