issue #0001743: XML problem with Full report fixed

This commit is contained in:
Arman KYOKCHAN 2013-10-22 13:18:00 +00:00
parent f3c6490cef
commit f897c144b3
6 changed files with 72 additions and 69 deletions

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,7 +16,7 @@
<tbody>
<tr>
<?php foreach($this->report->ComportementPaiement as $dates => $valeurs):?>
<?preg_match('/(\d{8})(\d{8})/', $dates,$matches);$s = $matches[1];$e = $matches[2];?>
<?(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">
@ -72,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>
@ -81,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

@ -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

@ -3,41 +3,41 @@
<?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 />
<span class="title">Données officielles</span><br />
<table id="giant_synthese">
<tbody>
<tr >
<td class="head">
<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">
<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">
<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">
<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">
<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">
<td class="head" style='width: 169px;'>
<a class="tooltip tooltipFont">No. Siret</a>
</td>
<td class="right"><?php echo $this->report->CompanyId?></td>
@ -45,36 +45,36 @@
</tbody>
</table>
<br />
<a name="2"></a>
<span class="title">Données de contact</span><br /><br />
<a name="2"></a><br />
<span class="title">Données de contact</span><br />
<table id="giant_synthese">
<tbody>
<tr >
<td class="head">
<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">
<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">
<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">
<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">
<td class="head" style='width: 169px;'>
<a class="tooltip tooltipFont">Adresse</a>
</td>
<td class="right"><?php echo $this->report->CompanyAddress?></td>
@ -83,9 +83,9 @@
</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 />
<span class="title">Activités</span><br />
<table id="giant_synthese">
<thead>
<tr>
@ -96,9 +96,9 @@
<tbody>
<tr>
<?php foreach($this->report->activity as $code => $activity): ?>
<tr class="<?php echo ($val)? 'red':'green'; ?>">
<td class="head">
<a class="tooltip" title="<?php echo $code?>"><?php echo $code?></a>
<tr>
<td class="head" style='width: 169px;'>
<a><?php echo $code?></a>
</td>
<td class="right"><?php echo $activity?></td>
</tr>
@ -108,12 +108,12 @@
<?php endif;?>
<br />
<?php if(!empty($this->report->Employees)):?>
<a name="4"></a>
<span class="title">Personnel</span><br /><br />
<a name="4"></a><br />
<span class="title">Personnel</span><br />
<table id="giant_synthese">
<thead>
<tr>
<th align="left" class="date">Année</th>
<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>
@ -132,8 +132,8 @@
<?php endif;?>
<br />
<?php if(!empty($this->report->ProductName)):?>
<a name="5"></a>
<span class="title">Noms de produit</span><br /><br />
<a name="5"></a><br />
<span class="title">Noms de produit</span><br />
<table id="giant_synthese">
<thead>
<tr>
@ -145,8 +145,8 @@
<tr>
<?php foreach($this->report->ProductName as $ProductName): ?>
<tr class="<?php echo ($val)? 'red':'green'; ?>">
<td class="head">
<a class="tooltip" title="<?php echo (empty($ProductName->source)?'NC':$ProductName->source);?>"><?php echo (empty($ProductName->source)?'NC':$ProductName->source);?></a>
<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>

View File

@ -201,16 +201,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) {
@ -279,7 +280,7 @@ class ComportementPaiement
foreach($period->DueDateExceeds as $DueDateExceeds) {
$per = $period->Period->StartDate->_.$period->Period->EndDate->_;
$this->report->DataSet->Company->
ComportementPaiement[$per][$DueDateExceeds->NrOfDaysExceeds->LowerLimit->_.':'.$DueDateExceeds->NrOfDaysExceeds->UpperLimit->_] =
ComportementPaiement[$per][$DueDateExceeds->NrOfDaysExceeds->LowerLimit->_.'0000'.$DueDateExceeds->NrOfDaysExceeds->UpperLimit->_] =
$DueDateExceeds->Percentage;
}
}
@ -288,8 +289,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;
}
}
}
@ -644,7 +645,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;
@ -652,9 +655,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]);