Bonjour à toutes et à tous !

J'ai un formulaire dans lequel j'ai cette opération :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
$Mensualite_hors_assurance = ($Montant_investissement * $tauxMensuel) / (1 - pow(1 + $tauxMensuel , ( -1 * $nbMois )));
Lorsque je la mets dans une page a part et que je renseigne toutes mes valeurs, tout marche nickel, hors, intégrée dans mon formulaire, elle me retourne toujours comme resultat 1331.4382661

Je ne comprends pas pourquoi !

ci dessous le code complet de mon formulaire :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?php
/* --------------------------------------------------------------------- */
/* VARIABLES
/* --------------------------------------------------------------------- */
$Souhaite_defiscaliser = (float) _clean_number(_request('Souhaite_defiscaliser', 5000));     /* souhaite defiscaliser */
$Montant_investissement = (float) _clean_number(_request('Montant_investissement', 180000));
$Apport = (float) _clean_number(_request('Apport', 30000));/* Apport */
$Pourcentage_scellier =25; /* pourcentage_scellier*/
$Nombre_annees_scellier = 9; /* Nombre annees scellier */
$Taux_pret_hors_assurance = (float) _clean_number(_request('Taux_pret_hors_assurance', 4.0));/* Revenu_net_imposable */
$Revenu_net_imposable = (float) _clean_number(_request('Revenu_net_imposable', 100000));/* Revenu_net_imposable */
$Revenu_foncier_declare= (float) _clean_number(_request('Revenu_foncier_declare', 50000));/* Revenu_foncier_declare */
$Nombre_parts_fiscales = (float) _clean_number(_request('Nombre_parts_fiscales', 1));/* Nb parts fiscales */
$bareme_impot1 = 321.86 * ($Nombre_parts_fiscales);/* Bareme impot 1 */
$bareme_impot2 = 1314.07 * ($Nombre_parts_fiscales);/* Bareme impot 2 */
$bareme_impot3 = 5462.23 * ($Nombre_parts_fiscales);/* Bareme impot 3 */
$bareme_impot4 = 12412.73 * ($Nombre_parts_fiscales);/* Bareme impot 14 */
$zoneA = 21.65;/* ZONE A */
$zoneB1 = 15.05;/* ZONE B1 */
$zoneB2 = 12.31;/* ZONE B2 */
$Duree =15; /* Durée du pret*/
$ADI = (float) _clean_number(_request('ADI', 0.3));/* Assurance deces invalidite */
$tauxMensuel = ($Taux_pret_hors_assurance) / 100 / 12;
$nbMois = $Duree * 12;
 
/* --------------------------------------------------------------------- */
/*ON ENVOIES LA PUREEEEEEEEE !!!!!!!!
/* --------------------------------------------------------------------- */
$Resultat_annuel_scellier = $Montant_investissement * ($pourcentage_scellier / 9);
$Resultat_total_scellier = $Montant_investissement * ($pourcentage_scellier);
$Resultat_souhaite_defiscaliser = $Souhaite_defiscaliser * 9;
$investissement_global = $Souhaite_defiscaliser * 9 * 4;
$Resultat_tranche_marginale = $Revenu_net_imposable + $Revenu_foncier_declare / $Nombre_parts_fiscales;
if ($Resultat_tranche_marginale >= 0 && $Resultat_tranche_marginale < 5853) $Resultat_tranche_marginale =0;
if ($Resultat_tranche_marginale >= 5853 && $Resultat_tranche_marginale < 11673) $Resultat_tranche_marginale =5.5;
if ($Resultat_tranche_marginale >= 11674 && $Resultat_tranche_marginale < 25926) $Resultat_tranche_marginale =14;
if ($Resultat_tranche_marginale >= 25927 && $Resultat_tranche_marginale < 69505) $Resultat_tranche_marginale =30;
if ($Resultat_tranche_marginale >= 69506 ) $Resultat_tranche_marginale =40;
if($Resultat_tranche_marginale == 5.5) $Resultat_impot_paye = ($Revenu_net_imposable + $Revenu_foncier_declare)* $Resultat_tranche_marginale / 100 - $bareme_impot1;
if($Resultat_tranche_marginale == 14) $Resultat_impot_paye = ($Revenu_net_imposable + $Revenu_foncier_declare) * $Resultat_tranche_marginale / 100 - $bareme_impot2;
if($Resultat_tranche_marginale == 30) $Resultat_impot_paye = ($Revenu_net_imposable + $Revenu_foncier_declare) * $Resultat_tranche_marginale / 100 - $bareme_impot3;
if($Resultat_tranche_marginale == 40) $Resultat_impot_paye = ($Revenu_net_imposable + $Revenu_foncier_declare) * $Resultat_tranche_marginale / 100 - $bareme_impot4;
if($investissement_global < 100000) $Frais_dossier = $investissement_global *1 / 100;
if($investissement_global >= 100000) $Frais_dossier = 1000;
if ($investissement_global >= 0 && $investissement_global < 100000) $Frais_garantie = 1000;
if ($investissement_global >= 100000 && $investissement_global < 200000) $Frais_garantie = $investissement_global * 1 /100;
if ($investissement_global >= 200000) $Frais_garantie = 2000;
$Mensualite_adi = ($Montant_investissement * $ADI) /12 / 100;
$Mensualite_hors_assurance = ($Montant_investissement * $tauxMensuel) / (1 - pow(1 + $tauxMensuel , ( -1 * $nbMois )));
?>
 
