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 
00045 /*
00046  * Let you change the exercice
00047  */
00048 echo '<fieldset><legend>'._('Choississez un autre exercice').'</legend>';;
00049 echo '<form method="GET">';
00050 echo 'Choississez un autre exercice :';
00051 $ex=new Exercice($cn);
00052 $wex=$ex->select('exercice',$exercice,' onchange="submit(this)"');
00053 echo $wex->input();
00054 echo dossier::hidden();
00055 echo HtmlInput::get_to_hidden(array('ac','type'));
00056 echo '</form>';
00057 echo '</fieldset>';
00058 
00059 $filter_year=" where p_exercice='".sql_string($exercice)."'";
00060 echo '<FORM  METHOD="GET">';
00061 echo HtmlInput::hidden('type','bilan');
00062 echo dossier::hidden();
00063 echo $bilan->display_form ($filter_year);
00064 echo HtmlInput::submit('verif',_('Verification comptabilite'));
00065 echo HtmlInput::get_to_hidden(array('ac','exercice'));
00066 echo '</FORM>';
00067 
00068 
00069 
00070 if ( isset($_GET['verif']))
00071 {
00072     echo '<h2> Etape 2 :Impression </h2>';
00073 
00074     $bilan->get_request_get();
00075     $bilan->verify();
00076 
00077     echo '<FORM METHOD="GET" ACTION="export.php">';
00078     echo dossier::hidden();
00079     echo HtmlInput::get_to_hidden(array('exercice'));
00080     echo HtmlInput::hidden('b_id',$_GET['b_id']);
00081     echo HtmlInput::hidden('act','OTH:Bilan');
00082 
00083     echo HtmlInput::hidden('from_periode',$bilan->from);
00084     echo HtmlInput::hidden('to_periode',$bilan->to);
00085     echo HtmlInput::submit('Impression','Impression');
00086     echo '</form>';
00087 
00088 }
00089 echo _('<span class="notice"> Attention : si le bilan n\'est pas équilibré.<br> Vérifiez <ul>
00090        <li>L\'affectation du résultat est fait</li>
00091        <li>Vos comptes actifs ont  un solde débiteur (sauf les comptes dit inversés)</li>
00092        <li> les comptes passifs ont un solde créditeur (sauf les comptes dit inversés) </li>
00093        </ul>
00094        Utilisez la balance des comptes pour vérifier. </span>');
00095 
00096 echo '</div>';
00097 ?>
 All Data Structures Namespaces Files Functions Variables Enumerations