225 lines
6.7 KiB
PHP
225 lines
6.7 KiB
PHP
<?php
|
|
class OrderController extends Zend_Controller_Action
|
|
{
|
|
protected $theme;
|
|
|
|
public function init()
|
|
{
|
|
// --- Theme
|
|
$this->theme = Zend_Registry::get('theme');
|
|
}
|
|
|
|
public function indexAction(){}
|
|
|
|
public function kbisAction()
|
|
{
|
|
$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 {
|
|
$this->view->Cmd = $response->item;
|
|
}
|
|
}
|
|
|
|
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');
|
|
$params = new stdClass();
|
|
$params->month = $selectedYear.'-'.$selectedMonth;
|
|
$response = $ws->getBilanInputList($params);
|
|
|
|
if ($response === false) {
|
|
$this->view->Error = true;
|
|
} else {
|
|
$this->view->Cmd = $response->item;;
|
|
}
|
|
}
|
|
|
|
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');
|
|
$params = new stdClass();
|
|
$params->month = $selectedYear.'-'.$selectedMonth;
|
|
$response = $ws->getBilanList($params);
|
|
|
|
if ($response === false) {
|
|
$this->view->Error = true;
|
|
} else {
|
|
$this->view->Cmd = $response->item;;
|
|
}
|
|
|
|
}
|
|
|
|
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');
|
|
$params = new stdClass();
|
|
$params->month = $selectedYear.'-'.$selectedMonth;
|
|
$response = $ws->getActeList($params);
|
|
|
|
if ($response === false) {
|
|
$this->view->Error = true;
|
|
} else {
|
|
$this->view->Cmd = $response->item;;
|
|
}
|
|
|
|
}
|
|
|
|
public function assostatutAction()
|
|
{
|
|
$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
|
|
|
|
}
|
|
|
|
} |