Prise en compte de la selection du mois
This commit is contained in:
parent
680eeeb122
commit
fc1b2bd641
@ -5,9 +5,40 @@ class OrderController extends Zend_Controller_Action
|
||||
|
||||
public function kbisAction()
|
||||
{
|
||||
$ws = new Scores_Ws_Client('order', '0.1');
|
||||
$response = $ws->getKbisList();
|
||||
$request = $this->getRequest();
|
||||
|
||||
// --- Année de départ
|
||||
$user = new Scores_Utilisateur();
|
||||
$startYear = substr($user->identity->dateDebutCompte,0,4);
|
||||
if (empty($startYear)) {
|
||||
$startYear = 2006;
|
||||
}
|
||||
|
||||
// --- Date
|
||||
$date = new Zend_Date();
|
||||
$year = $date->toString('yyyy'); //Année en cours
|
||||
$month = $date->toString('MM'); //Mois en cours
|
||||
|
||||
$nbYear = $year - $startYear + 1;
|
||||
$selectYear = array();
|
||||
for( $i=0; $i<$nbYear; $i++ ) {
|
||||
$selectYear[] = $startYear + $i;
|
||||
}
|
||||
$this->view->Years = $selectYear;
|
||||
|
||||
$selectMonth = array('01','02','03','04','05','06','07','08','09','10','11','12');
|
||||
$this->view->Months = $selectMonth;
|
||||
|
||||
$selectedYear = $request->getParam('y', date('Y'));
|
||||
$this->view->year = $selectedYear;
|
||||
$selectedMonth = $request->getParam('m', date('m'));
|
||||
$this->view->month = $selectedMonth;
|
||||
// --- Fin Date
|
||||
|
||||
$ws = new Scores_Ws_Client('order', '0.1');
|
||||
$params = new stdClass();
|
||||
$params->month = $selectedYear.'-'.$selectedMonth;
|
||||
$response = $ws->getKbisList($params);
|
||||
if ($response === false) {
|
||||
$this->view->Error = true;
|
||||
} else {
|
||||
@ -17,8 +48,40 @@ class OrderController extends Zend_Controller_Action
|
||||
|
||||
public function bilaninputAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
// --- Année de départ
|
||||
$user = new Scores_Utilisateur();
|
||||
$startYear = substr($user->identity->dateDebutCompte,0,4);
|
||||
if (empty($startYear)) {
|
||||
$startYear = 2006;
|
||||
}
|
||||
|
||||
// --- Date
|
||||
$date = new Zend_Date();
|
||||
$year = $date->toString('yyyy'); //Année en cours
|
||||
$month = $date->toString('MM'); //Mois en cours
|
||||
|
||||
$nbYear = $year - $startYear + 1;
|
||||
$selectYear = array();
|
||||
for( $i=0; $i<$nbYear; $i++ ) {
|
||||
$selectYear[] = $startYear + $i;
|
||||
}
|
||||
$this->view->Years = $selectYear;
|
||||
|
||||
$selectMonth = array('01','02','03','04','05','06','07','08','09','10','11','12');
|
||||
$this->view->Months = $selectMonth;
|
||||
|
||||
$selectedYear = $request->getParam('y', date('Y'));
|
||||
$this->view->year = $selectedYear;
|
||||
$selectedMonth = $request->getParam('m', date('m'));
|
||||
$this->view->month = $selectedMonth;
|
||||
// --- Fin Date
|
||||
|
||||
$ws = new Scores_Ws_Client('order', '0.1');
|
||||
$response = $ws->getBilanInputList();
|
||||
$params = new stdClass();
|
||||
$params->month = $selectedYear.'-'.$selectedMonth;
|
||||
$response = $ws->getBilanInputList($params);
|
||||
|
||||
if ($response === false) {
|
||||
$this->view->Error = true;
|
||||
@ -29,8 +92,40 @@ class OrderController extends Zend_Controller_Action
|
||||
|
||||
public function greffebilanAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
// --- Année de départ
|
||||
$user = new Scores_Utilisateur();
|
||||
$startYear = substr($user->identity->dateDebutCompte,0,4);
|
||||
if (empty($startYear)) {
|
||||
$startYear = 2006;
|
||||
}
|
||||
|
||||
// --- Date
|
||||
$date = new Zend_Date();
|
||||
$year = $date->toString('yyyy'); //Année en cours
|
||||
$month = $date->toString('MM'); //Mois en cours
|
||||
|
||||
$nbYear = $year - $startYear + 1;
|
||||
$selectYear = array();
|
||||
for( $i=0; $i<$nbYear; $i++ ) {
|
||||
$selectYear[] = $startYear + $i;
|
||||
}
|
||||
$this->view->Years = $selectYear;
|
||||
|
||||
$selectMonth = array('01','02','03','04','05','06','07','08','09','10','11','12');
|
||||
$this->view->Months = $selectMonth;
|
||||
|
||||
$selectedYear = $request->getParam('y', date('Y'));
|
||||
$this->view->year = $selectedYear;
|
||||
$selectedMonth = $request->getParam('m', date('m'));
|
||||
$this->view->month = $selectedMonth;
|
||||
// --- Fin Date
|
||||
|
||||
$ws = new Scores_Ws_Client('order', '0.1');
|
||||
$response = $ws->getBilanList();
|
||||
$params = new stdClass();
|
||||
$params->month = $selectedYear.'-'.$selectedMonth;
|
||||
$response = $ws->getBilanList($params);
|
||||
|
||||
if ($response === false) {
|
||||
$this->view->Error = true;
|
||||
@ -42,8 +137,40 @@ class OrderController extends Zend_Controller_Action
|
||||
|
||||
public function greffeacteAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
// --- Année de départ
|
||||
$user = new Scores_Utilisateur();
|
||||
$startYear = substr($user->identity->dateDebutCompte,0,4);
|
||||
if (empty($startYear)) {
|
||||
$startYear = 2006;
|
||||
}
|
||||
|
||||
// --- Date
|
||||
$date = new Zend_Date();
|
||||
$year = $date->toString('yyyy'); //Année en cours
|
||||
$month = $date->toString('MM'); //Mois en cours
|
||||
|
||||
$nbYear = $year - $startYear + 1;
|
||||
$selectYear = array();
|
||||
for( $i=0; $i<$nbYear; $i++ ) {
|
||||
$selectYear[] = $startYear + $i;
|
||||
}
|
||||
$this->view->Years = $selectYear;
|
||||
|
||||
$selectMonth = array('01','02','03','04','05','06','07','08','09','10','11','12');
|
||||
$this->view->Months = $selectMonth;
|
||||
|
||||
$selectedYear = $request->getParam('y', date('Y'));
|
||||
$this->view->year = $selectedYear;
|
||||
$selectedMonth = $request->getParam('m', date('m'));
|
||||
$this->view->month = $selectedMonth;
|
||||
// --- Fin Date
|
||||
|
||||
$ws = new Scores_Ws_Client('order', '0.1');
|
||||
$response = $ws->getActeList();
|
||||
$params = new stdClass();
|
||||
$params->month = $selectedYear.'-'.$selectedMonth;
|
||||
$response = $ws->getActeList($params);
|
||||
|
||||
if ($response === false) {
|
||||
$this->view->Error = true;
|
||||
|
@ -1,5 +1,22 @@
|
||||
<div id="center">
|
||||
<h1>Commandes de saisie de bilan</h1>
|
||||
<div class="paragraph">
|
||||
<form action="<?=$this->url(array('controller'=>'order', 'action'=>'bilaninput'), null, true)?>">
|
||||
<select name="y" >
|
||||
<?php foreach($this->Years as $year) { ?>
|
||||
<option value="<?=$year?>" <?php if($year==$this->year) echo 'selected';?>><?=$year?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<select name="m">
|
||||
<?php foreach($this->Months as $month) { ?>
|
||||
<option value="<?=$month?>" <?php if($month==$this->month) echo 'selected';?>><?=$month?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
||||
<input type="submit" value="OK" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Liste des commandes</h2>
|
||||
<div class="paragraph">
|
||||
|
@ -1,5 +1,21 @@
|
||||
<div id="center">
|
||||
<h1>Commandes de pièces officielles - actes</h1>
|
||||
<div class="paragraph">
|
||||
<form action="<?=$this->url(array('controller'=>'order', 'action'=>'greffeacte'), null, true)?>">
|
||||
<select name="y" >
|
||||
<?php foreach($this->Years as $year) { ?>
|
||||
<option value="<?=$year?>" <?php if($year==$this->year) echo 'selected';?>><?=$year?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<select name="m">
|
||||
<?php foreach($this->Months as $month) { ?>
|
||||
<option value="<?=$month?>" <?php if($month==$this->month) echo 'selected';?>><?=$month?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
||||
<input type="submit" value="OK" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<h2>Liste des commandes</h2>
|
||||
<div class="paragraph">
|
||||
|
@ -1,5 +1,21 @@
|
||||
<div id="center">
|
||||
<h1>Commandes de pièces officielles - bilans au format image</h1>
|
||||
<div class="paragraph">
|
||||
<form action="<?=$this->url(array('controller'=>'order', 'action'=>'greffebilan'), null, true)?>">
|
||||
<select name="y" >
|
||||
<?php foreach($this->Years as $year) { ?>
|
||||
<option value="<?=$year?>" <?php if($year==$this->year) echo 'selected';?>><?=$year?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<select name="m">
|
||||
<?php foreach($this->Months as $month) { ?>
|
||||
<option value="<?=$month?>" <?php if($month==$this->month) echo 'selected';?>><?=$month?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
||||
<input type="submit" value="OK" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<h2>Liste des commandes</h2>
|
||||
<div class="paragraph">
|
||||
|
@ -1,5 +1,21 @@
|
||||
<div id="center">
|
||||
<h1>Commandes KBIS</h1>
|
||||
<div class="paragraph">
|
||||
<form action="<?=$this->url(array('controller'=>'order', 'action'=>'kbis'), null, true)?>">
|
||||
<select name="y" >
|
||||
<?php foreach($this->Years as $year) { ?>
|
||||
<option value="<?=$year?>" <?php if($year==$this->year) echo 'selected';?>><?=$year?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<select name="m">
|
||||
<?php foreach($this->Months as $month) { ?>
|
||||
<option value="<?=$month?>" <?php if($month==$this->month) echo 'selected';?>><?=$month?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
||||
<input type="submit" value="OK" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<h2>Liste des commandes</h2>
|
||||
<div class="paragraph">
|
||||
@ -25,7 +41,7 @@
|
||||
case 'M':?> Courriel <?php break;
|
||||
}?>
|
||||
</td>
|
||||
<td><?=$item->DateInsert?></td>
|
||||
<td style="white-space: nowrap;"><?=$item->DateInsert?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
|
@ -5,7 +5,7 @@ class Scores_Utilisateur
|
||||
* Identity
|
||||
* @var stdClass
|
||||
*/
|
||||
protected $identity = null;
|
||||
public $identity = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@ -13,8 +13,6 @@ class Scores_Utilisateur
|
||||
if ( $auth->hasIdentity() ) {
|
||||
$this->identity = $auth->getIdentity();
|
||||
}
|
||||
|
||||
return $this->identity;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user