tarifAction
This commit is contained in:
parent
69515da3c7
commit
0a030d6fcf
@ -1011,28 +1011,30 @@ class DashboardController extends Zend_Controller_Action
|
||||
|
||||
$ws = new WsScores();
|
||||
|
||||
if ($request->isPost()){
|
||||
$log = $request->getParam('log');
|
||||
$service = $request->getParam('service');
|
||||
$type = $request->getParam('type');
|
||||
$priceUnit = $request->getParam('priceUnit');
|
||||
$limit = $request->getParam('limit');
|
||||
$date = $request->getParam('date');
|
||||
$duree = $request->getParam('duree');
|
||||
$doublon = $request->getParam('doublon');
|
||||
$result = $ws->setClientTarif($idClient, $log, $service, $type, $priceUnit, $limit, $date, $duree, $doublon);
|
||||
if(is_int($result)) {
|
||||
$url = $this->view->url(array('controller'=>'dashboard','action'=>'tarifs','idClient'=>$idClient));
|
||||
$this->redirect($url);
|
||||
} else {
|
||||
$this->view->assign('log', $log);
|
||||
$this->view->assign('service', $service);
|
||||
$this->view->assign('type', $type);
|
||||
$this->view->assign('priceUnit', $priceUnit);
|
||||
$this->view->assign('date', $date);
|
||||
$this->view->assign('duree', $duree);
|
||||
$this->view->assign('doublon', $doublon);
|
||||
$this->view->assign('error', $result);
|
||||
if ( $request->isXmlHttpRequest() ) {
|
||||
$this->_helper->layout()->disableLayout();
|
||||
if ( $request->isPost() ) {
|
||||
$log = $request->getParam('log');
|
||||
$service = $request->getParam('service');
|
||||
$type = $request->getParam('type');
|
||||
$priceUnit = $request->getParam('priceUnit');
|
||||
$limit = $request->getParam('limit');
|
||||
$date = $request->getParam('date');
|
||||
$duree = $request->getParam('duree');
|
||||
$doublon = $request->getParam('doublon');
|
||||
$result = $ws->setClientTarif($idClient, $log, $service, $type, $priceUnit, $limit, $date, $duree, $doublon);
|
||||
if(is_int($result)) {
|
||||
//OK
|
||||
} else {
|
||||
$this->view->assign('log', $log);
|
||||
$this->view->assign('service', $service);
|
||||
$this->view->assign('type', $type);
|
||||
$this->view->assign('priceUnit', $priceUnit);
|
||||
$this->view->assign('date', $date);
|
||||
$this->view->assign('duree', $duree);
|
||||
$this->view->assign('doublon', $doublon);
|
||||
$this->view->assign('error', $result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user