Merge, update from trunk

This commit is contained in:
Michael RICOIS 2013-10-27 16:22:33 +00:00
commit add02110b8
79 changed files with 677 additions and 1850 deletions

View File

@ -435,7 +435,8 @@ class DashboardController extends Zend_Controller_Action
$document = 'DERNIER STATUS À JOUR';
} else {
$explodedRef = explode('-', $listCommandes[$i]->refDocument);
$dateref = WDate::dateT('Ymd','d/m/Y',$explodedRef[1]);
$date = new Zend_Date($explodedRef[1], 'yyyyMMdd');
$dateref = $date->toString('dd/MM/yyyy');
$depot = ', Dépôt n°'.$explodedRef[6].' au '.$dateref;
$document = $this->typeActes['a'.substr($listCommandes[$i]->refDocument,0,2)].$depot;
}

View File

@ -51,8 +51,7 @@ class ErrorController extends Zend_Controller_Action
$message.= "Referer : ".$_SERVER['HTTP_REFERER']."\n";
$c = Zend_Registry::get('config');
require_once 'Scores/Mail.php';
$mail = new Mail();
$mail = new Scores_Mail();
$mail->setSubject('[ERREUR APPLICATIVE] - '.$c->profil->server->name.' -'.date('Ymd'));
$mail->setBodyTexte($message);
$mail->setFrom('supportdev');

View File

