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
00020
00021
00022
00023
00024
00025
00026 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
00027 require_once('class_lettering.php');
00028
00029 echo '<div class="content">';
00030 echo '<div id="search">';
00031 echo '<FORM METHOD="GET">';
00032 echo dossier::hidden();
00033 echo HtmlInput::hidden('ac',$_REQUEST['ac']);
00034 echo HtmlInput::hidden('sa','poste');
00035 echo '<table width="50%">';
00036
00037 $poste=new IPoste();
00038 $poste->name="acc";
00039 $poste->table=0;
00040 $poste->set_attribute('jrn',0);
00041 $poste->set_attribute('gDossier',dossier::id());
00042 $poste->set_attribute('ipopup','ipop_account');
00043 $poste->set_attribute('label','account_label');
00044 $poste->set_attribute('account','acc');
00045 if (isset($_GET['acc'])) $poste->value=$_GET['acc'];
00046 $poste_span=new ISpan('account_label');
00047 $r= td(_('Lettrage pour le poste comptable ')).
00048 td($poste->input()).
00049 td($poste_span->input());
00050 echo tr($r);
00051
00052 $exercice=$g_user->get_exercice();
00053 $periode=new Periode($cn);
00054 list($first_per,$last_per)=$periode->get_limit($exercice);
00055
00056 $start=new IDate('start');
00057 if ( isset ($_GET['start']) && isDate($_GET['start']) == null )
00058 {
00059 echo alert(_('Date malformée, désolé'));
00060 $_GET['start']=$first_per->first_day();
00061
00062 }
00063 $start->value=(isset($_GET['start']))?$_GET['start']:$first_per->first_day();
00064
00065 $r=td(_('Date début'));
00066 $r.=td($start->input());
00067 echo tr($r);
00068
00069 $end=new IDate('end');
00070 if ( isset($_GET['end']) && isDate($_GET['end']) == null )
00071 {
00072 echo alert(_('Date malformée, désolé'));
00073 $_GET['end']=$last_per->last_day();
00074
00075 }
00076 $end->value=(isset($_GET['end']))?$_GET['end']:$last_per->last_day();
00077 $r=td(_('Date fin'));
00078 $r.=td($end->input());
00079 echo tr($r);
00080
00081
00082 $sel=new ISelect('type_let');
00083 $sel->value=array(
00084 array('value'=>0,'label'=>_('Toutes opérations')),
00085 array('value'=>1,'label'=>_('Opérations lettrées')),
00086 array('value'=>3,'label'=>_('Opérations lettrées montants différents')),
00087 array('value'=>2,'label'=>_('Opérations NON lettrées'))
00088 );
00089 if (isset($_GET['type_let'])) $sel->selected=$_GET['type_let'];
00090
00091 $r= td("Filtre ").
00092 td($sel->input());
00093
00094 echo tr($r);
00095 echo '</table>';
00096 echo '<br>';
00097 echo HtmlInput::submit("seek",_('Recherche'));
00098 echo '</FORM>';
00099 echo '</div>';
00100 if (! isset($_REQUEST['seek'])) exit;
00101 echo '<hr>';
00102
00103
00104
00105 if ( isset($_POST['record']))
00106 {
00107 $letter=new Lettering_Account($cn);
00108 $letter->save($_POST);
00109 }
00110
00111
00112
00113 echo '<div id="list">';
00114 if ( isDate($_GET['start']) == null || isDate($_GET['end']) == null )
00115 {
00116 echo alert(_('Date malformée, désolé'));
00117 exit();
00118 }
00119 $letter=new Lettering_Account($cn);
00120 $letter->set_parameter('account',$_GET['acc']);
00121 $letter->set_parameter('start',$_GET['start']);
00122 $letter->set_parameter('end',$_GET['end']);
00123
00124 if ( $sel->selected == 0 )
00125 echo $letter->show_list('all');
00126 if ( $sel->selected == 1 )
00127 echo $letter->show_list('letter');
00128 if ( $sel->selected == 2 )
00129 echo $letter->show_list('unletter');
00130 if ( $sel->selected == 3 )
00131 echo $letter->show_list('letter_diff');
00132 echo '</div>';
00133 echo '<div id="detail" style="display:none">';
00134 echo 'Un instant...';
00135 echo '<IMG SRC=image/loading.gif>';
00136 echo '</div>';