<?php
/* --------------------------------------------------------------------- */
/* DONNES FORMULAIRE
/* --------------------------------------------------------------------- */
?>
<SCRIPT LANGUAGE="Javascript" SRC="FusionCharts/FusionCharts.js"></SCRIPT><form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<table cellpadding="0" cellspacing="0" class="input">
  <tr class="<?php echo _get_background() ?>">
    <th>Je veux défiscaliser &gt;&gt;</th>
    <td><input type="text" size="12" name="Souhaite_defiscaliser" value="<?php echo _money($Souhaite_defiscaliser); ?>" />
      (Euros) 
      par An 
        <input type="submit" value="Calculer" /></td>
  </tr>
  <tr class="<?php echo _get_background() ?>">
    <th>Revenu Net Imposable</th>
    <td><input type="text" size="12" name="Revenu_net_imposable" value="<?php echo _money($Revenu_net_imposable); ?>" />
  </tr>
    <tr class="<?php echo _get_background() ?>">
    <th>Revenu Foncier déclaré</th>
    <td><input type="text" size="12" name="Revenu_foncier_declare" value="<?php echo _money($Revenu_foncier_declare); ?>" />
  </tr>
<tr class="<?php echo _get_background() ?>">
    <th>Nb parts Fiscales</th>
    <td><input type="text" size="12" name="Nombre_parts_fiscales" value="<?php echo _money($Nombre_parts_fiscales); ?>" />
  </tr>
  <tr class="<?php echo _get_background() ?>">
    <th>Apport</th>
    <td><input type="text" size="12" name="Apport" value="<?php echo _money($Apport); ?>" /></td>
  </tr>
  <tr class="<?php echo _get_background() ?>">
    <th>Frais dossier</th>
    <td><input type="text" size="12" name="Frais_dossier" value="<?php echo _money($Frais_dossier); ?>" /></td>
  </tr>
  <tr class="<?php echo _get_background() ?>">
    <th>Frais de garantie</th>
    <td><input type="text" size="12" name="Frais_garantie" value="<?php echo _money($Frais_garantie); ?>" /></td>
  </tr>
  <tr class="<?php echo _get_background() ?>">
    <th>Taux Pret HA</th>
    <td><input type="text" size="12" name="Taux_pret_hors_assurance" value="<?php echo _money($Taux_pret_hors_assurance); ?>" /></td>
  </tr>
  <tr class="<?php echo _get_background() ?>">
    <th>Dur&eacute;e</th>
    <td><input type="text" size="12" name="Duree" value="<?php echo $Duree; ?>" /></td>
  </tr>
  <tr class="<?php echo _get_background() ?>">
    <th>ADI</th>
    <td><input type="text" size="12" name="ADI" value="<?php echo _money($ADI); ?>" /></td>
  </tr>
    <th>&nbsp;</th>
      <td><input type="hidden" name="form_complete" value="1" /></td>
    </tr>
 </table>
</form>
<p><?php echo "En defiscalisant $Souhaite_defiscaliser Euros /an, soit $Resultat_souhaite_defiscaliser Euros sur $Nombre_annees_scellier ans, vous pouvez acquerir un bien à hauteur de $investissement_global  Euros. Avec un RNI de $Revenu_net_imposable Euros et $Nombre_parts_fiscales part(s) fiscales, votre tranche marginale est de $Resultat_tranche_marginale % qui correspond a un impot paye de $Resultat_impot_paye";?><?php echo "Euros";?>
 
<?php  echo "<br />";
echo "<br />";
 
echo "Revenu Foncier déclaré: $Revenu_foncier_declare euros, montant investissement $investissement_global euros, apport $Apport , frais de dossier $Frais_dossier , frais de garantie $Frais_garantie , taux du pret hors assurance $Taux_pret_hors_assurance , duree  $Duree , mensualite hors asurance $Mensualite_hors_assurance , adi $ADI , frais dossier $Frais_dossier, mensualite adi $Mensualite_adi Eur /mois";
 
?>
 
 
 
  <?php
 
/* --------------------------------------------------------------------- */
/* FONCTIONS
/* --------------------------------------------------------------------- */
 
function _money($input) {
	return number_format($input, "2", ".", ",");
 
}
 
function _get_background()
{
	static $i = 0;
	++$i;
	return ($i % 2) ? 'odd' : 'even';
}
 
function _request($key, $default=null)
{
	return (isset($_REQUEST[$key])) ? $_REQUEST[$key] : $default;
}
 
function _clean_number($input) 
{
	return (float) preg_replace('/[^0-9.]/', '', $input);
}
 
class IncompleteException extends Exception
{
}
?>
Si quelqu'un a une idée, je suis preneur ! Merci à toutes et à tous