noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
impress_bilan.inc.php
Go to the documentation of this file.
00001 <?php
00002 /*
00003  *   This file is part of NOALYSS.
00004  *
00005  *   NOALYSS is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU General Public License as published by
00007  *   the Free Software Foundation; either version 2 of the License, or
00008  *   (at your option) any later version.
00009  *
00010  *   NOALYSS is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with NOALYSS; if not, write to the Free Software
00017  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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 //ini_set("memory_limit","150M");
00024 /*! \file
00025  * \brief form who call the printing of the bilan in RTF
00026  *        file included by user_impress
00027  *
00028  * some variable are already defined ($cn, $g_user ...)
00029  */
00030 
00031 //-----------------------------------------------------
00032 // Show the jrn and date
00033 //-----------------------------------------------------
00034 require_once('class_database.php');
00035 global $g_user;
00036 //-----------------------------------------------------
00037 // Form
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  * Let you change the exercice
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 ?>
 All Data Structures Namespaces Files Functions Variables Enumerations