Edit report at https://bugs.php.net/bug.php?id=7156&edit=1
ID: 7156
Comment by: Jamesjerseys at 126 dot com
Reported by: hboveri at bancobisel dot com dot ar
Summary: equal datatypes and equal values not response in if
structure
Status: Closed
Type: Bug
Package: Unknown/Other Function
Operating System: solaris 2.7
PHP Version: 4.0.3
Block user comment: N
Private report: N
New Comment:
http://www.wholesalenfl-jersey.com/ Cheap Jerseys
Previous Comments:
------------------------------------------------------------------------
[2000-11-19 12:18:08] [email protected]
no feedback
------------------------------------------------------------------------
[2000-10-18 05:55:07] [email protected]
Could you please explain in detail what's the problem and cut down you code to
the minimal size which reproduces the problem?
------------------------------------------------------------------------
[2000-10-12 09:02:58] hboveri at bancobisel dot com dot ar
<?
// *******************
// Inicializo el ERROR
// *******************
$MSG_ERROR = "";
$cuota = 10;
$cuota_hasta = 12;
$Cobranza = "656.81";
$gHonorarios = 10;
$gcuota_vencida = "N";
$rec_cli_suc_cod = "rec_cli_suc_cod";
$rec_cli_nro_cli = "rec_cli_nro_cli";
$rec_cli_desc_cli = "rec_cli_desc_cli";
$rec_lin_codigo = "rec_lin_codigo";
$rec_lin_desc_lin = "rec_lin_desc_lin";
$rec_cuo_fec_vto = "rec_cuo_fec_vto";
$rec_pre_nro_sol = "rec_pre_nro_sol";
$rec_pre_suc_res = "rec_pre_suc_res";
$a_cobrar[1] = "596.68";
$a_cobrar[2] = "0.35";
$a_cobrar[3] = "0.07";
$a_cobrar[4] = "0.0";
$a_cobrar[5] = "0.0";
$a_cobrar[6] = "0.0";
$a_cobrar[7] = "0.0";
$a_cobrar[8] = "0.0";
$a_cobrar[9] = "0.0";
$a_cobrar[10] = "0.0";
// ****************************************
// Calculo el Total a Pagar de la CUOTA
// ****************************************
$SubTotal = 0.0;
for( $i = 1; $i <= 10; $i++ ){
$SubTotal += $a_cobrar[$i];
}
echo gettype($SubTotal) . " ($SubTotal) SubTotal <br>";
// **********************
// Calculo los honorarios
// **********************
$total_honorarios = 0.0;
$total_honorarios = $SubTotal * $gHonorarios / 100.0;
echo gettype($total_honorarios) . " ($total_honorarios) total_honorarios <br>";
// ************************
// Acumulo al Total a Pagar
// ************************
$total_a_pagar = 0;
echo( "subtotal,total_honorarios: $SubTotal + $total_honorarios<br>" );
$total_a_pagar = $SubTotal + $total_honorarios;
echo strlen($total_a_pagar) . " " . gettype($total_a_pagar) . "
($total_a_pagar) total_a_pagar <br>";
echo strlen($Cobranza) . " " . gettype($Cobranza) . " ($Cobranza)
Cobranza <br>";
settype( $Cobranza, "double" );
echo strlen($total_a_pagar) . " " . gettype($total_a_pagar) . "
($total_a_pagar) total_a_pagar <br>";
echo strlen($Cobranza) . " " . gettype($Cobranza) . " ($Cobranza)
Cobranza <br>";
// --------------------------------------------------------------------
// this is the cuestion !!!
if( $Cobranza >= $total_a_pagar ) {
// --------------------------------------------------------------------
echo "<br>ok";
} else {
echo "<br>error";
}
?>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=7156&edit=1