From 7d5cb9bbdbe9f21997024e0fe463fb39514d5aba Mon Sep 17 00:00:00 2001 From: Claire DELBOS Date: Wed, 8 Mar 2017 18:55:37 +0100 Subject: [PATCH] SD-12 Decrement operationnel --- .../achatclient/controllers/IndexController.php | 8 ++++++++ .../views/default/scripts/index/index.phtml | 12 ++++++++++++ .../default/views/default/scripts/auth/index.phtml | 2 +- .../views/default/scripts/auth/userssoform.phtml | 14 +++++++++++--- library/Scores/Ws/Client/Credit.php | 4 ---- 5 files changed, 32 insertions(+), 8 deletions(-) diff --git a/application/modules/achatclient/controllers/IndexController.php b/application/modules/achatclient/controllers/IndexController.php index 6b9fb39a9..ae35950fc 100644 --- a/application/modules/achatclient/controllers/IndexController.php +++ b/application/modules/achatclient/controllers/IndexController.php @@ -54,6 +54,7 @@ class Achatclient_IndexController extends Zend_Controller_Action } $ws = new Scores_Ws_Client('credit', '0.1'); $infocredit = $ws->infoCredit(); + //var_dump($infocredit);die; try { } catch(Exception $e) { $this->error('index','Pas de crédit'); @@ -88,6 +89,13 @@ class Achatclient_IndexController extends Zend_Controller_Action $infos['paid'][$no][$v->key]=$v->value; }} } + $infos['used']=array(); + foreach($infocredit->used as $no => $r){ + $infos['used'][$no]=array(); + foreach($r as $o){foreach($o as $k => $v){ + $infos['used'][$no][$v->key]=$v->value; + }} + } $this->logger->info(print_r($user,1)); $this->view->infos=$infos; //echo __LINE__;var_dump($this->view->infos);die; diff --git a/application/modules/achatclient/views/default/scripts/index/index.phtml b/application/modules/achatclient/views/default/scripts/index/index.phtml index fe9ed92fe..7b9525ac0 100644 --- a/application/modules/achatclient/views/default/scripts/index/index.phtml +++ b/application/modules/achatclient/views/default/scripts/index/index.phtml @@ -60,5 +60,17 @@ Dernière mise à jour le infos['balance']['upd +infos) && isset($this->infos['used'])):?> +

Historique de vos consommations

+ +infos['used'] as $row):?> + + + + + + +
 Credit
+ diff --git a/application/modules/default/views/default/scripts/auth/index.phtml b/application/modules/default/views/default/scripts/auth/index.phtml index ca2205237..43a29cb82 100644 --- a/application/modules/default/views/default/scripts/auth/index.phtml +++ b/application/modules/default/views/default/scripts/auth/index.phtml @@ -66,7 +66,7 @@
 
- msg;?>
+
msg;?>
diff --git a/application/modules/default/views/default/scripts/auth/userssoform.phtml b/application/modules/default/views/default/scripts/auth/userssoform.phtml index 62777d4f0..29c08c513 100644 --- a/application/modules/default/views/default/scripts/auth/userssoform.phtml +++ b/application/modules/default/views/default/scripts/auth/userssoform.phtml @@ -23,7 +23,7 @@
-
+ - +
@@ -98,7 +98,15 @@

© Scores & Décisions SAS.

- + inlineScript(); ?> diff --git a/library/Scores/Ws/Client/Credit.php b/library/Scores/Ws/Client/Credit.php index e882ee072..f99b7ac94 100644 --- a/library/Scores/Ws/Client/Credit.php +++ b/library/Scores/Ws/Client/Credit.php @@ -9,10 +9,6 @@ return array( 'debug' => true, 'errorMsg' => array('MSG'), ), - 'canUse' => array( - 'debug' => true, - 'errorMsg' => array('MSG'), - ), ) );