Merge
This commit is contained in:
commit
65447d43b8
@ -185,26 +185,27 @@ class GestionController extends Zend_Controller_Action
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract sirets from database
|
||||
* Extract only SIRETs from database
|
||||
* @todo : To csv file
|
||||
*/
|
||||
public function siretscsvAction()
|
||||
public function extractAction()
|
||||
{
|
||||
$id = $this->getRequest()->getParam('id');
|
||||
$table = new Application_Model_EnrichissementIdentifiants();
|
||||
$sql = $table->select()
|
||||
->where('idComptage = ?', $id);
|
||||
$sql = $table->select()->where('idComptage = ?', $id);
|
||||
$result = $table->fetchRow($sql);
|
||||
if(!empty($result)) {
|
||||
$result = $result->toArray();
|
||||
$sirets = json_decode($result['identifiants'], true);
|
||||
$content = '';
|
||||
foreach($sirets as $siret) {
|
||||
echo $siret."\n";
|
||||
}
|
||||
$content.= $siret.",";
|
||||
}
|
||||
$this->view->assign('content', $content);
|
||||
|
||||
}else {
|
||||
echo 'Aucune commande d\'enrichissement sur ce comptage';
|
||||
}
|
||||
exit;
|
||||
$this->view->assign('message', 'Aucune commande d\'enrichissement sur ce comptage');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
12
application/views/default/scripts/gestion/extract.phtml
Normal file
12
application/views/default/scripts/gestion/extract.phtml
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
if ($this->content) {
|
||||
$content_type = 'application/csv-tab-delimited-table';
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo $this->content;
|
||||
} else {
|
||||
echo $this->message;
|
||||
}
|
@ -137,9 +137,10 @@ if (count($tabEnteteLabel)>0){
|
||||
}
|
||||
//Mise à jour des éléments
|
||||
if ($opts->id) {
|
||||
$commandesM->update('enrichissement_identifiants', array(
|
||||
$commandesM->update(array(
|
||||
'dateStart'=>date('Y-m-d H:i:s'),
|
||||
'fichier' => basename($outFile)),
|
||||
'fichier' => basename($outFile)
|
||||
),
|
||||
"id = ".$commande->id);
|
||||
}
|
||||
|
||||
|
@ -503,9 +503,9 @@ Les zones urbaines sensibles constituent un sous-ensemble de l'ensemble plus lar
|
||||
'label' => 'Derniers éléments financiers',
|
||||
'fields' => array(
|
||||
'selectMultiple' => array('value' => array(
|
||||
'I' => 'Inconnus',
|
||||
'R' => 'Réels',
|
||||
'E' => 'Estimés')
|
||||
'1' => 'Inconnus', // I
|
||||
'2' => 'Réels', // R
|
||||
'3' => 'Estimés') //E
|
||||
),
|
||||
),
|
||||
'famille' => 'financier',
|
||||
|
Loading…
Reference in New Issue
Block a user