[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 12/107: Code cleaning replace $start and $end
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 12/107: Code cleaning replace $start and $end by $periode_...>value to avoid to get it several times |
Date: |
Mon, 26 Aug 2019 10:31:47 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit ed38b8a549beafe321b4c0b9d370c9fc169bf849
Author: Dany De Bontridder <address@hidden>
Date: Sat Feb 16 11:07:15 2019 +0100
Code cleaning replace $start and $end by $periode_...>value to avoid
to get it several times
---
include/fiche.inc.php | 31 +++++++++++++------------------
1 file changed, 13 insertions(+), 18 deletions(-)
diff --git a/include/fiche.inc.php b/include/fiche.inc.php
index c0612d4..8a1f8a7 100644
--- a/include/fiche.inc.php
+++ b/include/fiche.inc.php
@@ -248,16 +248,14 @@ if ($histo->selected == 3)
return;
}
-$start=$http->get("start","date");
-$end=$http->get("end","date");
$cat=$http->get("cat","number");
$phisto=$http->get("histo","number");
$export_pdf = '<FORM METHOD="get" ACTION="export.php" style="display:inline">';
$export_pdf.=HtmlInput::hidden('cat', $cat);
$export_pdf.=HtmlInput::hidden('act', "PDF:fiche_balance") .
-$export_pdf.=HtmlInput::hidden('start', $start);
-$export_pdf.=HtmlInput::hidden('end', $end);
+$export_pdf.=HtmlInput::hidden('start', $periode_start->value );
+$export_pdf.=HtmlInput::hidden('end', $periode_end->value );
$export_pdf.=HtmlInput::hidden('histo', $phisto);
$export_pdf.=HtmlInput::request_to_hidden(array('allcard'));
$export_pdf.=dossier::hidden();
@@ -269,8 +267,8 @@ $export_print = HtmlInput::print_window();
$export_csv = '<FORM METHOD="get" ACTION="export.php" style="display:inline">';
$export_csv.=HtmlInput::hidden('cat', $cat);
$export_csv.=HtmlInput::hidden('act', 'CSV:fiche_balance');
-$export_csv.=HtmlInput::hidden('start', $start);
-$export_csv.=HtmlInput::hidden('end', $end);
+$export_csv.=HtmlInput::hidden('start', $periode_start->value );
+$export_csv.=HtmlInput::hidden('end', $periode_end->value );
$export_csv.=HtmlInput::hidden('histo', $phisto);
$export_csv.=HtmlInput::request_to_hidden(array('allcard'));
$export_csv.=dossier::hidden();
@@ -291,12 +289,11 @@ if (isDate($_REQUEST['start']) == null ||
isDate($_REQUEST['end']) == null)
if ( $histo->selected == 8)
{
require_once NOALYSS_INCLUDE.'/class/balance_age.class.php';
- $start=$http->get("start","date");
$cat=$http->get("cat","number");
$bal=new Balance_Age($cn);
$export_csv = '<FORM METHOD="get" ACTION="export.php"
style="display:inline">';
$export_csv
.=HtmlInput::request_to_hidden(array('gDossier','ac','p_let','p_date_start'));
- $export_csv.=HtmlInput::hidden('p_date_start',$start);
+ $export_csv.=HtmlInput::hidden('p_date_start',$periode_start->value );
$export_csv .= HtmlInput::hidden('act','CSV:balance_age');
$export_csv .= HtmlInput::hidden('p_let','let');
$export_csv .= HtmlInput::hidden('p_type','X');
@@ -307,7 +304,7 @@ if ( $histo->selected == 8)
if ( $allcard == 0 )
{
echo $export_csv;
- $bal->display_category($start,$cat,'let');
+ $bal->display_category($periode_start->value ,$cat,'let');
echo $export_csv;
}
else
@@ -317,7 +314,7 @@ if ( $histo->selected == 8)
$nb_cat=count($a_cat);
for ($i=0;$i < $nb_cat;$i++)
{
- $bal->display_category($start,$a_cat[$i]['fd_id'],'let');
+ $bal->display_category($periode_start->value
,$a_cat[$i]['fd_id'],'let');
}
echo $export_csv;
}
@@ -330,11 +327,11 @@ if ( $histo->selected == 7)
{
require_once NOALYSS_INCLUDE.'/class/balance_age.class.php';
$bal=new Balance_Age($cn);
- $start=$http->get("start","date");
+
$cat=$http->get("cat","number");
$export_csv = '<FORM METHOD="get" ACTION="export.php"
style="display:inline">';
$export_csv
.=HtmlInput::request_to_hidden(array('gDossier','ac','p_let','p_date_start'));
- $export_csv.=HtmlInput::hidden('p_date_start', $start);
+ $export_csv.=HtmlInput::hidden('p_date_start', $periode_start->value );
$export_csv .= HtmlInput::hidden('act','CSV:balance_age');
$export_csv .= HtmlInput::hidden('p_let','unlet');
$export_csv .= HtmlInput::hidden('p_type','X');
@@ -345,7 +342,7 @@ if ( $histo->selected == 7)
if ( $allcard == 0 )
{
echo $export_csv;
- $bal->display_category($start,$cat,'unlet');
+ $bal->display_category($periode_start->value ,$cat,'unlet');
echo $export_csv;
}
else
@@ -355,7 +352,7 @@ if ( $histo->selected == 7)
$nb_cat=count($a_cat);
for ($i=0;$i < $nb_cat;$i++)
{
- $bal->display_category($start,$a_cat[$i]['fd_id'],'unlet');
+ $bal->display_category($periode_start->value
,$a_cat[$i]['fd_id'],'unlet');
}
echo $export_csv;
}
@@ -484,8 +481,6 @@ if ( $allcard == 0) echo $str_add_card;
echo $export_csv;
echo $export_pdf;
echo $export_print;
-$p_start=$http->get("start","date");
-$p_end=$http->get("end","date");
$fiche = new Fiche($cn);
for ($e = 0; $e < count($afiche); $e++)
{
@@ -496,8 +491,8 @@ for ($e = 0; $e < count($afiche); $e++)
$row = new Fiche($cn, $card['f_id']);
$letter = new Lettering_Card($cn);
$letter->set_parameter('quick_code',
$row->strAttribut(ATTR_DEF_QUICKCODE));
- $letter->set_parameter('start', $p_start);
- $letter->set_parameter('end', $p_end);
+ $letter->set_parameter('start', $periode_start->value );
+ $letter->set_parameter('end', $periode_end->value );
// all
if ($_GET['histo'] == 0)
{
- [Noalyss-commit] [noalyss] 13/107: Icon_Action : add icon for menu, (continued)
- [Noalyss-commit] [noalyss] 13/107: Icon_Action : add icon for menu, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 16/107: Icon_Action add icon for locking , unlocking, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 24/107: Debug : Add memory info, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 18/107: Mantis #0001651: Problème avec totaux en CA, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 09/107: translation, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 04/107: Php7.2 incompatibility, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 10/107: Security : replace $_GET by Http_Input, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 06/107: TEST : fix some little bugs, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 14/107: Accounting : Cosmetic change icon more by arrow, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 17/107: Mantis #0001651: Problème avec totaux en CA, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 12/107: Code cleaning replace $start and $end by $periode_...>value to avoid to get it several times,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 23/107: Bug javascript mispelled function show_tab, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 21/107: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss into dev7016, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 15/107: Icon_Action : add testing + cosmetic for Icon_Action::menu, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 22/107: typo, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 26/107: Code Cleaning : replace tempname with sys_get_temp_dir Merge commit 'd85d6f8c77083fb997441a672d222bb10836af3e' into dev7109, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 27/107: Improve : depending if pdftk is a snap or not , his path must be a setting, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 30/107: New function PDF:is_fill add documentation, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 35/107: indent code, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 37/107: Card : allow to specify the max displaid rows, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 34/107: Clean code , remove useless comment, Dany De Bontridder, 2019/08/26