diff --git a/application/controllers/GiantController.php b/application/controllers/GiantController.php index 0d11dd835..e02bf94da 100644 --- a/application/controllers/GiantController.php +++ b/application/controllers/GiantController.php @@ -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); @@ -166,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); diff --git a/application/views/default/scripts/giant/full.phtml b/application/views/default/scripts/giant/full.phtml index 210e93348..e2b6c04e4 100644 --- a/application/views/default/scripts/giant/full.phtml +++ b/application/views/default/scripts/giant/full.phtml @@ -10,7 +10,7 @@

3. Compte Annuels

- partial('giant/partials/rapports/ComptesAnnuels.phtml', null, array('report' => $this->report, 'Type' => $this->Type)); ?> + partial('giant/partials/rapports/ComptesAnnuels.phtml', null, array('report' => $this->report, 'Type' => $this->Type, 'dateFunction' => $this->dateFunction)); ?>

4. Position financiére

@@ -18,7 +18,7 @@

5. Comportement de paiement

- partial('giant/partials/rapports/ComportementDePaiement.phtml', null, array('report' => $this->report, 'Type' => $this->Type)); ?> + partial('giant/partials/rapports/ComportementDePaiement.phtml', null, array('report' => $this->report, 'Type' => $this->Type, 'dateFunction' => $this->dateFunction)); ?>

6. Structure de l'entreprise

diff --git a/application/views/default/scripts/giant/partials/rapports/ComportementDePaiement.phtml b/application/views/default/scripts/giant/partials/rapports/ComportementDePaiement.phtml index 6f88723f6..1c1b94d8a 100644 --- a/application/views/default/scripts/giant/partials/rapports/ComportementDePaiement.phtml +++ b/application/views/default/scripts/giant/partials/rapports/ComportementDePaiement.phtml @@ -16,10 +16,11 @@ report->ComportementPaiement as $dates => $valeurs):?> + - - + dateFunction->dateT('Ymd', 'd/m/Y', $s);?> - dateFunction->dateT('Ymd', 'd/m/Y', $e);?> % diff --git a/application/views/default/scripts/giant/partials/rapports/ComptesAnnuels.phtml b/application/views/default/scripts/giant/partials/rapports/ComptesAnnuels.phtml index 0ddc0cfbe..ddb2388a5 100644 --- a/application/views/default/scripts/giant/partials/rapports/ComptesAnnuels.phtml +++ b/application/views/default/scripts/giant/partials/rapports/ComptesAnnuels.phtml @@ -8,7 +8,7 @@ Date de clôture report->AnnualAccounts as $AnnualAccounts):$i++?> - AccountsDate->_))?'NC':$AnnualAccounts->AccountsDate->_;?> + AccountsDate->_))?'NC':$this->dateFunction->dateT('Ymd', 'd/m/Y', $AnnualAccounts->AccountsDate->_);?> @@ -39,9 +39,8 @@ report->AnnualAccounts as $AnnualAccounts): $i++?> - AccountsDate->_; ?> + dateFunction->dateT('Ymd', 'd/m/Y', $AnnualAccounts->AccountsDate->_); ?> -   @@ -84,7 +83,7 @@ report->AnnualAccounts as $AnnualAccounts): $i++?> - AccountsDate->_; ?> + dateFunction->dateT('Ymd', 'd/m/Y', $AnnualAccounts->AccountsDate->_); ?>   @@ -129,7 +128,7 @@ report->AnnualAccounts as $AnnualAccounts): $i++?> - AccountsDate->_; ?> + dateFunction->dateT('Ymd', 'd/m/Y', $AnnualAccounts->AccountsDate->_); ?>   @@ -175,7 +174,7 @@ report->AnnualAccounts as $AnnualAccounts): $i++?> - AccountsDate->_; ?> + dateFunction->dateT('Ymd', 'd/m/Y', $AnnualAccounts->AccountsDate->_); ?>   diff --git a/application/views/default/scripts/giant/partials/rapports/Dirigeant.phtml b/application/views/default/scripts/giant/partials/rapports/Dirigeant.phtml index f647d887a..c42d366a6 100644 --- a/application/views/default/scripts/giant/partials/rapports/Dirigeant.phtml +++ b/application/views/default/scripts/giant/partials/rapports/Dirigeant.phtml @@ -2,13 +2,12 @@ Dirigeants