@ -10,11 +10,9 @@ class EvaluationController extends Zend_Controller_Action
$this->siret = $request->getParam('siret');
$this->id = $request->getParam('id', 0);
require_once 'common/dates.php';
require_once 'Scores/WsScores.php';
require_once 'Scores/SessionEntreprise.php';
require_once 'Scores/IdentiteEntreprise.php';
require_once 'Finance/RatiosData.php';
}
public function indexAction()
@ -108,7 +106,6 @@ class EvaluationController extends Zend_Controller_Action
$this->view->headScript()->appendFile('/themes/default/scripts/finance.js', 'text/javascript');
$user = new Scores_Utilisateur();
$wdate = new WDate();
if(!$user->checkPerm('INDISCORE2') && !$user->checkPerm('INDISCORE2P'))
$this->_forward('perms', 'error');
@ -136,7 +133,7 @@ class EvaluationController extends Zend_Controller_Action
//Formattage des données
$typeBilan = 'N';
$ratiosData = new RatiosData($infos);
$ratiosData = new Scores_Finance_Ratios_Data($infos);
$nbBilanN = $ratiosData->getNbBilan('N');
$nbBilanC = $ratiosData->getNbBilan('C');
@ -166,8 +163,9 @@ class EvaluationController extends Zend_Controller_Action
$dataTotal[$idRatio] = $ratiosData->dTotal($typeBilan, $annee, $idRatio, $valRatio['total']);
$dInfo[$idRatio] = $valRatio['total_info'];
}
$date = new Zend_Date($annee, 'yyyyMMdd');
$tabResult[] = array(
'dateCloture' => $wdate->dateT('Ymd','d/m/Y',$annee),
'dateCloture' => $date->toString('dd/MM/yyyy'),
'duree' => $infosAnnee[$annee]->duree.' Mois',
'ratio' => $data,
'total' => $dataTotal,
@ -218,9 +216,10 @@ class EvaluationController extends Zend_Controller_Action
$this->view->assign('dBlock', $dBlock);
$dateRadiation = '';
if(isset($indiscore->DateRadiation) && $indiscore->DateRadiation!='' && $indiscore->DateRadiation!='0000-00-00')
$this->view->assign('dateRadiation', $wdate->dateT('Ymd', 'd/m/Y', str_replace('-','',$indiscore->DateRadiation)));
if(isset($indiscore->DateRadiation) && $indiscore->DateRadiation!='' && $indiscore->DateRadiation!='0000-00-00') {
$date = new Zend_Date(str_replace('-','',$indiscore->DateRadiation), 'yyyyMMdd');
$this->view->assign('dateRadiation', $date->toString('dd/MM/yyyy'));
}
foreach($indiscore->scores as $name => $sc){
if($name == 'ConanH')
$score[$name] = array($sc, 'Score Conan Holder');
@ -243,8 +242,6 @@ class EvaluationController extends Zend_Controller_Action
break;
}
$score['Indiscore'] = array($indiscore->Indiscore20, 'IndiScore');
$this->view->assign('siret', $this->siret);
$this->view->assign('id', $this->id);
$this->view->assign('siren', $siren);
@ -463,8 +460,7 @@ class EvaluationController extends Zend_Controller_Action
file_put_contents($outfile, $xml);
//Génération du pdf
require_once 'wkhtmltopdf/wkhtmltopdf.php';
$wkhtmltopdf = new wkhtmltopdf();
$wkhtmltopdf = new Scores_Wkhtml_Pdf();
$wkhtmltopdf->setOptions('footer-right', 'Page [page] sur [toPage]');
$wkhtmltopdf->setOptions('header-right', date('d/m/Y H:i:s'));
$wkhtmltopdf->setOptions('disable-external-links');
@ -662,8 +658,7 @@ class EvaluationController extends Zend_Controller_Action
$texte = "<pre>".print_r($InfoUser, 1)."</pre>".
"<pre>".print_r($InfoEnq, 1)."</pre>";
require_once 'Scores/Mail.php';
$mail = new Mail();
$mail = new Scores_Mail();
$mail->setFrom('production');
$mail->addToKey('support');
$mail->setSubject($sujet);
@ -818,8 +813,7 @@ class EvaluationController extends Zend_Controller_Action
if (preg_match('#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,5}$#',$email)) {
$message = 'Entreprise mise sous surveillance scoring partenaire !';
require_once 'Scores/Mail.php';
$mail = new Mail();
$mail = new Scores_Mail();
$mail->setSubject("Demande de surveillance score CreditSafe pour $siren à ".$email);
$user = new Scores_Utilisateur();

View File

@ -6,12 +6,8 @@ class FinanceController extends Zend_Controller_Action
public function init()
{
require_once 'common/dates.php';
require_once 'Scores/SessionEntreprise.php';
require_once 'Scores/WsScores.php';
require_once 'Finance/Liasse.php';
require_once 'Finance/RatiosData.php';
require_once 'Finance/RatiosGraph.php';
$request = $this->getRequest();
$this->siret = $request->getParam('siret');
@ -71,7 +67,7 @@ class FinanceController extends Zend_Controller_Action
}
//Formattage des données
$ratiosData = new RatiosData($infos);
$ratiosData = new Scores_Finance_Ratios_Data($infos);
$nbBilanN = $ratiosData->getNbBilan('N');
$nbBilanC = $ratiosData->getNbBilan('C');
@ -92,7 +88,7 @@ class FinanceController extends Zend_Controller_Action
sort($annees);
if (count($annees)>1){
//Générer les différents graphiques d'évolutions
$ratiosGraph = new RatiosGraph($this->siret, $this->id);
$ratiosGraph = new Scores_Finance_Ratios_Graph($this->siret, $this->id);
$tabGraphEvol = array();
foreach($tabRatio as $idRatio => $infoRatio){
$dataGraphEvol = array();
@ -138,8 +134,9 @@ class FinanceController extends Zend_Controller_Action
$data[$idRatio] = $ratiosData->dRatio($typeBilan, $annee, $idRatio);
$dataEvol[$idRatio] = $ratiosData->dEvol($typeBilan, $annee, $valRatio['evol']);
}
$date = new Zend_Date($annee, 'yyyyMMdd');
$tabResult[] = array(
'dateCloture' => WDate::dateT('Ymd','d/m/Y',$annee),
'dateCloture' => $date->toString('dd/MM/yyyy'),
'duree' => $infosAnnee[$annee]->duree.' Mois',
'entrep' => $data,
'entrepEvol' => $dataEvol,
@ -220,7 +217,7 @@ class FinanceController extends Zend_Controller_Action
$infos = $this->getRequest()->getParam('infos');
}
$ratiosData = new RatiosData($infos);
$ratiosData = new Scores_Finance_Ratios_Data($infos);
$nbBilanN = $ratiosData->getNbBilan('N');
$nbBilanC = $ratiosData->getNbBilan('C');
@ -234,7 +231,7 @@ class FinanceController extends Zend_Controller_Action
$infosAnnee = $ratiosData->getBilansInfo($typeBilan);
$annees = array_keys($infosAnnee);
$ratiosGraph = new RatiosGraph($this->siret, $this->id);
$ratiosGraph = new Scores_Finance_Ratios_Graph($this->siret, $this->id);
$tabRatioActif = array(
'r59' => array( 'titre' => 'Actif Immobilisé Net', 'class' => 'subhead'),
@ -332,8 +329,9 @@ class FinanceController extends Zend_Controller_Action
);
$ratiosGraph->bilansgraphactif($dataGraphActif, $typeBilan, $annee);
$date = new Zend_Date($annee, 'yyyyMMdd');
$tabResultActif[] = array(
'dateCloture' => WDate::dateT('Ymd','d/m/Y',$annee),
'dateCloture' => $date->toString('dd/MM/yyyy'),
'duree' => $infosAnnee[$annee]->duree.' Mois',
'entrep' => $data,
'total' => $dataTotal,
@ -347,19 +345,20 @@ class FinanceController extends Zend_Controller_Action
}
//Génération données graphique passif
$dataGraphPassif = array(
$ratiosData->graphPercent($typeBilan, $annee, 'r70','r22'),
$ratiosData->graphPercent($typeBilan, $annee, 'r71','r22'),
$ratiosData->graphPercent($typeBilan, $annee, 'r72','r22'),
$ratiosData->graphPercent($typeBilan, $annee, 'r83','r22'),
$ratiosData->graphPercent($typeBilan, $annee, 'r84','r22'),
$ratiosData->graphPercent($typeBilan, $annee, 'r85','r22'),
$ratiosData->graphPercent($typeBilan, $annee, 'r86','r22'),
$ratiosData->graphPercent($typeBilan, $annee, 'r87','r22'),
$ratiosData->graphPercent($typeBilan, $annee, 'r70', 'r22'),
$ratiosData->graphPercent($typeBilan, $annee, 'r71', 'r22'),
$ratiosData->graphPercent($typeBilan, $annee, 'r72', 'r22'),
$ratiosData->graphPercent($typeBilan, $annee, 'r83', 'r22'),
$ratiosData->graphPercent($typeBilan, $annee, 'r84', 'r22'),
$ratiosData->graphPercent($typeBilan, $annee, 'r85', 'r22'),
$ratiosData->graphPercent($typeBilan, $annee, 'r86', 'r22'),
$ratiosData->graphPercent($typeBilan, $annee, 'r87', 'r22'),
);
$ratiosGraph->bilansgraphpassif($dataGraphPassif, $typeBilan, $annee);
$date = new Zend_Date($annee, 'yyyyMMdd');
$tabResultPassif[] = array(
'dateCloture' => WDate::dateT('Ymd','d/m/Y',$annee),
'dateCloture' => $date->toString('dd/MM/yyyy'),
'duree' => $infosAnnee[$annee]->duree.' Mois',
'entrep' => $data,
'total' => $dataTotal,
@ -383,8 +382,9 @@ class FinanceController extends Zend_Controller_Action
);
$ratiosGraph->bilansgraphsig($dataGraphSIG, $typeBilan, $annee);
$date = new Zend_Date($annee, 'yyyyMMdd');
$tabResultSig[] = array(
'dateCloture' => WDate::dateT('Ymd','d/m/Y',$annee),
'dateCloture' => $date->toString('dd/MM/yyyy'),
'duree' => $infosAnnee[$annee]->duree.' Mois',
'entrep' => $data,
'total' => $dataTotal,
@ -555,7 +555,7 @@ class FinanceController extends Zend_Controller_Action
$tabRatio = array( $ratio => $tabRatio[$ratio] );
}
$ratiosData = new RatiosData($infos);
$ratiosData = new Scores_Finance_Ratios_Data($infos);
$nbBilanN = $ratiosData->getNbBilan('N');
$nbBilanC = $ratiosData->getNbBilan('C');
@ -567,7 +567,7 @@ class FinanceController extends Zend_Controller_Action
if ($nbBilanN!=0 || $nbBilanC!=0)
{
//Génération Graphique evolution
$ratiosGraph = new RatiosGraph($this->siret, $this->id);
$ratiosGraph = new Scores_Finance_Ratios_Graph($this->siret, $this->id);
$infosAnnee = $ratiosData->getBilansInfo($typeBilan);
$annees = array_keys($infosAnnee);
@ -577,7 +577,8 @@ class FinanceController extends Zend_Controller_Action
$tabAnnees = array();
foreach($annees as $annee){
$tabAnnees[$annee] = WDate::dateT('Ymd', 'd/m/Y', $annee);
$date = new Zend_Date($annee, 'yyyyMMdd');
$tabAnnees[$annee] = $date->toString('dd/MM/yyyy');
}
$tabResult = array();
@ -672,8 +673,7 @@ class FinanceController extends Zend_Controller_Action
$path = $c->profil->path->files . '/';
$file = 'liasse-'.substr($this->siret, 0, 9).'-'.$this->id.'-'.$type.$date.'.xls';
require_once 'Finance/LiasseXLS.php';
$liasse = new LiasseXLS($model);
$liasse = new Scores_Finance_Liasse_XLS($model);
$liasse->dataModel(substr($this->siret, 0, 9), $entreprise->getRaisonSociale(), $data);
$liasse->dataFile($file);
@ -835,7 +835,10 @@ class FinanceController extends Zend_Controller_Action
'amortissements' => 'Amortissements',
'provisions' => 'Provisions',
'creancesDettes' => 'Créances, Dettes',
'affectation' => 'Affectation'
'resultatfiscal' => 'Résultat fiscal',
'deficit' => 'Déficit',
'affectation' => 'Affectation',
'annexe16' => 'Valeur ajoutée',
),
'S' => array(
'actif' => 'Actif',
@ -895,7 +898,6 @@ class FinanceController extends Zend_Controller_Action
if( $listBilan->nbReponses > 0 )
{
$date = $request->getParam('date',$listBilan->result->item[0]->dateExercice.':'.$listBilan->result->item[0]->typeBilan);
$dateFunction = new WDate();
foreach ($listBilan->result->item as $item)
$liste[$item->typeBilan][] = $item->dateExercice;
@ -908,9 +910,15 @@ class FinanceController extends Zend_Controller_Action
if ($infos === false) $this->_forward('soap', 'error');
$infoLiasse = new Liasse($infos, $unite);
$infoLiasse = new Scores_Finance_Liasse($infos, $unite);
$this->view->assign('dateCloture', $infoLiasse->getInfo('dateCloture'));
$this->view->assign('dateCloturePre', $infoLiasse->getInfo('dateCloturePre'));
$date = new Zend_Date($infoLiasse->getInfo('dateCloture'), 'yyyyMMdd');
$this->view->assign('dateClotureD', $date->toString('dd/MM/yyyy'));
$date = new Zend_Date($infoLiasse->getInfo('dateCloturePre'), 'yyyyMMdd');
$this->view->assign('dateCloturePreD', $date->toString('dd/MM/yyyy'));
$this->view->assign('dureesMois', $infoLiasse->getInfo('dureeMois'));
$this->view->assign('dureesMoisPre', $infoLiasse->getInfo('dureeMoisPre'));
@ -925,7 +933,6 @@ class FinanceController extends Zend_Controller_Action
$this->view->assign('exportxls', true);
}
}
$this->view->assign('dateFunction', $dateFunction);
$this->view->assign('liste', $liste);
$this->view->assign('id', $id);
$this->view->assign('type', $type);
@ -1026,7 +1033,7 @@ class FinanceController extends Zend_Controller_Action
$infos = $ws->getRatios($siren, 'ratios');
//Formattage des données
$ratiosData = new RatiosData($infos);
$ratiosData = new Scores_Finance_Ratios_Data($infos);
$nbBilanN = $ratiosData->getNbBilan('N');
$nbBilanC = $ratiosData->getNbBilan('C');
@ -1239,7 +1246,7 @@ class FinanceController extends Zend_Controller_Action
$labels[] = substr($date, 0, 4);
}
$graph = new RatiosGraph($this->siret, $this->id);
$graph = new Scores_Finance_Ratios_Graph($this->siret, $this->id);
$image = $graph->flux($labels, $data, $typeBilan);
if ( $image != false ){
$this->view->assign('graph', $image);

View File

@ -131,6 +131,7 @@ class GiantController extends Zend_Controller_Action
$giantConstroller = new GiantControllerLib($this->getRequest()->getParam('CompanyId').'-'.$this->getRequest()->getParam('Type'));
$identiteController->ficheAction();
$fiche = $identiteController->getObjet('fiche');
foreach($creditrecommendationAction as $action => $val) {
if(isset($creditrecommendation->DataSet->Company->$val)) {
$creditrecommendation = $giantConstroller->$action($creditrecommendation);
@ -142,6 +143,7 @@ class GiantController extends Zend_Controller_Action
$this->view->report = $fiche;
$this->view->Type = $this->getRequest()->getParam('Type');
$this->view->dateFunction = new WDate();
$this->view->assign('exportObjet', $creditrecommendation);
}
public function compactAction()
@ -165,7 +167,6 @@ class GiantController extends Zend_Controller_Action
$giantConstroller = new GiantControllerLib($this->getRequest()->getParam('CompanyId').'-'.$this->getRequest()->getParam('Type'));
$identiteController->ficheAction();
$fiche = $identiteController->getObjet('fiche');
foreach($compactAction as $action => $val) {
if(isset($compact->DataSet->Company->$val)) {
$compact = $giantConstroller->$action($compact);
@ -177,6 +178,7 @@ class GiantController extends Zend_Controller_Action
$this->view->report = $fiche;
$this->view->Type = $this->getRequest()->getParam('Type');
$this->view->dateFunction = new WDate();
$this->view->assign('exportObjet', $compact);
}
public function fullAction()
@ -213,6 +215,7 @@ class GiantController extends Zend_Controller_Action
$this->view->report = $fiche;
$this->view->Type = $this->getRequest()->getParam('Type');
$this->view->dateFunction = new WDate();
$this->view->assign('exportObjet', $full);
}
public function getForm()

View File

@ -16,7 +16,6 @@ class IdentiteController extends Zend_Controller_Action
require_once 'Scores/WsScores.php';
require_once 'Scores/SessionEntreprise.php';
require_once 'Scores/IdentiteEntreprise.php';
require_once 'common/dates.php';
}
public function preDispatch()
@ -58,15 +57,11 @@ class IdentiteController extends Zend_Controller_Action
$autrePage = $this->getRequest()->getParam('apage');
//Récupération des informations
if ( empty($autrePage) ) {
$ws = new Scores_Ws();
$infos = $ws->Entreprise_getIdentite($this->siret, $this->id);
if ($infos === false) {
$this->forward('soap', 'error', null, array(
'type' => $ws->getResponseType(),
'message' => $ws->getResponseMsg(),
'error' => $ws->getError(),
));
if (empty($autrePage)) {
$ws = new WsScores();
$infos = $ws->getIdentite($this->siret, $this->id);
if ($infos === false) {
$this->_forward('soap', 'error');
}
} else {
$infos = $this->getRequest()->getParam('infos');
@ -90,21 +85,22 @@ class IdentiteController extends Zend_Controller_Action
);
$datemajTexte = $dateDerMaj = '';
$datemajTexte.= '<table>';
$wdate = new WDate();
foreach ( $tabDate as $dateId => $dateLib ) {
if ( isset($infos->{$dateId})
&& !empty($infos->{$dateId})
&& $infos->{$dateId}!='0000-00-00') {
if ( $dateId == 'DateMajID') {
$dateDerMaj = ' le '.$wdate->dateT('Y-m-d', 'd/m/Y', $infos->DateMajID);
$date = new Zend_Date($infos->DateMajID, 'yyyy-MM-dd');
$dateDerMaj = ' le '.$date->toString('dd/MM/yyyy');
}
if ( $dateId == 'DateMajID' && !$user->checkModeEdition()) {
} else {
$date = new Zend_Date($infos->{$dateId}, 'yyyy-MM-dd');
$datemajTexte.= '<tr>';
$datemajTexte.= '<td>'.$dateLib.'</td>';
$datemajTexte.= '<td>'.$wdate->dateT('Y-m-d', 'd/m/Y', $infos->{$dateId}).'</td>';
$datemajTexte.= '<td>'.$date->toString('dd/MM/yyyy').'</td>';
$datemajTexte.= '</tr>';
}
@ -1164,6 +1160,7 @@ class IdentiteController extends Zend_Controller_Action
public function streetviewAction()
{
$request = $this->getRequest();
$siret = $request->getParam('siret');
if ( $request->isXmlHttpRequest() ) {
$this->_helper->layout()->disableLayout();
@ -1173,7 +1170,7 @@ class IdentiteController extends Zend_Controller_Action
$lon = $request->getParam('lon', '');
$num = $request->getParam('heading', 0);
$streetview = new Scores_Google_Streetview();
$streetview = new Scores_Google_Streetview($siret);
if ( $lat != '' && $lon != '' ) {
$deg = $streetview->getNumDeg();
$nbImg = count($deg);

View File

@ -165,7 +165,7 @@ class JuridiqueController extends Zend_Controller_Action
$this->renderScript('juridique/annonce.phtml');
}
//Affichage pour la liste des annonces
//Affichage pour la liste des annonces
} else {
$nbReponses = $infos->nbReponses;

View File

@ -41,53 +41,54 @@ class PiecesController extends Zend_Controller_Action
$request = $this->getRequest();
$email = $request->getParam('email', '');
$reference = $request->getParam('reference');
if(!empty($email)) {
if (empty($email)) {
$message="ERREUR : Veuillez saisir une adresse email valide pour la commande de pièces.";
} elseif (empty($reference)) {
$message="ERREUR : Veuillez saisir une référence pour la commande de pièces.";
} else {
$c = Zend_Registry::get('config');
$fp=fopen(realpath($c->profil->path->data).'/log/commande_asso.csv', 'a');
fwrite($fp, date('Y/m/d H:i:s').";$siren;".$email.';'.$login.';'.$user->getEmail().';'.$user->getIpAddress()."\n");
fclose($fp);
$erreur = false;
$c = Zend_Registry::get('config');
$fp=fopen(realpath($c->profil->path->data).'/log/commande_asso.csv', 'a');
fwrite($fp, date('Y/m/d H:i:s').";$siren;".$email.';'.$login.';'.$user->getEmail().';'.$user->getIpAddress()."\n");
fclose($fp);
$siren = substr($this->siret, 0, 9);
$siren = substr($this->siret, 0, 9);
$infoAsso = new stdClass();
$infoAsso->siren = $siren;
$infoAsso->waldec = '';
$infoAsso->idEntreprise = $this->id;
$infoAsso->raisonSociale = $this->entrep->getRaisonSociale();
$infoAsso = new stdClass();
$infoAsso->siren = $siren;
$infoAsso->waldec = '';
$infoAsso->idEntreprise = $this->id;
$infoAsso->raisonSociale = $this->entrep->getRaisonSociale();
$infoDemande = new stdClass();
$infoDemande->reference = $request->getParam('reference');
$infoDemande->email = $email;
$infoDemande->tel = $request->getParam('tel');
$infoDemande->fax = '';
$infoDemande->nom = '';
$infoDemande->service = '';
$infoDemande->societe = '';
$infoDemande->adresse = '';
$infoDemande->cp = '';
$infoDemande->ville = '';
$infoDemande = new stdClass();
$infoDemande->reference = $request->getParam('reference');
$infoDemande->email = $email;
$infoDemande->tel = $request->getParam('tel');
$infoDemande->fax = '';
$infoDemande->nom = '';
$infoDemande->service = '';
$infoDemande->societe = '';
$infoDemande->adresse = '';
$infoDemande->cp = '';
$infoDemande->ville = '';
$ws = new WsScores();
$reponse = $ws->setCmdAsso($infoAsso, $infoDemande); //@todo : vérfier les logs de facturation
Zend_Registry::get('firebug')->info($reponse);
$annee = substr($reponse->commande->dateCommande,0,4);
$mois = substr($reponse->commande->dateCommande,4,2);
$jour = substr($reponse->commande->dateCommande,6,2);
$heure = substr($reponse->commande->dateCommande,8,2);
$minutes = substr($reponse->commande->dateCommande,10,2);
$ref = $reponse->commande->refCmd;
if( isset($ref) && !empty($ref) ) {
$message = 'Votre demande à été prise en compte le '.$jour.'/'.$mois.'/'.$annee.' à '.$heure.' h '.$minutes.' sous la référence <b>'.$ref.'</b>.';
} else {
$message = 'Une erreur s\'est produite lors du passage de votre commande.';
}
}
$ws = new WsScores();
$reponse = $ws->setCmdAsso($infoAsso, $infoDemande); //@todo : vérfier les logs de facturation
Zend_Registry::get('firebug')->info($reponse);
$annee = substr($reponse->commande->dateCommande,0,4);
$mois = substr($reponse->commande->dateCommande,4,2);
$jour = substr($reponse->commande->dateCommande,6,2);
$heure = substr($reponse->commande->dateCommande,8,2);
$minutes = substr($reponse->commande->dateCommande,10,2);
$ref = $reponse->commande->refCmd;
if( isset($ref) && !empty($ref) )
{
$message = 'Votre demande à été prise en compte le '.$jour.'/'.$mois.'/'.$annee.' à '.$heure.' h '.$minutes.' sous la référence <b>'.$ref.'</b>.';
} else {
$message = 'Une erreur s\'est produite lors du passage de votre commande.';
}
} else {
$message="ERREUR : Veuillez saisir une adresse email valide pour la commande de pièces.";
}
$this->view->assign('message', $message);
$this->view->assign('siren', substr($this->siret, 0,9));
$this->view->assign('siret', $this->siret);
@ -316,8 +317,9 @@ class PiecesController extends Zend_Controller_Action
if ($rncsDepots!==false) {
if (count($rncsDepots->item)>0) {
foreach($rncsDepots->item as $d) {
$date = WDate::dateT('Y-m-d', 'd/m/Y', $d->DateDepot);
if ($date==$depot['date_depot']){
$date = new Zend_Date($d->DateDepot, 'yyyy-MM-dd');
$dateDepot = $date->toString('dd/MM/yyyy');
if ($dateDepot==$depot['date_depot']){
$data.= '<br/> - '.$d->LibDepot;
}
}
@ -637,8 +639,7 @@ class PiecesController extends Zend_Controller_Action
//Envoi mail de commande courrier
if($type=='C') {
require_once 'Scores/Mail.php';
$mail = new Mail();
$mail = new Scores_Mail();
$mail->setFrom('contact');
$mail->addToKey('support');
$mail->setSubject('[COMMANDE PIECES] - '.'COMMANDE DE '.strtoupper($vue));
@ -751,7 +752,8 @@ class PiecesController extends Zend_Controller_Action
$dejaCommande = true;
if ($rows[0]->login==$user->getLogin())
{
$dateCommande = WDate::dateT('Y-m-d','d/m/Y',$rows[0]->dateCommande);
$date = new Zend_Date($rows[0]->dateCommande, 'yyyy-MM-dd');
$dateCommande = $date->toString('dd/MM/yyyy');
$idCommande = $rows[0]['idCommande'];
if(empty($rows[0]->emailCommande)) $noemail = true;
$sameLogin = true;
@ -804,7 +806,8 @@ class PiecesController extends Zend_Controller_Action
$dejaCommande = true;
if ($rows[0]->login==$user->getLogin())
{
$dateCommande = WDate::dateT('Y-m-d','d/m/Y',$rows[0]->dateCommande);
$date = new Zend_Date($rows[0]->dateCommande, 'yyyy-MM-dd');
$dateCommande = $date->toString('dd/MM/yyyy');
$idCommande = $rows[0]->idCommande;
if(empty($rows[0]->emailCommande)) $noemail = true;
$sameLogin = true;
@ -877,8 +880,7 @@ class PiecesController extends Zend_Controller_Action
$message = '<br/>Impossible de télécharger le fichier auprès de notre partenaire.';
//Envoi Mail avec reférence erreur
require_once 'Scores/Mail.php';
$mail = new Mail();
$mail = new Scores_Mail();
$mail->setFrom('supportdev');
$mail->addToKey('supportdev');
$sujet = "[ERREUR TELECHARGEMENT INFOGREFFE] - ".date('d')."/".date('m')."/".date('Y');
@ -952,7 +954,8 @@ class PiecesController extends Zend_Controller_Action
$dejaCommande = true;
if ($rows[0]['login']==$user->getLogin())
{
$dateCommande = WDate::dateT('Y-m-d','d/m/Y',$rows[0]['dateCommande']);
$date = new Zend_Date($rows[0]['dateCommande'], 'yyyy-MM-dd');
$dateCommande = $date->toString('dd/MM/yyyy');
$idCommande = $rows[0]->idCommande;
if(empty($rows[0]->emailCommande)) $noemail = true;
$sameLogin = true;
@ -998,7 +1001,8 @@ class PiecesController extends Zend_Controller_Action
$dejaCommande = true;
if ($rows[0]->login==$user->getLogin())
{
$dateCommande = WDate::dateT('Y-m-d','d/m/Y',$rows[0]->dateCommande);
$date = new Zend_Date($rows[0]->dateCommande, 'yyyy-MM-dd');
$dateCommande = $date->toString('dd/MM/yyyy');
$idCommande = $rows[0]->idCommande;
if(empty($rows[0]->emailCommande)) $noemail = true;
$sameLogin = true;
@ -1075,8 +1079,7 @@ class PiecesController extends Zend_Controller_Action
//Envoi Mail avec reférence erreur
require_once 'Scores/Mail.php';
$mail = new Mail();
$mail = new Scores_Mail();
$mail->setFrom('supportdev');
$mail->addToKey('supportdev');
$sujet = "[ERREUR TELECHARGEMENT INFOGREFFE] - ".date('d')."/".date('m')."/".date('Y');
@ -1154,8 +1157,7 @@ class PiecesController extends Zend_Controller_Action
//Vérification des champs
if (!empty($email)) {
//Envoi du mail
require_once 'Scores/Mail.php';
$mail = new Mail();
$mail = new Scores_Mail();
$mail->setFrom('contact');
$mail->addToKey('support');
$mail->setSubject('[COMMANDE PIECES] - KBIS par email');
@ -1209,8 +1211,7 @@ class PiecesController extends Zend_Controller_Action
}
if(!$error) {
//Envoi du mail
require_once 'Scores/Mail.php';
$mail = new Mail();
$mail = new Scores_Mail();
$mail->setFrom('contact');
$mail->addToKey('support');
$mail->setSubject('[COMMANDE PIECES] - KBIS par courrier');
@ -1288,8 +1289,7 @@ class PiecesController extends Zend_Controller_Action
$privilegesJ = join(', ', $privileges);
$privilegesLog = join('-', $privileges);
require_once 'Scores/Mail.php';
$mail = new Mail();
$mail = new Scores_Mail();
$mail->setFrom('contact');
$mail->addToKey('support');
$mail->setSubject('[COMMANDE PIECES] - PRIVILEGES par email');
@ -1540,8 +1540,7 @@ class PiecesController extends Zend_Controller_Action
{
if(!empty($params['email']))
{
require_once 'Scores/Mail.php';
$mail = new Mail();
$mail = new Scores_Mail();
$mail->setFrom('contact');
$mail->addToKey('support');
$mail->setSubject('[COMMANDE PIECES] - KBIS par email après essai(s) de téléchargement');

View File

@ -1,9 +1,9 @@
<?php
class PrintController extends Zend_Controller_Action
{
public function init(){}
/**
* Renvoie les paramètres pour l'impression
*/
@ -71,7 +71,10 @@ class PrintController extends Zend_Controller_Action
$params['id'] = $elements[3];
break;
case 'giant':
$params['idRapport'] = $elements[2];
$params['Pays'] = $elements[2];
$params['Type'] = $elements[3];
$params['CompanyId'] = $elements[4];
$params['Language'] = $elements[5];
break;
case 'surveillance':
switch($action){
@ -94,9 +97,9 @@ class PrintController extends Zend_Controller_Action
'params' => $params
);
}
public function indexAction(){}
/**
* Imprime la page en PDF
* Par défaut, le contenu html a déjà été enregistré..
@ -109,13 +112,13 @@ class PrintController extends Zend_Controller_Action
{
$request = $this->getRequest();
$fichier = $request->getParam('fichier');
if (substr($fichier,-4)!='.pdf') {
echo 'Fichier incorrect';
exit;
}
$fichier = str_replace('.pdf', '', $fichier);
$c = Zend_Registry::get('config');
$file = $c->profil->path->pages.'/'.$fichier.'.html';
if (!file_exists($file))
@ -123,20 +126,19 @@ class PrintController extends Zend_Controller_Action
echo 'Fichier introuvable';
exit;
}
require_once 'wkhtmltopdf/wkhtmltopdf.php';
$pdf = new wkhtmltopdf();
$pdf = new Scores_Wkhtml_Pdf();
$pdf->setOptions('footer-right', 'Page [page] sur [toPage]');
$pdf->setOptions('header-right', date('d/m/Y H:i:s'));
$output_file = $pdf->exec($file);
//Envoi au navigateur
if(!file_exists($output_file))
{
echo 'Impossible de générer le fichier PDF';
exit;
}
$content_type = 'application/pdf';
$dest = 'I';
switch($dest)
@ -172,7 +174,7 @@ class PrintController extends Zend_Controller_Action
break;
}
}
/**
* Imprime la page en activant le javascript d'impression
* Il faut récupérer le controller et l'action du nom du fichier, ainsi que
@ -184,12 +186,12 @@ class PrintController extends Zend_Controller_Action
{
$request = $this->getRequest();
$fichier = $request->getParam('fichier', '');
if (substr($fichier,-5)!='.html') {
echo 'Fichier incorrect';
exit;
}
$fichier = str_replace('.html', '', $fichier);
$elements = $this->pageParams($fichier);
if ($elements===false){
@ -199,7 +201,7 @@ class PrintController extends Zend_Controller_Action
$this->view->assign('action', $elements['action']);
$this->view->assign('params', $elements['params']);
}
/**
* Envoi le fichier XML de l'objet sérialiser sur la sortie standard
*/
@ -209,19 +211,19 @@ class PrintController extends Zend_Controller_Action
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$fichier = $request->getParam('fichier', '');
if (substr($fichier,-4)!='.xml') {
echo 'Fichier incorrect.';
exit;
}
$c = Zend_Registry::get('config');
$file = $c->profil->path->files.'/'.$fichier;
if (!file_exists($file)){
echo "Erreur lors de la génération du fichier.";
exit;
}
header("Content-type: application/xml");
header("Content-Disposition: attachement; filename=\"$fichier\"");
flush();

View File

@ -306,8 +306,7 @@ class RechercheController extends Zend_Controller_Action
$message.= "Prénom : ".$user->getPrenom()."<br/>";
$objet = "Demande d'investigation";
require_once 'Scores/Mail.php';
$mail = new Mail();
$mail = new Scores_Mail();
$mail->setFrom('contact');
$mail->addToKey('support');
$mail->setSubject($objet);
@ -723,8 +722,8 @@ class RechercheController extends Zend_Controller_Action
if ($etab->ActActif==0){
$preDate = ', avant le ';
}
require_once 'common/dates.php';
if ($etab->ActDateLien!='') $item['InfoActionnaire'].= $preDate.WDate::dateT('Y-m-d', 'd/m/Y',$etab->ActDateLien);
$date = new Zend_Date($etab->ActDateLien, 'yyyy-MM-dd');
if ($etab->ActDateLien!='') $item['InfoActionnaire'].= $preDate.$date->toString('dd/MM/yyyy');
if ($etab->ActPmin!='') {
if($etab->ActPmin<1){
$item['InfoActionnaire'].= ', minoritaire ';
@ -1037,9 +1036,14 @@ class RechercheController extends Zend_Controller_Action
$item['source'] = $etab->Infos->source;
$item['ref'] = $etab->Infos->ref;
require_once 'common/dates.php';
$item['dateAjout'] = WDate::dateT('Y-m-d','d/m/Y',$etab->Infos->dateAjout);
$item['dateEnvoi'] = ($etab->Infos->dateEnvoi!='0000-00-00') ? WDate::dateT('Y-m-d','d/m/Y',$etab->Infos->dateEnvoi) : '';
$date = new Zend_Date($etab->Infos->dateAjout, 'yyyy-MM-dd');
$item['dateAjout'] = $date->toString('dd/MM/yyyy');
if ( $etab->Infos->dateEnvoi!='0000-00-00' ) {
$date = new Zend_Date($etab->Infos->dateEnvoi, 'yyyy-MM-dd');
$item['dateEnvoi'] = $date->toString('dd/MM/yyyy');
} else {
$item['dateEnvoi'] = '';
}
$liste[] = $item;
}

View File

@ -1402,7 +1402,8 @@ class SaisieController extends Zend_Controller_Action
$this->view->assign('PDetention', $infos['PDetention']);
$this->view->assign('Pvote', $infos['Pvote']);
$this->view->assign('MajMin', $infos['MajMin']);
$this->view->assign('dateEffetLien', $this->wDate->dateT('Y-m-d', 'd/m/Y', $infos['dateEffetLien']));
$dateEffetLien = new Zend_Date($infos['dateEffetLien'], 'yyyy-MM-dd');
$this->view->assign('dateEffetLien', $dateEffetLien->toString('dd/MM/yyyy'));
}
//Mode = edit / add
@ -1427,14 +1428,18 @@ class SaisieController extends Zend_Controller_Action
$this->view->assign('id1', $infos['idAct']);
}
$dateEffetLien = $this->wDate->dateT('Y-m-d', 'd/m/Y', $infos['dateEffetLien']);
$dateEffetLien = new Zend_Date($infos['dateEffetLien'], 'yyyy-MM-dd');
$doc = ($siren) ? $ws->getLienDoc($siren, 'Siren') : $ws->getLienDoc($lienRef, 'Entreprise');
$dateEffetLienDoc = ($doc->item[0]->date) ? $this->wDate->dateT('Y-m-d', 'd/m/Y', $doc->item[0]->date) : $dateEffetLien;
if ( $doc->item[0]->date ) {
$date = new Zend_Date($doc->item[0]->date, 'yyyy-MM-dd');
$dateEffetLienDoc = $date->toString('dd/MM/yyyy');
} else {
$dateEffetLienDoc = $dateEffetLien->toString('dd/MM/yyyy');
}
$this->view->assign('PDetention', $infos['PDetention']);
$this->view->assign('Pvote', $infos['Pvote']);
$this->view->assign('MajMin', $infos['MajMin']);
$this->view->assign('dateEffetLien', $dateEffetLien);
$this->view->assign('dateEffetLien', $dateEffetLien->toString('dd/MM/yyyy'));
$this->view->assign('dateEffetLienDoc', $dateEffetLienDoc);
} else {
@ -1666,19 +1671,19 @@ class SaisieController extends Zend_Controller_Action
}
}
}
public function checkisinAction()
{
$this->_helper->layout()->disableLayout();
$isin = $this->getRequest()->getParam('isin', '');
$letters = array(
'A' => 10, 'B' => 11, 'C' => 12, 'D' => 13, 'E' => 14, 'F' => 15,
'G' => 16, 'H' => 17, 'I' => 18, 'J' => 19, 'K' => 20, 'L' => 21,
'M' => 22, 'N' => 23, 'O' => 24, 'P' => 25, 'Q' => 26, 'R' => 27,
'S' => 28, 'T' => 29, 'U' => 30, 'V' => 31, 'W' => 32, 'X' => 33,
'Y' => 34, 'Z' => 35);
$digitIsin = strtr($isin, $letters);
$tmpIsin = str_split($digitIsin);
$checkDigit = end($tmpIsin);

View File

@ -219,10 +219,11 @@ class SurveillanceController extends Zend_Controller_Action
$tooltipTexte = '';
$ref = $surv->ref;
$tooltipTexte.= "Ref : ".$ref;
$tooltipTexte.= "<br/>Date d'ajout :".WDate::dateT('Y-m-d', 'd/m/Y', $surv->dateAjout);
$dateAjout = new Zend_Date($surv->dateAjout, 'yyyy-MM-dd');
$tooltipTexte.= "<br/>Date d'ajout :".$dateAjout->toString('dd/MM/yyyy');
if ($surv->dateDerEnvoi!='0000-00-00 00:00:00') {
$tooltipTexte.= "<br/>Date de dernier envoi : ".
WDate::dateT('Y-m-d', 'd/m/Y', substr($surv->dateDerEnvoi,0,10));
$date = new Zend_Date(substr($surv->dateDerEnvoi,0,10), 'yyyy-MM-dd');
$tooltipTexte.= "<br/>Date de dernier envoi : ".$date->toString('dd/MM/yyyy');
}
$listSurv[] = array(
'tooltipTexte' => $tooltipTexte,
@ -501,7 +502,8 @@ class SurveillanceController extends Zend_Controller_Action
if ($item->dateBilan=='0000-00-00') {
$tooltip.= 'Néant';
} else {
$tooltip.= 'le '.WDate::dateT('Y-m-d', 'd/m/Y',$item->dateBilan);
$date = new Zend_Date($item->dateBilan,'yyyy-MM-dd');
$tooltip.= 'le '.$date->toString('dd/MM/yyyy');
}
$tooltip.= '<br/>';
if ($item->sourceModif!='ajout') {
@ -509,8 +511,6 @@ class SurveillanceController extends Zend_Controller_Action
$tooltip.= '- Dernière modification ';
if( $item->indiScoreDate=='0000-00-00') {
$tooltip.= '';
} else {
//$tooltip.= 'le '.WDate::dateT('Y-m-d', 'd/m/Y',$item->indiScoreDate);
}
if (!empty($item->sourceModif)) {
if (in_array($item->sourceModif, $dicoSource)) {
@ -795,7 +795,8 @@ class SurveillanceController extends Zend_Controller_Action
$tab[$count]['Ref'] = utf8_encode($ann[$colRef]);
$tab[$count]['Parution'] = utf8_encode($ann[$colParution]);
$tab[$count]['Bodacc'] = utf8_encode($ann[$colBodacc]);
$tab[$count]['DatePar'] = WDate::dateT('Ymd','d/m/Y',$ann[$colDatePar]);
$date = new Zend_Date($ann[$colDatePar],'yyyyMMdd');
$tab[$count]['DatePar'] = $date->toString('dd/MM/yyyy');
$tab[$count]['Tribunal'] = utf8_encode($ann[$colTribunal]);
$tab[$count]['Even'] = utf8_encode(str_replace(', ','<br/>',$ann[$colEven]));
$tab[$count]['TexteAnn'] = utf8_encode($ann[$colTexteAnn]);
@ -976,7 +977,8 @@ class SurveillanceController extends Zend_Controller_Action
$tab[$count]['Ref'] = utf8_encode($ann[$colRef]);
$tab[$count]['Parution'] = utf8_encode($ann[$colParution]);
$tab[$count]['Bodacc'] = utf8_encode($ann[$colBodacc]);
$tab[$count]['DatePar'] = WDate::dateT('Ymd','d/m/Y',$ann[$colDatePar]);
$date = new Zend_Date($ann[$colDatePar],'yyyyMMdd');
$tab[$count]['DatePar'] = $date->toString('dd/MM/yyyy');
$tab[$count]['Tribunal'] = utf8_encode($ann[$colTribunal]);
$tab[$count]['Even'] = utf8_encode(str_replace(', ','<br/>',$ann[$colEven]));
$tab[$count]['TexteAnn'] = utf8_encode($ann[$colTexteAnn]);

View File

@ -348,7 +348,7 @@ class UserController extends Zend_Controller_Action
$this->view->form = $form;
$request = $this->getRequest();
if ( $request->isPost() ) {
$formData = $request->getPost ();
$formData = $request->getPost();
if ($form->isValid($formData)) {
$login = $form->getValue('login');
$pass = $form->getValue('pass');
@ -621,8 +621,7 @@ class UserController extends Zend_Controller_Action
$mailbody .= "Aussi nous vous invitons à vous rapprocher de votre interlocuteur commercial habituel ";
$mailbody .= "ou de votre responsable suivi relations Scores & Décisions au sein de votre société.</p>";
require_once 'Scores/Mail.php';
$mail = new Mail();
$mail = new Scores_Mail();
$mail->setSubject("Demande d'envoi des identifiants");
$mail->setBodyHTML($mailbody);
$mail->setFrom('support');
@ -634,8 +633,8 @@ class UserController extends Zend_Controller_Action
}
catch ( Zend_Mail_Transport_Exception $e ){
$message = $e->getMessage();
}
}
}
$this->view->assign('message', $message);
}

View File

@ -1,16 +0,0 @@
<?php $i = 0;?>
<div id="inDebug">
<div id="debug" style="margin-bottom:2px;">
<b><?php echo $this->resultat->RegisteredName;?></b>
</div>
<?php foreach($this->menu as $menu):?>
<div <?php ($i > 0)?'style="margin-left:2px;"':null; ?> id="debug_menu"><center><?php echo $menu;?></center></div>
<?php $i++;?>
<?php endforeach;?>
<div style="float:left" id="debug">
<center><b>Objet</b></center>
<div id="objet0" style="display:none"><?php echo htmlentities($this->requestXML);?></div>
<div id="objet1" style="display:none"><pre><?php print_r($this->resultat);?></pre></div>
<div id="objet2"><pre><?php print_r($this->resultat);?></pre></div>
</div>
</div>

View File

@ -42,8 +42,8 @@
if (strpos($dir->DateFct, '/') != false) {
echo $dir->DateFct.' ';
} else {
$wdate = new WDate();
echo $wdate->dateT('Y-m-d', 'd/m/Y', $dir->DateFct);
$date = new Zend_Date($dir->DateFct,'yyyy-MM-dd');
echo $date->toString('dd/MM/yyyy');
}
}
?>

View File

@ -80,7 +80,8 @@
<td width="30"></td>
<td width="200" class="StyleInfoLib">Date de création de l'entreprise</td>
<td width="350" class="StyleInfoData">
<?=WDate::dateT('Ymd', 'm/Y', $this->indiscore->DateCreaEn)?>
<?php $date = new Zend_Date($this->indiscore->DateCreaEn, 'yyyyMMdd');?>
<?=$date->toString('dd/MM/yyyy')?>
</td>
</tr>
<tr>
@ -182,8 +183,7 @@
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">
A la lecture du dernier bilan, la situation financi&egrave;re de l'entreprise <?php echo $this->Nom;?> est <b><?php echo $this->indiscore->tabInfosNotations->SituationFinanciere;?></b>.<br/>
<!-- Cette notation financi&egrave;re est <?php echo $this->indiscore->tabInfosNotations->Notation;?>.<br/>-->
A la lecture du dernier bilan, cloturé le <?=substr($this->indiscore->Bilans->item[0]->Millesime,6,2).'/'.substr($this->indiscore->Bilans->item[0]->Millesime,4,2).'/'.substr($this->indiscore->Bilans->item[0]->Millesime,0,4)?>, la situation financi&egrave;re de l'entreprise <?php echo $this->Nom;?> est <b><?php echo $this->indiscore->tabInfosNotations->SituationFinanciere;?></b>.<br/>
<?php
if (html_entity_decode($this->indiscore->tabInfosNotations->ProbabiliteDefaut) <> 'En défaut')
echo 'La probabilit&eacute; de d&eacute;faillance associ&eacute;e &agrave; cette note avoisine les '. number_format($this->indiscore->tabInfosNotations->ProbabiliteDefaut,3,',',' ') .' %';
@ -208,7 +208,7 @@
<td width="550" colspan="2" class="StyleInfoData">
La situation financi&egrave;re de l'entreprise ne peut être évaluée en détail car
<?php
if($this->indiscore->Bilans->item[0]->Millesime < $millesimeMax && count($this->indiscore->Bilans) > 0 ) {
if($this->indiscore->Bilans->item[0]->Millesime < $millesimeMax && count($this->indiscore->Bilans->item) > 0 ) {
echo 'le dernier bilan disponible date de '.substr($this->indiscore->Bilans->item[0]->Millesime,0,4).'.';
} else {
echo 'aucun bilan n\'est disponible.';

View File

@ -1,8 +1,8 @@
<?php if (empty($this->AutrePage)):?>
<?php if (empty($this->AutrePage)) {?>
<div id="center">
<?php endif;?>
<?php }?>
<?php if (empty($this->AutrePage)):?>
<?php if (empty($this->AutrePage)) {?>
<h1>ÉLÉMENTS FINANCIERS - BILANS</h1>
<div class="paragraph">
<table class="identite">
@ -28,7 +28,7 @@
<?php if ($this->nbBilanC==0){?>
Réel normal ou Simplifié
<?php } elseif ($this->nbBilanN==0){?>
Consolidé
Consolidé
<?php } else {?>
<form>
<select name="typeBilan">
@ -42,10 +42,10 @@
<?php }?>
</table>
</div>
<?php endif; ?>
<?php }?>
<?php if($this->typeBilan == 'B' and $this->typeBilan == 'A'):?>
<?php if($this->typeBilan == 'B' || $this->typeBilan == 'A') {?>
<div class="paragraph">
<table>
@ -56,9 +56,9 @@
</table>
</div>
<?php else: ?>
<?php } else { ?>
<?php if ($this->nbBilanN==0 && $this->nbBilanN==0):?>
<?php if ($this->nbBilanN==0 && $this->nbBilanC==0) {?>
<div class="paragraph">
<table>
@ -68,24 +68,137 @@
</tr>
</table>
</div>
<?php else:?>
<?php } else {?>
<h2>Bilan actif - passif</h2>
<?=$this->partial('finance/bilan/actif.phtml')?>
<?=$this->partial('finance/bilan/passif.phtml')?>
<div class="paragraph">
<table class="bilans">
<thead>
<tr>
<th>Actif</th>
<?php foreach($this->tabResultActif as $info) { ?>
<th class="date" >
<?=$info['dateCloture']?><br/><?=$info['duree']?>
</th>
<?php }?>
<?php $lastDateCloture = $info['dateCloture']; ?>
<th>% T.B.</th>
</tr>
</thead>
<tbody>
<?php foreach($this->tabRatioActif as $idRatio => $info) { ?>
<tr<?php if (!empty($info['class'])) echo ' class="'.$info['class'].'"'?>>
<td>
<?=$info['titre']?></td>
<?php foreach($this->tabResultActif as $value) { ?>
<td class="left"><?=$value['entrep'][$idRatio]?></td>
<?php }?>
<td><?=$value['total'][$idRatio]?></td>
<?php }?>
</tr>
</tbody>
</table>
</div>
<div class="paragraph">
<?=$this->action('bilangraph', 'finance', null, array(
'type' => 'actif',
'typeBilan' => $this->typeBilan,
'dateCloture' => $this->lastDateCloture,
'siret' => $this->siret,
'id' => $this->id,
))?>
</div>
<div class="paragraph">
<table class="bilans">
<thead>
<tr>
<th>Passif</th>
<?php foreach($this->tabResultPassif as $info) { ?>
<th class="date" >
<?=$info['dateCloture']?><br/><?=$info['duree']?>
</th>
<?php }?>
<th>% T.B.</th>
</tr>
</thead>
<tbody>
<?php foreach($this->tabRatioPassif as $idRatio => $info) { ?>
<tr<?php if (!empty($info['class'])) echo ' class="'.$info['class'].'"'?>>
<td>
<?=$info['titre']?></td>
<?php foreach($this->tabResultPassif as $value) { ?>
<td class="left"><?=$value['entrep'][$idRatio]?></td>
<?php }?>
<td><?=$value['total'][$idRatio]?></td>
<?php }?>
</tr>
</tbody>
</table>
</div>
<div class="paragraph">
<?=$this->action('bilangraph', 'finance', null, array(
'type' => 'passif',
'typeBilan' => $this->typeBilan,
'dateCloture' => $this->lastDateCloture,
'siret' => $this->siret,
'id' => $this->id,
))?>
</div>
<h2>Soldes Intermédiaire de Gestion</h2>
<?=$this->partial('finance/bilan/sig.phtml')?>
<?php endif;?>
<?php endif;?>
<div class="paragraph">
<table class="bilans">
<thead>
<tr>
<th colspan="2">SOLDES INTERMEDIAIRE DE GESTION</th>
<?php foreach($this->tabResultSig as $info) { ?>
<th class="date" >
<?=$info['dateCloture']?><br/><?=$info['duree']?>
</th>
<?php }?>
<th>% C.A.</th>
</tr>
</thead>
<tbody>
<?php foreach($this->tabRatioSig as $idRatio => $info) { ?>
<tr<?php if (!empty($info['class'])) echo ' class="'.$info['class'].'"'?>>
<?php if(empty($info['op'])){?>
<td colspan="2"><?=$info['titre']?></td>
<?php } else {?>
<td><?=$info['op']?></td><td><?=$info['titre']?></td>
<?php }?>
<?php foreach($this->tabResultSig as $value) { ?>
<td class="left"><?=$value['entrep'][$idRatio]?></td>
<?php }?>
<td><?=$value['total'][$idRatio]?></td>
<?php }?>
</tr>
</tbody>
</table>
</div>
<?php if (empty($this->AutrePage)):?>
<div class="paragraph">
<?=$this->action('bilangraph', 'finance', null, array(
'type' => 'sig',
'typeBilan' => $this->typeBilan,
'dateCloture' => $this->lastDateCloture,
'siret' => $this->siret,
'id' => $this->id,
))?>
</div>
<?php }?>
<?php }?>
<?php if (empty($this->AutrePage)) {?>
<?=$this->render('cgu.phtml', $this->cgu)?>
<?php endif;?>
<?php }?>
<?php if (empty($this->AutrePage)):?>
<?php if (empty($this->AutrePage)) {?>
</div>
<?php endif;?>
<?php }?>

View File

@ -1,42 +0,0 @@
<?php
$tabResult = $this->partial()->view->tabResultActif;
$tabRatio = $this->partial()->view->tabRatioActif;
?>
<div class="paragraph">
<table class="bilans">
<thead>
<tr>
<th>Actif</th>
<?php foreach($tabResult as $info) { ?>
<th class="date" >
<?=$info['dateCloture']?><br/><?=$info['duree']?>
</th>
<?php }?>
<?php $lastDateCloture = $info['dateCloture']; ?>
<th>% T.B.</th>
</tr>
</thead>
<tbody>
<?php foreach($tabRatio as $idRatio => $info) { ?>
<tr<?php if (!empty($info['class'])) echo ' class="'.$info['class'].'"'?>>
<td>
<?=$info['titre']?></td>
<?php foreach($tabResult as $value) { ?>
<td class="left"><?=$value['entrep'][$idRatio]?></td>
<?php }?>
<td><?=$value['total'][$idRatio]?></td>
<?php }?>
</tr>
</tbody>
</table>
</div>
<div class="paragraph">
<?=$this->action('bilangraph', 'finance', null, array(
'type' => 'actif',
'typeBilan' => $this->partial()->view->typeBilan,
'dateCloture' => $this->partial()->view->lastDateCloture,
'siret' => $this->partial()->view->siret,
'id' => $this->partial()->view->id,
))?>
</div>

View File

@ -1,41 +0,0 @@
<?php
$tabResult = $this->partial()->view->tabResultPassif;
$tabRatio = $this->partial()->view->tabRatioPassif;
?>
<div class="paragraph">
<table class="bilans">
<thead>
<tr>
<th>Passif</th>
<?php foreach($tabResult as $info) { ?>
<th class="date" >
<?=$info['dateCloture']?><br/><?=$info['duree']?>
</th>
<?php }?>
<th>% T.B.</th>
</tr>
</thead>
<tbody>
<?php foreach($tabRatio as $idRatio => $info) { ?>
<tr<?php if (!empty($info['class'])) echo ' class="'.$info['class'].'"'?>>
<td>
<?=$info['titre']?></td>
<?php foreach($tabResult as $value) { ?>
<td class="left"><?=$value['entrep'][$idRatio]?></td>
<?php }?>
<td><?=$value['total'][$idRatio]?></td>
<?php }?>
</tr>
</tbody>
</table>
</div>
<div class="paragraph">
<?=$this->action('bilangraph', 'finance', null, array(
'type' => 'passif',
'typeBilan' => $this->partial()->view->typeBilan,
'dateCloture' => $this->partial()->view->lastDateCloture,
'siret' => $this->partial()->view->siret,
'id' => $this->partial()->view->id,
))?>
</div>

View File

@ -1,44 +0,0 @@
<?php
$tabResult = $this->partial()->view->tabResultSig;
$tabRatio = $this->partial()->view->tabRatioSig;
?>
<div class="paragraph">
<table class="bilans">
<thead>
<tr>
<th colspan="2">SOLDES INTERMEDIAIRE DE GESTION</th>
<?php foreach($tabResult as $info) { ?>
<th class="date" >
<?=$info['dateCloture']?><br/><?=$info['duree']?>
</th>
<?php }?>
<th>% C.A.</th>
</tr>
</thead>
<tbody>
<?php foreach($tabRatio as $idRatio => $info) { ?>
<tr<?php if (!empty($info['class'])) echo ' class="'.$info['class'].'"'?>>
<?php if(empty($info['op'])){?>
<td colspan="2"><?=$info['titre']?></td>
<?php } else {?>
<td><?=$info['op']?></td><td><?=$info['titre']?></td>
<?php }?>
<?php foreach($tabResult as $value) { ?>
<td class="left"><?=$value['entrep'][$idRatio]?></td>
<?php }?>
<td><?=$value['total'][$idRatio]?></td>
<?php }?>
</tr>
</tbody>
</table>
</div>
<div class="paragraph">
<?=$this->action('bilangraph', 'finance', null, array(
'type' => 'sig',
'typeBilan' => $this->partial()->view->typeBilan,
'dateCloture' => $this->partial()->view->lastDateCloture,
'siret' => $this->partial()->view->siret,
'id' => $this->partial()->view->id,
))?>
</div>

View File

@ -213,7 +213,8 @@ if ($this->urlImg!='') {
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Derni&egrave;re cotation connue</td>
<td width="350" class="StyleInfoData"><?=WDate::dateT('Y-m-d','d/m/Y',$this->InfosBourse->derCoursDate)?></td>
<?php $date = new Zend_Date($this->InfosBourse->derCoursDate, 'yyyy-MM-dd');?>
<td width="350" class="StyleInfoData"><?=$date->toString('dd/MM/yyyy')?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>

View File

@ -31,13 +31,14 @@
<td width="200" class="StyleInfoLib">Millesime</td>
<td width="350" class="StyleInfoData">
<select name="date">
<?php foreach ($this->type as $champType => $name):?>
<?php foreach ($this->liste[$champType] as $element):?>
<?php foreach ($this->type as $champType => $name) {?>
<?php foreach ($this->liste[$champType] as $element) {?>
<option value="<?=$element.':'.$champType?>"<?=($this->date == $element && $champType == $this->champType)? ' selected': '';?>>
<?=$this->dateFunction->dateT('Ymd', 'd/m/Y', $element).' '.$name;?>
<?php $date = new Zend_Date($element, 'yyyyMMdd'); ?>
<?=$date->toString('dd/MM/yyyy').' '.$name;?>
</option>
<?php endforeach;?>
<?php endforeach;?>
<?php }?>
<?php }?>
</select>
<input type="submit" value="OK" />
</td>
@ -135,8 +136,8 @@
<?php echo $this->partial('finance/liasse/2050.phtml', array(
'liasse' => $this->liasse,
'dateCloture' => $this->dateFunction->dateT('Ymd', 'd/m/Y', $this->dateCloture),
'dateCloturePre' => $this->dateFunction->dateT('Ymd', 'd/m/Y', $this->dateCloturePre),
'dateCloture' => $this->dateClotureD,
'dateCloturePre' => $this->dateCloturePreD,
'dureesMois' => $this->dureesMois,
'dureesMoisPre'=> $this->dureesMoisPre,
'unite'=> $this->unite,
@ -146,8 +147,8 @@
<?php echo $this->partial('finance/liasse/banque.phtml', array(
'liasse' => $this->liasse,
'dateCloture' => $this->dateFunction->dateT('Ymd', 'd/m/Y', $this->dateCloture),
'dateCloturePre' => $this->dateFunction->dateT('Ymd', 'd/m/Y', $this->dateCloturePre),
'dateCloture' => $this->dateClotureD,
'dateCloturePre' => $this->dateCloturePreD,
'dureesMois' => $this->dureesMois,
'dureesMoisPre'=> $this->dureesMoisPre,
'unite'=> $this->unite,
@ -157,8 +158,8 @@
<?php echo $this->partial('finance/liasse/assurance.phtml', array(
'liasse' => $this->liasse,
'dateCloture' => $this->dateFunction->dateT('Ymd', 'd/m/Y', $this->dateCloture),
'dateCloturePre' => $this->dateFunction->dateT('Ymd', 'd/m/Y', $this->dateCloturePre),
'dateCloture' => $this->dateClotureD,
'dateCloturePre' => $this->dateCloturePreD,
'dureesMois' => $this->dureesMois,
'dureesMoisPre'=> $this->dureesMoisPre,
'unite'=> $this->unite,

View File

@ -161,7 +161,7 @@
<td align="center">BC</td>
<td align="right" class="amount-value"><?php echo $this->liasse['BC'];?></td>
<td align="right" class="amount-value"><?php echo $this->liasse['BC1'];?></td>
<td align="right" class="amount-value"><?php echo $this->liasse['BC1'];?></td>
<td align="right" class="amount-value"><?php echo $this->liasse['BC2'];?></td>
</tr>
<tr>
<td>Autres titres immobilisés</td>

View File

@ -10,7 +10,7 @@
</div>
<h2>3. Compte Annuels</h2>
<div id="break">
<?php echo $this->partial('giant/partials/rapports/ComptesAnnuels.phtml', null, array('report' => $this->report, 'Type' => $this->Type)); ?>
<?php echo $this->partial('giant/partials/rapports/ComptesAnnuels.phtml', null, array('report' => $this->report, 'Type' => $this->Type, 'dateFunction' => $this->dateFunction)); ?>
</div>
<h2>4. Position financiére</h2>
<div id="break">
@ -18,7 +18,7 @@
</div>
<h2>5. Comportement de paiement</h2>
<div id="break">
<?php echo $this->partial('giant/partials/rapports/ComportementDePaiement.phtml', null, array('report' => $this->report, 'Type' => $this->Type)); ?>
<?php echo $this->partial('giant/partials/rapports/ComportementDePaiement.phtml', null, array('report' => $this->report, 'Type' => $this->Type, 'dateFunction' => $this->dateFunction)); ?>
</div>
<h2>6. Structure de l'entreprise</h2>
<div id="break">

View File

@ -1,11 +1,11 @@
<div id="center">
<!--<span style="float:left;margin-left:6px;">
<span style="float:right;margin-right:16px;">
<a style="color:#9C093A;cursor:help;" class="tooltip" title="<?php echo htmlentities($this->listeCommandes);?>">Total commande : <?php echo $this->total; ?> euros</a>
</span>!-->
<span style="color:#9C093A;margin-right:5px;float: right;">
</span>
<!-- <span style="color:#9C093A;margin-right:5px;float: right;">
<a style="cursor:help;" class="tooltip" title="<?php echo htmlentities($this->modification);?>">Dernières modifications au <?php echo date('d/m/Y'); ?></a>
</span>
<h1>Identite<img style="margin-top:4px;float:right" src="/themes/default/images/giant/expanded.gif" ></h1>
</span> -->
<h1>Identite</h1>
<div class="paragraph">
<div id="identite">
<table>
@ -27,8 +27,8 @@
<tr id="info">
<td width="30px"></td>
<td valign="top" class="StyleInfoLib" width="250px">Adresse</td>
<td class="StyleInfoData" width="300px"><a href=""><?php echo $this->Adresse[0].' '.$this->Adresse[1];?><br />
<?php echo $this->Adresse[2].' '.$this->Adresse[3]?></a></td>
<td class="StyleInfoData" width="300px"><?php echo $this->Adresse[0].' '.$this->Adresse[1];?><br />
<?php echo $this->Adresse[2].' '.$this->Adresse[3]?></td>
</tr>
<tr id="info">
<td width="30px"></td>
@ -39,21 +39,16 @@
</div>
</div>
<?php if(!empty($this->listeRapport)):?>
<h1>Liste des rapports<img style="margin-top:4px;float:right" src="/themes/default/images/giant/expanded.gif" ></h1>
<h1>Liste des rapports</h1>
<div class="paragraph">
<div id="radio">
<table>
<?php $i=1; foreach ($this->listeRapport->DataSetOptions->DataSetOption as $rapport):?>
<tr id="info">
<td class="StyleInfoLib" style="float:left;" >
<img style="cursor:help" title="<?php echo htmlentities($this->description->Full);?>" class="tooltip" src="/themes/default/images/giant/tag_blue.png" /><input type="radio" class="radio" id="radio<?php echo $i; ?>" value="<?php echo $rapport->DataSetType->_?>" name="radio" /><label class="radio_but" for="radio<?php echo $i; ?>">Rapport de Type <?php echo $rapport->DataSetType->_?></label>
<?$t = $rapport->DataSetType->_;?>
<img style="cursor:help" title="<?php echo htmlentities($this->description->$t);?>" class="tooltip" src="/themes/default/images/giant/tag_blue.png" /><input type="radio" class="radio" id="radio<?php echo $i; ?>" value="<?php echo $rapport->DataSetType->_?>" name="radio" /><label class="radio_but" for="radio<?php echo $i; ?>">Rapport de Type <?php echo $rapport->DataSetType->_?></label>
</td>
<td align="center" class="StyleInfoData lang_img <?=strtolower($rapport->DataSetType->_);?>">
<div class="lang_select">
<select class="lang_val">
@ -66,9 +61,6 @@
<img class='lang'src="/themes/default/images/drapeaux/<?=$rapport->LanguageCodes->LanguageCode[0]?>.png" />
</div>
</td>
<td class="StyleInfoData lang_img <?=strtolower($rapport->DataSetType->_);?>">
<a id="r<?php echo $i?>" class="idpr id_cr" href="/giant/<?=strtolower($rapport->DataSetType->_)?>/Pays/test/<?=$this->TestIndication?>/<?=$this->Pays; ?>/Type/<?php echo $rapport->DataSetType->_?>/CompanyId/<?php echo $this->CompanyId;?>/Language/<?=$rapport->LanguageCodes->LanguageCode[0];?>" >Consulter le rapport en immédiat</a>
<div id="pr<?php echo $i?>" class="hide" style="display:none;z-index: 1;margin-left: -340px;">
@ -81,7 +73,7 @@
</table>
</div></div>
<?php endif; ?>
<?php if(!empty($this->listeRapport->InvestigationOptions)): ?>
<?php if(!empty($this->listeRapport->InvestigationOptions1)): ?>
<h1>Liste des investigations<img style="margin-top:4px;float:right" src="/themes/default/images/giant/expanded.gif" ></h1>
<div class="paragraph">
<table>

View File

@ -14,8 +14,7 @@
<th>&nbsp;</th>
<?php if(isset($this->report->ComparaisonValeurs[key($this->report->ComparaisonValeurs)]['old'])):?>
<?php foreach($this->report->ComparaisonValeurs[key($this->report->ComparaisonValeurs)]['old'] as $date => $valeur):?>
<?php $dates = explode('/', $date);?>
<th align="right" class="date"><?php echo $dates[2];?></th>
<th align="right" class="date"><?php echo substr($date, 0,4);?></th>
<?php endforeach;?>
<?php endif;?>
@ -29,7 +28,7 @@
?>
<tr class="<?php echo ($val)? 'red':'green'; ?>">
<td class="head">
<a class="tooltip" title="<?php echo str_replace('_', ' ', $name);?>"><?php echo str_replace('_', ' ', $name);?></a>
<a class="tooltip" title="<?php echo str_replace('_', ' ', $ComparaisonValeurs['name']);?>"><?php echo str_replace('_', ' ', $ComparaisonValeurs['name']);?></a>
</td>
<td class="right"><?php echo round($ComparaisonValeurs['current']); ?></td>
<td class="right"><?php echo round($ComparaisonValeurs['entreprise']); ?></td>

View File

@ -7,8 +7,8 @@
<tr>
<th class="date">Jours</th>
<?php foreach(current($this->report->ComportementPaiement) as $dates => $valeurs):?>
<? if($dates==':30'){$dates='1:30';}else if($dates=='90:'){$dates='+90';}else if($dates=='151:'){$dates='+151';}?>
<?$dates = str_replace(':', ' - ', $dates)?>
<? if($dates=='000030'){$dates='1000030';}else if($dates=='900000'){$dates='+90';}else if($dates=='1510000'){$dates='+151';}?>
<?$dates = str_replace('0000', ' - ', $dates)?>
<th align="right" class="date"><?=$dates?></th>
<?php endforeach; ?>
</tr>
@ -16,10 +16,11 @@
<tbody>
<tr>
<?php foreach($this->report->ComportementPaiement as $dates => $valeurs):?>
<?(strlen($dates)==12)?$len=6:$len=8;preg_match('/(\d{'.$len.'})(\d{'.$len.'})/', $dates,$matches);$s = $matches[1];$e = $matches[2];?>
<?php $date = explode(':', $dates);?>
<tr>
<td class="head">
<a class="tooltip" title="<?php echo $date[0];?> - <?php echo $date[1];?>"><?php echo $date[0];?> - <?php echo $date[1];?></a>
<a><?php echo $this->dateFunction->dateT('Ymd', 'd/m/Y', $s);?> - <?php echo $this->dateFunction->dateT('Ymd', 'd/m/Y', $e);?></a>
</td>
<?php $i=0;foreach($valeurs as $valeur): $i++; ?>
<td class="right"><?php echo $valeur;?> %</td>
@ -71,8 +72,8 @@
<tr>
<th class="date">Jours</th>
<?php foreach(current($this->report->ByAmount) as $dates => $valeurs):?>
<? if($dates==':30'){$dates='1:30';}else if($dates=='90:'){$dates='+90';}else if($dates=='151:'){$dates='+151';}?>
<?$dates = str_replace(':', ' - ', $dates)?>
<? if($dates=='000030'){$dates='1000030';}else if($dates=='900000'){$dates='+90';}else if($dates=='1510000'){$dates='+151';}?>
<?$dates = str_replace('0000', ' - ', $dates)?>
<th align="right" class="date"><?=$dates?></th>
<?php endforeach; ?>
</tr>
@ -80,7 +81,7 @@
<tbody>
<tr>
<?php foreach($this->report->ByAmount as $sommes => $valeurs):?>
<?php $somme = explode(':', $sommes);?>
<?php $somme = explode('1111', $sommes);?>
<tr>
<td class="head">
<a class="tooltip" title="<?php echo $date[0];?> - <?php echo $date[1];?>">entre : <?php echo (!empty($somme[0]))?$somme[0].'€':'0';?></b> et <b><?php echo (!empty($somme[1]))?$somme[1].'€':'plus';?></a>

View File

@ -8,7 +8,7 @@
<a class="tooltip tooltipFont">Date de clôture</a>
</td>
<?php foreach($this->report->AnnualAccounts as $AnnualAccounts):$i++?>
<td class="right"><?php echo (empty($AnnualAccounts->AccountsDate->_))?'NC':$AnnualAccounts->AccountsDate->_;?></td>
<td class="right"><?php echo (empty($AnnualAccounts->AccountsDate->_))?'NC':$this->dateFunction->dateT('Ymd', 'd/m/Y', $AnnualAccounts->AccountsDate->_);?></td>
<?php endforeach; ?>
</tr>
<tr >
@ -39,9 +39,8 @@
<th align="center">
</th>
<?php $i=0; foreach($this->report->AnnualAccounts as $AnnualAccounts): $i++?>
<th align="right" class="date"><?php echo $AnnualAccounts->AccountsDate->_; ?></th>
<th align="right" class="date"><?php echo $this->dateFunction->dateT('Ymd', 'd/m/Y', $AnnualAccounts->AccountsDate->_); ?></th>
<?php endforeach; ?>
<th>&nbsp;</th>
</tr>
</thead>
@ -84,7 +83,7 @@
<th align="center">
</th>
<?php $i=0; foreach($this->report->AnnualAccounts as $AnnualAccounts): $i++?>
<th align="right" class="date"><?php echo $AnnualAccounts->AccountsDate->_; ?></th>
<th align="right" class="date"><?php echo $this->dateFunction->dateT('Ymd', 'd/m/Y', $AnnualAccounts->AccountsDate->_); ?></th>
<?php endforeach; ?>
<th>&nbsp;</th>
@ -129,7 +128,7 @@
<th align="center">
</th>
<?php $i=0; foreach($this->report->AnnualAccounts as $AnnualAccounts): $i++?>
<th align="right" class="date"><?php echo $AnnualAccounts->AccountsDate->_; ?></th>
<th align="right" class="date"><?php echo $this->dateFunction->dateT('Ymd', 'd/m/Y', $AnnualAccounts->AccountsDate->_); ?></th>
<?php endforeach; ?>
<th>&nbsp;</th>
@ -175,7 +174,7 @@
<th align="center">
</th>
<?php $i=0; foreach($this->report->AnnualAccounts as $AnnualAccounts): $i++?>
<th align="right" class="date"><?php echo $AnnualAccounts->AccountsDate->_; ?></th>
<th align="right" class="date"><?php echo $this->dateFunction->dateT('Ymd', 'd/m/Y', $AnnualAccounts->AccountsDate->_); ?></th>
<?php endforeach; ?>
<th>&nbsp;</th>

View File

@ -2,13 +2,12 @@
<a name="19"></a>
<span class="title">Dirigeants</span><br /><br />
<?php if(isset($this->report->Dirigeant)):?>
<table style="font-size:13px;margin-left: 19px;" width="97%" class="hoverTr">
<table style="font-size:13px;margin-left: 19px;" width="97%" class="hoverTr"><pre><?//print_r($this->report->Dirigeant);?></pre>
<?php foreach($this->report->Dirigeant as $Dirigeants):?>
<?php foreach($Dirigeants as $date => $Dirigeant):?>
<?php $date = explode(':', $date); ?>
<?php foreach($Dirigeants as $date => $Dirigeant):?>
<tr>
<td style="padding:2px;color:#2599E7"><b><?php echo ($date[0]!='//')?$date[0]:'NC';?></b></td>
<td style="padding:2px;color:#2599E7"><b><?php if(!empty($Dirigeant[0]->date[0]) || !empty($Dirigeant[0]->date[1])){echo(!empty($Dirigeant[0]->date[0]))?$this->dateFunction->dateT('Ymd', 'd/m/Y', $Dirigeant[0]->date[0]):'NC';echo' - ';
echo(!empty($Dirigeant[0]->date[1]))?$this->dateFunction->dateT('Ymd', 'd/m/Y', $Dirigeant[0]->date[1]):'NC';}else{echo 'NC';}?></b></td>
</tr>
<?php $i=0;?>
<?php foreach($Dirigeant as $dir):$i++;?>

View File

@ -2,7 +2,7 @@
<a name="21"></a>
<?php if(isset($this->report->Event)):?>
<?php foreach($this->report->Event as $name => $Events):?>
<span class="title"><?php echo $name;?></span><br /><br />
<span class="title"><?php echo $this->report->EventNew[$name];?></span><br /><br />
<form method="POST">
<select name="Date" style="float:right" onchange="submit()">
<option value="all">Date</option>
@ -20,7 +20,7 @@
<table id="giant_synthese">
<thead>
<tr>
<th align="center" class="date">Date</th>
<th align="center" class="date" style='width: 142px;'>Date</th>
<th align="right" class="date">Description</th>
</tr>
</thead>

View File

@ -1,128 +1,157 @@
<div class="paragraph">
<?php if(isset($this->report)) :?>
<?preg_match('/(\d{2})(\d{2})(\d{4})/', $this->report->IncorporationDate, $matches);$d = $matches[1];$m = $matches[2];$y = $matches[3];?>
<div>
<a name="1"></a>
<span class="title">Données officielles</span><br /><br />
<ul style="font-size:13px;margin-left:3%;list-style: none">
<li><b>Nom d'entreprise </b> <span style="float:right"><?php echo $this->report->CompanyName?></span></li>
<hr style="border:1px dotted silver" />
<li><b>Numéro de TVA </b> <span style="float:right"><?php echo $this->report->Vat?></span></li>
<hr style="border:1px dotted silver" />
<li><b>Forme juridique actuelle </b> <span style="float:right"><?php echo $this->report->LegalForm.' / '.$this->report->UnifiedLegalForm;?></span></li>
<hr style="border:1px dotted silver" />
<li><b>Date de constitution </b> <span style="float:right"><?php echo ($this->report->IncorporationDate != '//')?$this->report->IncorporationDate:'NC'?></span></li>
<hr style="border:1px dotted silver" />
<li><b>Etat de l'entreprise </b> <span style="float:right"><?php echo $this->report->CompanyStatus?></span></li>
<hr style="border:1px dotted silver" />
<li><b>No. Siret </b> <span style="float:right"><?php echo $this->report->CompanyId?></span></li>
<hr style="border:1px dotted silver" />
</ul>
<span class="title">Données officielles</span><br />
<table id="giant_synthese">
<tbody>
<tr >
<td class="head" style='width: 169px;'>
<a class="tooltip tooltipFont">Nom d'entreprise </a>
</td>
<td class="right"><?php echo $this->report->CompanyName?></td>
</tr>
<tr >
<td class="head" style='width: 169px;'>
<a class="tooltip tooltipFont">Numéro de TVA</a>
</td>
<td class="right"><?php echo $this->report->Vat?></td>
</tr>
<tr >
<td class="head" style='width: 169px;'>
<a class="tooltip tooltipFont">Forme juridique actuelle</a>
</td>
<td class="right"><?php echo $this->report->LegalForm.' / '.$this->report->UnifiedLegalForm;?></td>
</tr>
<tr >
<td class="head" style='width: 169px;'>
<a class="tooltip tooltipFont">Date de constitution</a>
</td>
<td class="right"><?php echo (!empty($this->report->IncorporationDate))?$d.'/'.$m.'/'.$y:'NC'?></td>
</tr>
<tr >
<td class="head" style='width: 169px;'>
<a class="tooltip tooltipFont">Etat de l'entreprise</a>
</td>
<td class="right"><?php echo $this->report->CompanyStatus?></td>
</tr>
<tr >
<td class="head" style='width: 169px;'>
<a class="tooltip tooltipFont">No. Siret</a>
</td>
<td class="right"><?php echo $this->report->CompanyId?></td>
</tr>
</tbody>
</table>
<br />
<a name="2"></a>
<span class="title">Données de contact</span><br /><br />
<ul style="font-size:13px;margin-left:3%;list-style: none">
<li><b>Numéro de téléphone </b> <span style="float:right"><?php echo $this->report->TelephoneNumber?></span></li>
<hr style="border:1px dotted silver" />
<li><b>Numéro de fax </b> <span style="float:right"><?php echo $this->report->Telefax?></span></li>
<hr style="border:1px dotted silver" />
<li><b>Adresse Email </b> <span style="float:right"><?php echo $this->report->EmailAddress?></span></li>
<hr style="border:1px dotted silver" />
<li><b>Site internet </b> <span style="float:right"><?php echo $this->report->WebAddress?></span></li>
<hr style="border:1px dotted silver" />
<li><b>Adresse </b> <span style="float:right"><?php echo $this->report->CompanyAddress?></span></li>
<hr style="border:1px dotted silver" />
</ul>
<a name="2"></a><br />
<span class="title">Données de contact</span><br />
<table id="giant_synthese">
<tbody>
<tr >
<td class="head" style='width: 169px;'>
<a class="tooltip tooltipFont">Numéro de téléphone</a>
</td>
<td class="right"><?php echo $this->report->TelephoneNumber?></td>
</tr>
<tr >
<td class="head" style='width: 169px;'>
<a class="tooltip tooltipFont">Numéro de fax</a>
</td>
<td class="right"><?php echo $this->report->Telefax?></td>
</tr>
<tr >
<td class="head" style='width: 169px;'>
<a class="tooltip tooltipFont">Adresse Email</a>
</td>
<td class="right"><?php echo ($this->report->EmailAddress!='<a href="mailto:"></a>')?$this->report->EmailAddress:'NC'?></td>
</tr>
<tr >
<td class="head" style='width: 169px;'>
<a class="tooltip tooltipFont">Site internet</a>
</td>
<td class="right"><?php echo ($this->report->WebAddress!='<a href="http://"></a>')?$this->report->WebAddress:'NC'?></td>
</tr>
<tr >
<td class="head" style='width: 169px;'>
<a class="tooltip tooltipFont">Adresse</a>
</td>
<td class="right"><?php echo $this->report->CompanyAddress?></td>
</tr>
</tbody>
</table>
</div>
<br />
<a name="3"></a>
<a name="3"></a><br />
<?php if(!empty($this->report->activity)):?>
<span class="title">Activités</span><br /><br />
<table style="margin-left: 19px;" width="97%">
<span class="title">Activités</span><br />
<table id="giant_synthese">
<thead>
<tr>
<th align="left" class="date">Code</th>
<th align="right" class="date">Activité</th>
</tr>
</thead>
<tbody>
<tr>
<?php foreach($this->report->activity as $code => $activity): ?>
<tr>
<td style="font-size:13px;"><b>Code</b></td>
<td style="float:right;font-size:13px;padding-left:5px"><b>Activité</b></td>
</tr>
<tr>
<td colspan="2"><hr style="border:1px dotted silver" /></td>
</tr>
<?php foreach($this->report->activity as $code => $activity): ?>
<tr>
<td>
<ul style="font-size:13px;list-style: none">
<li><span ><?php echo $code?></span></li>
</ul>
</td>
<td style="padding-left:5px">
<ul style="font-size:13px;list-style: none;">
<?php if(strlen($activity) < 50): ?>
<li style="float:right"><span ><i><?php echo $activity?></i></span></li>
<?php else: ?>
<li style="float:right;cursor:help" class="tooltip" title="<?php echo $activity;?>" style="float:right">
<span ><i><?php echo substr($activity, 0, 50);?>...</i></span>
</li>
<?php endif; ?>
</ul>
<td class="head" style='width: 169px;'>
<a><?php echo $code?></a>
</td>
<td class="right"><?php echo $activity?></td>
</tr>
<tr>
<td colspan="2"><hr style="border:1px dotted silver" /></td>
</tr>
<?php endforeach;?>
</table>
<?php endforeach; ?>
</tbody>
</table>
<?php endif;?>
<br />
<?php if(!empty($this->report->Employees)):?>
<a name="4"></a>
<span class="title">Personnel</span><br /><br />
<table style="font-size:13px;margin-left: 19px;" width="97%">
<a name="4"></a><br />
<span class="title">Personnel</span><br />
<table id="giant_synthese">
<thead>
<tr>
<td><b>Année</b></td>
<td><b>Total des travailleurs employés</b></td>
<td><b>Équivalent temps plein</b></td>
<th align="left" class="date" style='width: 169px;'>Année</th>
<th align="right" class="date">Total des travailleurs employés</th>
<th align="right" class="date">Équivalent temps plein</th>
</tr>
<?php foreach($this->report->Employees as $year => $employees): ?>
</thead>
<tbody>
<tr>
<td><?php if(strlen($year)==4)echo $year; else echo $this->dateFunction->dateT('Ymd', 'd/m/Y', $year);?></td>
<td><?php echo $employees['TotalStaffEmployed'];?> </td>
<td><?php echo $employees['FulltimeEquivalent'];?> </td>
</tr>
<tr>
<td colspan="3"><hr style="border:1px dotted silver" /></td>
</tr>
<?php endforeach;?>
<?php foreach($this->report->Employees as $year => $employees): ?>
<tr class="<?php echo ($val)? 'red':'green'; ?>">
<td class="left"><?php if(strlen($year)==4)echo $year; else echo $this->dateFunction->dateT('Ymd', 'd/m/Y', $year);?></td>
<td class="right"><?php echo $employees['TotalStaffEmployed'];?></td>
<td class="right"><?php echo $employees['FulltimeEquivalent'];?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif;?>
<br />
<?php if(!empty($this->report->ProductName)):?>
<a name="5"></a>
<span class="title">Noms de produit</span><br /><br />
<table style="margin-left: 19px;" width="97%">
<tr>
<td style="font-size:13px;"><b>Source</b></td>
<td width="100%" style="font-size:13px;padding-left:5px"><b>Produit</b></td>
</tr>
<tr>
<td colspan="2"><hr style="border:1px dotted silver" /></td>
</tr>
<a name="5"></a><br />
<span class="title">Noms de produit</span><br />
<table id="giant_synthese">
<thead>
<tr>
<th align="left" class="date">Source</th>
<th align="right" class="date">Produit</th>
</tr>
</thead>
<tbody>
<tr>
<?php foreach($this->report->ProductName as $ProductName): ?>
<tr>
<td style="font-size:13px;"><?php echo (empty($ProductName->source)?'NC':$ProductName->source);?></td>
<td style="padding-left:5px" width="100%">
<ul style="font-size:13px;list-style: none;">
<?php if(strlen($ProductName->_) < 50): ?>
<li style="float:right"><span ><i><?php echo $ProductName->_?></i></span></li>
<?php else: ?>
<li style="float:right;cursor:help" class="tooltip" title="<?php echo $ProductName->_;?>" style="float:right">
<span ><i><?php echo substr($ProductName->_, 0, 80);?>...</i></span>
</li>
<?php endif; ?>
</ul>
</td>
</tr>
<tr>
<td colspan="2"><hr style="border:1px dotted silver" /></td>
</tr>
<?php endforeach;?>
<tr class="<?php echo ($val)? 'red':'green'; ?>">
<td class="head" style='width: 169px;'>
<a><?php echo (empty($ProductName->source)?'NC':$ProductName->source);?></a>
</td>
<td class="right"><?php echo $ProductName->_?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif;?>
<?php else: ?>

View File

@ -1,5 +1,6 @@
<div class="paragraph">
<?php if(isset($this->report->FinancialSummary)):?>
<? $dateFunction = new WDate();?>
<a name="11"></a>
<span class="title">Informations Capital</span><br />
<?php if(isset($this->report->PositionFinanciere)):?>
@ -9,7 +10,7 @@
<th align="center">
</th>
<?php $i = 0; foreach($this->report->PositionFinanciereDate as $date => $val):$i++?>
<th align="right" class="date"><?php echo $date;?></th>
<th align="right" class="date"><?php echo $dateFunction->dateT('Ymd', 'd/m/Y', $date);?></th>
<?php endforeach; ?>
</tr>
</thead>

View File

@ -1,4 +1,6 @@
<b>
<?$address=$this->resultat->Address->HouseNumber.':'.$this->resultat->Address->Street.':'.$this->resultat->Address->PostCode.':'.$this->resultat->Address->City;
$address=str_replace('/', '_', $address);?>
<?if (in_array($this->resultat->CompanyId, $this->TestCompanies)):?>
<a href="<?php echo $this->url(
array('controller' => 'giant', 'action' => 'identite',
@ -8,7 +10,7 @@
'Pays' => $this->resultat->Address->Country,
'telephone' => $this->resultat->TelephoneNumbers->TelephoneNumber[0],
'test' => '0',
'Adresse' => $this->resultat->Address->HouseNumber.':'.$this->resultat->Address->Street.':'.$this->resultat->Address->PostCode.':'.$this->resultat->Address->City));?>">
'Adresse' => $address));?>">
<?php echo $this->resultat->RegisteredName.' -'; ?>
</a>
<span class='testSearch'><a href="<?php echo $this->url(
@ -19,7 +21,7 @@
'Pays' => $this->resultat->Address->Country,
'telephone' => $this->resultat->TelephoneNumbers->TelephoneNumber[0],
'test' => '1',
'Adresse' => $this->resultat->Address->HouseNumber.':'.$this->resultat->Address->Street.':'.$this->resultat->Address->PostCode.':'.$this->resultat->Address->City));?>">
'Adresse' => $address));?>">
<?php echo ' TEST MODE'; ?>
</a></span>
<?else:?>
@ -31,7 +33,7 @@
'Pays' => $this->resultat->Address->Country,
'telephone' => $this->resultat->TelephoneNumbers->TelephoneNumber[0],
'test' => '0',
'Adresse' => $this->resultat->Address->HouseNumber.':'.$this->resultat->Address->Street.':'.$this->resultat->Address->PostCode.':'.$this->resultat->Address->City));?>">
'Adresse' => $address));?>">
<?php echo $this->resultat->RegisteredName; ?>
</a>
<?endif?>

View File

@ -6,7 +6,7 @@
<p align="center"><b>
<?php echo number_format($this->resultats->NumberOfHits, 0, ',', ' ')?>
réponses avec les critères <a href="<?php echo $this->lienReferer;?>">"<?php echo $this->referer; ?>"</a>.
<?php echo $this->userMaxResult;?> résultats affichés.
<?php echo ($this->resultats->NumberOfHits>$this->userMaxResult)?$this->userMaxResult:$this->resultats->NumberOfHits?> résultats affichés.
Page <?php echo $this->page + 1 .'/'. $this->resultats->NumberOfHits?>.</b>
</p>
<ol start="<?php echo ($this->userMaxResult * $this->page) + 1; ?>">

View File

@ -2,8 +2,9 @@
<div id="infogeo_photo">
<?=$this->action('streetview', 'identite', null, array(
'lat' => $this->infos->GeoLat,
'lon' => $this->infos->GeoLon
'lat' => $this->infos->GeoLat,
'lon' => $this->infos->GeoLon,
'siret' => $this->infos->Siret,
));?>
</div>

View File

@ -172,6 +172,7 @@ Cette entreprise est une personne physique exerçant son activité en nom propre
<a class="lienNom" href="<?=$this->url(array('controller'=>'identite','action'=>'liens','lienref'=>$lien->idFiche), null, true)?>">
<?php }?>
<?=$lien->nom?>
<?php if($lien->sigle) echo " (".$lien->sigle.")"; ?>
</a>
</td>
<td class="StyleInfoData" width="150">

View File

@ -117,8 +117,9 @@ else
{
$texte = $this->RemplaceSiren($info->Annonce);
if(substr($this->criteres->source, 0, 3) == 'BOD' ){
$date = new Zend_Date($info->Date_Parution, 'yyyy-MM-dd');
?>
Source BODACC n°<?=$info->Num_Parution?> <?=substr($this->criteres->source, 3, 1)?> du <?=WDate::dateT('Y-m-d', 'd/m/Y', $info->Date_Parution)?>.
Source BODACC n°<?=$info->Num_Parution?> <?=substr($this->criteres->source, 3, 1)?> du <?=$date->toString('dd/MM/yyyy')?>.
<?php
}
?>

View File

@ -181,7 +181,7 @@
<td align="center">BC</td>
<td align="right"><?=$this->Editable('BC',$this->liasse['BC'],'poste');?></td>
<td align="right"><?=$this->Editable('BC1',$this->liasse['BC1'],'poste');?></td>
<td align="right"><?=$this->Editable('BC2',$this->liasse['BC1'],'poste');?></td>
<td align="right"><?=$this->Editable('BC2',$this->liasse['BC2'],'poste');?></td>
</tr>
<tr>
<td>Autres titres immobilisés</td>

View File

@ -34,6 +34,10 @@
<label>Né(e) le</label>
<div class="field">
<input type="text" size="10" name="naissance_date" value="<?=$this->naissance_date?>"/>
<script>
$.datepicker.setDefaults( $.datepicker.regional["fr"] );
$('input[name=naissance_date]').datepicker({ changeMonth: true, changeYear: true });
</script>
à <input type="text" name="naissance_lieu" value="<?=$this->naissance_lieu?>"/>
<select name="naissance_dept_pays">
<option>-</option>

View File

@ -36,7 +36,7 @@ select, input {
border-color:red;
}
.loading
.loading
{
background-color: silver;
height: 450px;
@ -45,7 +45,7 @@ select, input {
position: absolute;
width: 720px;
opacity: 0.3;
display:none;
display:none;
z-index: 1;
}
@ -59,10 +59,7 @@ select, input {
}
</style>
<?php
$getcutoff = $this->getcutoff;
$wdate = new WDate();
?>
<?php $getcutoff = $this->getcutoff; ?>
<?php if ($this->message!='') {?>
<div class='message'><p id='<?=$this->refresh ?>'><?=$this->message; ?></p></div>
<?php }?>
@ -72,9 +69,15 @@ $wdate = new WDate();
<div>Date de création Cut-off</div>
<div>Date de mise à jour Cut-off</div>
</div>
<div class="StyleInfoData" style="float:left; margin-top:20px; ">
<div id='dateInsert'> <?=$wdate->dateT('Y-m-d', 'd/m/Y', $getcutoff['dateInsert']); ?></div>
<div> <?=$wdate->dateT('Y-m-d', 'd/m/Y', $getcutoff['dateUpdate']); ?></div>
<div class="StyleInfoData" style="float:left; margin-top:20px; ">
<div id='dateInsert'>
<?php $date = new zend_Date($getcutoff['dateInsert'], 'yyyy-MM-dd')?>
<?=$date->toString('dd/MM/yyyy')?>
</div>
<div>
<?php $date = new zend_Date($getcutoff['dateUpdate'], 'yyyy-MM-dd')?>
<?=$date->toString('dd/MM/yyyy')?>
</div>
</div>
<?php } ?>
@ -89,7 +92,7 @@ $wdate = new WDate();
</div>
<div style="float:left">K€ (de 0 à 500 K€)</div>
<?php
<?php
$select = array('scoreConf' => 'Score de conformité', 'scoreDir' => 'Score dirigeance', 'scoreSolv' => 'IndiScore');
foreach($select as $item => $val) {
?>
@ -97,7 +100,7 @@ foreach($select as $item => $val) {
<label><?=$val?></label>
<select name="<?=$item ?>" required>
<option value='' selected>---</option>
<?php
<?php
for($i=0; $i<=$this->typescore; $i++) {
$selected = '';
if (is_numeric($getcutoff[$item]) && $i == $getcutoff[$item]) {

View File

@ -36,7 +36,7 @@ if (strtolower($this->nameType)=='individual')
'dirDateNaissJJ' =>$day,
'dirDateNaissMM' =>$month,
'dirDateNaissAAAA' =>$year,
'dirCpVille' =>$content[0]->events->event[0]->address->region
'dirCpVille' =>''
);
} else {
$param = array(
@ -187,7 +187,7 @@ if ($associate->associatetype=='ASSOCIATE')
'dirDateNaissJJ' =>$day,
'dirDateNaissMM' =>$month,
'dirDateNaissAAAA' =>$year,
'dirCpVille' =>$associate->targetEntity->events->event[0]->address->region
'dirCpVille' =>''
);
} else {
$dirType = 'ORGANISATION';

View File

@ -1,4 +1,4 @@
<?=($this->occurrence===false) ? "WorldCheck<br/>Cliquez sur l&rsquo;icone WorldCheck" : "WorldCheck<br/>Occurrences: ".$this->occurrence;?>
<?=($this->occurrence===false) ? "WorldCheck<br/>Cliquez sur le lien" : "WorldCheck<br/>Occurrences: ".$this->occurrence;?>
<? $param = array(
'controller'=>'worldcheck',
'action'=>'index',

View File

@ -398,7 +398,7 @@ table {
/* Main
----------------------------------*/
body{font-family: Verdana, Arial, sans-serif;font-size: 11px;text-align: center; /* pour corriger le bug de centrage IE */ }
#global {width:900px; margin:0 auto; text-align:left;}
#global {text-align:left;}
#content {padding:0;margin:0;}
#center {background-color:#fff;padding:5px 0;}
#footer {clear:both;text-align:center;margin-top:15px;}

View File

@ -1,12 +0,0 @@
<?php
class DomDocument2 extends DOMDocument {
function getValueFromTag($tagName) {
$items = $this->getElementsByTagName($tagName);
foreach ($items as $item) {
return $item->nodeValue;
}
}
}
?>

View File

@ -1,242 +0,0 @@
<?php
require_once 'common/dates.php';
require_once 'Finance/OtherFunctions.lib.php';
require_once 'Finance/RatiosGraph.lib.php';
require_once 'Scores/WsScores.php';
Class FinanceLib
{
private $dateFunction;
private $siret;
private $idSC;
private $graphique;
public function __construct($siret, $idSC) {
$this->dateFunction = new WDate();
$c = Zend_Registry::get('config');
$this->graphique = new Graphique($c->profil->path->pages . '/imgcache/');
$this->siret = $siret;
$this->idSC = $idSC;
}
/**
*/
public function getRatiosValeur($date, $id, $type, $ratios)
{
$ratio = self::getRatios($ratios, 'entreprise');
foreach($ratio[$date][$type] as $element) {
if ($element->id == $id)
return ($element->val);
}
}
public function getRatios($ratios, $RatioType)
{
$retour = array();
foreach($ratios->BilansInfos->item as $item) {
if ($RatioType == 'entreprise') {
$retour[$item->dateCloture][$item->typeBilan] = $item->RatiosEntrep->item;
} else if($RatioType == 'secteur') {
echo "";
}
}
return ($retour);
}
public function rsynthese($synthese, $idsReference, &$tabAnnee, &$final)
{
$OtherFunction = new OtherFunction();
foreach ($synthese->BilansInfos->item as $item) {
$annee = substr($item->dateCloture, 0, 4);
if( $annee >= substr($synthese->BilansInfos->item[0]->dateCloture, 0, 4)-2) {
$tabAnnee[$this->dateFunction->dateT('Ymd', 'd/m/Y', $item->dateCloture)] = $item->duree;
foreach ($item->RatiosEntrep->item as $RatiosEntrep) {
foreach($idsReference as $id => $elements) {
if ($RatiosEntrep->id == $id) {
$final[$id.':'.$elements['titre']][$item->dateCloture] =
array('Valeur' => $RatiosEntrep->val/1000,
'percent' => $OtherFunction->getReference($RatiosEntrep->val, $elements['total'], $annee, $synthese), 'id' => $id);
ksort($final[$id.':'.$elements['titre']]);
}
}
}
}
}
ksort($tabAnnee);
}
public function synthese($synthese, $bilanReference, $typeBilan, $RatiosGraph)
{
$OtherFunction = new OtherFunction();
$RatiosGraph = new RatiosGraph($this->siret, $this->idSC);
foreach ($synthese->BilansInfos->item as $item) {
if ($item->typeBilan == $typeBilan) {
foreach ($item->RatiosEntrep->item as $RatiosEntrep) {
foreach ($bilanReference as $id => $params) {
if ($RatiosEntrep->id == $id) {
$bilan[$id]['name'] = $params['name'];
$bilan[$id]['unite'] = $params['unite'];
$bilan[$id]['commentaires'] = $params['commentaires'];
if (count($bilan[$id]['item']) <= 2) {
if (is_numeric($RatiosEntrep->val))
$valeur = number_format(($RatiosEntrep->val / $params['operateur']), 0, '', ' ');
$bilan[$id]['item'][$item->dateCloture]['ValEntrep'] = $valeur;}
$this->graphique->GraphiqueLineXY($RatiosGraph->GraphiqueSyntheseLine($id, $synthese,
$item->typeBilan, $OtherFunction->maskNameImg('synthese', $this->siret, array($id,$item->typeBilan))), true); } } }
foreach ($item->RatiosEntrepEvol->item as $RatiosEntrepEvol) {
foreach ($bilanReference as $id => $params) {
if ($RatiosEntrepEvol->id == $params['evolution']) {
if (array_key_exists($item->dateCloture, $bilan[$id]['item'])) {
$bilan[$id]['item'][$item->dateCloture]['duree'] = $item->duree;
$bilan[$id]['item'][$item->dateCloture]['ValEntrepEvol'] = $RatiosEntrepEvol->val; } } } }
}
}
foreach ($bilan as $id => $val)
ksort($bilan[$id]['item']);
return ($bilan);
}
public function constructElementForBilan($bilan, $tableauDeReference, &$type, &$date, &$duree, $typebilan)
{
foreach($bilan->BilansInfos->item as $element) {
if($element->typeBilan == $typebilan)
{
if($duree == EOF)
$duree = $element->duree;
if (@count($date) < 5) {
if(!in_array($element->dateCloture, $date))
$date[] = $element->dateCloture;
}
foreach($element->RatiosEntrep->item as $item) {
foreach($tableauDeReference as $id => $valeur) {
if ($item->id == $id) {
if (count($type[$id]['item']) < 5) {
if ($item->val > 0) {
$type[$id]['item'][$element->dateCloture] = $item->val / 1000;
}
else
$type[$id]['item'][$element->dateCloture] = 'NS';
}
}
}
}
}
}
foreach ($type as $id => $valeur) {
$type[$id]['item'] = array_reverse($valeur['item']);
}
$date = array_reverse($date);
}
public function specialSIG($id, $element, $partial, $count)
{
$OtherFunction = new OtherFunction();
if($element != 'NS') {
if ($id == 'r101')
return $OtherFunction->Tb($element, $element) - $OtherFunction->Tb($partial['r122']['item'][$count], $partial['r101']['item'][$count]);
else if ($id == 'r122')
return $OtherFunction->Tb($element, $partial['r101']['item'][$count]) - $OtherFunction->Tb($partial['r130']['item'][$count], $partial['r101']['item'][$count]);
else if ($id == 'r130')
return $OtherFunction->Tb($element, $partial['r101']['item'][$count]) - $OtherFunction->Tb($partial['r140']['item'][$count], $partial['r101']['item'][$count]);
else if ($id == 'r140')
return $OtherFunction->Tb($element, $partial['r101']['item'][$count]) - $OtherFunction->Tb($partial['r150']['item'][$count], $partial['r101']['item'][$count]);
else if ($id == 'r150')
return $OtherFunction->Tb($element, $partial['r101']['item'][$count]) - $OtherFunction->Tb($partial['r170']['item'][$count], $partial['r101']['item'][$count]);
else if ($id == 'r170')
return $OtherFunction->Tb($element, $partial['r101']['item'][$count]) - $OtherFunction->Tb($partial['r199']['item'][$count], $partial['r101']['item'][$count]);
else if ($id == 'r199')
return $OtherFunction->Tb($element, $partial['r101']['item'][$count]);
} else
return (null);
}
public function LineBilan(&$tableauBilanGraphique, $helper, $id, $Graphdate, $partial, $reference, $name, $url, $siren, $sig = false)
{
$i = 0;
$this->column = 0;
$GraphLine = array();
$OtherFunction = new OtherFunction();
$RatiosGraph = new RatiosGraph($this->siret, $this->idSC);
/** Ont enregistre les données (premié temps) **/
foreach($partial[$id]['item'] as $element) {
if($element != 'NS'){ $GraphLine[] = $number = $element; }else{$number = 0; $GraphLine[] = 0;};
if($sig) {
$result = self::specialSIG($id, $element, $partial, $i);
if(is_numeric($result))
$gr[] = ($result < 0)?0:$result;
}
else
if($OtherFunction->createlementForGraphique($id))$gr[] = $number;
}
($gr != 0)?$tableauBilanGraphique = $gr:$tableauBilanGraphique = false;
/** Ont affiche les données (deuxiéme temps) **/
$html .= '<tr '.(($OtherFunction->ifIsHead($id))?'class="subhead"':'class="bilanDatas"').'>';
$html .= '<td>'.$name.'</td>';
foreach($partial[$id]['item'] as $element) {
$html .= '<td align="right">' . (($element != 'NS') ? number_format($element, 0, '', ' ') . ' K€':$element).'</td>';
}
$html .= '<td align="right">'.$OtherFunction->Tb(end($partial[$id]['item']), end($partial[$reference]['item'])).'</td>';
$image = $RatiosGraph->GraphiqueLineBilan($GraphLine, $RatiosGraph->maskNameImg('bilan', $this->siret, array($id)), $Graphdate);
$html .= '<td>';
$datas = implode('|', $GraphLine);
$dates = implode('|', $Graphdate);
$html .= '<a name="Actif Immobilisé Net" class="rTip" rel="'.$url.'" href="'.$helper->url(
'onelinebilan','finance', null,
array('data'=> $datas,
'name' => urlencode($name),
'dates' => $dates,
'image' => $image,
'siret' => $this->siret,
'id' => $this->idSC)).'">
<img src="/themes/default/images/finance/char_bar.png" />
</a>';
$html .= '</td>';
$html .= '</tr>';
return ($html);
}
public function compareValeur($valeurEnt, $valeurSec, $compare, $valeur = false)
{
$ecart = 1/100;
if( $valeurSec=='NS' || $valeurEnt == 'NS' || $valeurSec==NULL || $valeurEnt==NULL) {
return ('-');
} else if ($compare == '>') {
if (($valeurEnt + $ecart) > $valeurSec) {
if($valeur)
$return = 'bon';
else $return = '<img src="/themes/default/images/finance/ratios_bon.png" />';
} elseif(($valeurSec - ($valeurSec * $ecart)) < $valeurEnt && ($valeurSec + ($valeurSec * $ecart)) > $valeurEnt) {
if($valeur)
$return = 'neutre';
else $return = '-';
} else {
if($valeur)
$return = 'mauvais';
else $return = '<img src="/themes/default/images/finance/ratios_mauvais.png" />';
}
} else if ($compare == '<') {
if ($valeurEnt < $valeurSec) {
if($valeur)
$return = 'bon';
else $return = '<img src="/themes/default/images/finance/ratios_bon.png" />';
} elseif( ($valeurSec - ($valeurSec * $ecart)) < $valeurEnt && ($valeurSec + ($valeurSec * $ecart)) > $valeurEnt) {
if($valeur)
$return = 'neutre';
else $return = '-';
} else {
if($valeur)
$return = 'mauvais';
else $return = '<img src="/themes/default/images/finance/ratios_mauvais.png" />';
}
}
return ($return);
}
}

View File

@ -1,12 +0,0 @@
<?php
class LiasseList
{
public function __construct()
{
}
}

View File

@ -1,236 +0,0 @@
<?php
class OtherFunction
{
public function maskNameImg($action, $siret, $others = EOF)
{
$name = $action.'-'.$siret;
if($others != EOF) {
foreach($others as $other) {
$name .= '-'.$other;
}
}
$name .= '.png';
return ($name);
}
public function array_key_existValeur($array, $key, $valeur)
{
foreach ($array as $arrayValeur) {
foreach($arrayValeur as $arrayKey => $val) {
if($arrayKey == $key)
if($val == $valeur)
return (true);
}
}
return (false);
}
public function getReference($valeur, $reference, $annee, $synthese)
{
foreach ($synthese->BilansInfos->item as $item) {
if(substr($item->dateCloture, 0, 4) == $annee) {
foreach ($item->RatiosEntrep->item as $RatiosEntrep) {
if ($RatiosEntrep->id == $reference) {
return (round(($valeur/$RatiosEntrep->val)*100,2));
}
}
}
}
}
public function setSyntheseReference()
{
$bilanReference = array('r5' => array('evolution' => 'r6' , 'unite' => 'EUR', 'operateur' => 1000, 'name' => 'CHIFFRE D\'AFFAIRES',
'commentaires' => 'Montant total des ventes hors taxe tant sur le territoire français que hors de France.'),
'r7' => array('evolution' => 'r8' , 'unite' => 'EUR', 'operateur' => 1000, 'name' => 'RESULTAT COURANT AVANT IMPOTS',
'commentaires' => 'Bénéfice ou perte constaté avant affectation des produits ou charges exceptionnelles, déduction des impôts et participation au bénéfice. Il est égal aux :
produits d\'exploitation (notamment les sommes reçues qui relèvent de l\'activité de l\'entreprise, soit les ventes de biens, prestations de services etc..)
+ quotes-parts de résultats sur opérations faites en commun(par exemple, résultat des opérations faites par l\'intermédiaire d\'une société en participation)
+ produits financiers (intérêts courus, gains de change, revenus tirés des comptes en banque)
- charges d\'exploitation
- quotes-parts de charges sur opérations en commun
- charges financières.)'),
'r10' => array('evolution' => 'r11' , 'unite' => 'EUR', 'operateur' => 1000, 'name' => 'RESULTAT NET',
'commentaires' => 'Le résultat net comptable correspond au bénéfice ou perte de la période, mesuré par la différence entre les produits et les charges (au sens comptable) de l\'exercice. Il s\'agit du résultat courant, corrigé du résultat exceptionnel, déduction faite de l\'impôt sur le résultat et de l\'éventuelle participation des salariés. Il mesure les ressources nettes restant à l\'entreprise à l\'issue de l\'exercice.'),
'r18' => array('evolution' => 'r19' , 'unite' => 'EUR', 'operateur' => 1000, 'name' => 'FONDS PROPRES',
'commentaires' => 'La situation nette ou Fonds propres ou bien encore, capitaux propres représentent l\'argent apporté par les actionnaires à la constitution de la société ou ultérieurement, ou laissés à la disposition de la société en tant que bénéfices non distribués sous forme de dividendes. Ils courent le risque total de l\'entreprise : si celle-ci va mal, ils ne seront pas rémunérés (aucun dividende ne sera versé) ; si elle dépose son bilan, les porteurs de capitaux propres ne seront remboursés qu\'après que les créanciers l\'aient été intégralement. Si elle va très bien au contraire, tous les profits leur reviennent.'),
'r22' => array('evolution' => 'r23' , 'unite' => 'EUR', 'operateur' => 1000, 'name' => 'TOTAL BILAN',
'commentaires' => 'Le total du bilan est la somme de tous les actifs ainsi que des passifs, il caractérise la taille de l\'entreprise.
Selon le décret 2008-1354 du 18 décembre 2008, les critères désormais retenus pour les besoins de l\'analyse statistique et économique sont les suivants :
La catégorie des micro entreprises est constituée des entreprises qui :
* d\'une part occupent moins de 10 personnes ;
* d\'autre part ont un chiffre d\'affaires annuel ou un total de bilan n\'excédant pas 2 millions d\'euros.
La catégorie des petites et moyennes entreprises (PME) est constituée des entreprises qui :
* d\'une part occupent moins de 250 personnes ;
* d\'autre part ont un chiffre d\'affaires annuel n\'excédant pas 50 millions d\'euros ou un total de bilan n\'excédant pas 43 millions d\'euros.
La catégorie des entreprises de taille intermédiaire (ETI) est constituée des entreprises qui n\'appartiennent pas à la catégorie des petites et moyennes entreprises, et qui :
* d\'une part occupent moins de 5 000 personnes ;
* d\'autre part ont un chiffre d\'affaires annuel n\'excédant pas 1 500 millions d\'euros ou un total de bilan n\'excédant pas 2 000 millions d\'euros.
La catégorie des grandes entreprises (GE) est constituée des entreprises qui ne sont pas classées dans les catégories précédentes.'),
'r231' => array('evolution' => 'r235', 'unite' => 'EUR', 'operateur' => 1000, 'name' => 'FONDS DE ROULEMENT',
'commentaires' => 'Le fonds de roulement représente la différence entre l\'actif à court terme et le passif à court terme (dont l\'échéance est de moins de douze mois). Un fonds de roulement positif indique qu\'une entreprise a suffisamment d\'actifs liquides pour régler ses dettes et engagements à court terme (12 mois). Dans certains cas particuliers, le FDR peut être négatif et l\'entreprise viable : GSA ou autre Hypermarchés par exemple. Cette situation devenant risquée en cas de baisse du CA.'),
'r232' => array('evolution' => 'r236', 'unite' => 'EUR', 'operateur' => 1000, 'name' => 'BESOIN EN FONDS DE ROULEMENT',
'commentaires' => 'Pour les comptables, le BFR correspond aux actifs d\'exploitation (hors immobilisations et actifs financiers) diminués du montant des dettes d\'exploitation (cad aux fonds indéfiniment mobilisés). Ainsi, une entreprise dont le BFR s\'élève à 15 % de son chiffre d\'affaires requiert un besoin permanent de trésorerie représentant 15 % de son activité uniquement pour assurer la pérennité de son cycle d\'exploitation. Plus le niveau de BFR est faible (ou bien plus sa rotation est forte), plus le dégagement de liquidités est important dès lors que les marges sont positives.'),
'r249' => array('evolution' => 'r254', 'unite' => 'EUR', 'operateur' => 1000, 'name' => 'TRESORERIE',
'commentaires' => 'Trésorerie nette (FR-BFR)'),
'r24' => array('evolution' => 'r24' , 'unite' => 'Pers.', 'operateur' => 1, 'name' => 'EFFECTIF',
'commentaires' => 'La définition exacte de l\'effectif peut varier selon les sources :
DADS : effectif salarié instantané au 30 juin ;
SIRENE : effectif salarié au 31 décembre n (ou au 1er janvier n+1) ; cet effectif fait l\'objet d\'une mise à jour « de masse » au premier semestre à partir des données DADS, l\'effectif d\'une entreprise est alors la somme des effectifs de ses établissements au 31 décembre;
SUSE-FICUS : moyenne annuelle de l\'effectif salarié.
Dans un bilan c\'est la moyenne de l\'effectif de l\'exercice.')
);
return ($bilanReference);
}
public function referenceBilan($reference)
{
switch ($reference)
{
case 'actif':
$reference = array('r59' => 'Actif Immobilisé Net','r51' => 'Incorporelles',
'r52' => 'Corporelles', 'r53' => 'Financières',
'r69' => 'Actif Circulant Net', 'r60' => 'Stock et encours',
'r61' => 'Créances Clients', 'r62' => 'Autres Créances',
'r63' => 'Trésorerie Active', 'r22' => 'TOTAL ACTIF'
);
break;
case 'passif':
$reference = array('r79' => 'Ressources Propres', 'r70' => 'Fonds Propres',
'r71' => 'Provisions Risques', 'r72' => 'Comptes Courants',
'r90' => 'Ressources Externes', 'r83' => 'Dettes Financières',
'r84' => 'Dettes Fournisseurs', 'r85' => 'Dettes Fiscales',
'r86' => 'Autres Dettes', 'r87' => 'Trésorerie Passive',
'r22' => 'TOTAL PASSIF'
);
break;
case 'sig':
$reference = array('r101' => 'CHIFFRE D\'AFFAIRES HORS TAXE', 'r102' => '-Achat de marchandises, de matières premières',
'r110' => 'MARGE COMMERCIALE', 'r111' => '+Production vendue',
'r112' => '+Production immobilisée et stockée',
'r120' => 'PRODUCTION DE L\'EXERCICE',
'r121' => 'Variation de stock de marchandises et matières premières',
'r122' => 'MARGE BRUTE',
'r123' => '-Autres charges externes',
'r130' => 'VALEUR AJOUTÉE', 'r132' => 'Charges de personnel',
'r133' => '-Impôts, taxes & versements assimilés', 'r131' => '+Subventions d\'exploitation',
'r140' => 'EXCÉDENT BRUT D\'EXPLOITATION (EBE)', 'r141' => '+Autres produits d\'exploitation',
'r142' => '-Autres charges d\'exploitation', 'r143' => '+Reprise sur dotations & transferts de charges',
'r144' => '+70% Loyer de crédit bail', 'r145' => '-Dotations d\'exploitation & provisions d\'exploitation',
'r150' => 'RÉSULTAT D\'EXPLOITATION', 'r151' => '+Produits financiers',
'r152' => '+30% Loyer de crédit bail', 'r153' => '+Charges financières',
'r170' => 'RÉSULTAT COURANT AVANT IMPOTS', 'r171' => '+Produits exceptionnels',
'r172' => '-Charges exceptionnelles', 'r181' => '-Impôts sur les bénéfices',
'r182' => '-Participation salariale',
'r199' => 'RÉSULTAT NET'
);
break;
}
return ($reference);
}
/*public function formatElementForGraphiqueBilan($bilan)
{
$tb = array();
foreach ($bilan as $id => $item) {
foreach($bilan[$id]['item'] as $element) {
$tb[] = round($element*100/$bilan[$id]['item'][key($bilan['r22']['item'])],2);
}
}
return ($tb);
}*/
public function Tb($element, $reference)
{
if($element != 'NS') {
if ($element != 0 and $reference != 0) {
return (round(($element * 100) / $reference, 2));
} else {
return($element);
}
}
return (false);
}
public function ifIsHead($id)
{
$head = array('r59', 'r69', 'r22','r79', 'r90', 'r101',
'r110', 'r120', 'r122', 'r130', 'r140',
'r150', 'r170', 'r199'
);
if (in_array($id, $head))
return (true);
return (false);
}
public function createlementForGraphique($id)
{
$element = array('r51', 'r52', 'r53', 'r60', 'r61', 'r62', 'r63',
'r70', 'r71', 'r72', 'r83', 'r84', 'r85', 'r86', 'r87',
'');
if (in_array($id, $element))
return (true);
return (false);
}
public function formatElementGraphiquebilan($tb)
{
$valeur = array();
$case = 0;
for ($i =0; $i < count($tb); $i++) {
foreach ($tb as $tableau) {
while($case < count($tableau)) {
$valeur[$i][] = $tableau[$case];
break;
}
}
$case++;
}
return ($valeur);
}
public function parseUnite($unite, $valeur)
{
switch ($unite)
{
case 'EUR':
return (number_format((round($valeur)/1000), 0, '', ' '));
case '%' :
return (round($valeur));
case 'Jours':
return ($valeur);
default:
return ($valeur);
}
}
public function getSwitchFormRatios($ratio, $type, $date = false)
{
$change = false;
if(!$date) {
foreach($ratio->BilansInfos->item as $valeur) {
if ($valeur->typeBilan == $type)
return ($valeur);
}
} else {
foreach($ratio->BilansInfos->item as $valeur) {
if ($valeur->typeBilan == $type and $valeur->dateCloture == $date)
return ($valeur);
else
$change = true;
}
}
if($change) {
foreach($ratio->BilansInfos->item as $valeur) {
if ($valeur->typeBilan == $type)
return ($valeur);
}
}
}
}

View File

@ -1,313 +0,0 @@
<?php
require_once 'Vendors/ChartDirector/phpchartdir.php';
require_once 'Vendors/ChartDirector/FinanceChart.php';
Class RatiosGraph
{
private $siret;
private $SCid;
private $graphique;
private $imageCachePath;
public function __construct($siret, $SCid)
{
$this->siret = $siret;
$this->SCid = $SCid;
$c = Zend_Registry::get('config');
$this->imageCachePath = $c->profil->path->pages . '/imgcache/';
$this->graphique = new Graphique($this->imageCachePath);
}
public function maskNameImg($action, $siret, $others = EOF)
{
$name = $action.'-'.$siret;
if($others != EOF) {
foreach($others as $other) {
$name .= '-'.$other;
}
}
$name .= '.png';
return ($name);
}
public function getValFromKey($stdClass, $key)
{
foreach($stdClass as $element) {
if ($element->id == $key)
return ($element->val/1000);
}
}
public function trieType($data, $idType)
{
$type = array();
foreach($data as $item)
{
if($item->typeBilan == 'N')
$type['N'][] = $item;
else if($item->typeBilan == 'C')
$type['C'][] = $item;
}
return ($type[$idType]);
}
public function createAbscisseSynthese($synthese, $id, &$labelX, $type)
{
$dataX1 = array();
foreach ($synthese->BilansInfos->item as $item) {
if ($item->typeBilan == $type) {
$labelX[] = substr($item->dateCloture, 0, 4);
foreach ($item->RatiosEntrep->item as $RatiosEntrep) {
if ($RatiosEntrep->id == $id) {
if (is_numeric($RatiosEntrep->val))
$dataX1[] = ($RatiosEntrep->val / 1000);
}
}
}
}
$labelX = array_reverse($labelX);
$dataX1 = array_reverse($dataX1);
return ($dataX1);
}
public function GraphiqueSyntheseLine($id, $synthese, $type, $name)
{
$labelX = array();
$parametres = new stdClass();
$parametres->nom = $name;
$parametres->datas = array(self::createAbscisseSynthese($synthese,$id, $labelX, $type));
$parametres->TitlesY = array(array("Keuros"));
$parametres->TitlesX = array(array("Années"));
$parametres->LineLayer = array("Entreprise");
$parametres->labelsY = array();
$parametres->labelsX = $labelX;
return ($parametres);
}
public function GraphiqueSyntheseAnalyse($data, $type, $siret)
{
//Définition des valeurs pour le graph
$dataBFR = array();
$dataFR = array();
$dataCA = array();
$BFR = array();
$i = 0;
$nbAnnees = 0;
$data = self::trieType($data, $type);
//Tri des données par date et par ordre croissant
foreach ($data as $key => $row) { $date[$key] = $row->dateCloture; }
array_multisort($date, SORT_ASC, $data);
if(count($data)>5)
$data = array_slice($data, count($data)-5, null, true);
//Parcourir les années
foreach($data as $item) {
$anneeFin = substr($item->dateCloture,0,4);
$moisFin = substr($item->dateCloture,4,2);
$jourFin = substr($item->dateCloture,6,2);
//Calcul de la date de début
$dateDebut = date("Ymd", mktime(0, 0, 0, $moisFin-$item->duree, $jourFin, $anneeFin));
$anneeDebut = substr($dateDebut,0,4);
$moisDebut = substr($dateDebut,4,2);
$jourDebut = substr($dateDebut,6,2);
//Affectation des abscisses
$dataBFR['x'][$i] = $dataFR['x'][$i] = $dataCA['x'][$i] = $dataEBE['x'][$i] = chartTime((int)$anneeDebut, (int)$moisDebut, (int)$jourDebut);
$dataBFR['x'][$i+1] = $dataFR['x'][$i+1] = $dataCA['x'][$i+1] = $dataEBE['x'][$i+1] = chartTime((int)$anneeFin, (int)$moisFin, (int)$jourFin);
//Affectation des ordonnées
$dataBFR['y'][$i] = $dataBFR['y'][$i+1] = self::getValFromKey($item->RatiosEntrep->item, 'r236');
$dataFR['y'][$i] = $dataFR['y'][$i+1] = self::getValFromKey($item->RatiosEntrep->item, 'r235');
$dataCA['y'][$i] = $dataCA['y'][$i+1] = self::getValFromKey($item->RatiosEntrep->item, 'r6');
$dataEBE['y'][$i] = $dataEBE['y'][$i+1] = self::getValFromKey($item->RatiosEntrep->item, 'r146');
$i+=2;
}
$parametres = new stdClass();
$parametres->nom = self::maskNameImg('synthese', $this->siret, array('graphiqueSynthses', $type));
$parametres->width = 660;
$parametres->height = 350;
$parametres->bgColor = 0xcccccc;
$parametres->edgeColor = 0x000000;
$parametres->raisedEffect = 1;
$parametres->addTitle = array("Synthèse *", "timesbi.ttf", 15, 0x000000);
$parametres->addText = array(array(60, 320, "* Elements financier rapportés à 12 mois"));
$parametres->setPlotArea = array(100, 80, 500, 200, 0xffffff, -1, -1, 0xcccccc, 0xcccccc);
$parametres->TitlesY = array(array("KEUROS","timesbi.ttf", 10));
$parametres->TitlesX = array(array("<*block,valign=absmiddle*>Années<*/*>"));
$parametres->yAxisWidth = 2;
$parametres->xAxisWidth = 2;
$parametres->legendeParams = array(55, 30, false, "times.ttf", 9);
$parametres->addStepLineLayer = array('layer1' => array($dataFR['y'], 0x0000ff, "FONDS DE ROULEMENT", $dataFR['x']),
'layer0' => array($dataBFR['y'], 0xff0000, "BESOIN EN FONDS DE ROULEMENT", $dataBFR['x']),
'layer2' => array($dataCA['y'], 0x00ff00, "CHIFFRE D'AFFAIRES", $dataCA['x']),
'layer3' => array($dataEBE['y'], 0x000000, "EXCEDENT BRUT D'EXPLOITATION", $dataEBE['x'])
);
$parametres->dashLineColor = 'layer3';
$parametres->addInterLineLayer = array('layer0:layer1' => array(0xff0000, Transparent),
'layer0:layer1' => array(Transparent, 0x8044ff44)
);
return ($parametres);
}
public function selectTitleGraphique($type)
{
switch($type) {
case 'actif' :
return ('Composition de l\'actif au : ');
case 'passif':
return ('Composition du passif au : ');
case 'sig' :
return ('Sole Intermédiaire de Gestion au : ');
}
}
public function GraphiqueBilan($type, $data, $i, $filename, $date, $count, $labels)
{
$parametres = new stdClass();
$parametres->nom = self::maskNameImg('bilan', $this->siret, array($i, 'graph', $type));
$parametres->title->texte = self::selectTitleGraphique($type).' '.$date;
$parametres->datas = $data;
$parametres->labels = $labels;
$parametres->makeSession = 'chart_'.$type.$i;
$retour = $this->graphique->GraphiquePieChart($parametres, true);
$parametres->retour->file = $parametres->nom;
$parametres->retour->chartID = $retour->chartId;
$parametres->retour->imageMap = $retour->imageMap;
$parametres->retour->i = $type.$i;
$parametres->retour->hide = $i;
($i == $count)?$parametres->retour->hide = false : $parametres->retour->hide = true;
return ($parametres->retour);
}
public function GraphiqueLineBilan($data, $name, $date)
{
$parametres = new stdClass();
$parametres->nom = $name;
$parametres->datas = array($data);
$parametres->TitlesY = array(array("Keuros"));
$parametres->TitlesX = array(array("Années"));
$parametres->LineLayer = array("Entreprise");
$parametres->labelsY = array();
$parametres->labelsX = $date;
$this->graphique->GraphiqueLineXY($parametres, true);
return($parametres->nom);
}
public function initTableau($tableau)
{
$i = 0;
foreach($tableau as $date => $valeur){
$tableau[$i] = $valeur;
unset($tableau[$date]);
$i++;
}
return ($tableau);
}
public function countTypeBilan($ratios, $typeBilan)
{
$type = 0;
foreach($ratios->BilansInfos->item as $item) {
if($item->typeBilan == $typeBilan)
$type++;
}
return ($type);
}
protected function setUnite($valeur, $unite)
{
switch ($unite) {
case 'EUR':
return ($valeur = $valeur / 1000);
default:
return ($valeur);
}
}
public function createAbscisse($type, $unite, $ratio, $id, $typeBilan = 'N', &$labelX = null, $nbResult = 5)
{
$i = 0;
$dataX = array();
if ($type == 'RatiosEntrep') {
foreach ($ratio->BilansInfos->item as $element) {
if($element->typeBilan == $typeBilan) {
if ($i >= self::countTypeBilan($ratio, $typeBilan))
break;
if (is_array($labelX))
$labelX[] = substr($element->dateCloture, 0, 4);
foreach ($element->RatiosEntrep->item as $ratioEntre) {
if ($ratioEntre->id == $id) {
$dataX[substr($element->dateCloture, 0, 4)] = self::setUnite($ratioEntre->val, $unite);$i++;} } } } }
if ($type == 'RatiosSecteur') {
foreach ($ratio->RatiosSecteur->item as $element) {
if($i >= self::countTypeBilan($ratio, $typeBilan))
break;
foreach($element->liste->item as $item) {
if ($item->id == $id) {
$dataX[$element->annee] = self::setUnite($item->val, $unite);$i++; } } } }
if (is_array($labelX)) sort($labelX);
ksort($dataX);
$dataX = self::initTableau($dataX);
return ($dataX);
}
public function createGraphique($ratio, $id, $unite, $type)
{
$Annees = array();
$parametres = new stdClass();
$parametres->nom = self::maskNameImg('ratios', substr($this->siret, 0, 9), array($id,$type));
$parametres->datas = array(self::createAbscisse('RatiosEntrep', $unite, $ratio, $id, $type, $Annees),
self::createAbscisse('RatiosSecteur', $unite, $ratio, $id, $type));
$parametres->TitlesY = array(array($unite));
$parametres->TitlesX = array(array("Années"));
$parametres->colorLegende->Secteur = 0x008C00;
$parametres->colorLegende->Entreprise = 0x0000ff;
$parametres->LineLayer = array("Entreprise", "Secteur");
$parametres->labelsY = array();
$parametres->labelsX = $Annees;
return ($this->graphique->GraphiqueLineXY($parametres, true));
}
public function bourseGraphique($filename)
{
$file = $filename.'.png';
$noOfDays = 30;
$extraDays = 30;
$rantable = new RanTable(9, 6, $noOfDays + $extraDays);
$rantable->setDateCol(0, chartTime(2002, 9, 4), 86400, true);
$rantable->setHLOCCols(1, 100, -5, 5);
$rantable->setCol(5, 50000000, 250000000);
$timeStamps = $rantable->getCol(0); // Les date
$highData = $rantable->getCol(1); // les données les plus hautes
$lowData = $rantable->getCol(2); // Les données les plus basses
$openData = $rantable->getCol(3); // Les donnée d'ouverture
$closeData = $rantable->getCol(4); // Les donnée de fermeture
$volData = $rantable->getCol(5); // Volume de data
$parametres = new stdClass();
$parametres->nom = $file;
$parametres->makeSession = "chart1";
$parametres->timeStamps = $timeStamps;
$parametres->highData = $highData;
$parametres->lowData = $lowData;
$parametres->openData = $openData;
$parametres->closeData = $closeData;
$parametres->volData = $volData;
$parametres->extraDays = $extraDays;
$retour = $this->graphique->GraphiqueFinance($parametres, true);
return ('<img src="/fichier/imgcache/'.$file.'?'.$retour->chartID.'" border="1" usemap="#map1"><map name="map1">'.$retour->imageMap.'</map>');
}
}

View File

@ -1,233 +0,0 @@
<?php
Class FormatDatas
{
/**
* Ont peut y rajouter des labelles pour completer la synthese.
*
* Respecter l'ordre ( ordre d'affichage ).
* @var
*/
protected $tabRatio = array(
'r5' => array('title' => 'CHIFFRE D\'AFFAIRES', 'div' => 1000, 'unit' => ' K€', 'evolution' => 'r6' ),
'r7' => array('title' => 'RESULTAT COURANT AVANT IMPOTS', 'div' => 1000, 'unit' => ' K€', 'evolution' => 'r8' ),
'r10' => array('title' => 'RESULTAT NET', 'div' => 1000, 'unit' => ' K€', 'evolution' => 'r11' ),
'r18' => array('title' => 'FONDS PROPRES', 'div' => 1000, 'unit' => ' K€', 'evolution' => 'r19' ),
'r22' => array('title' => 'TOTAL BILAN', 'div' => 1000, 'unit' => ' K€', 'evolution' => 'r23' ),
'r231' => array('title' => 'FONDS DE ROULEMENT', 'div' => 1000, 'unit' => ' K€', 'evolution' => 'r235'),
'r232' => array('title' => 'BESOIN EN FONDS DE ROULEMENT', 'div' => 1000, 'unit' => ' K€', 'evolution' => 'r236'),
'r249' => array('title' => 'TRESORERIE', 'div' => 1000, 'unit' => ' K€', 'evolution' => 'r254'),
'r24' => array('title' => 'EFFECTIF', 'div' => 1, 'unit' => ' Pers.', 'evolution' => 'r24' )
);
protected $datas = array();
protected $structure = array();
private $resultats;
private $evolutionsArray;
/**
* Merci de passer l'objet a ce niveau : BilansInfos->item
*
* @param unknown_type $resultats
*/
public function __construct($resultats, $evolutions)
{
$this->resultats = $resultats;
$this->evolutionsArray = $evolutions;
}
/**
* A utiliser avec précaution !
*
* format : 'id' => array(title => '', div => '', unit => '', evolution => '')
* @param Array $element
*/
public function addInRatioTab($id, $element)
{
$tab = array($id => $element);
$copy = $this->tabRatio;
$this->tabRatio = array_merge($copy, $tab);
}
public function constructStructure()
{
self::constructBaseLibele();
foreach ($this->datas as $libele => $title) {
foreach ($this->resultats as $item)
foreach ($item as $row) {
foreach($row as $champ => $valeur) {
if ($champ == 'dateCloture'){
$date = $valeur;
self::constructBaseDate($libele, $valeur);
}
if ($champ == 'typeBilan')
{
self::constructBaseType($libele, $date, $valeur);
}
}
}
}
print_r($this->datas);
}
/**
* Construction du premier etage Libeler
*/
private function constructBaseLibele()
{
foreach ($this->tabRatio as $libel => $valeur) {
$this->datas[$valeur['title']] = array();
}
}
/**
* Construction du deuxieme etage Dates
*
* @param $libeler precedent $libele
* @param date courente $date
*/
private function constructBaseDate($libel, $date)
{
if(!array_key_exists($date, $this->datas)) {
$this->datas[$libel][$date] = array();
}
}
/**
* Construction du troisieme etage Type
*
* @param libele precedent $libele
* @param date precedente $date
* @param type en cours $type
*/
private function constructBaseType($libele, $date, $type)
{
foreach ($this->resultats as $row) {
foreach($row as $champ => $valeur) {
if ($champ == 'dateCloture') {
if ($valeur == $date) {
$this->datas[$libele][$valeur][$type] = array();
}
}
}
}
}
/**
* Construction du quatrieme etage Items
*
* @param libele precedent $libele
* @param date precedente $date
* @param type precedent $type
* @param item precedent $item
* @param id de l'item dans le tabRatio $id
* @param id evolution dans tabRatio $idEvol
*/
private function constructBaseItem($libele, $date, $type, $item, $id, $idEvol)
{
if ($item->id == $id) {
$var = new stdClass();
$var->val = $item->val;
foreach ($this->evolutionsArray as $evol) {
if ($evol->id == $idEvol)
$var->evolution = $item->val;
}
$this->datas[$libele][$date][$type] = $var;
}
}
}
Class Synthese
{
/**
* Type du bilan N, C, A, S, B
*
* N : Normal
* C : Consolidé
* A : Assurance
* B : Banque
* S : Simplifié
*
* Ont garde une priorité sur les bilan de type S donc les type N deviennent type S !
* Donc il n'y a pas de type N dans la vue.
*
* @var unknown_type
*/
protected $typeBilan = array(
'N', 'C', 'A', 'B'
);
/**
* Les données correctement formaté par FormatData
*
* @var unknown_type
*/
protected $datas;
/**
* Les parametres courrant de l'objet
*
* @var unknown_type
*/
protected $currentTypeBilan;
protected $currentDate;
public function __construct($resultats, $evolutions) {
$this->data = new FormatDatas($resultats, $evolutions);
$this->data->constructStructure();
}
/**
* Permet de retourner des elements du tableau
* peut egalement savoir si l'element existe dans le tableau
*
* @param unknown_type $id
* @param unknown_type (existe, title, div, unit, evolution)
*/
public function getElementInSynthese($id, $action)
{
foreach ($this->tabRatio as $name => $element) {
if ($name == $id) {
switch ($action){
case 'exist':
return (true);
case 'title':
return($element['title']);
case 'div':
return ($element['div']);
case 'unit':
return ($element['unit']);
case 'evolution':
return ($element['evolution']);
default:
return ($element);
}
}
}
return (false);
}
/**
* Permet de switcher entre les bilans
*
* @param unknown_type $type
*/
protected function selectTypeBilan($type)
{
foreach($this->typeBilan as $typeBilan) {
if ($typeBilan == $type)
$this->currentTypeBilan = $type;
}
}
/**
* Permet de selectionnez d'autre dates.
*
* @param unknown_type $date
*/
protected function selectDateBilan($date)
{
$this->currentDate = $date;
}
}

View File

@ -263,7 +263,7 @@ Class GiantControllerLib
Class GiantRechercheController extends GiantFunction
{
protected $listAutorized = array(
'FR' => '006', 'BE' => '001', 'ES' => '001',
'FR' => '006', 'BE' => '001', 'ES' => '005',
'GB' => '002', 'NL' => '003'
);
protected $Provider;

View File

@ -20,11 +20,11 @@ Class GiantFunction
public function setDate($date, $format)
{
$date = new WDate();
$wdate = new WDate();
switch($format) {
case 'YYYYMMDD':
$formatIn = 'Ymd';
$date = $date->dateT($formatIn, 'd/m/Y', $date);
$date = $wdate->dateT($formatIn, 'd/m/Y', $date);
return ($date);
case 'YYYY':
return ($date);

View File

@ -11,7 +11,7 @@ Class AvisDeCredit
'Conan & Holder' => array('min' => -4.5, 'max' => 16),
'Afdcc2' => array('min' => 0, 'max' => 5),
'Score Z' => array('min' => -3, 'max' => 3),
'CommonRisk' => array('min' => 0, 'max' => 20),
'CommonRisk' => array('min' => 1, 'max' => 5),
'ERC' => array('min' => -5, 'max' => 5)
);
private $pdRating = array('AAA' => 9, 'AA' => 8, 'A' =>7, 'BBB' => 6, 'BB' => 5, 'B' => 4, 'CCC' => 3, 'CC' => 2, 'C' => 1, 'D' => 0);
@ -68,9 +68,9 @@ Class AvisDeCredit
$current = (($current > $max)?$max:$current);
$current = (($current < $min)?$min:$current);
$m->setScale($min, $max);
$m->addZone(9, 100, 0x21FF11, "");
$m->addZone(5, 9, 0xFF8C19, "");
$m->addZone(0, 5, 0xFF0004, "");
$m->addZone(55, 100, 0x21FF11, "");
$m->addZone(35, 55, 0xFF8C19, "");
$m->addZone(0, 35, 0xFF0004, "");
break;
case 'Conan_&_Holder':
$current = (($current > $max)?$max:$current);
@ -94,12 +94,18 @@ Class AvisDeCredit
$m->addZone(-3, 0, 0xFF0004, "");
break;
case 'CommonRisk':
$current = (($current > $max)?$max:$current);
$current = (($current < $min)?$min:$current);
$m->setScale($min, $max);
$m->addZone(8, 20, 0x21FF11, "");
$m->addZone(5, 8, 0xFF8C19, "");
$m->addZone(0, 5, 0xFF0004, "");
if ($current!=8 && $current!=9) {
$current = (($current < $min)?$min:$current);
$current = (($current > $max)?$max:$current);
$m->setScale($min, $max);
$m->addZone(3, 5, 0x21FF11, "");
$m->addZone(2, 3, 0xFF8C19, "");
$m->addZone(0, 2, 0xFF0004, "");
}
else{
$m->setScale($min, $max);
$m->addZone(0, 5, 0xCCCCCC, "");
}
break;
case 'ERC':
$current = (($current > $max)?$max:$current);
@ -201,16 +207,17 @@ class ComparaisonValeurs
case 'FlexibleComparisonItems':
foreach($PeerGroup->FlexibleComparisonItems->ComparisonItemsGroup as $ComparisonItemsGroup) {
foreach($ComparisonItemsGroup->FlexibleComparisonItem as $FlexibleComparisonItem) {
foreach($ComparisonItemsGroup->FlexibleComparisonItem as $key=>$FlexibleComparisonItem) {
$name = str_replace(' ', '_', str_replace('\'', '', $FlexibleComparisonItem->ItemName->_));
if(!isset($this->report->DataSet->Company->ComparaisonValeurs[$name]['date'])) {
$this->report->DataSet->Company->ComparaisonValeurs[$name]['date'] = $date->dateT('Ymd', 'd/m/Y', $ComparisonItemsGroup->Period->EndDate->_);}
if(!isset($this->report->DataSet->Company->ComparaisonValeurs[$name]['current'])){
$this->report->DataSet->Company->ComparaisonValeurs[$name]['current'] = $FlexibleComparisonItem->SubjectValue;}
if(!isset($this->report->DataSet->Company->ComparaisonValeurs[$name]['entreprise'])){
$this->report->DataSet->Company->ComparaisonValeurs[$name]['entreprise'] = $FlexibleComparisonItem->AverageValue;}
if($date->dateT('Ymd', 'd/m/Y', $ComparisonItemsGroup->Period->EndDate->_) != $this->report->DataSet->Company->ComparaisonValeurs[$name]['date']){
$this->report->DataSet->Company->ComparaisonValeurs[$name]['old'][$date->dateT('Ymd', 'd/m/Y', $ComparisonItemsGroup->Period->EndDate->_)][] = $FlexibleComparisonItem;}}}
$this->report->DataSet->Company->ComparaisonValeurs[$key]['name'] = $name;
if(!isset($this->report->DataSet->Company->ComparaisonValeurs[$key]['date'])) {
$this->report->DataSet->Company->ComparaisonValeurs[$key]['date'] = $date->dateT('Ymd', 'd/m/Y', $ComparisonItemsGroup->Period->EndDate->_);}
if(!isset($this->report->DataSet->Company->ComparaisonValeurs[$key]['current'])){
$this->report->DataSet->Company->ComparaisonValeurs[$key]['current'] = $FlexibleComparisonItem->SubjectValue;}
if(!isset($this->report->DataSet->Company->ComparaisonValeurs[$key]['entreprise'])){
$this->report->DataSet->Company->ComparaisonValeurs[$key]['entreprise'] = $FlexibleComparisonItem->AverageValue;}
if($date->dateT('Ymd', 'd/m/Y', $ComparisonItemsGroup->Period->EndDate->_) != $this->report->DataSet->Company->ComparaisonValeurs[$key]['date']){
$this->report->DataSet->Company->ComparaisonValeurs[$key]['old'][$ComparisonItemsGroup->Period->EndDate->_][] = $FlexibleComparisonItem;}}}
break;
case 'AmountAdvisedComparison':
foreach($PeerGroup->AmountAdvisedComparison as $AmountAdvisedComparison) {
@ -277,8 +284,9 @@ class ComportementPaiement
if(isset($PaymentBehaviour->AnalysisByPeriod->Category)) {
foreach($PaymentBehaviour->AnalysisByPeriod->Category as $period) {
foreach($period->DueDateExceeds as $DueDateExceeds) {
$per = $period->Period->StartDate->_.$period->Period->EndDate->_;
$this->report->DataSet->Company->
ComportementPaiement[$date->dateT('Ymd', 'd/m/Y', $period->Period->StartDate->_).':'.$date->dateT('Ymd', 'd/m/Y', $period->Period->EndDate->_)][$DueDateExceeds->NrOfDaysExceeds->LowerLimit->_.':'.$DueDateExceeds->NrOfDaysExceeds->UpperLimit->_] =
ComportementPaiement[$per][$DueDateExceeds->NrOfDaysExceeds->LowerLimit->_.'0000'.$DueDateExceeds->NrOfDaysExceeds->UpperLimit->_] =
$DueDateExceeds->Percentage;
}
}
@ -287,8 +295,8 @@ class ComportementPaiement
foreach($PaymentBehaviour->AnalysisByAmount->Category as $Amount) {
foreach($Amount->DueDateExceeds as $AmountExceeds) {
$index = ((isset($Amount->AmountCategory->LowerLimit->_))?$Amount->AmountCategory->LowerLimit->_:'0').
':'.(isset($Amount->AmountCategory->HigherLimit->_)?$Amount->AmountCategory->HigherLimit->_:'0');
$this->report->DataSet->Company->ByAmount[$index][$AmountExceeds->NrOfDaysExceeds->LowerLimit->_.':'.$AmountExceeds->NrOfDaysExceeds->UpperLimit->_] = $AmountExceeds->Percentage;
'1111'.(isset($Amount->AmountCategory->HigherLimit->_)?$Amount->AmountCategory->HigherLimit->_:'0');
$this->report->DataSet->Company->ByAmount[$index][$AmountExceeds->NrOfDaysExceeds->LowerLimit->_.'0000'.$AmountExceeds->NrOfDaysExceeds->UpperLimit->_] = $AmountExceeds->Percentage;
}
}
}
@ -586,13 +594,14 @@ class ComptesAnnuels
public function formatDate($report)
{
$date = new WDate();
$function = new GiantFunction();
//$date = new WDate();
//$function = new GiantFunction();
for ($i = 0; $i < count($this->report->DataSet->Company->AnnualAccounts); $i++) {
if(isset($this->report->DataSet->Company->AnnualAccounts[$i]->AccountsDate->_)) {
$this->report->DataSet->Company->AnnualAccounts[$i]->AccountsDate->_ = $date->dateT(
$this->report->DataSet->Company->AnnualAccounts[$i]->AccountsDate->_=(int)$this->report->DataSet->Company->AnnualAccounts[$i]->AccountsDate->_;
/*$this->report->DataSet->Company->AnnualAccounts[$i]->AccountsDate->_ = $date->dateT(
$function->getFormatDate($this->report->DataSet->Company->AnnualAccounts[$i]->AccountsDate->format), 'd/m/Y',
$this->report->DataSet->Company->AnnualAccounts[$i]->AccountsDate->_);
$this->report->DataSet->Company->AnnualAccounts[$i]->AccountsDate->_);*/
}
}
}
@ -617,7 +626,8 @@ class Dirigeant {
{
$date = new WDate();
foreach($this->report->DataSet->Company->Position as $Position) {
$this->report->DataSet->Company->Dirigeant[$Position->PositionTitle->code][$date->dateT('Ymd', 'd/m/Y', $Position->Period->StartDate->_).':'.$date->dateT('Ymd', 'd/m/Y',$Position->Period->EndDate->_)][] = $Position->Person;
$Position->Person->date = array($Position->Period->StartDate->_,$Position->Period->EndDate->_);
$this->report->DataSet->Company->Dirigeant[$Position->PositionTitle->code][(int)$Position->Period->StartDate->_][] = $Position->Person;
}
}
@ -641,7 +651,9 @@ class Historiques
public function generateStructure()
{
$myEvent = array();
$new =array();
$function = new GiantFunction();
$i=0;
foreach($this->report->DataSet->Company->Event as $events) {
$std = new stdClass();
$std->EventCode = $events->EventCode;
@ -649,9 +661,18 @@ class Historiques
$std->FreeText = $events->FreeText->_;
$std->Date = $function->setDate($events->Date->_, $events->Date->format);
$std->Format = $events->Date->format;
$myEvent[$events->Source->_][$events->Date->_][] = $std;
$std->name = $events->Source->_;
$tmp = array_search($events->Source->_, $new);
if (!$tmp){
$i++;
$new[$i] = $events->Source->_;
$myEvent[$i][$events->Date->_][] = $std;
} else {
$myEvent[$tmp][$events->Date->_][] = $std;
}
unset ($std);
}
$this->report->DataSet->Company->EventNew = $new;
$this->report->DataSet->Company->Event = $myEvent;
foreach($this->report->DataSet->Company->Event as $name => $event) {
ksort($this->report->DataSet->Company->Event[$name]);
@ -687,7 +708,7 @@ class InformationGenerale
$this->report->CompanyAddress = $this->report->CompanyAddress[0]->HouseNumber.' '.$this->report->CompanyAddress[0]->Street.' - '.$this->report->CompanyAddress[0]->PostCode.' '.$this->report->CompanyAddress[0]->City;
$this->report->TelephoneNumber = $this->report->TelephoneNumber[0]->_;
$this->report->Telefax = $this->report->Telefax[0];
$this->report->IncorporationDate = $function->setDate($this->report->IncorporationDate->_, $this->report->IncorporationDate->format);
$this->report->IncorporationDate = str_replace('/', '', $function->setDate($this->report->IncorporationDate->_, $this->report->IncorporationDate->format));
$this->report->UnifiedLegalForm = $this->report->LegalForm[0]->UnifiedLegalForm;
$this->report->LegalForm = $this->report->LegalForm[0]->CountryLegalForm->_;
$this->report->WebAddress = '<a href="http://'.$this->report->WebAddress.'">'.$this->report->WebAddress.'</a>';
@ -791,13 +812,15 @@ class PositionFinanciere
public function generateStructure()
{
$dateFunction = new WDate();
foreach($this->report->DataSet->Company->FinancialSummary as $FinancialSummary) {
foreach($FinancialSummary as $name => $valeur) {
if($name != 'SummaryDate' and $name != 'AccountStatus' and $name != 'Unit') {
(($FinancialSummary->Unit == 1)?$unit=1000:$unit=1);
$date = (strlen($FinancialSummary->SummaryDate->_) == 8 )?$dateFunction->dateT('Ymd', 'd/m/Y', $FinancialSummary->SummaryDate->_):$FinancialSummary->SummaryDate->_;
$date = $FinancialSummary->SummaryDate->_;
if(strlen($FinancialSummary->SummaryDate->_) != 8){
list($date, $month, $year) = explode("/", $FinancialSummary->SummaryDate->_);
$date = $date.$month.$year;
}
$return[$name][$date] = number_format ($valeur->_/$unit, 0, '', ' ').(($unit==1000)?' K€':' €');
$this->labelDate[$date] = true;
}

View File

@ -94,8 +94,7 @@ class AvisSituation
'http://avis-situation-sirene.insee.fr'.EOL.
'pour login '.$user->getLogin().EOL;
require_once 'Scores/Mail.php';
$mail = new Mail();
$mail = new Scores_Mail();
$mail->setFrom('contact');
$mail->addToKey('support');
$mail->setSubject($objet);

View File

@ -1,5 +1,5 @@
<?php
class Liasse
class Scores_Finance_Liasse
{
protected $postes = array();

View File

@ -1,5 +1,5 @@
<?php
class LiasseXLS
class Scores_Finance_Liasse_XLS
{
protected $path;
protected $mode;
@ -10,7 +10,7 @@ class LiasseXLS
);
protected $assoc = array();
protected $values = array();
/**
*
* Enter description here ...
@ -32,7 +32,7 @@ class LiasseXLS
}
$this->mode = $mode;
}
public function dataModel($siren, $raisonSociale, $values)
{
switch($this->modele)
@ -80,7 +80,7 @@ class LiasseXLS
}
//Association
$dataAssoc = parse_ini_file(realpath(dirname(__FILE__)).'/liassexls/'.$this->modele.'.ini', true);
$dataAssoc = parse_ini_file(realpath(dirname(__FILE__)).'/models/'.$this->modele.'.ini', true);
$assoc = array();
foreach($dataAssoc as $sheet => $dataCell)
{
@ -92,11 +92,11 @@ class LiasseXLS
$this->assoc = $assoc;
$this->values = $values;
}
public function dataFile($file)
{
require_once 'Vendors/phpexcel/PHPExcel.php';
$objPHPexcel = PHPExcel_IOFactory::load(realpath(dirname(__FILE__)).'/liassexls/'.$this->modele.'.xls');
$objPHPexcel = PHPExcel_IOFactory::load(realpath(dirname(__FILE__)).'/models/'.$this->modele.'.xls');
foreach( $this->assoc as $key => $position )
{
$sheet = $position[0];
@ -119,8 +119,8 @@ class LiasseXLS
$objWriter = PHPExcel_IOFactory::createWriter($objPHPexcel, $this->mode);
$objWriter->save($this->path.'/'.$file);
}
}
?>

View File

@ -1,5 +1,5 @@
<?php
class RatiosData
class Scores_Finance_Ratios_Data
{
protected $ratiosInfos;
protected $bilansInfo;

View File

@ -1,11 +1,11 @@
<?php
class RatiosGraph
class Scores_Finance_Ratios_Graph
{
protected $path;
protected $siret = null;
protected $id = 0;
public function __construct($siret, $id = 0)
{
require_once 'Vendors/ChartDirector/phpchartdir.php';
@ -15,7 +15,7 @@ class RatiosGraph
$this->siret = $siret;
$this->id = $id;
}
/**
* Enregistre le graphique bilan passif sous forme d'image.
* @param array $data
@ -101,7 +101,7 @@ class RatiosGraph
$c->setStartAngle(135);
$c->setData($data, $labels);
$c->set3D(20);
if($c->makeChart($this->path.$file) === TRUE){
$return = $file;
}else{
@ -110,7 +110,7 @@ class RatiosGraph
}
return $return;
}
/**
* Enregistre le graphique bilan actif sous forme d'image.
* @param array $data
@ -157,8 +157,8 @@ class RatiosGraph
}
return $return;
}
public function ratiosgraph($ratio, $data)
{
$file = 'ratiosgraph-'.$this->siret.'-'.$this->id.'-'.$ratio.'.png';
@ -203,7 +203,7 @@ class RatiosGraph
}
return $return;
}
public function syntheseGraphEvol($data, $ratio, $unite)
{
$file = 'syntheseEvol-'.$this->siret.'-'.$this->id.'-'.$ratio.'.png';
@ -247,12 +247,12 @@ class RatiosGraph
}
return $return;
}
public function syntheseGraphLineCompare($data, $typeBilan)
{
$file = 'synthese-linecompare-'.$this->siret.'-'.$this->id.'-'.$typeBilan.'.png';
$cache = new Cache();
if( $cache->exist($this->path.$file) ){
$return = $this->path.$file;
} else {
@ -261,7 +261,7 @@ class RatiosGraph
$date[$key] = $row['date'];
}
array_multisort($date, SORT_ASC, $data);
//Définition des valeurs pour le graph
$dataBFR = array();
$dataFR = array();
@ -287,7 +287,7 @@ class RatiosGraph
$dataEBE['y'][$i] = $dataEBE['y'][$i+1] = $item['r146'];
$i+=2;
}
$c = new XYChart(665, 350, 0xcccccc, 0x000000, 1);
$c->addTitle("Synthèse *", "timesbi.ttf", 15, 0x000000);
$c->addText(60, 320, "* Elements financier rapportés à 12 mois" );
@ -296,38 +296,38 @@ class RatiosGraph
$c->xAxis->setTitle( "<*block,valign=absmiddle*>Années<*/*>");
$c->xAxis->setWidth(2);
$c->yAxis->setWidth(2);
// Add a legend box at (55, 32) (top of the chart) with horizontal layout. Use 9 pts
// Arial Bold font. Set the background and border color to Transparent.
$legendObj = $c->addLegend(55, 30, false, "times.ttf", 9);
$legendObj->setBackground(Transparent);
// Add a blue (0000ff) step line layer to the chart and set the line width to 2 pixels
$layer1 = $c->addStepLineLayer($dataFR['y'], 0x0000ff, "FONDS DE ROULEMENT");
$layer1->setXData($dataFR['x']);
$layer1->setLineWidth(2);
// Add a red (ff0000) step line layer to the chart and set the line width to 2 pixels
$layer0 = $c->addStepLineLayer($dataBFR['y'], 0xff0000, "BESOIN EN FONDS DE ROULEMENT");
$layer0->setXData($dataBFR['x']);
$layer0->setLineWidth(2);
// Add a green (00ff00) step line layer to the chart and set the line width to 2 pixels
$layer2 = $c->addStepLineLayer($dataCA['y'], 0x00ff00, "CHIFFRE D'AFFAIRES");
$layer2->setXData($dataCA['x']);
$layer2->setLineWidth(2);
// Add a black (000000) step line layer style dash to the chart and set the line width to 2 pixels
$layer3 = $c->addStepLineLayer($dataEBE['y'], $c->dashLineColor(0x000000, DashLine), "EXCEDENT BRUT D'EXPLOITATION");
$layer3->setXData($dataEBE['x']);
$layer3->setLineWidth(2);
# If the FR line gets above the BFR line, color to area between the lines red (ff0000)
$c->addInterLineLayer($layer0->getLine(0), $layer1->getLine(0), 0xff0000, Transparent);
# If the FR line gets below the lower BFR line, color to area between the lines light green (8099ff99)
$c->addInterLineLayer($layer0->getLine(0), $layer1->getLine(0), Transparent, 0x8044ff44);
if($c->makeChart($this->path.$file) === TRUE){
$return = $this->path.$file;
}else{
@ -336,7 +336,7 @@ class RatiosGraph
}
return $return;
}
/**
* Génére l'histogramme flux de trésorerie
* @param array $labels
@ -349,14 +349,14 @@ class RatiosGraph
$couleur = array(0xff8080, 0x80ff80, 0x8080ff);
$file = 'flux-'.$this->siret.'-'.$this->id.'-'.$typeBilan.'.png';
$cache = new Cache();
if( $cache->exist($this->path.$file) ){
$return = $this->path.$file;
} else {
if (count($data)<=1) {
$return = 0;
} else {
$c = new XYChart(600, 300);
$c->setPlotArea(100, 70, 300, 200);
$legendObj = $c->addLegend(100, 20, false, "times.ttf", 9);
@ -380,5 +380,5 @@ class RatiosGraph
}
return $return;
}
}

View File

@ -74,14 +74,21 @@ class Scores_Google_Streetview
/**
*
* @var string
*/
public function __construct()
protected $siret;
/**
*
*/
public function __construct($siret)
{
$this->size = '320x320';
$c = Zend_Registry::get('config');
$ths->path = realpath($c->profil->path->data).'/google/streetview';
$this->siret = $siret;
$c = Zend_Registry::get('config');
$this->path = realpath($c->profil->path->data).'/google/streetview';
}
/**
@ -152,6 +159,7 @@ class Scores_Google_Streetview
require_once 'common/curl.php';
$page = getUrl($this->url, '', '', '', false);
Zend_Registry::get('firebug')->info('URL = '.$this->url);
if ( !in_array($page['code'], array(400, 408, 403)) ) {
$body = $page['body'];
file_put_contents($this->pathImg(), $body);
@ -174,7 +182,9 @@ class Scores_Google_Streetview
*/
public function display()
{
$this->url = $this->urlImg();
$file = $this->pathImg();
Zend_Registry::get('firebug')->info('Filename = '.$file);
if ( !file_exists($file) ) {
$this->getImg();
}

View File

@ -1,5 +1,5 @@
<?php
class Mail
class Scores_Mail
{
protected $config;
protected $mail;

View File

@ -1,23 +1,23 @@
<?php
class DetectMobile
class Scores_Mobile_Detect
{
public function isMobile()
{
if (isset($_SERVER['HTTP_X_WAP_PROFILE']) || isset($_SERVER['HTTP_PROFILE']))
return true;
if (isset ($_SERVER['HTTP_USER_AGENT']))
{
if (strpos ($_SERVER['HTTP_USER_AGENT'], 'Mobile') !== false)
return true;
if (strpos ($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== false)
return true;
}
if (preg_match('#Android|BlackBerry|Cellphone|iPhone|iPod|hiptop|HTC|MIDP-2\.|MMEF20|MOT-V|NetFront|Newt|Nintendo Wii|Nintendo DS|Nitro|Nokia|Opera Mobi|Palm|PlayStation Portable|PSP|portalmmm|SonyEricsson|Symbian|UP.Browser|UP.Link|webOS|Windows CE|WinWAP|YahooSeeker/M1A1-R2D2|LGE VX|Maemo|phone)#', $_SERVER['HTTP_USER_AGENT']))
return true;
return false;
return false;
}
}

View File

@ -30,9 +30,9 @@ class PagePrint
'evaluation-valorisation' => 'siret,id',
'pieces-bilans' => 'siret,id',
'pieces-actes' => 'siret,id',
'giant-full' => 'Pays,Type,CompanyId',
'giant-compact' => 'Pays,Type,CompanyId',
'giant-creditrecommendation' => 'Pays,Type,CompanyId',
'giant-full' => 'Pays,Type,CompanyId,Language',
'giant-compact' => 'Pays,Type,CompanyId,Language',
'giant-creditrecommendation' => 'Pays,Type,CompanyId,Language',
'surveillance-fichier' => 'nomFic,filtre',
'worldcheck-matchcontent' => 'matchIdentifier',
);
@ -63,9 +63,9 @@ class PagePrint
'evaluation-valorisation' => 'siret,id',
'pieces-bilans' => 'siret,id',
'pieces-actes' => 'siret,id',
'giant-full' => 'Pays,Type,CompanyId',
'giant-compact' => 'Pays,Type,CompanyId',
'giant-creditrecommendation' => 'Pays,Type,CompanyId',
'giant-full' => 'Pays,Type,CompanyId,Language',
'giant-compact' => 'Pays,Type,CompanyId,Language',
'giant-creditrecommendation' => 'Pays,Type,CompanyId,Language',
'worldcheck-matchcontent' => 'matchIdentifier',
);
@ -91,6 +91,9 @@ class PagePrint
'evaluation-indiscore2' => 'siret,id',
'evaluation-indiscore3' => 'siret,id',
'evaluation-valorisation' => 'siret,id',
'giant-full' => 'Pays,Type,CompanyId,Language',
'giant-compact' => 'Pays,Type,CompanyId,Language',
'giant-creditrecommendation' => 'Pays,Type,CompanyId,Language',
'worldcheck-matchcontent' => 'matchIdentifier',
);

View File

@ -1,5 +1,5 @@
<?php
class wkhtmltopdf
class Scores_Wkhtml_Pdf
{
protected $wkhtml;

View File

@ -2886,8 +2886,7 @@ class WsScores
$message.= "Requete :\n ".$requete."\n";
$message.= "Reponse :\n ".$reponse."\n";
$c = Zend_Registry::get('config');
require_once 'Scores/Mail.php';
$mail = new Mail();
$mail = new Scores_Mail();
$mail->setSubject('[ERREUR SOAP] - '.$c->profil->server->name.' -'.date('Ymd'));
$mail->setBodyTexte($message);
$mail->setFrom('supportdev');

View File

@ -1,173 +0,0 @@
<?
if ( !function_exists('htmlspecialchars_decode') )
{
function htmlspecialchars_decode($text)
{
return strtr($text, array_flip(get_html_translation_table(HTML_SPECIALCHARS)));
}
}
require_once 'common/curl.php';
if ( !function_exists('supprDecimales') )
{
function supprDecimales($dec) {
if ($dec>0 )
return floor($dec);
else
return ceil($dec);
}
}
if ( !function_exists('dec2dms') )
{
function dec2dms($dec) {
$d = supprDecimales($dec);
$m = supprDecimales(($dec - $d) * 60);
$s = abs(round(((($dec - $d) * 60) - $m) * 60));
$m = abs($m);
return $d.'°'.$m."'".$s.'"';
}
}
/** Retourne la distance en kilomètres entre 2 points à la surface de la terre
** Calcul effectué avec la sphère « GRS80 » de rayon R = 6378,187 km
** Autre sphère possible : « Picard » de rayon R = 6371,598 km
**
** @param double $latA Latitude du point A en décimal
** @param double $lonA Longitude du point A en décimal
** @param double $latB Latitude du point B en décimal
** @param double $lonB Longitude du point B en décimal
** @return unknown
**/
function distance($latA=0, $lonA=0, $latB=0, $lonB=0) {
//s(AB) = arc cos (sinjA sinjB + cos jA cosjB cosdl)
// avec dl = lB - lA
$e=pi()*$latA/180;
$f=pi()*$lonA/180;
$g=pi()*$latB/180;
$h=pi()*$lonB/180;
$j=acos(cos($e)*cos($g)*cos($f)*cos($h) + cos($e)*sin($f)*cos($g)*sin($h) + sin($e)*sin($g));
return round(6371.598*$j,3); // div par 1.852 ==> résultat en miles nautiques
}
class MMap {
public $body = '';
public $header = '';
public $cookie = '';
public $codeRetour = 0;
public $codeRetour2 = 0;
public $latitudeDec= 0; // Latitude en Décimal
public $latitudeDeg= 0; // Latitude en Dégrés
public $longitudeDec= 0; // Longitude en Décimal
public $longitudeDeg= 0; // Longitude en Dégrés
public $precision = 0;
public $adresseValidee='';
function __construct($adresse, $cp, $ville, $pays='France') {
/*
$referer='http://maps.google.fr/?output=html';
$page=getUrl($referer, '', '', $referer, false, 'maps.google.fr');
$this->body=$page['body'];
$this->codeRetour=$page['code'];
$this->header=$page['header'];
$this->cookie=$this->header['Set-Cookie'];
$url='http://maps.google.fr/maps?f=q&output=html&q='.urlencode($adresse.', '.$cp.' '. $ville.', '.$pays);
$page=getUrl($url, $this->cookie, '', $referer, false, 'maps.google.fr');
$this->body=$page['body'];
$this->codeRetour=$page['code'];
$this->header=$page['header'];
if (strpos($this->body, '<p>Nous ne sommes pas parvenus à localiser l\'adresse : <br />')===true) return false;
$this->adresseValidee=strtoupper(htmlspecialchars_decode(str_replace('<br>', ', ', @getTextInHtml($this->body, '<p><table cellpadding="0" cellspacing="0" border="0"><tr><td valign="center" nowrap>', ' nowrap>', '</td>')), ENT_QUOTES));
$this->latitudeDec=@getTextInHtml($this->body, 'latitude_e6=', '=','&')/1000000;
$this->longitudeDec=@getTextInHtml($this->body, 'longitude_e6=', '=','&');
if ($this->longitudeDec>1000000000)
$this->longitudeDec=-(4294967293-$this->longitudeDec)/1000000;
else
$this->longitudeDec=$this->longitudeDec/1000000;
$this->latitudeDeg=dec2dms($this->latitudeDec);
$this->longitudeDeg=dec2dms($this->longitudeDec);
if ($this->codeRetour==200)
return true;
//$latitude_range = (180 * $range) / ($pi * $radius_of_earth);
//$longitude_range = (180 * $range) / ($pi * $radius_of_earth * sin((90 - $alat) * $pi / 180));
*/
$apiKey='ABQIAAAAuKBtUyFonYJBl1fqfc78tRQvADPcxwXf3Q2QIE-M32vuSkrxiBRLUHDB_YSLeTscTDeWRKM_wILaaw';
$url='http://maps.google.com/maps/geo?q='.urlencode($adresse.', '.$cp.' '. $ville.', '.$pays).'&output=xml&key='.$apiKey;
$referer='';//http://maps.google.fr/?output=html';
$page=getUrl($url, '', '', $referer, false, 'maps.google.com', '', 2);
$this->body=$page['body'];
$this->codeRetour=$page['code'];
$this->header=$page['header'];
//die($this->body=$page['body']);
//{"name":"3 rue viète, 75017 paris, france","Status":{"code":200,"request":"geocode"},"Placemark":[{"id":"p1","address":"3, Rue Viète, 75017 17ème Arrondissement, Paris, France","AddressDetails":{"Country":{"CountryNameCode":"FR","AdministrativeArea":{"AdministrativeAreaName":"Ile-de-France","SubAdministrativeArea":{"SubAdministrativeAreaName":"Paris","Locality":{"LocalityName":"Paris","DependentLocality":{"DependentLocalityName":"17ème Arrondissement","Thoroughfare":{"ThoroughfareName":"3, Rue Viète"},"PostalCode":{"PostalCodeNumber":"75017"}}}}}},"Accuracy": 8},"Point":{"coordinates":[2.306174,48.883705,0]}}]}
/*<?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://earth.google.com/kml/2.0"><Response><name>3 rue viète, 75017 paris, france</name><Status><code>200</code><request>geocode</request></Status><Placemark id="p1"><address>3, Rue Viète, 75017 17ème Arrondissement, Paris, France</address><AddressDetails Accuracy="8" xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"><Country><CountryNameCode>FR</CountryNameCode><AdministrativeArea><AdministrativeAreaName>Ile-de-France</AdministrativeAreaName><SubAdministrativeArea><SubAdministrativeAreaName>Paris</SubAdministrativeAreaName><Locality><LocalityName>Paris</LocalityName><DependentLocality><DependentLocalityName>17ème Arrondissement</DependentLocalityName><Thoroughfare><ThoroughfareName>3, Rue Viète</ThoroughfareName></Thoroughfare><PostalCode><PostalCodeNumber>75017</PostalCodeNumber></PostalCode></DependentLocality></Locality></SubAdministrativeArea></AdministrativeArea></Country></AddressDetails><Point><coordinates>2.306174,48.883705,0</coordinates></Point></Placemark></Response></kml>*/
/*
0 Unknown location. (Since 2.59)
1 Country level accuracy. (Since 2.59)
2 Region (state, province, prefecture, etc.) level accuracy. (Since 2.59)
3 Sub-region (county, municipality, etc.) level accuracy. (Since 2.59)
4 Town (city, village) level accuracy. (Since 2.59)
5 Post code (zip code) level accuracy. (Since 2.59)
6 Street level accuracy. (Since 2.59)
7 Intersection level accuracy. (Since 2.59)
8 Address level accuracy. (Since 2.59)
*/
$this->precision=@getTextInHtml($this->body, '<AddressDetails Accuracy', '="', ' ');
$this->adresseValidee=strtoupper(@getTextInHtml($this->body, '<address>', 'adress>', '</address>'));
$strTmp=@getTextInHtml($this->body, '<Point><coordinates>', '<coordinates>', '</coordinates>');
$tabTmp=explode(',', $strTmp);
if (isset($tabTmp[1]) == false) {
return false;
}
$this->latitudeDec = $tabTmp[1];
$this->longitudeDec = $tabTmp[0];
$this->latitudeDeg = dec2dms($this->latitudeDec);
$this->longitudeDeg = dec2dms($this->longitudeDec);
/*
200 G_GEO_SUCCESS No errors occurred; the address was successfully parsed and its geocode has been returned.
400 G_GEO_BAD_REQUEST A directions request could not be successfully parsed.
500 G_GEO_SERVER_ERROR A geocoding or directions request could not be successfully processed, yet the exact reason for the failure is not known.
601 G_GEO_MISSING_QUERY The HTTP q parameter was either missing or had no value. For geocoding requests, this means that an empty address was
specified as input. For directions requests, this means that no query was specified in the input.
602 G_GEO_UNKNOWN_ADDRESS No corresponding geographic location could be found for the specified address. This may be due to the fact that the address
is relatively new, or it may be incorrect.
603 G_GEO_UNAVAILABLE_ADDRESS The geocode for the given address or the route for the given directions query cannot be returned due to legal or contractual
reasons.
604 G_GEO_UNKNOWN_DIRECTIONS The GDirections object could not compute directions between the points mentioned in the query. This is usually because
there is no route available between the two points, or because we do not have data for routing in that region.
610 G_GEO_BAD_KEY The given key is either invalid or does not match the domain for which it was given.
620 G_GEO_TOO_MANY_QUERIES The given key has gone over the requests limit in the 24 hour period.
*/
if ($this->codeRetour2==200)
return true;
return false;
}
/* if (latnorth == 'S') latdir='-'
if (lonwest == 'W') longdir='-'
latdec=Math.round(lat1)+lat2/60
londec=Math.round(long1)+long2/60
gmdatalat=latdir+latdec.toFixed(6)
gmdatalon=longdir+londec.toFixed(6)
//GM_log( 'Latdec:'+gmdatalat+' LongDec:'+gmdatalon)
gmx=gmdatalat*Math.pow(10,6)
gmy=gmdatalon*Math.pow(10,6)
if (gmx < 0) gmx=gmx+Math.pow(2,32)*/
}
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

View File

@ -15,7 +15,7 @@ $(document).ready( function()
$(this).load(href);
},
buttons: {'Fermer': function() { $(this).dialog('close'); }},
close: function() { $('#dial').remove(); }};
close: function() { location.reload(); }};
$('<div id="dial"></div>').dialog(dlgOpts);
return false;
});

View File

@ -14,7 +14,7 @@ $(document).ready(function(){
$(this).html('Chargement...');
$(this).load(href);
$('#dialogsurv').keypress(function(e){
if (e.keyCode == 13){
if (e.which==13){
e.preventDefault();
survSubmit();
}

View File

@ -49,7 +49,6 @@ $c = new Zend_Config($application->getOptions());
Zend_Registry::set('config', $c);
require_once 'Scores/WsScores.php';
require_once 'Scores/Mail.php';
define('LOGIN', 'mricois');
define('PASSWORD', '');
@ -154,7 +153,7 @@ $emailTxt.= "<br/>";
$emailTxt.= listeCmd(1);
//Envoi mail
$mail = new Mail();
$mail = new Scores_Mail();
$mail->setFrom('production');
$mail->addTo('support@scores-decisions.com', 'Pieces');
$mail->setSubject("[COMMANDES PIECES COURRIER] - ".date('d')."/".date('m')."/".date('Y'));

View File

@ -57,8 +57,6 @@ Zend_Registry::set('config', $c);
$db = Zend_Db::factory($c->profil->db->sdv1);
Zend_Db_Table_Abstract::setDefaultAdapter($db);
require_once 'Scores/Mail.php';
function listCmdMois($statut, $date)
{
$commandes = new Application_Model_Commandes();
@ -119,7 +117,7 @@ if(count($listeCmd)>0){
$emailTxt.= '<br/>';
//Envoi mail
$mail = new Mail();
$mail = new Scores_Mail();
$mail->setSubject("[Commandes greffe non receptionné] - ".date('d')."/".date('m')."/".date('Y'));
$mail->setFrom('production');
$mail->addTo('support@scores-decisions.com', 'Support');

View File

@ -172,8 +172,7 @@ if ( isset($opts->rapport) || isset($opts->rapportcomplet) )
$emailTxt = utf8_encode($emailTxt);
}
//Envoi mail
require_once 'Scores/Mail.php';
$mail = new Mail();
$mail = new Scores_Mail();
$mail->setFrom('production');
$mail->addTo('support@scores-decisions.com', 'Support');
$mail->addTo('supportdev@scores-decisions.com', 'Support Dev');

View File

@ -69,7 +69,9 @@ require_once 'common/dates.php';
function getRemoteFilename($infos)
{
$date = WDate::dateT('d/m/Y', 'Ymd', $infos['bilanCloture']);
Zend_Date::setOptions(array('extend_month' => true));
$dateCloture = new Zend_Date($infos['bilanCloture'], 'dd/MM/yyyy');
$date = $dateCloture->toString('yyyyMMdd');
$file = $infos['siren'].'_'.
$infos['format'].$date.'_'.
$infos['bilanDuree'].'_'.