Gestion de la selection du mois dans les commandes
This commit is contained in:
parent
4204240625
commit
ea2a215a53
@ -17,11 +17,11 @@ class Order extends Scores_Ws_Server
|
||||
{
|
||||
$this->authenticate();
|
||||
$this->permission('UPLOADBILAN');
|
||||
|
||||
|
||||
//Check siren
|
||||
|
||||
|
||||
$refCommande = uniqid();
|
||||
|
||||
|
||||
$data = array(
|
||||
'refCommande' => $refCommande,
|
||||
'siren' => $siren,
|
||||
@ -75,7 +75,7 @@ class Order extends Scores_Ws_Server
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Liste des commandes de saisie de bilan
|
||||
* @param string $month
|
||||
@ -91,12 +91,15 @@ class Order extends Scores_Ws_Server
|
||||
}
|
||||
$dateStart = $month.'-01 00:00:00';
|
||||
$dateEnd = $month.'-31 23:59:59';
|
||||
|
||||
|
||||
$list = array();
|
||||
|
||||
|
||||
try {
|
||||
$commandeM = new Application_Model_Sdv1OrderBilanInput();
|
||||
$sql = $commandeM->select()->where('userId=?', $this->User->id)->order('dateInsert DESC');
|
||||
$sql = $commandeM->select()
|
||||
->where('userId=?', $this->User->id)
|
||||
->where('dateInsert BETWEEN "'.$dateStart.'" AND "'.$dateEnd.'"')
|
||||
->order('dateInsert DESC');
|
||||
$result = $commandeM->fetchAll($sql);
|
||||
if (count($result) > 0) {
|
||||
foreach($result as $item) {
|
||||
@ -120,7 +123,7 @@ class Order extends Scores_Ws_Server
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
@ -133,7 +136,7 @@ class Order extends Scores_Ws_Server
|
||||
protected function getBilanInputDetail($ref)
|
||||
{
|
||||
$this->authenticate();
|
||||
|
||||
|
||||
try {
|
||||
$commandeM = new Application_Model_Sdv1OrderBilanInput();
|
||||
$sql = $commandeM->select()->where('userId=?', $this->User->id)->where('refCommande=?', $ref);
|
||||
@ -158,10 +161,10 @@ class Order extends Scores_Ws_Server
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Liste des commandes KBIS
|
||||
* @param string $month
|
||||
@ -177,12 +180,15 @@ class Order extends Scores_Ws_Server
|
||||
}
|
||||
$dateStart = $month.'-01 00:00:00';
|
||||
$dateEnd = $month.'-31 23:59:59';
|
||||
|
||||
|
||||
$list = array();
|
||||
|
||||
|
||||
try {
|
||||
$commandeM = new Application_Model_Sdv1GreffeCommandesKb();
|
||||
$sql = $commandeM->select()->where('login=?', $this->User->login)->order('dateInsert DESC');
|
||||
$sql = $commandeM->select()
|
||||
->where('login=?', $this->User->login)
|
||||
->where('dateInsert BETWEEN "'.$dateStart.'" AND "'.$dateEnd.'"')
|
||||
->order('dateInsert DESC');
|
||||
$result = $commandeM->fetchAll($sql);
|
||||
if (count($result) > 0) {
|
||||
foreach($result as $item) {
|
||||
@ -204,10 +210,10 @@ class Order extends Scores_Ws_Server
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Detail de la commande d'un KBIS
|
||||
* @param unknown $ref
|
||||
@ -217,7 +223,7 @@ class Order extends Scores_Ws_Server
|
||||
protected function getKbisDetail($ref)
|
||||
{
|
||||
$this->authenticate();
|
||||
|
||||
|
||||
try {
|
||||
$commandeM = new Application_Model_Sdv1GreffeCommandesKb();
|
||||
$sql = $commandeM->select()->where('login=?', $this->User->login)->where('refCommande=?', $ref);
|
||||
@ -240,14 +246,14 @@ class Order extends Scores_Ws_Server
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
protected function getKbisFile($ref)
|
||||
{
|
||||
$this->authenticate();
|
||||
|
||||
|
||||
// --- Paramètres
|
||||
$hostname = 'http://'.$_SERVER['SERVER_NAME'];
|
||||
if ($_SERVER['SERVER_PORT']!='80'){
|
||||
@ -256,16 +262,16 @@ class Order extends Scores_Ws_Server
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->secure).'/kbis';
|
||||
$file = null;
|
||||
|
||||
|
||||
// --- Lecture des informations de la commande
|
||||
try {
|
||||
$commandeM = new Application_Model_Sdv1GreffeCommandesKb();
|
||||
$sql = $commandeM->select()->where('login=?', $this->User->login)->where('refCommande=?', $ref);
|
||||
$item = $commandeM->fetchRow($sql);
|
||||
if ($item !== null) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$cmd = new BilanInput();
|
||||
$cmd->Reference = strtoupper($item->refCommande);
|
||||
$cmd->Mode = $item->mode;
|
||||
@ -283,12 +289,12 @@ class Order extends Scores_Ws_Server
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Liste des commandes d'acte infogreffe
|
||||
* @param string $month
|
||||
@ -304,12 +310,15 @@ class Order extends Scores_Ws_Server
|
||||
}
|
||||
$dateStart = $month.'-01 00:00:00';
|
||||
$dateEnd = $month.'-31 23:59:59';
|
||||
|
||||
|
||||
$list = array();
|
||||
|
||||
|
||||
try {
|
||||
$commandeM = new Application_Model_Sdv1GreffeCommandesAc();
|
||||
$sql = $commandeM->select()->where('login=?', $this->User->login)->order('dateInsert DESC');
|
||||
$sql = $commandeM->select()
|
||||
->where('login=?', $this->User->login)
|
||||
->where('dateInsert BETWEEN "'.$dateStart.'" AND "'.$dateEnd.'"')
|
||||
->order('dateInsert DESC');
|
||||
$result = $commandeM->fetchAll($sql);
|
||||
if (count($result) > 0) {
|
||||
foreach($result as $item) {
|
||||
@ -337,13 +346,13 @@ class Order extends Scores_Ws_Server
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
||||
protected function getActeDetail($ref){}
|
||||
protected function getActeFile($ref){}
|
||||
|
||||
|
||||
/**
|
||||
* Liste des commandes de bilan infogreffe
|
||||
* @param string $month
|
||||
@ -359,9 +368,9 @@ class Order extends Scores_Ws_Server
|
||||
}
|
||||
$dateStart = $month.'-01 00:00:00';
|
||||
$dateEnd = $month.'-31 23:59:59';
|
||||
|
||||
|
||||
$list = array();
|
||||
|
||||
|
||||
try {
|
||||
$commandeM = new Application_Model_Sdv1GreffeCommandesBi();
|
||||
$sql = $commandeM->select()->where('login=?', $this->User->login)->order('dateInsert DESC');
|
||||
@ -388,10 +397,10 @@ class Order extends Scores_Ws_Server
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Détail de la commande de bilan Infogreffe
|
||||
* @param unknown $ref
|
||||
@ -401,7 +410,7 @@ class Order extends Scores_Ws_Server
|
||||
protected function getBilanDetail($ref)
|
||||
{
|
||||
$this->authenticate();
|
||||
|
||||
|
||||
try {
|
||||
$commandeM = new Application_Model_Sdv1GreffeCommandesKb();
|
||||
$sql = $commandeM->select()->where('login=?', $this->User->login)->where('refCommande=?', $ref);
|
||||
@ -426,19 +435,19 @@ class Order extends Scores_Ws_Server
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
protected function getBilanFile($ref){}
|
||||
|
||||
|
||||
protected function setInvestigation()
|
||||
{
|
||||
$this->authenticate();
|
||||
$this->permission('enquetec');
|
||||
|
||||
|
||||
//Table pour le stockage des demandes d'investigation
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user