[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 17/46: Task #0001595: CA - liste d'opérations
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 17/46: Task #0001595: CA - liste d'opérations - pas de choix de l'execice. |
Date: |
Tue, 13 Jul 2021 05:01:53 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 1eb960760007b24b0c95c625050c583776300bba
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sat Jun 12 11:07:54 2021 +0200
Task #0001595: CA - liste d'opérations - pas de choix de l'execice.
---
html/ajax_misc.php | 2 +-
html/js/noalyss_script.js | 12 ++++++++++--
include/anc_od.inc.php | 13 +++++++++++--
3 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/html/ajax_misc.php b/html/ajax_misc.php
index 3e5d09b..b764655 100644
--- a/html/ajax_misc.php
+++ b/html/ajax_misc.php
@@ -376,7 +376,7 @@ switch ($op)
$field=$http->get("field");
$type=$http->get("type");
$exercice=$http->get("exercice","number");
- $last=$http->get("last","number");
+ $last=$http->get("last","string",0);
// if last == 1 then show first and last periode of the
// exercice
diff --git a/html/js/noalyss_script.js b/html/js/noalyss_script.js
index 1a8cfc2..912fa10 100644
--- a/html/js/noalyss_script.js
+++ b/html/js/noalyss_script.js
@@ -3670,8 +3670,16 @@ function updatePeriode(p_dossier, p_exercice,
p_periode_from, p_periode_to, p_la
{
waiting_box();
var exercice = $(p_exercice).value;
- new Ajax.Updater(p_periode_from, "ajax_misc.php", {method: "get",
parameters: {op: "periode_change", "gDossier": p_dossier, "exercice": exercice,
field: p_periode_from, "type": "from", "last": p_last}});
- new Ajax.Updater(p_periode_to, "ajax_misc.php", {method: "get",
parameters: {op: "periode_change", "gDossier": p_dossier, "exercice": exercice,
field: p_periode_to, "type": "to", "last": p_last}});
+ new Ajax.Updater(p_periode_from, "ajax_misc.php",
+ { method: "get",
+ parameters: {op: "periode_change", "gDossier": p_dossier,
"exercice": exercice,
+ field: p_periode_from, "type": "from", "last": p_last}});
+ if ( p_periode_to && p_last ) {
+ new Ajax.Updater(p_periode_to, "ajax_misc.php",
+ { method: "get",
+ parameters: {op: "periode_change", "gDossier": p_dossier,
"exercice": exercice,
+ field: p_periode_to, "type": "to", "last": p_last}});
+ }
remove_waiting_box();
}
/**
diff --git a/include/anc_od.inc.php b/include/anc_od.inc.php
index fc7ca55..a636d6c 100644
--- a/include/anc_od.inc.php
+++ b/include/anc_od.inc.php
@@ -31,6 +31,7 @@ require_once NOALYSS_INCLUDE.'/lib/iselect.class.php';
require_once NOALYSS_INCLUDE.'/class/anc_operation.class.php';
require_once NOALYSS_INCLUDE.'/class/anc_plan.class.php';
require_once NOALYSS_INCLUDE.'/class/anc_group_operation.class.php';
+require_once NOALYSS_INCLUDE.'/class/exercice.class.php';
global $g_user;
$http=new HttpInput();
@@ -100,7 +101,14 @@ if ( isset($_GET['see']))
echo dossier::hidden();
$hid=new IHidden();
-
+ $exercice=$http->request("exercice","number",0);
+ if ($exercice == 0 ){
+ $exercice=$g_user->get_exercice();
+ }
+ $ex=new Exercice($cn);
+
$js=sprintf("updatePeriode(%d,'%s','%s')",Dossier::id(),'exercice','p_periode');
+ $wex=$ex->select('exercice',$exercice,' onchange="'.$js.'"');
+ echo $wex->input();
$hid->name="ac";
$hid->value=$http->request("ac");
echo $hid->input();
@@ -114,7 +122,8 @@ if ( isset($_GET['see']))
// filter on the current year
$filter_year=" where p_exercice='".$g_user->get_exercice()."'";
- $periode_start=$cn->make_array("select p_id,to_char(p_start,'DD-MM-YYYY')
from parm_periode $filter_year order by p_start,p_end",1);
+ $periode_start=$cn->make_array("select p_id,to_char(p_start,'DD-MM-YYYY')
from parm_periode
+ where p_exercice=$1 order by p_start,p_end",1,[$exercice]);
$g_user=new User($cn);
$current=$http->get("p_periode","number",$g_user->get_periode());
$w->value=$periode_start;
- [Noalyss-commit] [noalyss] 08/46: Cosmetic : add waiting_box when exporting, (continued)
- [Noalyss-commit] [noalyss] 08/46: Cosmetic : add waiting_box when exporting, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 04/46: File cleaning, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 06/46: Move function to the noalyss_script.js, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 10/46: remove direct access to superglobal, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 02/46: File cleaning, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 07/46: ocument : add phpunit test, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 11/46: protect SQL, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 16/46: Improve email sent : check if file attached, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 15/46: Task #0001417: Reconnexion souple connect, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 09/46: Add waiting_box, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 17/46: Task #0001595: CA - liste d'opérations - pas de choix de l'execice.,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 19/46: clean code : remove useless comment, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 20/46: New #0001983: CA - permettre désactivation poste, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 18/46: Bug: possible to set an empy name for an Analytic plan, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 21/46: Bug #0002011: Encodage opération – Verrouillage nombre de lignes si non vides, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 23/46: Task #0002014: Comptabilité analytique = export des pièces des opérations rapprochées, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 27/46: Task #0002014: Comptabilité analytique ordre par date Database_Core setter/getter for sql, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 24/46: Task #0001974: Duplication d'opération – Inclure l'intitulé, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 33/46: If database connx failed then reload the form, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 12/46: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 22/46: Cosmetic, Dany De Bontridder, 2021/07/13