[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 08/08: task #1042 Amélioration visuelle de l
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 08/08: task #1042 Amélioration visuelle de la vérification Ajout d'un test pour les fiches utilisant 2 postes comptables différents dans l'année Task #1042 - Amélioration VERIFBIL |
Date: |
Fri, 07 Nov 2014 12:02:00 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 3b4da3f5d2459bfda09a348383bdcf77cdf8b130
Author: Dany De Bontridder <address@hidden>
Date: Fri Nov 7 12:58:59 2014 +0100
task #1042 Amélioration visuelle de la vérification
Ajout d'un test pour les fiches utilisant 2 postes comptables différents
dans l'année
Task #1042 - Amélioration VERIFBIL
---
include/verif_bilan.inc.php | 115 +++++++++++++++++++++++++------------------
1 files changed, 67 insertions(+), 48 deletions(-)
diff --git a/include/verif_bilan.inc.php b/include/verif_bilan.inc.php
index d613775..f45a6cf 100644
--- a/include/verif_bilan.inc.php
+++ b/include/verif_bilan.inc.php
@@ -23,29 +23,32 @@
* \brief Verify the saldo of ledger: independant file
*/
if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
+
require_once ('class_user.php');
require_once('class_acc_bilan.php');
+global $g_captcha,$g_failed,$g_succeed;
+
$cn=new Database(dossier::id());
$exercice=$g_user->get_exercice();
echo '<div class="content">';
$sql_year=" and j_tech_per in (select p_id from parm_periode where
p_exercice='".$g_user->get_exercice()."')";
-echo '<fieldset><legend>Vérification des journaux</legend>';
+echo '<fieldset><legend>'._('Vérification des journaux').'</legend>';
echo '<ol>';
$deb=$cn->get_value("select sum (j_montant) from jrnx where j_debit='t'
$sql_year ");
$cred=$cn->get_value("select sum (j_montant) from jrnx where j_debit='f'
$sql_year ");
if ( $cred == $deb )
{
- $result ='<span style="color:green;font-size:1.2em;font-weight:bold;"> OK
</span>';
+ $result =$g_succeed;
}
else
{
- $result ='<span style="color:red;font-size:1.2em;font-weight:bold;"> NON
OK </span>';
+ $result = $g_failed;
}
-printf ('<li> Solde Grand Livre : debit %f credit %f
%s</li>',$deb,$cred,$result);
+printf ('<li>'._("Solde Grand Livre : debit %f credit %f
%s").'</li>',$deb,$cred,$result);
$sql="select jrn_def_id,jrn_def_name from jrn_def";
$res=$cn->exec_sql($sql);
@@ -59,57 +62,20 @@ foreach ($jrn as $l)
if ( $cred == $deb )
{
- $result ='<span style="color:green;font-size:1.2em;font-weight:bold;">
OK </span>';
- }
- else
- {
- $result ='<span style="color:red;font-size:1.2em;font-weight:bold;">
NON OK </span>';
- }
-
- printf ('<li> Journal %s Solde : debit %f credit %f
%s</li>',$name,$deb,$cred,$result);
-
-}
-echo '</ol>';
-echo '<ol>';
-$sql_year=" and j_tech_per in (select p_id from parm_periode where
p_exercice='".$exercice."')";
-
-$deb=$cn->get_value("select sum (j_montant) from jrnx where j_debit='t'
$sql_year ");
-$cred=$cn->get_value("select sum (j_montant) from jrnx where j_debit='f'
$sql_year ");
-
-if ( $cred == $deb )
-{
- $result ='<span style="color:green;font-size:1.2em;font-weight:bold;"> OK
</span>';
+ $result =$g_succeed;
}
else
{
- $result ='<span style="color:red;font-size:1.2em;font-weight:bold;"> NON
OK </span>';
+ $result = $g_failed;
}
-printf ('<li> Total solde Grand Livre : debit %f credit %f
%s</li>',$deb,$cred,$result);
-$sql="select jrn_def_id,jrn_def_name from jrn_def";
-$res=$cn->exec_sql($sql);
-$jrn=Database::fetch_all($res);
-foreach ($jrn as $l)
-{
- $id=$l['jrn_def_id'];
- $name=$l['jrn_def_name'];
- $deb=$cn->get_value("select sum (j_montant) from jrnx where j_debit='t'
and j_jrn_def=$id $sql_year ");
- $cred=$cn->get_value("select sum (j_montant) from jrnx where j_debit='f'
and j_jrn_def=$id $sql_year ");
-
- if ( $cred == $deb )
- {
- $result ='<span style="color:green;font-size:1.2em;font-weight:bold;">
OK </span>';
- }
- else
- {
- $result ='<span style="color:red;font-size:1.2em;font-weight:bold;">
NON OK </span>';
- }
-
- printf ('<li> Journal %s total : debit %f credit %f
%s</li>',$name,$deb,$cred,$result);
+ printf ('<li>'._("Journal %s Solde : debit %f credit %f
%s").'</li>',$name,$deb,$cred,$result);
}
+echo '</ol>';
+
echo '</fieldset>';
-echo '<fieldset><legend>Vérification des comptes</legend>';
+echo '<fieldset><legend>'._('Vérification des comptes').'</legend>';
$bilan=new Acc_Bilan($cn);
$periode=new Periode($cn);
list ($start_periode,$end_periode)=$periode->get_limit($exercice);
@@ -118,5 +84,58 @@ $bilan->to=$end_periode->p_id;
$bilan->verify();
echo '</fieldset>';
echo '</div>';
-
?>
+<hr>
+<fieldset>
+ <legend>
+ <?php echo _("Vérification fiche").'</legend>';?>
+ </legend>
+ <h2>
+ <?php echo _('Fiche avec plusieurs postes comptables');?>
+ </h2>
+ <?php
+ $sql_year_target=" target.j_tech_per in (select p_id from parm_periode
where p_exercice='".$g_user->get_exercice()."')";
+ $sql_year_source=" source.j_tech_per in (select p_id from parm_periode
where p_exercice='".$g_user->get_exercice()."')";
+
+ $sql_qcode="select distinct source.f_id,source.j_qcode
+ from jrnx as source ,jrnx as target
+ where
+ source.j_id < target.j_id
+ and source.j_poste<>target.j_poste
+ and source.j_qcode = target.j_qcode
+ and $sql_year_source and $sql_year_target
+ ";
+ $sql_poste="select distinct j_poste,pcm_lib from jrnx join tmp_pcmn on
(pcm_val=j_poste) where j_qcode =$1 $sql_year";
+ $a_qcode=$cn->get_array($sql_qcode);
+ $res=$cn->prepare('get_poste',$sql_poste);
+ ?>
+ <ol>
+ <?php
+ for ($i=0;$i<count($a_qcode);$i++):
+ $poste=$cn->execute('get_poste',array($a_qcode[$i]['j_qcode']));
+ ?>
+ <li><?php
+ echo
HtmlInput::card_detail($a_qcode[$i]["j_qcode"],$a_qcode[$i]["j_qcode"],'
style="display:inline"') ;
+ echo " ";
+ echo HtmlInput::history_card($a_qcode[$i]["f_id"],_("Hist."),'
display:inline');
+
+ ?>
+
+ </li>
+ <ul>
+ <?php $all_dep=Database::fetch_all($poste);
+ for ($e=0;$e<count($all_dep);$e++):
+ ?>
+ <li>
+ <?php echo
HtmlInput::history_account($all_dep[$e]['j_poste'],$all_dep[$e]['j_poste'],'
display:inline ')?>
+ <?php echo h($all_dep[$e]['pcm_lib'])?>
+ </li>
+ <?php
+ endfor;
+ ?>
+ </ul>
+ <?php
+ endfor;
+ ?>
+ </ol>
+</fieldset>
- [Noalyss-commit] [noalyss] branch master updated (c4424df -> 3b4da3f), Dany De Bontridder, 2014/11/07
- [Noalyss-commit] [noalyss] 04/08: cosmetic : Fieldset title, Dany De Bontridder, 2014/11/07
- [Noalyss-commit] [noalyss] 06/08: copyright, Dany De Bontridder, 2014/11/07
- [Noalyss-commit] [noalyss] 02/08: cosmetic : improve appearance impress reconciliation, Dany De Bontridder, 2014/11/07
- [Noalyss-commit] [noalyss] 07/08: copyright, Dany De Bontridder, 2014/11/07
- [Noalyss-commit] [noalyss] 03/08: cosmetic : improve appearance fiche historique, Dany De Bontridder, 2014/11/07
- [Noalyss-commit] [noalyss] 05/08: translation, Dany De Bontridder, 2014/11/07
- [Noalyss-commit] [noalyss] 01/08: cosmetic : improve appearance impress reconciliation, Dany De Bontridder, 2014/11/07
- [Noalyss-commit] [noalyss] 08/08: task #1042 Amélioration visuelle de la vérification Ajout d'un test pour les fiches utilisant 2 postes comptables différents dans l'année Task #1042 - Amélioration VERIFBIL,
Dany De Bontridder <=