22 require_once(NOALYSS_INCLUDE.
'/lib/class_iselect.php');
23 require_once NOALYSS_INCLUDE.
'/lib/class_sort_table.php';
25 echo
'<div id="detail" style="display:none; width:80%;margin-left:10%">';
26 echo
'<image src="image/loading.gif" border="0" alt="Chargement...">';
32 echo
'<div id="main" class="content" style="width:80%;margin-left:10%">';
33 echo
'<form method="get">';
34 echo HtmlInput::request_to_hidden(array(
'ac'));
35 echo _(
'Filtrer par ');
38 array(
'label' =>
'Toutes',
'value' => 0),
39 array(
'label' =>
'Déclarations',
'value' => 1),
40 array(
'label' =>
'Listings assujetti',
'value' => 2),
41 array(
'label' =>
'Listings intracom',
'value' => 3)
44 $choice->javascript =
' onchange="submit(this)"';
45 echo HtmlInput::extension();
46 echo HtmlInput::hidden(
'sa',
'ltva');
47 echo dossier::hidden();
49 echo HtmlInput::submit(
'rc',
'Recharger');
52 $url = HtmlInput::request_to_string(array(
'ac',
'plugin_code',
'gDossier',
'sa',
'type'));
54 $sort->add(
'Date déclaration ',
$url,
' order by date_decl asc',
' order by date_decl desc',
'da',
'dd');
55 $sort->add(
'Période ',
$url,
' order by exercice asc,periode_dec asc',
' order by exercice desc,periode_dec desc',
'pa',
'pd');
65 select da_id as id, 'Déclaration trim/mens' as type_title,1 as type_decl,to_char(date_decl,'DD.MM.YYYY') as date_fmt,date_decl,
66 case when periodicity ='1' then 'Mensuel'
67 when periodicity = '2' then 'Trimestriel'
68 end as fmt_periodicity,
70 from tva_belge.declaration_amount
72 select i_id as id, 'Listing Intracom' as type_title, 3 as type_decl, to_char(date_decl,'DD.MM.YYYY') as date_fmt,date_decl,
73 case when periodicity ='1' then 'Mensuel'
74 when periodicity = '2' then 'Trimestriel'
75 when periodicity = '3' then 'Annuel'
76 end as fmt_periodicity,
78 from tva_belge.intracomm
80 select a_id as id, 'Listing assujetti' as type_title, 2 as type_decl, to_char(date_decl,'DD.MM.YYYY') as date_fmt,date_decl,
81 'Annuel' as fmt_periodicity,
83 from tva_belge.assujetti
91 select da_id as id, 'Déclaration trim/mens' as type_title,1 as type_decl,to_char(date_decl,'DD.MM.YYYY') as date_fmt,
92 case when periodicity ='1' then 'Mensuel'
93 when periodicity = '2' then 'Trimestriel'
94 end as fmt_periodicity,
96 from tva_belge.declaration_amount
101 select a_id as id, 'Listing assujetti' as type_title, 2 as type_decl, to_char(date_decl,'DD.MM.YYYY') as date_fmt,date_decl,
102 'Annuel' as fmt_periodicity,
104 from tva_belge.assujetti
109 select i_id as id, 'Listing Intracom' as type_title, 3 as type_decl, to_char(date_decl,'DD.MM.YYYY') as date_fmt,date_decl,
110 case when periodicity ='1' then 'Mensuel'
111 when periodicity = '2' then 'Trimestriel'
112 when periodicity = '3' then 'Annuel'
113 end as fmt_periodicity,
115 from tva_belge.intracomm
122 <
table class=
"result" >
124 <th>Type de déclaration</th>
126 <th> <?php echo
$sort->get_header(1)?></th>
127 <th><?php echo
$sort->get_header(0)?></th>
129 <?php
for ($i = 0; $i < count($res); $i++):?>
132 $aref = sprintf(
'<a href="javascript:void(0)" onclick="show_declaration(\'%s\',\'%s\')">',
$res[$i][
'type_decl'],
$res[$i][
'id']);
133 echo td($aref .
$res[$i][
'type_title'] .
'</a>');
134 echo td($aref .
$res[$i][
'fmt_periodicity'] .
'</a>');
135 echo td($aref.$res[$i][
'periode_dec'].
' - '.
$res[$i][
'exercice'].
'</a>');
136 echo td($aref.$res[$i][
'date_fmt'].
'</a>');
switch($choice->selected) $sql