Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GLJournal.php - account code does not exist error
01-26-2012, 10:34 PM,
GLJournal.php - account code does not exist error

There is an error on the journal entry page - when GL account code entered in the box, on the leave (Tab) system says "The account code XXX doesnt exist" although account does exist. After click OK it goes further and at the end the journal processes without problem.
It's a minor bug but could save a lot of time in journal entry.

01-27-2012, 05:29 PM, (This post was last modified: 01-27-2012, 05:30 PM by phil.)
RE: GLJournal.php - account code does not exist error
Oh dear me yes ... a javascript problem ....
I believe the error lies in this code - line 321 - :

echo '<td><input class="number" type="text" name="GLManualCode" maxlength="12" size="12" onChange="inArray(this.value, GLCode.options,'.    "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')" value="'. $_POST['GLManualCode'] .'"  /></td>';

$sql="SELECT accountcode,
        FROM chartmaster
        ORDER BY accountcode";

$result=DB_query($sql, $db);
echo '<td><select name="GLCode" onChange="return assignComboToInput(this,'.'GLManualCode'.')">';
echo '<option value="">' . _('Select a general ledger account code') . '</option>';
while ($myrow=DB_fetch_array($result)){
    if (isset($_POST['tag']) and $_POST['tag']==$myrow['accountcode']){
        echo '<option selected="selected" value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'].' - ' .htmlentities($myrow['accountname'], ENT_QUOTES,'UTF-8') . '</option>';
    } else {
        echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'].' - ' .htmlentities($myrow['accountname'], ENT_QUOTES,'UTF-8') .'</option>';
echo '</select></td>';

Needs a javascript person to figure out if GLCode.options will return the array of options from the GLCode select box. It seems it doesn't
Phil Daintree
webERP Admin
Logic Works Ltd
01-30-2012, 06:40 PM,
RE: GLJournal.php - account code does not exist error
Great! Thanks!
It's working now.

Forum Jump:

Users browsing this thread: 1 Guest(s)