Remove the use of WDate
This commit is contained in:
parent
75e2dd7c19
commit
e20af343a0
@ -302,7 +302,8 @@ class Infogreffe
|
|||||||
$commande->addChild('dossier_statut',$ref[4]);
|
$commande->addChild('dossier_statut',$ref[4]);
|
||||||
$commande->addChild('dossier_chrono',$ref[5]);
|
$commande->addChild('dossier_chrono',$ref[5]);
|
||||||
$commande->addChild('num_depot',$ref[6]);
|
$commande->addChild('num_depot',$ref[6]);
|
||||||
$commande->addChild('date_cloture', WDate::dateT('Ymd','d/m/Y', $ref[1]));
|
$date = new Zend_Date($ref[1],'yyyyMMdd');
|
||||||
|
$commande->addChild('date_cloture', $date->toString('dd/MM/yyyy'));
|
||||||
|
|
||||||
$fichierOption = $option;
|
$fichierOption = $option;
|
||||||
|
|
||||||
@ -596,14 +597,21 @@ class Infogreffe
|
|||||||
foreach($actes as $key => $depot)
|
foreach($actes as $key => $depot)
|
||||||
{
|
{
|
||||||
$tabActes[$key]['num_depot'] = $depot['num_depot'];
|
$tabActes[$key]['num_depot'] = $depot['num_depot'];
|
||||||
$tabActes[$key]['date_depot'] = WDate::dateT('Y-m-d', 'd/m/Y', $depot['date_depot']);
|
$date = new Zend_Date($depot['date_depot'],'yyyy-MM-dd');
|
||||||
|
$tabActes[$key]['date_depot'] = $date->toString('dd/MM/yyyy');
|
||||||
|
|
||||||
//Pour chaque acte dans le depot
|
//Pour chaque acte dans le depot
|
||||||
foreach($depot['depot'] as $acte)
|
foreach($depot['depot'] as $acte)
|
||||||
{
|
{
|
||||||
//Génération date (date_acte peut être vide)
|
//Génération date (date_acte peut être vide)
|
||||||
if(!empty($acte['date_acte'])){ $date = WDate::dateT('Y-m-d', 'Ymd', $acte['date_acte']); }
|
if(!empty($acte['date_acte'])){
|
||||||
else { $date = WDate::dateT('Y-m-d', 'Ymd', $depot['date_depot']); }
|
$dateF = new Zend_Date($acte['date_acte'],'yyyy-MM-dd');
|
||||||
|
$date = $dateF->toString('yyyyMMdd');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$dateF = new Zend_Date($depot['date_depot'],'yyyy-MM-dd');
|
||||||
|
$date = $dateF->toString('yyyyMMdd');
|
||||||
|
}
|
||||||
|
|
||||||
//Recherche du fichier suivant le siren, le type de document et la reference
|
//Recherche du fichier suivant le siren, le type de document et la reference
|
||||||
$file_exist = false;
|
$file_exist = false;
|
||||||
@ -632,13 +640,14 @@ class Infogreffe
|
|||||||
Zend_Registry::get('firebug')->info($acte);
|
Zend_Registry::get('firebug')->info($acte);
|
||||||
if ($result->type != $acte['type_acte'] && $result->type2 == '') {
|
if ($result->type != $acte['type_acte'] && $result->type2 == '') {
|
||||||
Zend_Registry::get('firebug')->info('Update Database');
|
Zend_Registry::get('firebug')->info('Update Database');
|
||||||
|
$dateDepot = new Zend_Date($depot['date_depot'],'yyyy-MM-dd');
|
||||||
//Add to the database
|
//Add to the database
|
||||||
try {
|
try {
|
||||||
$actesM->update(array(
|
$actesM->update(array(
|
||||||
'type2' => $acte['type_acte'],
|
'type2' => $acte['type_acte'],
|
||||||
'type_libelle' => $acte['type_acte_libelle'],
|
'type_libelle' => $acte['type_acte_libelle'],
|
||||||
'num_depot' => $depot['num_depot'],
|
'num_depot' => $depot['num_depot'],
|
||||||
'date_depot' => WDate::dateT('Y-m-d', 'Ymd', $depot['date_depot'])
|
'date_depot' => $dateDepot->toString('yyyyMMdd')
|
||||||
), 'id='.$result->id);
|
), 'id='.$result->id);
|
||||||
} catch (Zend_Exception $e) {
|
} catch (Zend_Exception $e) {
|
||||||
Zend_Registry::get('firebug')->info($e->getMessage());
|
Zend_Registry::get('firebug')->info($e->getMessage());
|
||||||
@ -648,7 +657,7 @@ class Infogreffe
|
|||||||
$actesM->update(array(
|
$actesM->update(array(
|
||||||
'type_libelle' => $acte['type_acte_libelle'],
|
'type_libelle' => $acte['type_acte_libelle'],
|
||||||
'num_depot' => $depot['num_depot'],
|
'num_depot' => $depot['num_depot'],
|
||||||
'date_depot' => WDate::dateT('Y-m-d', 'Ymd', $depot['date_depot'])
|
'date_depot' => $dateDepot->toString('yyyyMMdd')
|
||||||
), 'id='.$result->id);
|
), 'id='.$result->id);
|
||||||
} catch (Zend_Exception $e) {
|
} catch (Zend_Exception $e) {
|
||||||
Zend_Registry::get('firebug')->info($e->getMessage());
|
Zend_Registry::get('firebug')->info($e->getMessage());
|
||||||
@ -686,13 +695,15 @@ class Infogreffe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Assignation
|
//Assignation
|
||||||
$tabActe['num_acte'] = $acte['num_acte'];
|
$tabActe['num_acte'] = $acte['num_acte'];
|
||||||
$tabActe['nbpages_acte'] = $acte['nbpages_acte'];
|
$tabActe['nbpages_acte'] = $acte['nbpages_acte'];
|
||||||
$tabActe['type'] = $acte['type_acte'];
|
$tabActe['type'] = $acte['type_acte'];
|
||||||
$tabActe['type_lib'] = $acte['type_acte_libelle'];
|
$tabActe['type_lib'] = $acte['type_acte_libelle'];
|
||||||
$tabActe['decision'] = $acte['decision']['libelle'];
|
$tabActe['decision'] = $acte['decision']['libelle'];
|
||||||
$tabActe['date_acte'] = ($date!='') ? WDate::dateT('Ymd', 'd/m/Y', $date) : '';
|
$tabActe['date_acte'] = ($date!='') ? $dateF->toString('dd/MM/yyyy') : '';
|
||||||
$tabActe['mode'] = $mode;
|
$tabActe['mode'] = $mode;
|
||||||
$tabActe['ref'] = $ref;
|
$tabActe['ref'] = $ref;
|
||||||
|
|
||||||
@ -710,8 +721,14 @@ class Infogreffe
|
|||||||
foreach($actes['actes'] as $acte)
|
foreach($actes['actes'] as $acte)
|
||||||
{
|
{
|
||||||
//Génération date (date_acte peut être vide)
|
//Génération date (date_acte peut être vide)
|
||||||
if(!empty($acte['date_acte'])){ $date = WDate::dateT('Y-m-d', 'Ymd', $acte['date_acte']); }
|
if(!empty($acte['date_acte'])){
|
||||||
else { $date = WDate::dateT('Y-m-d', 'Ymd', $actes['date_depot']); }
|
$dateF = new Zend_Date($acte['date_acte'],'yyyy-MM-dd');
|
||||||
|
$date = $dateF->toString('yyyyMMdd');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$dateF = new Zend_Date($actes['date_depot'],'yyyy-MM-dd');
|
||||||
|
$date = $dateF->toString('yyyyMMdd');
|
||||||
|
}
|
||||||
|
|
||||||
$tabActe = '';
|
$tabActe = '';
|
||||||
|
|
||||||
@ -887,8 +904,14 @@ class Infogreffe
|
|||||||
|
|
||||||
foreach($actes as $acte)
|
foreach($actes as $acte)
|
||||||
{
|
{
|
||||||
if(!empty($acte['date_acte'])){ $date = $acte['date_acte']; }
|
if(!empty($acte['date_acte'])){
|
||||||
else { $date = WDate::dateT('Y-m-d', 'Ymd', $result['date_depot']); }
|
$dateF = new Zend_Date($acte['date_acte'],'yyyy-MM-dd');
|
||||||
|
$date = $dateF->toString('yyyyMMdd');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$dateF = new Zend_Date($result['date_depot'],'yyyy-MM-dd');
|
||||||
|
$date = $dateF->toString('yyyyMMdd');
|
||||||
|
}
|
||||||
|
|
||||||
$ref = $acte['type_acte'].'-'.$date.'-'.$num_gest.'-'.$acte['num_acte'];
|
$ref = $acte['type_acte'].'-'.$date.'-'.$num_gest.'-'.$acte['num_acte'];
|
||||||
|
|
||||||
@ -899,13 +922,14 @@ class Infogreffe
|
|||||||
//Add to the database
|
//Add to the database
|
||||||
$actesM = new Application_Model_ActesFiles();
|
$actesM = new Application_Model_ActesFiles();
|
||||||
if ( false !== $fichierdl) {
|
if ( false !== $fichierdl) {
|
||||||
|
$dateDepot = new Zend_Date($result['date_depot'],'yyyy-MM-dd');
|
||||||
$actesM->insert(array(
|
$actesM->insert(array(
|
||||||
'siren' => $siren,
|
'siren' => $siren,
|
||||||
'type' => $acte['type_acte'],
|
'type' => $acte['type_acte'],
|
||||||
'date' => $date,
|
'date' => $date,
|
||||||
'num' => $acte['num_acte'],
|
'num' => $acte['num_acte'],
|
||||||
'num_depot' => $result['num_depot'],
|
'num_depot' => $result['num_depot'],
|
||||||
'date_depot' => WDate::dateT('Y-m-d', 'Ymd', $result['date_depot']),
|
'date_depot' => $dateDepot->toString('yyyyMMdd'),
|
||||||
'file' => $fichierdl,
|
'file' => $fichierdl,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@ -1170,8 +1194,15 @@ class Infogreffe
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Génération date (date_acte peut être vide)
|
//Génération date (date_acte peut être vide)
|
||||||
if(!empty($acte['date_acte'])){ $date = WDate::dateT('Y-m-d', 'Ymd', $acte['date_acte']); }
|
if(!empty($acte['date_acte'])){
|
||||||
else { $date = WDate::dateT('Y-m-d', 'Ymd', $depot['date_depot']); }
|
$dateF = new Zend_Date($acte['date_acte'],'yyyy-MM-dd');
|
||||||
|
$date = $dateF->toString('yyyyMMdd');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$dateF = new Zend_Date($depot['date_depot'],'yyyy-MM-dd');
|
||||||
|
$date = $dateF->toString('yyyyMMdd');
|
||||||
|
}
|
||||||
|
|
||||||
return $acte['type_acte'].'-'.$date.'-'.$num_gest.'-'.$num_acte;
|
return $acte['type_acte'].'-'.$date.'-'.$num_gest.'-'.$num_acte;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1206,7 +1237,9 @@ class Infogreffe
|
|||||||
$ref =
|
$ref =
|
||||||
$bilan['millesime'].'_'.
|
$bilan['millesime'].'_'.
|
||||||
$bilan['type_comptes'].'-'.
|
$bilan['type_comptes'].'-'.
|
||||||
WDate::dateT('Y-m-d', 'Ymd', $bilan['date_cloture_iso']).'-'.
|
substr($bilan['date_cloture_iso'],0,4).
|
||||||
|
substr($bilan['date_cloture_iso'],5,2).
|
||||||
|
substr($bilan['date_cloture_iso'],8,2).'-'.
|
||||||
$bilan['num_gest']['greffe'].'-'.
|
$bilan['num_gest']['greffe'].'-'.
|
||||||
$bilan['num_gest']['dossier_millesime'].'-'.
|
$bilan['num_gest']['dossier_millesime'].'-'.
|
||||||
$bilan['num_gest']['dossier_statut'].'-'.
|
$bilan['num_gest']['dossier_statut'].'-'.
|
||||||
|
Loading…
Reference in New Issue
Block a user