[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 05/06: Bug : rapport, cannot use it
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 05/06: Bug : rapport, cannot use it |
Date: |
Thu, 13 Mar 2014 20:39:48 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 42050d6362e15dfb4dad06c0055bfe2714aeda00
Author: Dany De Bontridder <address@hidden>
Date: Thu Mar 13 21:17:17 2014 +0100
Bug : rapport, cannot use it
---
html/js/scripts.js | 24 ++++++++++++------------
include/export_form_csv.php | 5 +++--
include/export_form_pdf.php | 6 ++++--
include/impress_rapport.inc.php | 15 ++++++++-------
4 files changed, 27 insertions(+), 23 deletions(-)
diff --git a/html/js/scripts.js b/html/js/scripts.js
index da1a98f..8d39010 100644
--- a/html/js/scripts.js
+++ b/html/js/scripts.js
@@ -118,21 +118,21 @@ function g(ID)
*/
function enable_type_periode()
{
- if (g('type_periode').value === 1)
+ if ($("type_periode").options[$("type_periode").selectedIndex].value == 0)
{
- g('from_periode').disabled = true;
- g('to_periode').disabled = true;
- g('from_date').disabled = false;
- g('to_date').disabled = false;
- g('p_step').disabled = true;
+ $('from_periode').enable();
+ $('to_periode').enable ();
+ $('from_date').disable();
+ $('to_date').disable();
+ $('p_step').enable();
}
else
{
- g('from_periode').disabled = false;
- g('to_periode').disabled = false;
- g('from_date').disabled = true;
- g('to_date').disabled = true;
- g('p_step').disabled = false;
+ $('from_periode').disable();
+ $('to_periode').disable ();
+ $('from_date').enable();
+ $('to_date').enable();
+ $('p_step').disable();
}
}
@@ -814,7 +814,7 @@ function show_ledger_choice(json_obj)
};
//var y=calcy(posY);
var y=posY;
- if (json_obj.div !== '')obj.cssclass="";
+ if (json_obj.div != '')obj.cssclass="";
obj.style="top:"+y+'px;'+obj.style;
/* if ( json_obj.class )
{
diff --git a/include/export_form_csv.php b/include/export_form_csv.php
index d038cc8..a01f51a 100644
--- a/include/export_form_csv.php
+++ b/include/export_form_csv.php
@@ -40,7 +40,8 @@ $Form=new Acc_Report($cn,$_GET['form_id']);
$Form->get_name();
// Step ?
//--
-if ( $_GET['p_step'] == 0 )
+$step=HtmlInput::default_value_get("p_step", 0);
+if ( $step == 0 )
{
if ( $_GET ['type_periode'] == 0 )
$array=$Form->get_row( $_GET['from_periode'],$_GET['to_periode'],
$_GET['type_periode']);
@@ -64,7 +65,7 @@ if ( $_GET['p_step'] == 0 )
}
}
-else
+elseif ($step == 1)
{
// Gather all the data
//---
diff --git a/include/export_form_pdf.php b/include/export_form_pdf.php
index 505908b..8d120c8 100644
--- a/include/export_form_pdf.php
+++ b/include/export_form_pdf.php
@@ -50,7 +50,9 @@ $pdf->setTitle("Rapport ".$Libelle,true);
// Step ??
//--
-if ( $_GET['p_step'] == 0 )
+$step=HtmlInput::default_value_get("p_step", 0);
+
+if ( $step == 0 )
{
// No step asked
//--
@@ -78,7 +80,7 @@ else
$pdf->SetFont('DejaVuCond','',8);
// without step
-if ( $_GET['p_step'] == 0 )
+if ( $step == 0 )
{
if ( $_GET['type_periode'] == 0 )
{
diff --git a/include/impress_rapport.inc.php b/include/impress_rapport.inc.php
index c09967e..7b6c217 100644
--- a/include/impress_rapport.inc.php
+++ b/include/impress_rapport.inc.php
@@ -40,15 +40,15 @@ if ( isset( $_GET['bt_html'] ) )
$Form->get_name();
// step asked ?
//--
+ $type_periode=HtmlInput::default_value_get("type_periode", -1);
+ if ( $type_periode == 1 )
+ $array=$Form->get_row( $_GET['from_date'],$_GET['to_date'],
$type_periode);
- if ( $_GET['type_periode'] == 1 )
- $array=$Form->get_row( $_GET['from_date'],$_GET['to_date'],
$_GET['type_periode']);
+ if ($type_periode == 0 && $_GET['p_step'] == 0)
+ $array=$Form->get_row( $_GET['from_periode'],$_GET['to_periode'],
$type_periode);
- if ($_GET['type_periode'] == 0 && $_GET['p_step'] == 0 )
- $array=$Form->get_row( $_GET['from_periode'],$_GET['to_periode'],
$_GET['type_periode']);
-
- if ($_GET['type_periode'] == 0 && $_GET['p_step'] == 1 )
+ if ($type_periode == 0 && $_GET['p_step'] == 1 )
{
// step are asked
//--
@@ -132,7 +132,7 @@ if ( isset( $_GET['bt_html'] ) )
echo "</table>";
if ( count($Form->row ) == 0 )
exit;
- if ( $_GET['type_periode']==0 )
+ if ( $_GET['type_periode']== 0 )
{
if ( $_GET['p_step'] == 0)
{ // check the step
@@ -249,6 +249,7 @@ $aStep=array(
);
echo '<tr>';
echo td('Par étape de');
+$w->id='p_step';
echo $w->input('p_step',$aStep);
echo '</TR>';
- [Noalyss-commit] [noalyss] branch master updated (4e50bc4 -> eed45b7), Dany De Bontridder, 2014/03/13
- [Noalyss-commit] [noalyss] 04/06: bug : Font size too large, Dany De Bontridder, 2014/03/13
- [Noalyss-commit] [noalyss] 06/06: Bug : ledger search without border, Dany De Bontridder, 2014/03/13
- [Noalyss-commit] [noalyss] 03/06: bug : no lettering for the great ledger, Dany De Bontridder, 2014/03/13
- [Noalyss-commit] [noalyss] 05/06: Bug : rapport, cannot use it,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 01/06: CSS : change color Anchor, Dany De Bontridder, 2014/03/13
- [Noalyss-commit] [noalyss] 02/06: BUG : theme do not change the first time, Dany De Bontridder, 2014/03/13