noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
impress_rec.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 
00020 // Copyright Author Dany De Bontridder danydb@aevalys.eu
00021 
00022 /*!\file
00023  * \brief print the all the operation reconciled or not, with or without the same amount
00024  */
00025 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
00026 require_once ('class_acc_reconciliation.php');
00027 require_once('function_javascript.php');
00028 global $g_user;
00029 
00030 /**
00031  *@file
00032  */
00033 $aledger=$g_user->get_ledger('ALL',3);
00034 echo '<div class="noprint">';
00035 echo '<div class="content">';
00036 $rjrn='';
00037 $radio=new IRadio('choice');
00038 $choice=(isset($_GET['choice']))?$_GET['choice']:0;
00039 $r_jrn=(isset($_GET['r_jrn']))?$_GET['r_jrn']:'';
00040 echo '<form method="GET">';
00041 echo dossier::hidden().HtmlInput::hidden('ac',$_GET['ac']).HtmlInput::hidden('type','rec');
00042 echo 'Filtre par journal';
00043 HtmlInput::button_choice_ledger(array('div'=>'','type'=>'ALL','all_type'=>1));
00044 echo '<br/>';
00045 /*
00046  * Limit by date, default current exercice
00047  */
00048 list($start,$end)=$g_user->get_limit_current_exercice();
00049 $dstart=new IDate('p_start');
00050 $dstart->value=(isset($_REQUEST['p_start']))?$_REQUEST['p_start']:$start;
00051 
00052 $dend=new IDate('p_end');
00053 $dend->value=(isset($_REQUEST['p_end']))?$_REQUEST['p_end']:$end;
00054 
00055 echo "Opérations entre ".$dstart->input()." jusque ".$dend->input();
00056 echo '<ol style="list-style-type:none;">';
00057 
00058 $radio->selected=($choice==0)?true:false;
00059 $radio->value=0;
00060 echo '<li>'.$radio->input().'Opérations rapprochées'.'</li>';
00061 
00062 $radio->selected=($choice==1)?true:false;
00063 $radio->value=1;
00064 echo '<li>'.$radio->input().'Opérations rapprochées avec des montants différents'.'</li>';
00065 
00066 $radio->selected=($choice==2)?true:false;
00067 $radio->value=2;
00068 echo '<li>'.$radio->input().'Opérations rapprochées avec des montants identiques'.'</li>';
00069 
00070 $radio->selected=($choice==3)?true:false;
00071 $radio->value=3;
00072 echo '<li>'.$radio->input().'Opérations non rapprochées'.'</li>';
00073 
00074 echo '</ol>';
00075 
00076 
00077 
00078 
00079 echo HtmlInput::submit('vis',_('Visualisation'));
00080 echo '</form>';
00081 echo '<hr>';
00082 echo '</div>';
00083 echo '</div>';
00084 echo '<div class="content">';
00085 if ( ! isset($_GET['vis'])) exit();
00086 $acc_reconciliation=new Acc_Reconciliation($cn);
00087 $acc_reconciliation->a_jrn=$r_jrn;
00088 $acc_reconciliation->start_day=$dstart->value;
00089 $acc_reconciliation->end_day=$dend->value;
00090 
00091 $array=$acc_reconciliation->get_data($choice);
00092 
00093 $gDossier=Dossier::id();
00094 ?>
00095 <form method="get" action="export.php">
00096     <?php echo HtmlInput::get_to_hidden(array('ac','gDossier','p_end','p_start','choice','r_jrn'));
00097     echo HtmlInput::hidden('act','CSV:Reconciliation');
00098     echo HtmlInput::submit("csv_bt", "Export CSV");
00099     ?>
00100 </form>
00101 <?php
00102 require_once('template/impress_reconciliation.php');
00103 exit();
 All Data Structures Namespaces Files Functions Variables Enumerations