Small change in Infogreffe library

This commit is contained in:
Michael RICOIS 2013-11-12 13:12:32 +00:00
parent 797cb0359f
commit 15038e6b8c
2 changed files with 10 additions and 15 deletions

View File

@ -165,17 +165,14 @@ class PiecesController extends Zend_Controller_Action
if(substr($commande->refDocument, 0, 3) == 'ST-') {
$ref = trim($commande->refDocument);
$c = Zend_Registry::get('config');
$refFile = realpath($c->profil->path->data).'/pdf'.
'/acte-'.$siren.'-'.trim($commande->refDocument).'.pdf';
$refFile = realpath($c->profil->path->data).'/greffes/actes/acte-'.$siren.'-'.trim($commande->refDocument).'.pdf';
$checkFile = true;
break;
}
}
}
if( $checkFile && file_exists($refFile) ) {
$lienCommande = '<br/>'.
'<a href="./fichier/pdf/acte-'.$siren.'-'.$ref.'.pdf'.
'" target="_blank">'.$lib.'</a>';
$lienCommande = '<br/><a href="./fichier/pdf/acte-'.$siren.'-'.$ref.'.pdf" target="_blank">'.$lib.'</a>';
}
//Génération du lien de commande suivant le mode de diffusion
switch($acteS['mode']) {

View File

@ -596,20 +596,20 @@ class Infogreffe
foreach($actes as $key => $depot)
{
$tabActes[$key]['num_depot'] = $depot['num_depot'];
$date = new Zend_Date($depot['date_depot'],'yyyy-MM-dd');
$tabActes[$key]['date_depot'] = $date->toString('dd/MM/yyyy');
$dateDepot = new Zend_Date($depot['date_depot'],'yyyy-MM-dd');
$tabActes[$key]['date_depot'] = $dateDepot->toString('dd/MM/yyyy');
//Pour chaque acte dans le depot
foreach($depot['depot'] as $acte)
{
//Génération date (date_acte peut être vide)
if(!empty($acte['date_acte'])){
$dateF = new Zend_Date($acte['date_acte'],'yyyy-MM-dd');
$date = $dateF->toString('yyyyMMdd');
$dateActe = new Zend_Date($acte['date_acte'],'yyyy-MM-dd');
$date = $dateActe->toString('yyyyMMdd');
}
else {
$dateF = new Zend_Date($depot['date_depot'],'yyyy-MM-dd');
$date = $dateF->toString('yyyyMMdd');
$dateActe = $dateDepot;
$date = $dateDepot->toString('yyyyMMdd');
}
//Recherche du fichier suivant le siren, le type de document et la reference
@ -634,7 +634,6 @@ class Infogreffe
Zend_Registry::get('firebug')->info($result);
$fichier = $this->pathData.$this->actePath($ref).$result->file;
Zend_Registry::get('firebug')->info($fichier);
$dateDepot = new Zend_Date($depot['date_depot'],'yyyy-MM-dd');
if ( file_exists($fichier) )
{
Zend_Registry::get('firebug')->info($acte);
@ -694,15 +693,13 @@ class Infogreffe
}
}
//Assignation
$tabActe['num_acte'] = $acte['num_acte'];
$tabActe['nbpages_acte'] = $acte['nbpages_acte'];
$tabActe['type'] = $acte['type_acte'];
$tabActe['type_lib'] = $acte['type_acte_libelle'];
$tabActe['decision'] = $acte['decision']['libelle'];
$tabActe['date_acte'] = $dateF->toString('dd/MM/yyyy');
$tabActe['date_acte'] = $dateActe->toString('dd/MM/yyyy');
$tabActe['mode'] = $mode;
$tabActe['ref'] = $ref;
@ -715,6 +712,7 @@ class Infogreffe
function formatActesT($actes)
{
set_time_limit(90);
$tabActes = array();
$tabActe = array();
foreach($actes['actes'] as $acte)