Task #0001595: CA - liste d'opérations - pas de choix de l'execice.
This commit is contained in:
parent
f8142caf68
commit
1eb9607600
3 changed files with 22 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue