Fix bug and add verification
This commit is contained in:
parent
9ba93fa008
commit
779285ee69
7 changed files with 96 additions and 4 deletions
|
|
@ -76,7 +76,7 @@ BODY {
|
|||
<script src="js/scripts.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<BODY onLoad="SetFocus(\'login\',0)">
|
||||
Version 3.0.2
|
||||
Version 3.0.3
|
||||
<div class="remark">
|
||||
<p class="gras">Il est conseillé de ne PAS utiliser Internet Explorer.
|
||||
</p><p>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ function showfiche(p_sessid,p_qcode)
|
|||
{
|
||||
p_dossier=document.getElementById("gDossier").value;
|
||||
var a=window.open('show_fiche.php?PHPSESSID='+p_sessid+'&gDossier='+p_dossier+'&q='+p_qcode,'','toolbar=no,width=350,height=450,scrollbar=yes,statusbar=no');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/* type must be cred or deb and name is
|
||||
|
|
@ -40,6 +40,7 @@ function SearchCard(p_sessid,type,name,jrn)
|
|||
var search=document.getElementById(name).value;
|
||||
var gDossier=document.getElementById('gDossier').value;
|
||||
var a=window.open('fiche_search.php?first&search&fic_search='+search+'&p_jrn='+jrn+'&PHPSESSID='+p_sessid+'&type='+type+'&name='+name+'&gDossier='+gDossier,'item','toolbar=no,width=350,height=450,scrollbars=yes,statusbar=no');
|
||||
return false;
|
||||
}
|
||||
function NewCard(p_sessid,type,name,jrn)
|
||||
{
|
||||
|
|
@ -47,6 +48,8 @@ function SearchCard(p_sessid,type,name,jrn)
|
|||
var gDossier=document.getElementById('gDossier').value;
|
||||
|
||||
var a=window.open('fiche_new.php?p_jrn='+jrn+'&PHPSESSID='+p_sessid+'&type='+type+'&name='+name+'&gDossier='+gDossier,'item','toolbar=no,width=350,height=450,scrollbars=yes,statusbar=no');
|
||||
return false;
|
||||
|
||||
}
|
||||
/* SetValue( p_ctl,p_value )
|
||||
/* p_ctl is the name of the control
|
||||
|
|
|
|||
|
|
@ -62,6 +62,10 @@ switch ($p_action) {
|
|||
case 'periode';
|
||||
$high=2;
|
||||
break;
|
||||
case 'verif';
|
||||
$high=10;
|
||||
break;
|
||||
|
||||
default:
|
||||
$high=0;
|
||||
|
||||
|
|
@ -158,8 +162,77 @@ if ($p_action=="preod") {
|
|||
echo '</table>';
|
||||
}
|
||||
echo '</div>';
|
||||
exit();
|
||||
}
|
||||
//----------------------------------------------------------------------
|
||||
// Verification solde
|
||||
//----------------------------------------------------------------------
|
||||
if ( $p_action=='verif' ) {
|
||||
echo '<div class="u_content">';
|
||||
$User->db=$cn;
|
||||
$sql_year=" and c_periode in (select p_id from parm_periode where p_exercice='".$User->GetExercice()."')";
|
||||
|
||||
echo '<ol>';
|
||||
$deb=getDbValue($cn,"select sum (c_montant) from centralized where c_debit='t' $sql_year ");
|
||||
$cred=getDbValue($cn,"select sum (c_montant) from centralized where c_debit='f' $sql_year ");
|
||||
|
||||
if ( $cred == $deb ) {
|
||||
$result ='<span style="color:green;font-size:120%;font-weight:bold;"> OK </span>';}
|
||||
else {
|
||||
$result ='<span style="color:red;font-size:120%;font-weight:bold;"> NON OK </span>';}
|
||||
|
||||
printf ('<li> Solde Grand Livre centralisé: debit %f credit %f %s</li>',$deb,$cred,$result);
|
||||
|
||||
$sql="select jrn_def_id,jrn_def_name from jrn_def";
|
||||
$res=ExecSql($cn,$sql);
|
||||
$jrn=pg_fetch_all($res);
|
||||
foreach ($jrn as $l) {
|
||||
$id=$l['jrn_def_id'];
|
||||
$name=$l['jrn_def_name'];
|
||||
$deb=getDbValue($cn,"select sum (c_montant) from centralized where c_debit='t' and c_jrn_def=$id $sql_year ");
|
||||
$cred=getDbValue($cn,"select sum (c_montant) from centralized where c_debit='f' and c_jrn_def=$id $sql_year ");
|
||||
|
||||
if ( $cred == $deb ) {
|
||||
$result ='<span style="color:green;font-size:120%;font-weight:bold;"> OK </span>';}
|
||||
else {
|
||||
$result ='<span style="color:red;font-size:120%;font-weight:bold;"> NON OK </span>';}
|
||||
|
||||
printf ('<li> Journal %s Solde centralisé: 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='".$User->GetExercice()."')";
|
||||
|
||||
$deb=getDbValue($cn,"select sum (j_montant) from jrnx where j_debit='t' $sql_year ");
|
||||
$cred=getDbValue($cn,"select sum (j_montant) from jrnx where j_debit='f' $sql_year ");
|
||||
|
||||
if ( $cred == $deb ) {
|
||||
$result ='<span style="color:green;font-size:120%;font-weight:bold;"> OK </span>';}
|
||||
else {
|
||||
$result ='<span style="color:red;font-size:120%;font-weight:bold;"> NON OK </span>';}
|
||||
|
||||
printf ('<li> Solde Grand Livre non centralisé: debit %f credit %f %s</li>',$deb,$cred,$result);
|
||||
$sql="select jrn_def_id,jrn_def_name from jrn_def";
|
||||
$res=ExecSql($cn,$sql);
|
||||
$jrn=pg_fetch_all($res);
|
||||
foreach ($jrn as $l) {
|
||||
$id=$l['jrn_def_id'];
|
||||
$name=$l['jrn_def_name'];
|
||||
$deb=getDbValue($cn,"select sum (j_montant) from jrnx where j_debit='t' and j_jrn_def=$id $sql_year ");
|
||||
$cred=getDbValue($cn,"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:120%;font-weight:bold;"> OK </span>';}
|
||||
else {
|
||||
$result ='<span style="color:red;font-size:120%;font-weight:bold;"> NON OK </span>';}
|
||||
|
||||
printf ('<li> Journal %s Solde non centralisé: debit %f credit %f %s</li>',$name,$deb,$cred,$result);
|
||||
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
|
||||
html_page_stop();
|
||||
|
|
|
|||
|
|
@ -42,5 +42,12 @@ echo '<div class="u_redcontent">';
|
|||
echo '<FORM ACTION="bilan.php" METHOD="GET">';
|
||||
echo $bilan->display_form ($filter_year);
|
||||
echo '</FORM>';
|
||||
echo '<span class="notice"> Attention : si le bilan n\'est pas équilibré.<br> Vérifiez <ul>
|
||||
<li>L\'affectation du résultat est fait</li>
|
||||
<li>Vos comptes actifs ont un solde débiteur (sauf les comptes dit inversés)</li>
|
||||
<li> les comptes passifs ont un solde créditeur (sauf les comptes dit inversés) </li>
|
||||
</ul>
|
||||
Utilisez la balance des comptes pour vérifier. </span>';
|
||||
|
||||
echo '</div>';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -242,5 +242,7 @@ echo '</TABLE>';
|
|||
print $w->Submit('bt_html','Impression');
|
||||
|
||||
echo '</FORM>';
|
||||
echo '<span class="notice"> Attention : en-cas d\'impression de journaux centralisés, dans le PDF, les montants débit et crédit calculés par page sont la somme des montants de la page uniquement. Si une opération est sur 2 pages ces montants diffèreront évidemment. Ces montants doivent être égaux sur la dernière page. Pour vérifier la balance, utilisez la balance des comptes ou Avancé->Vérification</span>';
|
||||
|
||||
echo '</div>';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ if ( isset ($_POST["FMOD_NAME"]) ) {
|
|||
$Res=ExecSql($cn_mod,"truncate table stock_goods");
|
||||
$Res=ExecSql($cn_mod,"truncate table jrn");
|
||||
$Res=ExecSql($cn_mod,"delete from jrnx");
|
||||
$Res=ExecSql($cn_mod,'delete from operation_analytique');
|
||||
|
||||
// TODO
|
||||
// Nettoyage table quant_*
|
||||
|
|
@ -140,7 +141,10 @@ if ( isset ($_POST["FMOD_NAME"]) ) {
|
|||
|
||||
|
||||
}
|
||||
|
||||
if ( isset($_POST['CANAL'])) {
|
||||
$Res=ExecSql($cn_mod,'delete from poste_analytique');
|
||||
$Res=ExecSql($cn_mod,'delete from plan_analytique');
|
||||
}
|
||||
|
||||
}
|
||||
// Show all available templates
|
||||
|
|
@ -214,6 +218,8 @@ if ( $count != 0 ) {
|
|||
<TR><TD>Nettoyage des Documents et courriers (ce qui n'effacera pas les modèles de documents)</TD><TD> <input type="checkbox" name="DOC"></TD></TR>
|
||||
<TR><TD>Nettoyage de toutes les fiches (ce qui effacera client, opérations prédéfinies fournisseurs et documents)</TD><TD> <input type="checkbox" name="CARD"></TD></TR>
|
||||
|
||||
<TR><TD>Nettoyage de la comptabilité analytique : effacement des plans et des postes, les opérations sont de toute façon effacées </TD><TD> <input type="checkbox" name="CANAL"></TD></TR>
|
||||
|
||||
|
||||
|
||||
<TR>
|
||||
|
|
|
|||
|
|
@ -553,7 +553,8 @@ function ShowMenuAdvanced($default="") {
|
|||
array('compta.php?p_action=stock&'.$str_dossier,'Stock',"Gestion des stocks",5),
|
||||
array('form.php?'.$str_dossier,'Rapport',"Rapport",6),
|
||||
array('import.php?'.$str_dossier,'Import Banque',"Banque",7),
|
||||
array('ecrit_ouv.php?'.$str_dossier,'Ecriture ouverture',"",8)
|
||||
array('ecrit_ouv.php?'.$str_dossier,'Ecriture ouverture',"",8),
|
||||
array('user_advanced.php?p_action=verif&'.$str_dossier,'Vérification',"",10)
|
||||
),
|
||||
'H',"mtitle","mtitle",$default);
|
||||
$r='<div class="u_subtmenu">'.$left_menu."</div>";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue