Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
00020 require_once ('class_acc_bilan.php');
00021 require_once('class_exercice.php');
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 require_once('class_database.php');
00035 global $g_user;
00036
00037
00038
00039
00040 $bilan=new Acc_Bilan($cn);
00041 $bilan->get_request_get();
00042 echo '<div class="content">';
00043 $exercice=(isset($_GET['exercice']))?$_GET['exercice']:$g_user->get_exercice();
00044 if ( ! isset ($_GET['verif']))
00045 {
00046
00047
00048
00049 echo '<fieldset><legend>'._('Exercice').'</legend>';;
00050 echo '<form method="GET">';
00051 echo _('Choisissez un autre exercice');
00052 $ex=new Exercice($cn);
00053 $wex=$ex->select('exercice',$exercice,' onchange="submit(this)"');
00054 echo $wex->input();
00055 echo dossier::hidden();
00056 echo HtmlInput::get_to_hidden(array('ac','type'));
00057 echo '</form>';
00058 echo '</fieldset>';
00059
00060 $filter_year=" where p_exercice='".sql_string($exercice)."'";
00061 echo '<FORM METHOD="GET">';
00062 echo HtmlInput::hidden('type','bilan');
00063 echo dossier::hidden();
00064 echo $bilan->display_form ($filter_year);
00065 echo '<span class="notice"> '._('Attention : si le bilan n\'est pas équilibré.<br> Vérifiez <ul>
00066 <li>L\'affectation du résultat est fait</li>
00067 <li>Vos comptes actifs ont un solde débiteur (sauf les comptes dit inversés)</li>
00068 <li> les comptes passifs ont un solde créditeur (sauf les comptes dit inversés) </li>
00069 </ul>
00070 Utilisez la balance des comptes pour vérifier.').' </span>';
00071 echo HtmlInput::submit('verif',_('Verification comptabilite'));
00072 echo HtmlInput::get_to_hidden(array('ac','exercice'));
00073 echo '</FORM>';
00074 }
00075
00076
00077 if ( isset($_GET['verif']))
00078 {
00079 $periode=new Periode($cn);
00080 $date_from=$periode->first_day($bilan->from);
00081 $date_to=$periode->last_day($bilan->to);
00082 echo '<h2>'._('Etape 2 :Impression')." ".$date_from.'-'.$date_to.'</h2>';
00083
00084 $bilan->get_request_get();
00085 $bilan->verify();
00086 $url_verify=http_build_query(array('ac'=>'VERIFBIL','gDossier'=>dossier::id()));
00087 echo _('Pour une vérification complète, allez dans ').'<a class="line" href="?'.$url_verify.'"> VERIFBIL</a>';
00088 echo '<FORM METHOD="GET" ACTION="export.php">';
00089 echo dossier::hidden();
00090 echo HtmlInput::get_to_hidden(array('exercice'));
00091 echo HtmlInput::hidden('b_id',$_GET['b_id']);
00092 echo HtmlInput::hidden('act','OTH:Bilan');
00093
00094 echo HtmlInput::hidden('from_periode',$bilan->from);
00095 echo HtmlInput::hidden('to_periode',$bilan->to);
00096 echo HtmlInput::submit('Impression','Impression');
00097 echo '</form>';
00098
00099 }
00100
00101 echo '<hr>';
00102 echo '</div>';
00103 ?>