2016-07-18 15:21:48 +02:00

1366 lines
37 KiB
PHP

<?php
/** Auto generated class 2016-05-25 10:19:54*/
class Metier_Scores_MRatios
{
public $efftr = null;
/** Tableau de conversion des communes **/
public $tabZones2Ratios = array(
'R01a'=>'R[801]',
'R01b'=>'Rh[801]',
'R01c'=>'Rs[801]',
'R02a'=>'R[802]',
'R02b'=>'Rh[802]',
'R02c'=>'Rs[802]',
'R02d'=>'Rq[802]',
'R02e'=>'Rt[802]',
'R03a'=>'R[803]',
'R03b'=>'Rh[803]',
'R03c'=>'Rs[803]',
'R03d'=>'Rq[803]',
'R03e'=>'Rt[803]',
'R04a'=>'R[804]',
'R04b'=>'Rh[804]',
'R04c'=>'Rs[804]',
'R04d'=>'Rq[804]',
'R04e'=>'Rt[804]',
'R05a'=>'R[805]',
'R05b'=>'Rh[805]',
'R05c'=>'Rs[805]',
'R06a'=>'R[806]',
'R06b'=>'Rh[806]',
'R06c'=>'Rs[806]',
'R06d'=>'Rq[806]',
'R06e'=>'Rt[806]',
'R07a'=>'R[807]',
'R07b'=>'Rh[807]',
'R07c'=>'Rs[807]',
'R07d'=>'Rq[807]',
'R07e'=>'Rt[807]',
'R08a'=>'R[808]',
'R08b'=>'Rh[808]',
'R08c'=>'Rs[808]',
'R08d'=>'Rq[808]',
'R08e'=>'Rt[808]',
'R09a'=>'R[809]',
'R09b'=>'Rh[809]',
'R09c'=>'Rs[809]',
'R09d'=>'Rq[809]',
'R09e'=>'Rt[809]',
'R10a'=>'R[810]',
'R10b'=>'Rh[810]',
'R10c'=>'Rs[810]',
'R10d'=>'Rq[810]',
'R10e'=>'Rt[810]',
'R11a'=>'R[811]',
'R11b'=>'Rh[811]',
'R11c'=>'Rs[811]',
'R12a'=>'R[812]',
'R12b'=>'Rh[812]',
'R12c'=>'Rs[812]',
'R13a'=>'R[813]',
'R13b'=>'Rh[813]',
'R13c'=>'Rs[813]',
'R13d'=>'Rq[813]',
'R13e'=>'Rt[813]',
'R14a'=>'R[814]',
'R14b'=>'Rh[814]',
'R14c'=>'Rs[814]',
'R14d'=>'Rq[814]',
'R14e'=>'Rt[814]',
'R15a'=>'R[815]',
'R15b'=>'Rh[815]',
'R15c'=>'Rs[815]',
'R15d'=>'Rq[815]',
'R15e'=>'Rt[815]',
'R16a'=>'R[816]',
'R16b'=>'Rh[816]',
'R16c'=>'Rs[816]',
'R16d'=>'Rq[816]',
'R16e'=>'Rt[816]',
'R17a'=>'R[817]',
'R17b'=>'Rh[817]',
'R17c'=>'Rs[817]',
'R18a'=>'R[818]',
'R18b'=>'Rh[818]',
'R18c'=>'Rs[818]',
'R18d'=>'Rq[818]',
'R18e'=>'Rt[818]',
'R19a'=>'R[819]',
'R19b'=>'Rh[819]',
'R19c'=>'Rs[819]',
'R19d'=>'Rq[819]',
'R19e'=>'Rt[819]',
'R20a'=>'R[820]',
'R20b'=>'Rh[820]',
'R20c'=>'Rs[820]',
'R20d'=>'Rq[820]',
'R20e'=>'Rt[820]',
'R21a'=>'R[821]',
'R21b'=>'Rh[821]',
'R21c'=>'Rs[821]',
'R21d'=>'Rq[821]',
'R21e'=>'Rt[821]',
'R22a'=>'R[822]',
'R22b'=>'Rh[822]',
'R22c'=>'Rs[822]',
'R23a'=>'R[823]',
'R23b'=>'Rh[823]',
'R23c'=>'Rs[823]',
'R24a'=>'R[824]',
'R24b'=>'Rh[824]',
'R24c'=>'Rs[824]',
'R25a'=>'R[825]',
'R25b'=>'Rh[825]',
'R25c'=>'Rs[825]',
'R26a'=>'R[826]',
'R26b'=>'Rh[826]',
'R26c'=>'Rs[826]',
'R26d'=>'Rq[826]',
'R26e'=>'Rt[826]',
'R27a'=>'R[827]',
'R27b'=>'Rh[827]',
'R27c'=>'Rs[827]',
'R27d'=>'Rq[827]',
'R27e'=>'Rt[827]',
'R28a'=>'R[828]',
'R28b'=>'Rh[828]',
'R28c'=>'Rs[828]',
'R28d'=>'Rq[828]',
'R28e'=>'Rt[828]',
'R29a'=>'R[829]',
'R29b'=>'Rh[829]',
'R29c'=>'Rs[829]',
'R29d'=>'Rq[829]',
'R29e'=>'Rt[829]',
'R30a'=>'R[830]',
'R30b'=>'Rh[830]',
'R30c'=>'Rs[830]',
'R30d'=>'Rq[830]',
'R30e'=>'Rt[830]',
'R31a'=>'R[843]',
'R31b'=>'Rh[843]',
'R31c'=>'Rs[843]',
'R31d'=>'Rq[843]',
'R31e'=>'Rt[843]',
'R32a'=>'R[831]',
'R32b'=>'Rh[831]',
'R32c'=>'Rs[831]',
'R33a'=>'R[832]',
'R33b'=>'Rh[832]',
'R33c'=>'Rs[832]',
'R33d'=>'R[845]',
'R33e'=>'Rh[845]',
'R33f'=>'Rs[845]',
'R34a'=>'R[833]',
'R34b'=>'Rh[833]',
'R34c'=>'Rs[833]',
'R34d'=>'R[846]',
'R34e'=>'Rh[846]',
'R34f'=>'Rs[846]',
'R35a'=>'R[834]',
'R35b'=>'Rh[834]',
'R35c'=>'Rs[834]',
'R35d'=>'R[847]',
'R35e'=>'Rh[847]',
'R35f'=>'Rs[847]',
'R36a'=>'R[835]',
'R36b'=>'Rh[835]',
'R36c'=>'Rs[835]',
'R36d'=>'R[849]',
'R36e'=>'Rh[849]',
'R36f'=>'Rs[849]',
'R37a'=>'R[844]',
'R37b'=>'Rh[844]',
'R37c'=>'Rs[844]',
'R37d'=>'R[848]',
'R37e'=>'Rh[848]',
'R37f'=>'Rs[848]',
'R38a'=>'R[836]',
'R38b'=>'Rh[836]',
'R38c'=>'Rs[836]',
'R38d'=>'Rq[836]',
'R38e'=>'Rt[836]',
'R39a'=>'R[837]',
'R39b'=>'Rh[837]',
'R39c'=>'Rs[837]',
'R39d'=>'Rq[837]',
'R39e'=>'Rt[837]',
'R40a'=>'R[838]',
'R40b'=>'Rh[838]',
'R40c'=>'Rs[838]',
'R40d'=>'Rq[838]',
'R40e'=>'Rt[838]',
'R41a'=>'R[842]',
'R41b'=>'Rh[842]',
'R41c'=>'Rs[842]',
'R41d'=>'Rq[842]',
'R41e'=>'Rt[842]',
'R42a'=>'R[839]',
'R42b'=>'Rh[839]',
'R42c'=>'Rs[839]',
'R42d'=>'Rq[839]',
'R42e'=>'Rt[839]',
'R43a'=>'R[840]',
'R43b'=>'Rh[840]',
'R43c'=>'Rs[840]',
'R43d'=>'Rq[840]',
'R43e'=>'Rt[840]',
'R44a'=>'R[841]',
'R44b'=>'Rh[841]',
'R44c'=>'Rs[841]',
);
public function __construct($db = null)
{
if ( $db === null ) {
$this->iDb = new Metier_Util_Db();
} else {
$this->iDb = $db;
}
}
/**
* Conversion des zones pour les collectivités
* @param unknown $codeR
* @param unknown $zonesDB
* @return array
*/
public function convertZones($codeR, $zonesDB)
{
foreach($this->tabZones2Ratios as $oldR=>$newR) {
if (preg_match('/(\D+)\[(\d+)\]/Uis', $newR, $matches) && $matches[1]==$codeR) {
$iRatio=$matches[2];
if ($codeR=='R')
$ret[$iRatio]=$zonesDB[$oldR]*1000;
else
$ret[$iRatio]=$zonesDB[$oldR];
}
}
return $ret;
}
/**
* Donne le taux d'inflation pour une année donnée
* @param unknown $annee
* @return unknown
*/
public function getInflation($annee)
{
$tabInfla = include __DIR__ . '/Data/Infla.php';
if ( isset($tabInfla[$annee]) ) {
return $tabInfla[$annee];
}
}
/**
* Donne le taux de rendement des actions pour une année donnée
* @param unknown $annee
* @return unknown
*/
public function getTxRendement($annee)
{
$tabTxRendObli = include __DIR__ . '/Data/RendObli.php';
if ( isset($tabTxRendObli[$annee]) ) {
return $tabTxRendObli[$annee];
}
}
/**
* Taux de tva
* @param string $date AAAAMM
* @return double
*/
public function getTxTva($date)
{
$tabTxTva = include __DIR__ . '/Data/Tva.php';
foreach ($tabTxTva as $ym => $v) {
if ($ym > $date) {
break;
}
$tva = $v;
}
return $tva;
}
/**
* Définit la tranche d'effectif
* @param int $value
*/
public function setTrancheEffectif($value)
{
$this->efftr = $value;
}
/**
* Calcul les ratios
* @param array $bilans
* Format des bilans à envoyer
*
* Les bilans doivent être envoyés trier
* @return array
*/
public function calcul($bilans)
{
$numBil = 0;
foreach ($bilans as $k => $p) {
$millesime = $p['DATE_CLOTURE'];
$tva = $this->getTxTva(substr($millesime,0,6));
// --- Calcul
$nm=$p['DUREE_MOIS'];
$nmp=$p['DUREE_MOIS_PRE'];
$R=array();
$R[0]=0;
if (!isset($R[0])) { $R[0] = 'NS'; }
$R[1]=$p['FJ'];
if (!isset($R[1])) { $R[1] = 'NS'; }
$R[2]=($p['FJ']*12)/$nm; if ($R[2]<0) { $R[2] = 0; }
if (!isset($R[2])) { $R[2] = 'NS'; }
$R[3]=$p['FK'];
if (!isset($R[3])) { $R[3] = 'NS'; }
$R[4]=($p['FK']*12)/$nm; if ($R[4]<0) { $R[4] = 0; }
if (!isset($R[4])) { $R[4] = 'NS'; }
$R[5]=$p['FL'];
if (!isset($R[5])) { $R[5] = 'NS'; }
$R[6]=($p['FL']*12)/$nm; if ($R[6]<0) { $R[6] = 0; }
if (!isset($R[6])) { $R[6] = 'NS'; }
$R[7]=$p['GW'];
if (!isset($R[7])) { $R[7] = 'NS'; }
$R[8]=($p['GW']*12)/$nm;
if (!isset($R[8])) { $R[8] = 'NS'; }
$R[10]=$p['HN'];
if (!isset($R[10])) { $R[10] = 'NS'; }
$R[11]=($p['HN']*12)/$nm;
if (!isset($R[11])) { $R[11] = 'NS'; }
$R[12]=$p['HI'];
if (!isset($R[12])) { $R[12] = 'NS'; }
$R[13]=($p['HI']*12)/$nm;
if (!isset($R[13])) { $R[13] = 'NS'; }
$R[14]=$p['GV'];
if (!isset($R[14])) { $R[14] = 'NS'; }
$R[15]=($p['GV']*12)/$nm;
if (!isset($R[15])) { $R[15] = 'NS'; }
$R[16]=$p['GG'];
if (!isset($R[16])) { $R[16] = 'NS'; }
$R[17]=($p['GG']*12)/$nm;
if (!isset($R[17])) { $R[17] = 'NS'; }
$R[18]=$p['DL'];
if (!isset($R[18])) { $R[18] = 'NS'; }
$R[19]=($p['DL']*12)/$nm;
if (!isset($R[19])) { $R[19] = 'NS'; }
$R[20]=$p['GR'];
if (!isset($R[20])) { $R[20] = 'NS'; }
$R[21]=($p['GR']*12)/$nm;
if (!isset($R[21])) { $R[21] = 'NS'; }
$R[22]=$p['EE'];
if (!isset($R[22])) { $R[22] = 'NS'; }
$R[23]=($p['EE']*12)/$nm;
if (!isset($R[23])) { $R[23] = 'NS'; }
$R[24]=$p['YP']; if ($R[24]==0) { $R[24] = $efftr; }
if (!isset($R[24])) { $R[24] = 'NS'; }
$R[25]=($p['FK']*100)/$p['FL']; if ($R[25]<0) { $R[25] = 0; }
if (!isset($R[25])) { $R[25] = 'NS'; }
$R[30]=$p['AF'];
if (!isset($R[30])) { $R[30] = 'NS'; }
$R[31]=$p['AN'];
if (!isset($R[31])) { $R[31] = 'NS'; }
$R[32]=$p['EC'];
if (!isset($R[32])) { $R[32] = 'NS'; }
$R[33]=$p['DR'];
if (!isset($R[33])) { $R[33] = 'NS'; }
$R[51]=$p['AB']+$p['AD']+$p['AF']+$p['AH']+$p['AJ']+$p['AL']-$p['AC']-$p['AE']-$p['AG']-$p['AI']-$p['AK']-$p['AM'];
if (!isset($R[51])) { $R[51] = 'NS'; }
$R[52]=$p['AN']+ $p['AP']+ $p['AR']+ $p['AT']+ $p['AV']+ $p['AX']- $p['AO']- $p['AQ']- $p['AS']- $p['AU']- $p['AW']- $p['AY'];
if (!isset($R[52])) { $R[52] = 'NS'; }
$R[53]=$p['CS']+ $p['CU']+ $p['BB']+ $p['BD']+ $p['BF']+ $p['BH']- $p['CT']- $p['CV']- $p['BC']- $p['BE']- $p['BG']- $p['BI'];
if (!isset($R[53])) { $R[53] = 'NS'; }
$R[59]=$R[51]+$R[52]+$R[53];
if (!isset($R[59])) { $R[59] = 'NS'; }
$R[60]=$p['BL']+ $p['BN']+ $p['BP']+ $p['BR']+ $p['BT']- $p['BM']- $p['BO']- $p['BQ']- $p['BS']- $p['BU'];
if (!isset($R[60])) { $R[60] = 'NS'; }
$R[61]=$p['BX']-$p['DW']+$p['YS']-$p['BY'];
if (!isset($R[61])) { $R[61] = 'NS'; }
$R[62]=$p['BZ']+ $p['CB']+ $p['CH']- $p['CA']- $p['CC']- $p['CI'];
if (!isset($R[62])) { $R[62] = 'NS'; }
$R[63]=$p['CD']+$p['CF']-$p['CE']-$p['CG'];
if (!isset($R[63])) { $R[63] = 'NS'; }
$R[64]=($R[63]*12)/$nm;
if (!isset($R[64])) { $R[64] = 'NS'; }
$R[65]=$R[61]+$R[62];
if (!isset($R[65])) { $R[65] = 'NS'; }
$R[67]=($R[59]*12)/$nm;
if (!isset($R[67])) { $R[67] = 'NS'; }
$R[69]=$R[60]+$R[61]+$R[62]+$R[63];
if (!isset($R[69])) { $R[69] = 'NS'; }
$R[70]=$p['DL']+$p['DO']-$p['AA']-($p['CL']+$p['CM']+$p['CN'])+$p['ED'];
if (!isset($R[70])) { $R[70] = 'NS'; }
$R[71]=$p['DR'];
if (!isset($R[71])) { $R[71] = 'NS'; }
$R[72]=$p['VI'];
if (!isset($R[72])) { $R[72] = 'NS'; }
$R[73]=$p['DW']+$p['DX']+$p['DY']+$p['DZ']+$p['EA']+$p['EH'];
if (!isset($R[73])) { $R[73] = 'NS'; }
$R[74]=$p['DK'];
if (!isset($R[74])) { $R[74] = 'NS'; }
$R[79]=$R[70]+$R[71]+$R[72];
if (!isset($R[79])) { $R[79] = 'NS'; }
$R[80]=$p['DS']+$p['DT']+$p['DU']+$p['DV']-$p['EH']-$p['VI']; if ($R[80]<0) { $R[80] = 0; }
if (!isset($R[80])) { $R[80] = 'NS'; }
$R[81]=$p['VG1']+$p['VH1'];
if (!isset($R[81])) { $R[81] = 'NS'; }
$R[82]=$R[70]; if ($R[82]<0) { $R[82] = 0; }
if (!isset($R[82])) { $R[82] = 'NS'; }
$R[83]=$p['DS']+$p['DT']+$p['DU']+$p['DV']-$p['EH']-$p['VI']; if ($R[83]<0) { $R[83] = 0; }
if (!isset($R[83])) { $R[83] = 'NS'; }
$R[84]=$p['DX']- $p['BV']+ $p['BW'];
if (!isset($R[84])) { $R[84] = 'NS'; }
$R[85]=$p['DY'];
if (!isset($R[85])) { $R[85] = 'NS'; }
$R[86]=$p['DZ']+ $p['EA']+ $p['EB']+ $R[80];
if (!isset($R[86])) { $R[86] = 'NS'; }
$R[87]=$p['YS']+ $p['EH'];
if (!isset($R[87])) { $R[87] = 'NS'; }
$R[88]=$p['DW']+ $p['DY']+ $p['EH']+ $p['DZ']+ $p['EA']+ $p['EB']+ $p['YS'];
if (!isset($R[88])) { $R[88] = 'NS'; }
$R[89]=$p['DS']+ $p['DT']+ $p['DU']+ $p['DV']- $p['EH']- $p['VI'];
if (!isset($R[89])) { $R[89] = 'NS'; }
$R[90]=$R[83]+$R[84]+$R[85]+$R[86]+$R[87];
if (!isset($R[90])) { $R[90] = 'NS'; }
$R[91]=$p['DL']+$p['DO']+$p['DR']+$p['VI']-$p['DJ']-$p['DK']-$p['AA'];
if (!isset($R[91])) { $R[91] = 'NS'; }
$R[92]=($p['DL']+$p['DO']+$p['DR']+$p['VI']-$p['DJ']-$p['DK']-$p['AA'])/$p['EE'];
if (!isset($R[92])) { $R[92] = 'NS'; }
$R[93]=($R[69]*12)/$nm;
if (!isset($R[93])) { $R[93] = 'NS'; }
$R[101]=$p['FL'];
if (!isset($R[101])) { $R[101] = 'NS'; }
$R[102]=$p['FS']+ $p['FU'];
if (!isset($R[102])) { $R[102] = 'NS'; }
$R[110]=$R[101]-$p['FS'] -$p['FT'];
if (!isset($R[110])) { $R[110] = 'NS'; }
$R[111]=$p['FF']+$p['FI'];
if (!isset($R[111])) { $R[111] = 'NS'; }
$R[112]=$p['FM']+ $p['FN'];
if (!isset($R[112])) { $R[112] = 'NS'; }
$R[120]=$R[111]+$R[112];
if (!isset($R[120])) { $R[120] = 'NS'; }
$R[121]=$p['FT']+ $p['FV'];
if (!isset($R[121])) { $R[121] = 'NS'; }
$R[122]=$R[101]+$R[112]-$R[102]-$R[121];
if (!isset($R[122])) { $R[122] = 'NS'; }
$R[123]=$p['FW']- $p['HP']- $p['HQ'];
if (!isset($R[123])) { $R[123] = 'NS'; }
$R[124]=($R[120]*12)/$nm;
if (!isset($R[124])) { $R[124] = 'NS'; }
$R[130]=$R[122]-$R[123];
if (!isset($R[130])) { $R[130] = 'NS'; }
$R[131]=$p['FO'];
if (!isset($R[131])) { $R[131] = 'NS'; }
$R[132]=$p['FY']+$p['FZ'];
if (!isset($R[132])) { $R[132] = 'NS'; }
$R[133]=$p['FX'];
if (!isset($R[133])) { $R[133] = 'NS'; }
$R[140]=$R[130]-$R[132]-$R[133]+$R[131];
if (!isset($R[140])) { $R[140] = 'NS'; }
$R[141]=$p['FQ'];
if (!isset($R[141])) { $R[141] = 'NS'; }
$R[142]=$p['GE'];
if (!isset($R[142])) { $R[142] = 'NS'; }
$R[143]=$p['FP'];
if (!isset($R[143])) { $R[143] = 'NS'; }
$R[144]=($p['HP']+ $p['HQ'])*0.7;
if (!isset($R[144])) { $R[144] = 'NS'; }
$R[145]=$p['GA']+$p['GB']+$p['GC']+$p['GD']+$R[144];
if (!isset($R[145])) { $R[145] = 'NS'; }
$R[146]=($R[140]*12)/$nm;
if (!isset($R[146])) { $R[146] = 'NS'; }
$R[150]=$R[140]+$R[141]-$R[142]+$R[143]-$R[145];
if (!isset($R[150])) { $R[150] = 'NS'; }
$R[151]=$p['GP'];
if (!isset($R[151])) { $R[151] = 'NS'; }
$R[152]=($p['HP']+ $p['HQ'])*0.3;
if (!isset($R[152])) { $R[152] = 'NS'; }
$R[153]=$p['GU']+$R[152];
if (!isset($R[153])) { $R[153] = 'NS'; }
$R[160]=$R[151]-$R[153];
if (!isset($R[160])) { $R[160] = 'NS'; }
$R[161]=$p['GH']- $p['GI'];
if (!isset($R[161])) { $R[161] = 'NS'; }
$R[170]=$R[150]+$R[161]+$R[151]-$R[153];
if (!isset($R[170])) { $R[170] = 'NS'; }
$R[171]=$p['HD'];
if (!isset($R[171])) { $R[171] = 'NS'; }
$R[172]=$p['HH'];
if (!isset($R[172])) { $R[172] = 'NS'; }
$R[180]=$R[171]-$R[172];
if (!isset($R[180])) { $R[180] = 'NS'; }
$R[181]=$p['HK'];
if (!isset($R[181])) { $R[181] = 'NS'; }
$R[182]=$p['HJ'];
if (!isset($R[182])) { $R[182] = 'NS'; }
$R[199]=$R[170]+$R[171]-$R[172]-$R[181]-$R[182];
if (!isset($R[199])) { $R[199] = 'NS'; }
$R[201]=$p['DL']+ $p['DO']+ $p['DR']+ $p['VI']- $p['AA'];
if (!isset($R[201])) { $R[201] = 'NS'; }
$R[202]=$R[201]+$R[80];
if (!isset($R[202])) { $R[202] = 'NS'; }
$R[203]=$p['YY']; if ($R[203]==0) { $R[203] = (($p['FJ']*$tva)/100); }
if (!isset($R[203])) { $R[203] = 'NS'; }
$R[204]=(($R[203]+$R[5])*12/$nm)/360; if ($R[204]<0) { $R[204] = 0; }
if (!isset($R[204])) { $R[204] = 'NS'; }
$R[205]=($p['FS']-$p['FT']+$p['FU']-$p['FV']+$p['FW'])*$tva/100;
if (!isset($R[205])) { $R[205] = 'NS'; }
$R[206]=$p['YZ']; if ($R[206]==0) { $R[206] = $R[205]; }
if (!isset($R[206])) { $R[206] = 'NS'; }
$R[207]=((($p['FS']- $p['FT']+ $p['FU']- $p['FV']+ $p['FW'])+ ($R[206]))*12/$nm)/360; if ($R[207]<0) { $R[207] = 0; }
if (!isset($R[207])) { $R[207] = 'NS'; }
$R[208]=($R[5]*100)/$p['EE'];
if (!isset($R[208])) { $R[208] = 'NS'; }
$R[209]=$p['HP']+$p['HQ']-$p['GR'];
if (!isset($R[209])) { $R[209] = 'NS'; }
$R[210]=$p['BX']-$p['BY']+$p['YS'];
if (!isset($R[210])) { $R[210] = 'NS'; }
$R[211]=($R[210]*100)/$p['EE'];
if (!isset($R[211])) { $R[211] = 'NS'; }
$R[212]=($R[84]*100)/$p['EE'];
if (!isset($R[212])) { $R[212] = 'NS'; }
$R[213]=$p['BL']-$p['BM'];
if (!isset($R[213])) { $R[213] = 'NS'; }
$R[214]=($R[213]*100)/$p['EE'];
if (!isset($R[214])) { $R[214] = 'NS'; }
$R[215]=$p['BN']-$p['BO'];
if (!isset($R[215])) { $R[215] = 'NS'; }
$R[216]=($R[215]*100)/$p['EE'];
if (!isset($R[216])) { $R[216] = 'NS'; }
$R[217]=$p['BP']-$p['BQ'];
if (!isset($R[217])) { $R[217] = 'NS'; }
$R[218]=($R[217]*100)/$p['EE'];
if (!isset($R[218])) { $R[218] = 'NS'; }
$R[219]=$p['BR']-$p['BS'];
if (!isset($R[219])) { $R[219] = 'NS'; }
$R[220]=($R[219]*100)/$p['EE'];
if (!isset($R[220])) { $R[220] = 'NS'; }
$R[221]=$p['BT']-$p['BU'];
if (!isset($R[221])) { $R[221] = 'NS'; }
$R[222]=($R[221]*100)/$p['EE'];
if (!isset($R[222])) { $R[222] = 'NS'; }
$R[223]=$R[79]+$R[80]-$R[59];
if (!isset($R[223])) { $R[223] = 'NS'; }
$R[224]=$p['CJ']-$p['CK']-$p['CH']+$p['CI']-$p['DW']-$p['DX']-$p['DY']-$p['DZ']-$p['EA']-$p['EH'];
if (!isset($R[224])) { $R[224] = 'NS'; }
$R[225]=$R[60]+$R[61]+$R[62]-$R[84]-$R[85]-$R[86];
if (!isset($R[225])) { $R[225] = 'NS'; }
$R[226]=$R[223]-$R[225];
if (!isset($R[226])) { $R[226] = 'NS'; }
$R[227]=$p['YS'];
if (!isset($R[227])) { $R[227] = 'NS'; }
$R[228]=($R[79]*12)/$nm;
if (!isset($R[228])) { $R[228] = 'NS'; }
$R[229]=$p['FY']+$p['FZ'];
if (!isset($R[229])) { $R[229] = 'NS'; }
$R[230]=abs($R[223]);
if (!isset($R[230])) { $R[230] = 'NS'; }
$R[231]=$R[202]- $p['BJ']+ $p['BK']+ $p['ED']- $p['CL']- $p['CM']- $p['CN'];
if (!isset($R[231])) { $R[231] = 'NS'; }
$R[232]=$p['CJ']- $p['CK']+ $p['YS']- $p['CF']- $p['CD']+ $p['CE']+$p['CG']- $p['DW']- $p['DX']- $p['DY']- $p['DZ']- $p['EA']- $p['EB'];
if (!isset($R[232])) { $R[232] = 'NS'; }
$R[233]=$p['HN']+ $p['HF']+ $p['HG']- $p['HB']- $p['HC']+ $p['GQ']- $p['GM']+ $p['GA']+ $p['GB']+ $p['GC']+ $p['GD']- $p['FP'];
if (!isset($R[233])) { $R[233] = 'NS'; }
$R[234]=($R[231]*100)/$R[232];
if (!isset($R[234])) { $R[234] = 'NS'; }
$R[235]=($R[231])*12/$nm;
if (!isset($R[235])) { $R[235] = 'NS'; }
$R[236]=($R[232])*12/$nm;
if (!isset($R[236])) { $R[236] = 'NS'; }
$R[237]=($R[202]*100)/$R[59];
if (!isset($R[237])) { $R[237] = 'NS'; }
$R[238]=($R[235]*360)/$R[6];
if (!isset($R[238])) { $R[238] = 'NS'; }
$R[239]=($R[70]*100)/$p['EC'];
if (!isset($R[239])) { $R[239] = 'NS'; }
$R[240]=($R[70]*100)/abs($R[202]); if ($R[240]<0) { $R[240] = 0; }
if (!isset($R[240])) { $R[240] = 'NS'; }
$R[241]=($p['EC']/($R[70]))*100;
if (!isset($R[241])) { $R[241] = 'NS'; }
$R[242]=(($p['GR']+$R[152])*100)/$R[140]; if ($R[242]<-200) { $R[242] = -200; }
if (!isset($R[242])) { $R[242] = 'NS'; }
$R[243]=($R[81]*100)/($R[79]+$R[90]);
if (!isset($R[243])) { $R[243] = 'NS'; }
$R[244]=($R[89]*100)/$R[70];
if (!isset($R[244])) { $R[244] = 'NS'; }
$R[245]=($R[153]*100)/$p['EC'];
if (!isset($R[245])) { $R[245] = 'NS'; }
$R[246]=($R[153]*100)/$R[140];
if (!isset($R[246])) { $R[246] = 'NS'; }
$R[247]=($R[80]+$p['YQ']+$p['YR'])/$R[233];
if (!isset($R[247])) { $R[247] = 'NS'; }
$R[248]=$R[84]*100/$R[60];
if (!isset($R[248])) { $R[248] = 'NS'; }
$R[249]=$R[231]-$R[232];
if (!isset($R[249])) { $R[249] = 'NS'; }
$R[250]=($R[63]*100)/$R[88];
if (!isset($R[250])) { $R[250] = 'NS'; }
$R[251]=(($p['CJ']- $p['CK']- $p['CH']+ $p['CL'])*100/$R[88]);
if (!isset($R[251])) { $R[251] = 'NS'; }
$R[252]=($R[63]+$R[61])*100/$R[88];
if (!isset($R[252])) { $R[252] = 'NS'; }
$R[253]=($p['CJ']-$p['CK']-$p['CH']+$p['CL'])*100/$R[73];
if (!isset($R[253])) { $R[253] = 'NS'; }
$R[254]=$p['AO']+$p['AQ']+$p['AS']+$p['AU']+$p['AW']+$p['AY'];
if (!isset($R[254])) { $R[254] = 'NS'; }
$R[261]=$R[124]/$R[24];
if (!isset($R[261])) { $R[261] = 'NS'; }
$R[262]=($R[140]*100/$p['EE']);
if (!isset($R[262])) { $R[262] = 'NS'; }
$R[263]=($p['HN']*100/$R[70]);
if (!isset($R[263])) { $R[263] = 'NS'; }
$R[264]=($p['HN']*100/($p['FL']+ $p['FO']));
if (!isset($R[264])) { $R[264] = 'NS'; }
$R[265]=((($R[233]*12)/$nm)*100)/$R[202];
if (!isset($R[265])) { $R[265] = 'NS'; }
$R[266]=($R[233]*100)/$R[130];
if (!isset($R[266])) { $R[266] = 'NS'; }
$R[267]=$R[6]/$R[24];
if (!isset($R[267])) { $R[267] = 'NS'; }
$R[268]=($R[140]*100)/($p['FL']+$p['FO']);
if (!isset($R[268])) { $R[268] = 'NS'; }
$R[269]=($R[130]*100)/($R[51]+$R[52]);
if (!isset($R[269])) { $R[269] = 'NS'; }
$R[271]=($p['FL']+$p['FO'])*100/$p['EE'];
if (!isset($R[271])) { $R[271] = 'NS'; }
$R[272]=((($p['FU']- $p['FV'])*12)/$nm)/360;
if (!isset($R[272])) { $R[272] = 'NS'; }
$R[273]=($p['BL']- $p['BM'])/$R[272]; if ($R[273]<0) { $R[273] = 0; } if ($R[273]>730) { $R[273] = 730; }
if (!isset($R[273])) { $R[273] = 'NS'; }
$R[274]=(($p['FS']- $p['FT'])*12/$nm)/360; if ($R[274]<0) { $R[274] = 0; }
if (!isset($R[274])) { $R[274] = 'NS'; }
$R[275]=($p['BT']- $p['BU'])/$R[274]; if ($R[275]<0) { $R[275] = 0; } if ($R[275]>730) { $R[275] = 730; }
if (!isset($R[275])) { $R[275] = 'NS'; }
$R[276]=((($p['FL']+$p['FM']+$p['FN'])*12)/$nm)/360; if ($R[276]<0) { $R[276] = 0; }
if (!isset($R[276])) { $R[276] = 'NS'; }
$R[277]=(($p['BR']-$p['BS'])+($p['BN']- $p['BO'])+($p['BP']- $p['BQ'])- $p['DW'])/$R[276]; if ($R[277]<0) { $R[277] = 0; } if ($R[277]>730) { $R[277] = 730; }
if (!isset($R[277])) { $R[277] = 'NS'; }
$R[278]=(($p['BX']-$p['BY']+ $p['YS'])/$R[204]); if ($R[278]<0) { $R[278] = 0; } if ($R[278]>730) { $R[278] = 730; }
if (!isset($R[278])) { $R[278] = 'NS'; }
$R[279]=($p['DX']-$p['BV'])/$R[207]; if ($R[279]<0) { $R[279] = 0; } if ($R[279]>730) { $R[279] = 730; }
if (!isset($R[279])) { $R[279] = 'NS'; }
$R[280]=(($p['AO']+ $p['AQ']+ $p['AS']+ $p['AU']+ $p['AW']+ $p['AY'])/($p['AN']+ $p['AP']+ $p['AR']+ $p['AT']+ $p['AV']+ $p['AX']))*100;
if (!isset($R[280])) { $R[280] = 'NS'; }
$R[281]=(($p['FY']+ $p['FZ'])/$R[130])*100;
if (!isset($R[281])) { $R[281] = 'NS'; }
$R[282]=(($p['GA']+$p['GB'])*100)/$R[130];
if (!isset($R[282])) { $R[282] = 'NS'; }
$R[283]=(($p['HN'])*100)/$R[130];
if (!isset($R[283])) { $R[283] = 'NS'; }
$R[284]=($R[153]*100)/$R[130];
if (!isset($R[284])) { $R[284] = 'NS'; }
$R[285]=(($p['HK']+$p['FX'])*100)/$R[130];
if (!isset($R[285])) { $R[285] = 'NS'; }
$R[286]=($R[6])/360; if ($R[286]<0) { $R[286] = 0; }
if (!isset($R[286])) { $R[286] = 'NS'; }
$R[297]=$R[215]/$R[286];
if (!isset($R[297])) { $R[297] = 'NS'; }
$R[298]=$R[217]/$R[286];
if (!isset($R[298])) { $R[298] = 'NS'; }
$R[299]=$R[219]/$R[286];
if (!isset($R[299])) { $R[299] = 'NS'; }
$R[300]=($p['YS']*100)/abs($R[226]);
if (!isset($R[300])) { $R[300] = 'NS'; }
$R[301]=($R[140]*12)/$nm;
if (!isset($R[301])) { $R[301] = 'NS'; }
$R[302]=$p['IJ'];
if (!isset($R[302])) { $R[302] = 'NS'; }
$R[303]=$p['JH'];
if (!isset($R[303])) { $R[303] = 'NS'; }
$R[304]=$p['ZR'];
if (!isset($R[304])) { $R[304] = 'NS'; }
$R[305]=$R[70]+$R[88]+$R[89]-$R[226];
if (!isset($R[305])) { $R[305] = 'NS'; }
$R[306]=($R[6]*(100-$this->getInflation(substr($millesime,4))))/100;
if (!isset($R[306])) { $R[306] = 'NS'; }
$R[307]=($R[140]*100)/$R[130];
if (!isset($R[307])) { $R[307] = 'NS'; }
$R[308]=(($p['CJ']-$p['CK']-$p['CH']+$p['CL'])/$R[88]);
if (!isset($R[308])) { $R[308] = 'NS'; }
$R[309]=$p['CB'];
if (!isset($R[309])) { $R[309] = 'NS'; }
$R[310]=(($p['BJ']-$p['AN'])*100)/$p['EE'];
if (!isset($R[310])) { $R[310] = 'NS'; }
$R[311]=$p['AN']+$p['AP'];
if (!isset($R[311])) { $R[311] = 'NS'; }
$R[312]=$p['AH'];
if (!isset($R[312])) { $R[312] = 'NS'; }
$R[313]=$R[10]*100/$p['EE'];
if (!isset($R[313])) { $R[313] = 'NS'; }
$R[314]=$R[311]*100/$p['EE'];
if (!isset($R[314])) { $R[314] = 'NS'; }
$R[315]=(($p['YT']+$p['YU'])*12)/$nm ;
if (!isset($R[315])) { $R[315] = 'NS'; }
$R[316]=($p['YT']+$p['YU'])*100/($p['FY']+$p['FZ']);
if (!isset($R[316])) { $R[316] = 'NS'; }
$R[317]=$p['CP'];
if (!isset($R[317])) { $R[317] = 'NS'; }
$R[318]=(($R[170]-$R[181])*12)/$nm;
if (!isset($R[318])) { $R[318] = 'NS'; }
$R[321]=(($R[199]-$R[171]+$R[172]+$p['GA'])*12)/$nm;
if (!isset($R[321])) { $R[321] = 'NS'; }
$R[330]=$p['FZ']/$p['FY'];
if (!isset($R[330])) { $R[330] = 'NS'; }
$R[331]=$p['FY']/$p['YP'];
if (!isset($R[331])) { $R[331] = 'NS'; }
$R[500]=$p['EE']*0.15;
if (!isset($R[500])) { $R[500] = 'NS'; }
$R[501]=($p['CS']+$p['CU'])*100/($p['BJ']-$p['AN']);
if (!isset($R[501])) { $R[501] = 'NS'; }
$R[502]=($p['CV']+$p['BC'])*100/($p['CS']+$p['CU']);
if (!isset($R[502])) { $R[502] = 'NS'; }
$R[503]=$R[233]*100/$R[5];
if (!isset($R[503])) { $R[503] = 'NS'; }
$R[504]=((($p['FL']+$p['FM']+$p['FN'])*12)/$nm); if ($R[504]<0) { $R[504] = 0; }
if (!isset($R[504])) { $R[504] = 'NS'; }
$R[505]=(($R[130]*12)/$nm)*100/$R[6];
if (!isset($R[505])) { $R[505] = 'NS'; }
$R[506]=(($R[140]*12)/$nm)*100/$R[6];
if (!isset($R[506])) { $R[506] = 'NS'; }
$R[507]=($R[17]*100)/$R[6];
if (!isset($R[507])) { $R[507] = 'NS'; }
$R[508]=(($R[170]*12)/$nm)*100/$R[6];
if (!isset($R[508])) { $R[508] = 'NS'; }
$R[509]=($R[11]*100)/$R[6];
if (!isset($R[509])) { $R[509] = 'NS'; }
$R[510]=($R[70]*100)/$R[22];
if (!isset($R[510])) { $R[510] = 'NS'; }
$R[511]=($R[70]+$R[72])*100/($R[79]+$R[90]);
if (!isset($R[511])) { $R[511] = 'NS'; }
$R[512]=$R[226]/$R[286];
if (!isset($R[512])) { $R[512] = 'NS'; }
$R[513]=(($p['HN']- $p['HI']- $p['FO']- $p['FP'])*12)/$nm;
if (!isset($R[513])) { $R[513] = 'NS'; }
$R[514]=($R[513]*100)/$R[6];
if (!isset($R[514])) { $R[514] = 'NS'; }
$R[515]=($p['HN']-$p['HI']-$p['FO']-$p['FP']);
if (!isset($R[515])) { $R[515] = 'NS'; }
$R[516]=($R[513]-$R[11])*100/$R[11];
if (!isset($R[516])) { $R[516] = 'NS'; }
$R[517]=($R[233]*100)/($p['BJ']-$p['AN']);
if (!isset($R[517])) { $R[517] = 'NS'; }
$R[518]=($R[233]*100)/$R[80];
if (!isset($R[518])) { $R[518] = 'NS'; }
$R[519]=($R[80]*100)/$R[22];
if (!isset($R[519])) { $R[519] = 'NS'; }
$R[520]=($R[153]*100)/$R[5];
if (!isset($R[520])) { $R[520] = 'NS'; }
$R[521]=($R[226]+$p['CS']-$p['CT']+$p['CU']-$p['CV']+$p['BB']-$p['BC']+$R[210])/(($R[102]+$R[121]+$R[123]+$R[132]+$R[133]+$R[142])/360);
if (!isset($R[521])) { $R[521] = 'NS'; }
$R[522]=($R[16]*100)/$R[22];
if (!isset($R[522])) { $R[522] = 'NS'; }
$R[523]=($R[10]*100)/$R[70];
if (!isset($R[523])) { $R[523] = 'NS'; }
$R[524]=($R[52]*100)/$R[22];
if (!isset($R[524])) { $R[524] = 'NS'; }
$R[525]=($R[60]*100)/$R[22];
if (!isset($R[525])) { $R[525] = 'NS'; }
$R[526]=($R[63]*100)/$R[22];
if (!isset($R[526])) { $R[526] = 'NS'; }
$R[527]=($R[202]*100)/$R[22];
if (!isset($R[527])) { $R[527] = 'NS'; }
$R[528]=($R[110]*100)/$R[5];
if (!isset($R[528])) { $R[528] = 'NS'; }
$R[529]=($p['ZE']*12)/$nm;
if (!isset($R[529])) { $R[529] = 'NS'; }
$R[530]=(($R[153]+$R[170])*100)/$R[153];
if (!isset($R[530])) { $R[530] = 'NS'; }
$R[531]=(($R[153]+$R[170]+$p['XQ'])*100)/($R[153]+$p['XQ']);
if (!isset($R[531])) { $R[531] = 'NS'; }
$R[532]=($R[52]*100)/($p['BJ']-$p['AN']);
if (!isset($R[532])) { $R[532] = 'NS'; }
$R[533]=($R[53]*100)/$R[22];
if (!isset($R[533])) { $R[533] = 'NS'; }
$R[534]=($R[1]*100)/$R[5];
if (!isset($R[534])) { $R[534] = 'NS'; }
$R[535]=($p['ZE']*100)/$R[70];
if (!isset($R[535])) { $R[535] = 'NS'; }
$R[538]=($R[233]*100)/$R[305];
if (!isset($R[538])) { $R[538] = 'NS'; }
$R[540]=($R[233]*100)/$R[202];
if (!isset($R[540])) { $R[540] = 'NS'; }
$R[542]=($R[16]*100)/$R[153];
if (!isset($R[542])) { $R[542] = 'NS'; }
$R[543]=($R[10]*100)/($R[70]+$R[72]);
if (!isset($R[543])) { $R[543] = 'NS'; }
$R[544]=(($R[130]*12)/$nm)/$R[24];
if (!isset($R[544])) { $R[544] = 'NS'; }
$R[545]=$R[515]-$R[10];
if (!isset($R[545])) { $R[545] = 'NS'; }
$R[546]=$R[22]-$R[231]-$R[202];
if (!isset($R[546])) { $R[546] = 'NS'; }
$R[547]=$p['CJ']-$p['CK'];
if (!isset($R[547])) { $R[547] = 'NS'; }
$R[548]=$R[22]-$R[547];
if (!isset($R[548])) { $R[548] = 'NS'; }
$R[549]=$p['DB'];
if (!isset($R[549])) { $R[549] = 'NS'; }
$R[550]=$p['DC'];
if (!isset($R[550])) { $R[550] = 'NS'; }
$R[551]=$p['DH'];
if (!isset($R[551])) { $R[551] = 'NS'; }
$R[552]=$R[549]+$R[550]+$R[551];
if (!isset($R[552])) { $R[552] = 'NS'; }
$R[553]=$R[145]-$R[144];
if (!isset($R[553])) { $R[553] = 'NS'; }
$R[554]=($R[51]*100)/$R[22];
if (!isset($R[554])) { $R[554] = 'NS'; }
$R[555]=($R[151]*100)/$R[53];
if (!isset($R[555])) { $R[555] = 'NS'; }
$R[556]=($R[62]*100)/$R[22];
if (!isset($R[556])) { $R[556] = 'NS'; }
$R[558]=$R[547]-$R[63]-$R[60]-$R[223];
if (!isset($R[558])) { $R[558] = 'NS'; }
$R[559]=abs($R[223]);
if (!isset($R[559])) { $R[559] = 'NS'; }
$R[560]=abs($R[63]);
if (!isset($R[560])) { $R[560] = 'NS'; }
$R[561]=$R[5]+$p['FQ']+$p['FO'];
if (!isset($R[561])) { $R[561] = 'NS'; }
$R[562]=($p['BX']+$p['BV']-$p['BW'])+($p['YS'])+($p['CN'])+($p['CH']-$p['CI']);
if (!isset($R[562])) { $R[562] = 'NS'; }
$R[563]=$R[561]-$R[562];
if (!isset($R[563])) { $R[563] = 'NS'; }
$R[564]=$p['FW']+$p['FX']+$p['FY']+$p['FZ']+$p['GE'];
if (!isset($R[564])) { $R[564] = 'NS'; }
$R[565]=$p['DX']+$p['DW']+$p['EB']+$p['ED'];
if (!isset($R[565])) { $R[565] = 'NS'; }
$R[566]=$R[564]-$R[565];
if (!isset($R[566])) { $R[566] = 'NS'; }
$R[567]=$R[563]-$R[566];
if (!isset($R[567])) { $R[567] = 'NS'; }
$R[568]=$p['GL']+$p['GN']-$p['GS']+$p['HA']-$p['HE'];
if (!isset($R[568])) { $R[568] = 'NS'; }
$R[569]=$p['GR'];
if (!isset($R[569])) { $R[569] = 'NS'; }
$R[570]=$p['HK']+$p['DY1']-$p['DY'];
if (!isset($R[570])) { $R[570] = 'NS'; }
$R[571]=$p['HJ'];
if (!isset($R[571])) { $R[571] = 'NS'; }
$R[572]=$p['ZE'];
if (!isset($R[572])) { $R[572] = 'NS'; }
$R[573]=$R[567]+$R[568]-$R[569]-$R[570]-$R[571]-$R[572];
if (!isset($R[573])) { $R[573] = 'NS'; }
$R[574]=$p['LP']+$p['KF'];
if (!isset($R[574])) { $R[574] = 'NS'; }
$R[575]=$p['LS'];
if (!isset($R[575])) { $R[575] = 'NS'; }
$R[576]=$p['KF'];
if (!isset($R[576])) { $R[576] = 'NS'; }
$R[577]=$p['DJ'];
if (!isset($R[577])) { $R[577] = 'NS'; }
$R[578]=$p['DZ']-$p['DZ1'];
if (!isset($R[578])) { $R[578] = 'NS'; }
$R[579]=$p['NG'];
if (!isset($R[579])) { $R[579] = 'NS'; }
$R[580]=$R[574]+$R[575]+$R[576]-$R[577]-$R[578]-$R[579];
if (!isset($R[580])) { $R[580] = 'NS'; }
$R[581]=$p['AA']-$p['AA1'];
if (!isset($R[581])) { $R[581] = 'NS'; }
$R[582]=$p['CC1']-$p['CC2'];
if (!isset($R[582])) { $R[582] = 'NS'; }
$R[583]=$R[581]-$R[582];
if (!isset($R[583])) { $R[583] = 'NS'; }
$R[584]=$p['VJ']+$p['GR'];
if (!isset($R[584])) { $R[584] = 'NS'; }
$R[585]=$p['VK']+($p['HP']+$p['HQ'])+$p['GR1'];
if (!isset($R[585])) { $R[585] = 'NS'; }
$R[586]=($R[584]-$R[585]);
if (!isset($R[586])) { $R[586] = 'NS'; }
$R[587]=$p['EH']-$p['EH1'];
if (!isset($R[587])) { $R[587] = 'NS'; }
$R[588]=$p['YS']-$p['YS1'];
if (!isset($R[588])) { $R[588] = 'NS'; }
$R[589]=$R[587]+$R[588];
if (!isset($R[589])) { $R[589] = 'NS'; }
$R[590]=$R[583]+$R[586]+$R[589];
if (!isset($R[590])) { $R[590] = 'NS'; }
$R[591]=$p['CG']-$p['CG2'];
if (!isset($R[591])) { $R[591] = 'NS'; }
$R[592]=$p['CE']-$p['CE2'];
if (!isset($R[592])) { $R[592] = 'NS'; }
$R[593]=$R[573]-$R[580]+$R[590];
if (!isset($R[593])) { $R[593] = 'NS'; }
$R[594]=($R[22]-$R[59]-$R[223]);
if (!isset($R[594])) { $R[594] = 'NS'; }
$R[595]=($R[22]-$R[79]-$R[80]-$R[230]);
if (!isset($R[595])) { $R[595] = 'NS'; }
$R[596]=$p['EE']-$R[79]-$R[89]-$R[84];
if (!isset($R[596])) { $R[596] = 'NS'; }
$R[597]=$p['EE']-$R[65]-$R[60]-$R[59];
if (!isset($R[597])) { $R[597] = 'NS'; }
$R[701]=$p['BP3'];
if (!isset($R[701])) { $R[701] = 'NS'; }
$R[702]=$p['BR3'];
if (!isset($R[702])) { $R[702] = 'NS'; }
$R[703]=$p['BP8'];
if (!isset($R[703])) { $R[703] = 'NS'; }
$R[704]=$p['BP3'];
if (!isset($R[704])) { $R[704] = 'NS'; }
$R[705]=($p['BA1']-$p['BP1'])*12/$nm;
if (!isset($R[705])) { $R[705] = 'NS'; }
$R[706]=($p['BA2']-$p['BP2'])*12/$nm;
if (!isset($R[706])) { $R[706] = 'NS'; }
$R[707]=($p['BR1']*12)/$nm;
if (!isset($R[707])) { $R[707] = 'NS'; }
$R[708]=($p['BR2']*12)/$nm;
if (!isset($R[708])) { $R[708] = 'NS'; }
$R[710]=$p['BP3']+$p['BP4']+$p['BP5']+$p['BP7']+$p['BP8']-($p['BP8']*0.07);
if (!isset($R[710])) { $R[710] = 'NS'; }
$R[711]=$p['BP6']; if ($R[711]>0) { $R[711] = 0; }
if (!isset($R[711])) { $R[711] = 'NS'; }
$R[712]=($R[710]*12)/$nm;
if (!isset($R[712])) { $R[712] = 'NS'; }
$R[713]=($R[711]*12)/$nm;
if (!isset($R[713])) { $R[713] = 'NS'; }
$R[715]=0;
if (!isset($R[715])) { $R[715] = 'NS'; }
$R[716]=($p['BP1']+$p['BP2']-$p['BA1']-$p['BA2'])/($R[710]*12.5);
if (!isset($R[716])) { $R[716] = 'NS'; }
$R[720]=($p['BP1']+$p['BP2']-$p['BA1']+($p['BA1']*0.20)-$p['BA2']+($p['BA2']*0.025));
if (!isset($R[720])) { $R[720] = 'NS'; }
$R[721]=($R[720]*12)/$nm;
if (!isset($R[721])) { $R[721] = 'NS'; }
$R[722]=($R[712]*100)/$R[721];
if (!isset($R[722])) { $R[722] = 'NS'; }
$R[723]=($R[712]+$R[713])*100/$R[721];
if (!isset($R[723])) { $R[723] = 'NS'; }
$R[724]=$R[721]*0.08;
if (!isset($R[724])) { $R[724] = 'NS'; }
$R[730]=$p['BR3']/$R[710];
if (!isset($R[730])) { $R[730] = 'NS'; }
$R[731]=$p['BR3']/($R[710]+$R[711]);
if (!isset($R[731])) { $R[731] = 'NS'; }
$R[732]=$p['BR3']/$p['BA3'];
if (!isset($R[732])) { $R[732] = 'NS'; }
$R[740]=($p['BA1']-($p['BA1']*0.2)+$p['BA2']-($p['BA2']*0.025)-($R[710]*0.15))*100/($R[710]*8);
if (!isset($R[740])) { $R[740] = 'NS'; }
$R[741]=($p['BA1']-($p['BA1']*0.2)+$p['BA2']-($p['BA2']*0.025)-(($R[710]+$R[711])*0.15))*100/(($R[710]+$R[711])*8);
if (!isset($R[741])) { $R[741] = 'NS'; }
$R[742]=0;
if (!isset($R[742])) { $R[742] = 'NS'; }
$R[751]=$p['AP1'];
if (!isset($R[751])) { $R[751] = 'NS'; }
$R[752]=$p['AP2'];
if (!isset($R[752])) { $R[752] = 'NS'; }
$R[753]=$p['AR3'];
if (!isset($R[753])) { $R[753] = 'NS'; }
$R[757]=($p['AR1']*12)/$nm;
if (!isset($R[757])) { $R[757] = 'NS'; }
$R[758]=($p['AR2']*12)/$nm;
if (!isset($R[758])) { $R[758] = 'NS'; }
$R[761]=($p['AP1']*12)/$nm;
if (!isset($R[761])) { $R[761] = 'NS'; }
$R[762]=($p['AP2']*12)/$nm;
if (!isset($R[762])) { $R[762] = 'NS'; }
$R[770]=($R[761]*100)/$R[762];
if (!isset($R[770])) { $R[770] = 'NS'; }
$R[771]=($p['AP1']*100)/$p['AR1'];
if (!isset($R[771])) { $R[771] = 'NS'; }
$R[772]=($p['AP1']*100)/$p['AR2'];
if (!isset($R[772])) { $R[772] = 'NS'; }
$R[780]=($p['AR4']*100)/$p['AP1'];
if (!isset($R[780])) { $R[780] = 'NS'; }
$R[781]=($p['AR4']*100)/$p['AR1'];
if (!isset($R[781])) { $R[781] = 'NS'; }
$R[782]=($p['AR4']*100)/$p['AA2'];
if (!isset($R[782])) { $R[782] = 'NS'; }
$R[783]=($p['AR4']*100)/($p['AP1']-$p['AR4']);
if (!isset($R[783])) { $R[783] = 'NS'; }
$R[784]=($p['AR2']*100)/$p['AR1'];
if (!isset($R[784])) { $R[784] = 'NS'; }
$R[791]=($p['AA1']*100)/$p['AP1'];
if (!isset($R[791])) { $R[791] = 'NS'; }
$R[792]=($p['AA1']*100)/$p['AP2'];
if (!isset($R[792])) { $R[792] = 'NS'; }
$R[333]=($R[233]*12)/$nm;
if (!isset($R[333])) { $R[333] = 'NS'; }
$tabRatios[$numBil]=$R;
$numBil++;
}
for($i=0; $i<$numBil; $i++) {
$tabRatios[$i][319]=($tabRatios[$i][318]+$tabRatios[$i+1][318]+$tabRatios[$i+2][318])/3;
}
for($i=0; $i<$numBil; $i++) {
$tabRatios[$i][320]=($tabRatios[$i][11]+$tabRatios[$i+1][11]+$tabRatios[$i+2][11])/3;
}
for($i=0; $i<$numBil; $i++) {
$tabRatios[$i][322]=($tabRatios[$i][321]+$tabRatios[$i+1][321]+$tabRatios[$i+2][321])/3;
}
for($i=0; $i<$numBil; $i++) {
$tabRatios[$i][536]=($tabRatios[$i][306]+$tabRatios[$i+1][306]+$tabRatios[$i+2][306])/3;
}
for($i=0; $i<$numBil; $i++) {
$tabRatios[$i][537]=($tabRatios[$i][503]+$tabRatios[$i+1][503]+$tabRatios[$i+2][503])/3;
}
for($i=0; $i<$numBil; $i++) {
$tabRatios[$i][539]=($tabRatios[$i][538]+$tabRatios[$i+1][538]+$tabRatios[$i+2][538])/3;
}
for($i=0; $i<$numBil; $i++) {
$tabRatios[$i][541]=($tabRatios[$i][540]+$tabRatios[$i+1][540]+$tabRatios[$i+2][540])/3;
}
for($i=0; $i<$numBil; $i++) {
$tabRatios[$i][557]=($tabRatios[$i][265]+$tabRatios[$i+1][265]+$tabRatios[$i+2][265])/3;
}
for($i=0; $i<$numBil; $i++) {
$tabRatios[$i][598]=($tabRatios[$i][529]+$tabRatios[$i+1][529]+$tabRatios[$i+2][529])/3;
}
return $tabRatios;
}
}