report->FinancialSummary)):?>
+ $dateFunction = new WDate();?>
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;
}