[Weberp-svn] SF.net SVN: weberp:[4567] trunk
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2011-02-07 11:15:33
|
Revision: 4567 http://weberp.svn.sourceforge.net/weberp/?rev=4567&view=rev Author: tim_schofield Date: 2011-02-07 11:15:24 +0000 (Mon, 07 Feb 2011) Log Message: ----------- Fix javascript error when manually selecting an account code Modified Paths: -------------- trunk/Payments.php trunk/javascripts/MiscFunctions.js Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2011-02-06 18:08:34 UTC (rev 4566) +++ trunk/Payments.php 2011-02-07 11:15:24 UTC (rev 4567) @@ -870,7 +870,7 @@ ORDER BY tagref"; $result=DB_query($SQL,$db); - echo '<option value=0></option'; + echo '<option value=0></option>'; while ($myrow=DB_fetch_array($result)){ if (isset($_POST['tag']) and $_POST['tag']==$myrow["tagref"]){ echo '<option selected value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription']; @@ -884,12 +884,12 @@ /*now set up a GLCode field to select from avaialble GL accounts */ if (isset($_POST['GLManualCode'])) { echo '<tr><td>' . _('Enter GL Account Manually') . ':</td> - <td><input type=Text class="number" Name="GLManualCode" Maxlength=12 size=12 onChange="return inArray(this, this.value, GLCode.options,'. + <td><input type=Text class="number" Name="GLManualCode" Maxlength=12 size=12 onChange="inArray(this, GLCode.options,'. "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')"' . ' value='. $_POST['GLManualCode'] .' ></td></tr>'; } else { echo '<tr><td>' . _('Enter GL Account Manually') . ':</td> - <td><input type=Text class="number" Name="GLManualCode" Maxlength=12 size=12 onChange="return inArray(this, this.value, GLCode.options,'. + <td><input type=Text class="number" Name="GLManualCode" Maxlength=12 size=12 onChange="inArray(this, GLCode.options,'. "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')"></td></tr>'; } echo '<tr><td>' . _('Select GL Account') . ':</td> Modified: trunk/javascripts/MiscFunctions.js =================================================================== --- trunk/javascripts/MiscFunctions.js 2011-02-06 18:08:34 UTC (rev 4566) +++ trunk/javascripts/MiscFunctions.js 2011-02-07 11:15:24 UTC (rev 4567) @@ -18,7 +18,11 @@ i.value=c.value; } function inArray(v,tA,m){ - for (i=0;i<tA.length;i++) if (v==tA[i].value) return true; + for (i=0;i<tA.length;i++) { + if (v.value==tA[i].value) { + return true; + } + } alert(m); return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |