'._('Vérification des journaux').'
'; $sql=" with jdebit as ( select sum (j_montant) as amount,j_debit , jr_def_id from jrnx join jrn on (j_grpt=jr_grpt_id) where $sql_year and j_debit='t' group by jr_def_id,j_debit ), jcredit as ( select sum (j_montant) as amount,j_debit , jr_def_id from jrnx join jrn on (j_grpt=jr_grpt_id) where $sql_year and j_debit='f' group by jr_def_id,j_debit ) select jrn_def_id, jrn_def_name, jdebit.amount as deb, jcredit.amount as cred from jrn_def join jdebit on (Jdebit.jr_def_id=jrn_def.jrn_def_id) join jcredit on (jcredit.jr_def_id=jrn_def.jrn_def_id) where jcredit.amount<>jdebit.amount order by jrn_def_name "; $res=$cn->exec_sql($sql); $jrn=Database::fetch_all($res); $nb_jrn= count($jrn); if ( $jrn ===false ) { echo $g_succeed." "._("Aucune anomalie dans les montants des journaux"); } echo ''; echo '
'._('Vérification des comptes').'
'; $bilan=new Acc_Bilan($cn); $periode=new Periode($cn); list ($start_periode,$end_periode)=$periode->get_limit($exercice); $bilan->from=$start_periode->p_id; $bilan->to=$end_periode->p_id; $bilan->verify(); echo '';?>
get_exercice()."')"; $sql_fiche_id=" select count(*),f_id from ( select distinct f_id,j_poste from jrnx where $sql_year_target ) as m group by f_id having count(*) > 1 "; $a_fiche_id=$cn->get_array($sql_fiche_id); $sql_poste="select distinct j_poste,pcm_lib from jrnx join tmp_pcmn on (pcm_val=j_poste) where f_id =$1 and $sql_year"; $sql_qcode="select ad_value as qcode from fiche_detail where f_id=$1 and ad_id=".ATTR_DEF_QUICKCODE; $res=$cn->prepare('get_poste',$sql_poste); $resQcode=$cn->prepare('get_qcode',$sql_qcode); if ( $res == false || $resQcode == false ) { echo "ERREUR ".__FILE__.":".__LINE__."prepare failed"; } echo _("Résultat"); if (count($a_fiche_id) == 0) { echo " OK $g_succeed";} else { echo " "._('Attention ').$g_failed;} ?>
-
execute('get_poste',array($a_fiche_id[$i]['f_id']));
$tmp_qcode=$cn->execute('get_qcode',array($a_fiche_id[$i]['f_id']));
$qcode=Database::fetch_all($tmp_qcode);
if ( $qcode[0]['qcode']=="") {
continue;
}
?>
get_array($sql_account_used); $nb_account_used=count ($a_account_used); if ( $nb_account_used == 0 ) { echo _('Résultat')." ".$g_succeed; } $ret=$cn->prepare('get_operation',$sql_concerned_operation); ?>