report->Dirigeant)):?> - +
report->Dirigeant);?>
report->Dirigeant as $Dirigeants):?> - - $Dirigeant):?> - + $Dirigeant):?> - + diff --git a/application/views/default/scripts/giant/partials/rapports/InformationEntreprise.phtml b/application/views/default/scripts/giant/partials/rapports/InformationEntreprise.phtml index a6836f16a..c91a35331 100644 --- a/application/views/default/scripts/giant/partials/rapports/InformationEntreprise.phtml +++ b/application/views/default/scripts/giant/partials/rapports/InformationEntreprise.phtml @@ -1,128 +1,157 @@
report)) :?> + report->IncorporationDate, $matches);$d = $matches[1];$m = $matches[2];$y = $matches[3];?>
Données officielles

-
    -
  • Nom d'entreprise report->CompanyName?>
  • -
    -
  • Numéro de TVA report->Vat?>
  • -
    -
  • Forme juridique actuelle report->LegalForm.' / '.$this->report->UnifiedLegalForm;?>
  • -
    -
  • Date de constitution report->IncorporationDate != '//')?$this->report->IncorporationDate:'NC'?>
  • -
    -
  • Etat de l'entreprise report->CompanyStatus?>
  • -
    -
  • No. Siret report->CompanyId?>
  • -
    -
+
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';}?>
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Nom d'entreprise + report->CompanyName?>
+ Numéro de TVA + report->Vat?>
+ Forme juridique actuelle + report->LegalForm.' / '.$this->report->UnifiedLegalForm;?>
+ Date de constitution + report->IncorporationDate))?$d.'/'.$m.'/'.$y:'NC'?>
+ Etat de l'entreprise + report->CompanyStatus?>
+ No. Siret + report->CompanyId?>

Données de contact

- + + + + + + + + + + + + + + + + + + + + + + + +
+ Numéro de téléphone + report->TelephoneNumber?>
+ Numéro de fax + report->Telefax?>
+ Adresse Email + report->EmailAddress!='')?$this->report->EmailAddress:'NC'?>
+ Site internet + report->WebAddress!='')?$this->report->WebAddress:'NC'?>
+ Adresse + report->CompanyAddress?>

report->activity)):?> Activités

- - - - - - - - - report->activity as $code => $activity): ?> - - - +
CodeActivité

-
    -
  • -
-
-
    - -
  • - -
  • - ... -
  • - -
+ + + + + + + + + + report->activity as $code => $activity): ?> + + + - - - - -
CodeActivité
+

+ +

report->Employees)):?> Personnel

- +
+ - - - + + + - report->Employees as $year => $employees): ?> + + - - - - - - - - + report->Employees as $year => $employees): ?> + + + + + + +
AnnéeTotal des travailleurs employésÉquivalent temps pleinAnnéeTotal des travailleurs employésÉquivalent temps plein
dateFunction->dateT('Ymd', 'd/m/Y', $year);?>

dateFunction->dateT('Ymd', 'd/m/Y', $year);?>

report->ProductName)):?> Noms de produit

- - - - - - - - +
SourceProduit

+ + + + + + + + report->ProductName as $ProductName): ?> - - - - - - - - + + + + + +
SourceProduit
source)?'NC':$ProductName->source);?> -
    - _) < 50): ?> -
  • _?>
  • - -
  • - _, 0, 80);?>... -
  • - -
-

+ source)?'NC':$ProductName->source);?> + _?>
diff --git a/application/views/default/scripts/giant/partials/rapports/PositionFinanciere.phtml b/application/views/default/scripts/giant/partials/rapports/PositionFinanciere.phtml index 2a0a49083..9484927ea 100644 --- a/application/views/default/scripts/giant/partials/rapports/PositionFinanciere.phtml +++ b/application/views/default/scripts/giant/partials/rapports/PositionFinanciere.phtml @@ -1,5 +1,6 @@
report->FinancialSummary)):?> + Informations Capital
report->PositionFinanciere)):?> @@ -9,7 +10,7 @@ report->PositionFinanciereDate as $date => $val):$i++?> - + dateT('Ymd', 'd/m/Y', $date);?> diff --git a/library/Giant/Functions.lib.php b/library/Giant/Functions.lib.php index 468c95610..c2feb7509 100644 --- a/library/Giant/Functions.lib.php +++ b/library/Giant/Functions.lib.php @@ -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); diff --git a/library/Giant/Partials.php b/library/Giant/Partials.php index f77776854..62d80ff9b 100644 --- a/library/Giant/Partials.php +++ b/library/Giant/Partials.php @@ -277,8 +277,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->_.':'.$DueDateExceeds->NrOfDaysExceeds->UpperLimit->_] = $DueDateExceeds->Percentage; } } @@ -586,13 +587,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 +619,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; } } @@ -687,7 +690,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 = ''.$this->report->WebAddress.''; @@ -791,13 +794,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; }