SD-12 Decrement operationnel

This commit is contained in:
Claire DELBOS 2017-03-08 18:55:37 +01:00
parent 0a57a8300b
commit 7d5cb9bbdb
5 changed files with 32 additions and 8 deletions

View File

@ -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;

View File

@ -60,5 +60,17 @@ Dernière mise à jour le <?=Date('d/m/Y',strtotime($this->infos['balance']['upd
<?php endforeach;?>
</table>
<?php endif;?>
<?php if(isset($this->infos) && isset($this->infos['used'])):?>
<h2>Historique de vos consommations</h2>
<table class="data" style="max-width:80%;">
<?php foreach($this->infos['used'] as $row):?>
<tr>
<td><?=Date('d/m/Y H:i:s',strtotime($row['created']))?></td>
<td class="nbr"><?=$row['consumption']?>&nbsp;Credit</td>
<td><?=$row['idLog']?></td>
</tr>
<?php endforeach;?>
</table>
<?php endif;?>
</div>

View File

@ -66,7 +66,7 @@
</div>
<div class="row">
<div class="bannierebas">&nbsp;</div>
<dim class="alert alert-info"><?=$this->msg;?></div>
<div class="alert alert-info"><?=$this->msg;?></div>
</div>
</div>

View File

@ -23,7 +23,7 @@
</div>
<div class="col-md-6">
<form method="post" action="<?=$this->url(array('controller'=>'auth', 'action'=>'userssocreate'), 'default', true)?>">
<form id="ssoform" method="post" action="<?=$this->url(array('controller'=>'auth', 'action'=>'userssocreate'), 'default', true)?>">
<h2 class="form-signin-heading">Extranet <small>Scores &amp; Décisions</small></h2>
<?php
//Error
@ -63,7 +63,7 @@
<div class="form-group">
<label for="siret">SIRET</label>
<input type="text" class="form-control" name="siret" value="<?=$this->FormSiret?>">
<input type="text" class="form-control" id="siret" name="siret" value="<?=$this->FormSiret?>">
</div>
<div class="form-group">
@ -98,7 +98,15 @@
<p class="text-muted credit"> &copy; <?=date('Y')?> <a href="http://www.scores-decisions.com">Scores & Décisions SAS</a>.</p>
</div>
</div>
<script>
$(function(){
$('#ssoform').submit(function(e){
e.preventDefault();
alert($('input[name=siret]').value;
//$('form[name=cgu]').submit();
});
});
</script>
<?php echo $this->inlineScript(); ?>
</body>
</html>

View File

@ -9,10 +9,6 @@ return array(
'debug' => true,
'errorMsg' => array('MSG'),
),
'canUse' => array(
'debug' => true,
'errorMsg' => array('MSG'),
),
)
);