GL Journal Update Balance Javascript Problem
Status: Beta
Brought to you by:
dcmwai
On the GL Journal Update there is a Javascript Bug for
Mozilla Browser, (There is nothing wrong on IE).
Suspect this bug is due to the Mathmatic Error.
Will try to use BCMath to compensite.
This bug need to be solve ASAP cause it will block
people to edit the wrong entried Journal.
Logged In: NO
check rounding error instead of Mozilla mathmatic. I believe it
is the rounding error because I was having it on IE as well.
Logged In: YES
user_id=402754
I don't see any rounding here. Someone please correct me
echo '<input type="submit" onClick="CheckBal()"
value="'.$lang['STR_SAVE_CHANGES'].'">';
echo '<input type="reset"
value="'.$lang['STR_RESET_VALUES'].'">';
echo '<script language="JavaScript">'."\n";
echo ' function CheckBal() {'."\n";
echo ' var numb = "0"'."\n";
for ($i=1; $i<$cntr+2; $i++) echo ' numb =
eval(numb) +
parseInt(eval(document.mainform.gltramt'.$i.'.value) *
100)'."\n";
echo ' if (numb) {'."\n";
echo ' alert("Form is not balanced. Form
is currently "+numb/100+" from being in balance.")'."\n";
echo ' } else {'."\n";
echo ' mainform.submit()'."\n";
echo ' }'."\n";
echo ' return numb'."\n";
echo ' }'."\n";
echo '</script>'."\n";
Logged In: YES
user_id=402754
Should be fixed on 0.97.5, please try/