<?php
require_once ('Config/config.php');
require_once ('../includes/giant/modulesGiants/Functions.php');
require_once ('../includes/giant/modulesGiants/Class/Rapport.Class.php');
require_once ('../includes/giant/RapportGiant.php');

$commande_id = $_GET['OrderId'];
abstract class AccountItem { }
class AmountAccountItem extends AccountItem { }
class AccountItemGroup  extends AccountItem { }
class AmountType { }
$c = $rapport->Company;
$structure = new RapportFormat();
$structure->_CompanyIdentitie($config, $configNace['Section_NaceCode']);
?>
<div id="center">
	<h1><?php echo SelectTrueLabel($config['Section_rapportTitre'], 'IdentiteDeLentreprise');?></h1>
	<table style="margin-left:30px">
		<?php
		echo $number = numberOfCompany($rapport->Company->Branch);
		foreach($rapport->Company as $objs => $valeur) {
			if ($objs != 'AnnualAccounts' && $objs != 'Bank' 
				&& $objs != 'Position' && $objs != 'Associated' 
				&& $objs != 'PaymentBehaviour' && $objs != 'CreditRecommendation'
				&& $objs != 'FinancialSummary' && $objs != 'Event' && $objs != 'PeerGroup'
				&& $objs != 'Auditor')
				$structure->CompanyIdentitie->_selectFunction($objs, $valeur);
		}?>
	
	<?php $structure->CompanyIdentitie->_ConstructIdentite();?>
	</table>
	
	<?php if (isset($rapport->Company->CreditRecommendation)) {?>
    	<h1>
    	    <?php echo SelectTrueLabel($config['Section_rapportCreditRecommendation'], 'CreditRecommendation');?>
    	</h1>
	<?php }?>
	<?php $structure->CompanyIdentitie->_selectFunction('CreditRecommendation', $rapport->Company->CreditRecommendation); ?>
	
	<?php if (isset($rapport->Company->Position) or isset($rapport->Company->Auditor)) {?>
		<h1><?php echo SelectTrueLabel($config['Section_rapportTitre'], 'Dirigeants');?></h1>
	<?php }?>
	<?php $structure->CompanyIdentitie->_selectFunction('Position', $rapport->Company->Position); ?>
	<?php $structure->CompanyIdentitie->_selectFunction('Auditor', $rapport->Company->Auditor); ?>
	<a name="Branch"></a>
	<?php $structure->CompanyIdentitie->_selectFunction('BranchShow', $rapport->Company->Branch); ?>
	<?php if($_GET['type'] == 'Full') { ?>
    	<h1><?php echo SelectTrueLabel($config['Section_rapportTitre'], 'ElementsFinancies');?></h1>
    	<?php $structure->CompanyIdentitie->_selectFunction('AnnualAccounts', $rapport->Company->AnnualAccounts); ?>
    	<?php $structure->CompanyIdentitie->_selectFunction('Bank', $rapport->Company->Bank); ?>
    	<?php $structure->CompanyIdentitie->_selectFunction('Associated', $rapport->Company->Associated); ?>
    	<?php $structure->CompanyIdentitie->_selectFunction('FinancialSummary', $rapport->Company->FinancialSummary); ?>
    	<?php $structure->CompanyIdentitie->_selectFunction('PaymentBehaviour', $rapport->Company->PaymentBehaviour); ?>
    	<?php $structure->CompanyIdentitie->_selectFunction('PeerGroup', $rapport->Company->PeerGroup); ?>
    	<?php $structure->CompanyIdentitie->_selectFunction('Event', $rapport->Company->Event); ?>
	<?php }?>
</div>