Correction prévu et autre bug

This commit is contained in:
Damien LASSERRE 2012-04-16 15:23:17 +00:00
parent 605e963695
commit d8d52662f4
8 changed files with 42 additions and 18 deletions

View File

@ -20,7 +20,8 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
->appendStylesheet($pathStyle.'/jquery.qtip.css', 'all')
->appendStylesheet('/themes/jstree/default/style.css')
->appendStylesheet('/themes/jqueryui/jquery-ui.css', 'all')
->appendStylesheet($pathStyle.'/main.css', 'all');
->appendStylesheet($pathStyle.'/main.css', 'all')
->appendStylesheet('/themes/multiselect/css/ui.multiselect.css', 'all');
$view->headScript()
->appendFile($pathScript.'/jquery.js', 'text/javascript')
@ -29,7 +30,8 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
->appendFile($pathScript.'/jquery-ui.js', 'text/javascript')
->appendFile($pathScript.'/jquery.qtip.js', 'text/javascript')
->appendFile($pathScript.'/upload.js', 'text/javascript')
->appendFile($pathScript.'/scripts.js', 'text/javascript');
->appendFile($pathScript.'/scripts.js', 'text/javascript')
->appendFile($pathScript.'/ui.multiselect.js', 'text/javascript');
$view->headTitle()->setSeparator(' - ');
$view->headTitle('Odea');

View File

@ -109,9 +109,28 @@ class ComptageController extends Zend_Controller_Action
$sql = $dbMetier->select()->from('etablissements_act')->where('siren = ?', substr($siret, 0, 9))
->where('nic = ?', substr($siret, 9, strlen($siret)));
$result = $dbMetier->fetchRow($sql);
/*Provisoir...*/
$result['tel'] = str_pad($result['tel'], 10, 0, STR_PAD_LEFT);
$result['fax'] = str_pad($result['fax'], 10, 0, STR_PAD_LEFT);
$previ[] = $result;
$i++;
}
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
//$object->getProfil($user->username, $user->idClient);
$table = new Table_EnrichissementProfils();
$sql = $table->select()
->where('login = ?', $user->username)
->where('idClient = ?', $user->idClient);
$result = $table->fetchRow($sql);
if(!empty($result)) {
$result = $result->toArray();
$champs = json_decode($result['criteres']);
require_once('Scores/Enrichissement.php');
$fields = new Enrichissement();
$this->view->reference = $fields->getFields();
}
$this->view->champs = $champs;
$this->view->liste = $previ;
}
}

View File

@ -0,0 +1,5 @@
<?php
class Table_ProfilExtractions extends Libs_Table
{
protected $_name = 'profileExtraction';
}

View File

@ -6,20 +6,18 @@
</style>
<table width="100%" style="font-size:10px;">
<tr>
<th><b>Siret</b></th>
<th><b>Raison sociale</b></th>
<th><b>Code Postal</b></th>
<th><b>Ville</b></th>
<?php foreach($this->champs as $champ): ?>
<th style="border-left:1px solid black;padding:2px;"><b><?php echo $champ; ?></b></th>
<?php endforeach; ?>
</tr>
<?php
$i=0;
if(count($this->liste) > 0) {
foreach($this->liste as $societe) {
echo '<tr '.((($i%2) == 0)?'class="color"':'').'>';
echo '<td>'.$societe['siren'].$societe['nic'].'</td>';
echo '<td>'.$societe['raisonSociale'].'</td>';
echo '<td>'.$societe['adr_cp'].'</td>';
echo '<td>'.$societe['adr_ville'].'</td>';
foreach($this->champs as $champ) {
echo '<td style="border-left:1px solid silver;padding:2px">'.$societe[$this->reference[$champ]['column']].'</td>';
}
echo '</tr>';
$i++;
}

View File

@ -1,5 +1,5 @@
<div id="financiere">
<ul id="fieldsblock">
<ul id="fieldsblock" style="width:100%;height:100%;">
<li style="background: none; height:80px;">
<div id="bilType_ex" class="exclusion" style="display:none">
<?php echo $this->Field('bilType_ex', $this->fields->get('bilType_ex'));?>

View File

@ -12,7 +12,6 @@
<th><b>Date début</b></th>
<th><b>Date d'arret</b></th>
<th><b>Fichier</b></th>
<th><b>Actions</b></th>
</tr>
<?php foreach($this->enrichissements as $enrichissement): ?>
<tr>
@ -24,8 +23,7 @@
<td><?php echo $enrichissement['dateAdded']; ?></td>
<td><?php echo $enrichissement['dateStart']; ?></td>
<td><?php echo $enrichissement['dateStop']; ?></td>
<td><?php echo $enrichissement['fichier']; ?></td>
<td><a href="">Supprimer</a></td>
<td><a href="/enrichissement/download/id/<?php echo $enrichissement['id'];?>"><?php echo $enrichissement['fichier']; ?></a></td>
</tr>
<?php endforeach; ?>
</table>

View File

@ -169,11 +169,13 @@ class Enrichissement
),
'tel' => array(
'label' => "Téléphone",
'column' => 'tel'
'column' => 'tel' ,
'sql' => 'LPAD(tel, 10, 0000000000) AS tel'
),
'fax' => array(
'label' => "Fax",
'column' => 'fax'
'column' => 'fax',
'sql' => 'LPAD(fax, 10, 0000000000) AS fax'
),
'cj' => array(
'label' => "Forme juridique",

View File

@ -288,8 +288,8 @@ Class Fields
'label' => 'Tranche d\'effectif de l\'Entreprise',
'fields' => array(
'intervalSelect' => array('value' => array(
array('0', '1'),
array('1', '2'),
array('0', '1 ou 2'),
array('1', '3 ou 5'),
array('2', '3'),
array('3', '11'),
array('11', '12'),