Hey, here's what I found out after a late night Friday. It wasn't the function, it was more the logic. Code posted for your examiation:
if (mysql_num_rows($rstPP) > 0)
{
while ($rowPP = mysql_fetch_object($rstPP))
{
//$payments[$rowPP->PPmodalityLevel] = $rowPP->SDhcpcsUnits * PUreimbAmt;
//$maxPayAmt = $rowPP->SDhcpcsUnits * PUreimbAmt;
$payments[$rowPP->PPmodalityLevel] = $rowPP->PPpayAmount;
$maxPayAmt = $rowPP->PPpayAmount;
}
}
You'll notice I had to comment this out:
//$payments[$rowPP->PPmodalityLevel] = $rowPP->SDhcpcsUnits PUreimbAmt;
//$maxPayAmt = $rowPP->SDhcpcsUnits PUreimbAmt;
And I had to revert to original code:
$payments[$rowPP->PPmodalityLevel] = $rowPP->PPpayAmount;
$maxPayAmt = $rowPP->PPpayAmount;
This was doing something where 80 in the database was pulling back 79.98. Very strange.
(If anyone really cares 🙂, this has to do with medical billing and rate caps put on a maximum number of the same service performed)
Thanks for all your help!