Thread: [Weberp-svn] SF.net SVN: weberp:[5232] trunk (Page 5)
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2011-04-25 11:01:59
|
Revision: 5232 http://weberp.svn.sourceforge.net/weberp/?rev=5232&view=rev Author: tim_schofield Date: 2011-04-25 11:01:53 +0000 (Mon, 25 Apr 2011) Log Message: ----------- Fix credit note entry for non stock items Modified Paths: -------------- trunk/PO_Header.php trunk/SupplierCredit.php trunk/includes/PO_ReadInOrder.inc Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-04-24 18:40:25 UTC (rev 5231) +++ trunk/PO_Header.php 2011-04-25 11:01:53 UTC (rev 5232) @@ -829,9 +829,9 @@ echo '<tr><td>' . _('Status Comment') . ':</td> <td><input type=text name="StatusComments" size=50></td></tr> - <tr><td colspan=2><b>' . $_SESSION['PO'.$identifier]->StatComments .'</b></td></tr>'; + <tr><td colspan=2><b>' . addslashes($_SESSION['PO'.$identifier]->StatComments) .'</b></td></tr>'; //need to use single quotes as double quotes inside the string of StatusComments - echo '<input type="hidden" name="StatusCommentsComplete" value="' . $_SESSION['PO'.$identifier]->StatComments .'">'; + echo '<input type="hidden" name="StatusCommentsComplete" value=\'' . addslashes($_SESSION['PO'.$identifier]->StatComments) .'\' />'; echo '<tr><td><input type="submit" name="UpdateStatus" value="' . _('Status Update') .'"></td>'; echo '</tr></table></td>'; Modified: trunk/SupplierCredit.php =================================================================== --- trunk/SupplierCredit.php 2011-04-24 18:40:25 UTC (rev 5231) +++ trunk/SupplierCredit.php 2011-04-25 11:01:53 UTC (rev 5232) @@ -481,10 +481,11 @@ echo '<table class=selection><tr><td><font color=red>' . _('Credit Amount in Supplier Currency') . ':</font></td> <td colspan=2 class=number>' . number_format($_SESSION['SuppTrans']->OvAmount,2) . '</td></tr>'; + echo '<input type=hidden name="OvAmount" VALUE="' . number_format($_SESSION['SuppTrans']->OvAmount,2) . '">'; } else { echo '<table class=selection><tr><td><font color=red>' . _('Credit Amount in Supplier Currency') . ':</font></td> - <td colspan=2 class=number><input type=TEXT size="12" maxlength="10" name="OvAmount" VALUE=' . number_format($_SESSION['SuppTrans']->OvAmount,2) . '></td></tr>'; + <td colspan=2 class=number><input type=TEXT size="12" maxlength="10" name="OvAmount" VALUE="' . number_format($_SESSION['SuppTrans']->OvAmount,2) . '"></td></tr>'; } echo '<tr><td colspan=2><input type=Submit name="ToggleTaxMethod" VALUE="' . _('Change Tax Calculation Method') . @@ -809,7 +810,7 @@ $DbgMsg = _('The following SQL to insert the GL transaction was used'); - $Result = DB_query($SQL, $db, $ErrMsg, $Dbg, True); + $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, True); } @@ -967,7 +968,7 @@ $GLCode = $EnteredGRN->GLCode; //by default - if ($EnteredGRN->AssetID!=0) { //then it is an asset + if ($EnteredGRN->AssetID>0) { //then it is an asset /*Need to get the asset details for posting */ $result = DB_query("SELECT costact Modified: trunk/includes/PO_ReadInOrder.inc =================================================================== --- trunk/includes/PO_ReadInOrder.inc 2011-04-24 18:40:25 UTC (rev 5231) +++ trunk/includes/PO_ReadInOrder.inc 2011-04-25 11:01:53 UTC (rev 5232) @@ -214,6 +214,10 @@ $myrow2=DB_fetch_array($PurchDataResult); $myrow2['conversionfactor']=1; } + if ($StockID=='') { + $myrow2['unitname']=''; + $myrow2['suppliers_partno']=''; + } $_SESSION['PO'.$identifier]->add_to_order($_SESSION['PO'.$identifier]->LinesOnOrder+1, $StockID, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-05-07 21:34:44
|
Revision: 5256 http://weberp.svn.sourceforge.net/weberp/?rev=5256&view=rev Author: tim_schofield Date: 2011-05-07 21:34:37 +0000 (Sat, 07 May 2011) Log Message: ----------- Ricard - Updates to petty cash system Modified Paths: -------------- trunk/PcAssignCashToTab.php trunk/PcAuthorizeExpenses.php trunk/PcTabs.php Modified: trunk/PcAssignCashToTab.php =================================================================== --- trunk/PcAssignCashToTab.php 2011-05-07 21:33:14 UTC (rev 5255) +++ trunk/PcAssignCashToTab.php 2011-05-07 21:34:37 UTC (rev 5256) @@ -94,7 +94,7 @@ '" . $_POST['Notes'] . "', '" . $_POST['Receipt'] . "' )"; - $msg = _('Assignment of cash to PC Tab ') . ' ' . $_POST['SelectedTabs'] . ' ' . _('has been created'); + $msg = _('Assignment of cash to PC Tab ') . ' ' . $_POST["SelectedTabs"] . ' ' . _('has been created'); } if ( $InputError !=1) { @@ -128,26 +128,27 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $title. '</p>'; - echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; + echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p><table class=selection>'; //Main table - echo '<tr><td>' . _('Petty Cash Tab To Assign Cash') . ':</td><td><select name="SelectedTabs">'; + echo '<tr><td>' . _('Petty Cash Tab To Assign Cash') . ":</td><td><select name='SelectedTabs'>"; DB_free_result($result); $SQL = "SELECT tabcode FROM pctabs - WHERE authorizer='" . $_SESSION['UserID'] . "' + WHERE assigner ='" . $_SESSION['UserID'] . "' ORDER BY tabcode"; $result = DB_query($SQL,$db); while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectTabs']) and $myrow['tabcode']==$_POST['SelectTabs']) { - echo '<option selected value="' . $myrow['tabcode'] . '">' . $myrow['tabcode'] . '</option>'; + echo "<option selected value='"; } else { - echo '<option value="' . $myrow['tabcode'] . '">' . $myrow['tabcode'] . '</option>'; + echo "<option value='"; } + echo $myrow['tabcode'] . "'>" . $myrow['tabcode']; } echo '</select></td></tr>'; @@ -174,6 +175,20 @@ unset($_POST['Receipt']); } +/* $sql = "SELECT pcashdetails.date, + pcashdetails.codeexpense, + pcexpenses.description + pcashdetails.amount, + pcashdetails.authorized, + pcashdetails.posted, + pcashdetails.notes, + pcashdetails.receipt + FROM pcashdetails, pcexpenses + WHERE pcashdetails.tabcode='$SelectedTabs' + AND pcashdetails.codeexpense = pcexpenses.codeexpense + AND pcashdetails.date >=DATE_SUB(CURDATE(), INTERVAL ".$Days." DAY) + ORDER BY pcashdetails.counterindex Asc"; +*/ if(!isset ($Days)){ $Days=30; } @@ -186,21 +201,21 @@ $result = DB_query($sql,$db); echo '<table class=selection>'; - echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; + echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<tr><th colspan=8>' . _('Detail Of PC Tab Movements For Last ') .': '; - echo '<input type=hidden name="SelectedTabs" value="' . $SelectedTabs . '">'; - echo '<input type=text class=number name="Days" value="' . $Days . '" maxlength =3 size=4> Days '; + echo "<tr><th colspan=8>" . _('Detail Of PC Tab Movements For Last ') .': '; + echo "<input type=hidden name='SelectedTabs' value=" . $SelectedTabs . ">"; + echo "<input type=text class=number name='Days' value=" . $Days . " maxlength =3 size=4> Days "; echo '<input type=submit name="Go" value="' . _('Go') . '">'; echo '</th></tr></form>'; - echo '<tr> - <th>' . _('Date') . '</th> - <th>' . _('Expense Code') . '</th> - <th>' . _('Amount') . '</th> - <th>' . _('Authorised') . '</th> - <th>' . _('Notes') . '</th> - <th>' . _('Receipt') . '</th> - </tr>'; + echo "<tr> + <th>" . _('Date') . "</th> + <th>" . _('Expense Code') . "</th> + <th>" . _('Amount') . "</th> + <th>" . _('Authorised') . "</th> + <th>" . _('Notes') . "</th> + <th>" . _('Receipt') . "</th> + </tr>"; $k=0; //row colour counter @@ -224,25 +239,29 @@ $Description['0']='ASSIGNCASH'; } - if (($myrow['authorized'] == '0000-00-00') and ($Description['0'] == 'ASSIGNCASH')){ + if (($myrow['authorized'] == "0000-00-00") and ($Description['0'] == 'ASSIGNCASH')){ // only cash assignations NOT authorized can be modified or deleted - echo '<td>'.ConvertSQLDate($myrow['date']).'</td> - <td>'.$Description['0'].'</td> - <td class=number>'.number_format($myrow['amount'],2).'</td> - <td>'.ConvertSQLDate($myrow['authorized']).'</td> - <td>'.$myrow['notes'].'</td> - <td>'.$myrow['receipt'].'</td> - <td><a href="'.$_SERVER['PHP_SELF'] . '?SelectedIndex='.$myrow['counterindex'].'&SelectedTabs=' . $SelectedTabs . '&Days=' . $Days . '&edit=yes">' . _('Edit') . '</td> - <td><a href="'.$_SERVER['PHP_SELF'] . '?SelectedIndex='.$myrow['counterindex'].'&SelectedTabs=' . $SelectedTabs . '&Days=' . $Days . '&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this code and the expense it may have set up?') . '");\'>' . _('Delete') . '</td> - </tr>'; + echo "<td>".ConvertSQLDate($myrow['date'])."</td> + <td>".$Description['0']."</td> + <td class=number>".number_format($myrow['amount'],2)."</td> + <td>".ConvertSQLDate($myrow['authorized'])."</td> + <td>".$myrow['notes']."</td> + <td>".$myrow['receipt']."</td> + <td><a href='".$_SERVER['PHP_SELF'] . '?' . SID ."SelectedIndex=".$myrow['counterindex']."&SelectedTabs=" . + $SelectedTabs . "&Days=" . $Days . "&edit=yes'>" . _('Edit') . "</td> + <td><a href='".$_SERVER['PHP_SELF'] . '?' . SID ."SelectedIndex=".$myrow['counterindex']."&SelectedTabs=" . + $SelectedTabs . "&Days=" . $Days . "&delete=yes' onclick=\"return confirm('" . + _('Are you sure you wish to delete this code and the expense it may have set up?') . "');\">" . + _('Delete') . "</td> + </tr>"; }else{ - echo '<td>'.ConvertSQLDate($myrow['date']).'</td> - <td>'.$Description['0'].'</td> - <td class=number>'.number_format($myrow['amount'],2).'</td> - <td>'.ConvertSQLDate($myrow['authorized']).'</td> - <td>'.$myrow['notes'].'</td> - <td>'.$myrow['receipt'].'</td> - </tr>'; + echo "<td>".ConvertSQLDate($myrow['date'])."</td> + <td>".$Description['0']."</td> + <td class=number>".number_format($myrow['amount'],2)."</td> + <td>".ConvertSQLDate($myrow['authorized'])."</td> + <td>".$myrow['notes']."</td> + <td>".$myrow['receipt']."</td> + </tr>"; } } //END WHILE LIST LOOP @@ -271,13 +290,13 @@ $Amount['0']=0; } - echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; + echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p><table class=selection>'; //Main table if (isset($_GET['SelectedIndex'])) { - echo '<tr><th colspan=2><font color=blue size=3>'._('Update Cash Assignment').'</font></th></tr>'; + echo "<tr><th colspan=2><font color=blue size=3>"._('Update Cash Assignment')."</font></th></tr>"; } else { - echo '<tr><th colspan=2><font color=blue size=3>'._('New Cash Assignment').'</font></th></tr>'; + echo "<tr><th colspan=2><font color=blue size=3>"._('New Cash Assignment')."</font></th></tr>"; } if ( isset($_GET['edit'])) { @@ -293,18 +312,18 @@ $_POST['Notes'] = $myrow['notes']; $_POST['Receipt'] = $myrow['receipt']; - echo '<input type=hidden name="SelectedTabs" value="' . $SelectedTabs . '">'; - echo '<input type=hidden name="SelectedIndex" value="' . $SelectedIndex. '">'; - echo '<input type=hidden name="CurrentAmount" value="' . $Amount[0]. '">'; - echo '<input type=hidden name="Days" value="' .$Days. '">'; + echo "<input type=hidden name='SelectedTabs' value=" . $SelectedTabs . ">"; + echo "<input type=hidden name='SelectedIndex' value=" . $SelectedIndex. ">"; + echo "<input type=hidden name='CurrentAmount' value=" . $Amount[0]. ">"; + echo "<input type=hidden name='Days' value=" .$Days. ">"; } /* Ricard: needs revision of this date initialization */ if (!isset($_POST['Date'])) { - $_POST['Date']=Date('d/m/Y'); + $_POST['Date']=Date("d/m/Y"); } - echo '<tr><td>' . _('Cash Assignation Date') . ':</td>'; + echo '<tr><td>' . _('Cash Assignation Date') . ":</td>"; echo '<td><input type=text class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="Date" size=10 maxlength=10 value=' . $_POST['Date'] . '></td></tr>'; @@ -313,23 +332,23 @@ $_POST['Amount']=0; } - echo '<tr><td>' . _('Amount') . ':</td><td><input type="Text" class="number" name="Amount" size="12" maxlength="11" value="' . $_POST['Amount'] . '"></td></tr>'; + echo "<tr><td>" . _('Amount') . ":</td><td><input type='Text' class='number' name='Amount' size='12' maxlength='11' value='" . $_POST['Amount'] . "'></td></tr>"; if (!isset($_POST['Notes'])) { $_POST['Notes']=''; } - echo '<tr><td>' . _('Notes') . ':</td><td><input type="Text" name="Notes" size=50 maxlength=49 value="' . $_POST['Notes'] . '"></td></tr>'; + echo "<tr><td>" . _('Notes') . ":</td><td><input type='Text' name='Notes' size=50 maxlength=49 value='" . $_POST['Notes'] . "'></td></tr>"; if (!isset($_POST['Receipt'])) { $_POST['Receipt']=''; } - echo '<tr><td>' . _('Receipt') . ':</td><td><input type="Text" name="Receipt" size=50 maxlength=49 value="' . $_POST['Receipt'] . '"></td></tr>'; + echo "<tr><td>" . _('Receipt') . ":</td><td><input type='Text' name='Receipt' size=50 maxlength=49 value='" . $_POST['Receipt'] . "'></td></tr>"; - echo '<input type=hidden name="CurrentAmount" value="' . $Amount['0']. '">'; - echo '<input type=hidden name="SelectedTabs" value="' . $SelectedTabs . '">'; - echo '<input type=hidden name="Days" value="' .$Days. '">'; + echo "<input type=hidden name='CurrentAmount' value=" . $Amount['0']. ">"; + echo "<input type=hidden name='SelectedTabs' value=" . $SelectedTabs . ">"; + echo "<input type=hidden name='Days' value=" .$Days. ">"; echo '</td></tr></table>'; // close main table Modified: trunk/PcAuthorizeExpenses.php =================================================================== --- trunk/PcAuthorizeExpenses.php 2011-05-07 21:33:14 UTC (rev 5255) +++ trunk/PcAuthorizeExpenses.php 2011-05-07 21:34:37 UTC (rev 5256) @@ -41,16 +41,16 @@ } if (isset($_POST['submit']) or isset($_POST['update']) OR isset($SelectedTabs) OR isset ($_POST['GO'])) { - echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; + echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if(!isset ($Days)){ $Days=30; } - echo '<input type=hidden name="SelectedTabs" VALUE="' . $SelectedTabs . '">'; + echo "<input type=hidden name='SelectedTabs' VALUE=" . $SelectedTabs . ">"; echo '<br><table class=selection>'; - echo '<tr><th colspan=7>' . _('Detail Of Movement For Last ') .': '; - echo '<input type=text class=number name="Days" VALUE="' . $Days . '" MAXLENGTH =3 size=4> Days '; + echo "<tr><th colspan=7>" . _('Detail Of Movement For Last ') .': '; + echo "<input type=text class=number name='Days' VALUE=" . $Days . " MAXLENGTH =3 size=4> Days "; echo '<input type=submit name="Go" value="' . _('Go') . '"></tr></th>'; echo '</form>'; @@ -77,15 +77,15 @@ $result = DB_query($sql,$db); - echo '<tr> - <th>' . _('Date') . '</th> - <th>' . _('Expense Code') . '</th> - <th>' . _('Amount') . '</th> - <th>' . _('Posted') . '</th> - <th>' . _('Notes') . '</th> - <th>' . _('Receipt') . '</th> - <th>' . _('Authorized') . '</th> - </tr>'; + echo "<tr> + <th>" . _('Date') . "</th> + <th>" . _('Expense Code') . "</th> + <th>" . _('Amount') . "</th> + <th>" . _('Posted') . "</th> + <th>" . _('Notes') . "</th> + <th>" . _('Receipt') . "</th> + <th>" . _('Authorized') . "</th> + </tr>"; $k=0; //row colour counter echo'<form action="PcAuthorizeExpenses.php" method="POST" name="'._('update').'">'; @@ -94,7 +94,7 @@ while ($myrow=DB_fetch_array($result)) { //update database if update pressed - if ((isset($_POST['submit']) and $_POST['submit']==_('Update')) AND isset($_POST[$myrow['counterindex']])){ + if ((isset($_POST['submit']) and $_POST['submit']=='Update') AND isset($_POST[$myrow['counterindex']])){ $PeriodNo = GetPeriod(ConvertSQLDate($myrow['date']), $db); @@ -124,7 +124,7 @@ $typeno = GetNextTransNo($type,$db); //build narrative - $narrative= "PettyCash - ".$myrow['tabcode']." - ".$myrow['codeexpense']." - ". DB_escape_string($myrow['notes'])." - ".$myrow['receipt'].""; + $narrative= "PettyCash - ".$myrow['tabcode']." - ".$myrow['codeexpense']." - ".$myrow['notes']." - ".$myrow['receipt'].""; //insert to gltrans DB_Txn_Begin($db); @@ -248,27 +248,43 @@ } } - echo '<input type=hidden name="SelectedIndex" VALUE="' . $myrow['counterindex']. '">'; - echo '<input type=hidden name="SelectedTabs" VALUE="' . $SelectedTabs . '">'; - echo '<input type=hidden name="Days" VALUE="' .$Days. '">'; + echo "<input type=hidden name='SelectedIndex' VALUE=" . $myrow['counterindex']. ">"; + echo "<input type=hidden name='SelectedTabs' VALUE=" . $SelectedTabs . ">"; + echo "<input type=hidden name='Days' VALUE=" .$Days. ">"; echo' </tr> '; } //end of looping + $sqlamount="SELECT sum(amount) + FROM pcashdetails + WHERE tabcode='".$SelectedTabs."'"; + + $ResultAmount = DB_query($sqlamount,$db); + $Amount=DB_fetch_array($ResultAmount); + + if (!isset($Amount['0'])) { + $Amount['0']=0; + } + + echo "<tr><td colspan=4 style=text-align:right >" . _('Current balance') . ":</td> + <td colspan=2>".number_format($Amount['0'],2)."</td></tr>"; + + + // Do the postings include ('includes/GLPostings.inc'); - echo'<tr><td style="text-align:right" colspan=4><input type=submit name=submit value=' . _('Update') . '></td></tr></form>'; + echo'<tr><td style="text-align:right" colspan=4><input type=submit name=submit value=' . _("Update") . '></td></tr></form>'; } else { /*The option to submit was not hit so display form */ -echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; +echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p><table class=selection>'; //Main table -echo '<tr><td>' . _('Authorize expenses to Petty Cash Tab') . ':</td><td><select name="SelectedTabs">'; +echo '<tr><td>' . _('Authorize expenses to Petty Cash Tab') . ":</td><td><select name='SelectedTabs'>"; DB_free_result($result); $SQL = "SELECT tabcode @@ -279,10 +295,11 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectTabs']) and $myrow['tabcode']==$_POST['SelectTabs']) { - echo '<option selected VALUE="' . $myrow['tabcode'] . '">' . $myrow['tabcode'] . '</option>'; + echo "<option selected VALUE='"; } else { - echo '<option VALUE="' . $myrow['tabcode'] . '">' . $myrow['tabcode'] . '</option>'; + echo "<option VALUE='"; } + echo $myrow['tabcode'] . "'>" . $myrow['tabcode']; } //end while loop get type of tab Modified: trunk/PcTabs.php =================================================================== --- trunk/PcTabs.php 2011-05-07 21:33:14 UTC (rev 5255) +++ trunk/PcTabs.php 2011-05-07 21:34:37 UTC (rev 5256) @@ -1,6 +1,8 @@ <?php /* $Id$ */ +//$PageSecurity = 15; + include('includes/session.inc'); $title = _('Maintenance Of Petty Cash Tabs'); include('includes/header.inc'); @@ -31,12 +33,12 @@ //first off validate inputs sensible $i=1; - if ($_POST['TabCode']=='' OR $_POST['TabCode']==' ' OR $_POST['TabCode']==' ') { + if ($_POST['tabcode']=='' OR $_POST['tabcode']==' ' OR $_POST['tabcode']==' ') { $InputError = 1; - prnMsg('<br />' . _('The Tab code cannot be an empty string or spaces'),'error'); + prnMsg('<br>' . _('The Tab code cannot be an empty string or spaces'),'error'); $Errors[$i] = 'TabCode'; $i++; - } elseif (strlen($_POST['TabCode']) >20) { + } elseif (strlen($_POST['tabcode']) >20) { $InputError = 1; echo prnMsg(_('The Tab code must be twenty characters or less long'),'error'); $Errors[$i] = 'TabCode'; @@ -46,30 +48,31 @@ if (isset($SelectedTab) AND $InputError !=1) { $sql = "UPDATE pctabs - SET usercode = '" . $_POST['SelectUser'] . "', - typetabcode = '" . $_POST['SelectTabs'] . "', - currency = '" . $_POST['SelectCurrency'] . "', - tablimit = '" . $_POST['TabLimit'] . "', - authorizer = '" . $_POST['SelectAuthorizer'] . "', - glaccountassignment = '" . $_POST['glaccountcash'] . "', - glaccountpcash = '" . $_POST['GLAccountPcashTab'] . "' - WHERE tabcode = '".$SelectedTab."'"; + SET usercode = '" . $_POST['SelectUser'] . "', + typetabcode = '" . $_POST['SelectTabs'] . "', + currency = '" . $_POST['SelectCurrency'] . "', + tablimit = '" . $_POST['tablimit'] . "', + assigner = '" . $_POST['SelectAssigner'] . "', + authorizer = '" . $_POST['SelectAuthorizer'] . "', + glaccountassignment = '" . $_POST['glaccountcash'] . "', + glaccountpcash = '" . $_POST['glaccountpcashtab'] . "' + WHERE tabcode = '".$SelectedTab."'"; - $msg = _('The Tabs Of Code') . ' ' . $SelectedTab . ' ' . _('has been updated'); + $msg = _('The Petty Cash Tab') . ' ' . $SelectedTab . ' ' . _('has been updated'); } elseif ( $InputError !=1 ) { // First check the type is not being duplicated $checkSql = "SELECT count(*) - FROM pctabs - WHERE tabcode = '" . $_POST['TabCode'] . "'"; + FROM pctabs + WHERE tabcode = '" . $_POST['tabcode'] . "'"; $checkresult = DB_query($checkSql,$db); $checkrow = DB_fetch_row($checkresult); if ( $checkrow[0] > 0 ) { $InputError = 1; - prnMsg( _('The Tab ') . $_POST['TabCode'] . _(' already exist.'),'error'); + prnMsg( _('The Tab ') . $_POST['tabcode'] . _(' already exist.'),'error'); } else { // Add new record on submit @@ -80,19 +83,21 @@ typetabcode, currency, tablimit, + assigner, authorizer, glaccountassignment, glaccountpcash) - VALUES ('" . $_POST['TabCode'] . "', + VALUES ('" . $_POST['tabcode'] . "', '" . $_POST['SelectUser'] . "', '" . $_POST['SelectTabs'] . "', '" . $_POST['SelectCurrency'] . "', - '" . $_POST['TabLimit'] . "', + '" . $_POST['tablimit'] . "', + '" . $_POST['SelectAssigner'] . "', '" . $_POST['SelectAuthorizer'] . "', '" . $_POST['glaccountcash'] . "', - '" . $_POST['GLAccountPcashTab'] . "')"; + '" . $_POST['glaccountpcashtab'] . "')"; - $msg = _('Tab with Code ') . ' ' . $_POST['TabCode'] . ' ' . _('has been created'); + $msg = _('The Petty Cash Tab') . ' ' . $_POST["tabcode"] . ' ' . _('has been created'); } } @@ -101,14 +106,16 @@ //run the SQL from either of the above possibilites $result = DB_query($sql,$db); prnMsg($msg,'success'); + unset($SelectedTab); unset($_POST['SelectUser'] ); unset($_POST['SelectTabs']); unset($_POST['SelectCurrency']); - unset($_POST['TabLimit']); + unset($_POST['tablimit']); + unset($_POST['SelectAssigner']); unset($_POST['SelectAuthorizer']); unset($_POST['glaccountcash']); - unset($_POST['GLAccountPcashTab']); + unset($_POST['glaccountpcashtab']); } @@ -118,7 +125,8 @@ $sql="DELETE FROM pctabs WHERE tabcode='".$SelectedTab."'"; $ErrMsg = _('The Tab record could not be deleted because'); $result = DB_query($sql,$db,$ErrMsg); - prnMsg(_('Tab type') . ' ' . $SelectedTab . ' ' . _('has been deleted') ,'success'); + prnMsg(_('The Petty Cash Tab') . ' ' . $SelectedTab . ' ' . _('has been deleted') ,'success'); + unset ($SelectedTab); unset($_GET['delete']); } @@ -130,29 +138,23 @@ links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ - $sql = "SELECT tabcode, - usercode, - typetabcode, - currency, - tablimit, - authorizer, - glaccountassignment, - glaccountpcash - FROM pctabs - ORDER BY tabcode"; + $sql = "SELECT * + FROM pctabs + ORDER BY tabcode"; $result = DB_query($sql,$db); - echo '<br /><table class=selection>'; - echo '<tr> - <th>' . _('Tab Code') . '</th> - <th>' . _('User Name') . '</th> - <th>' . _('Type Of Tab') . '</th> - <th>' . _('Currency') . '</th> - <th>' . _('Limit') . '</th> - <th>' . _('Authorizer') . '</th> - <th>' . _('GL Account For Cash Assignment') . '</th> - <th>' . _('GL Account Petty Cash Tab') . '</th> - </tr>'; + echo '<br><table class=selection>'; + echo "<tr> + <th>" . _('Tab Code') . "</th> + <th>" . _('User Name') . "</th> + <th>" . _('Type Of Tab') . "</th> + <th>" . _('Currency') . "</th> + <th>" . _('Limit') . "</th> + <th>" . _('Assigner') . "</th> + <th>" . _('Authorizer') . "</th> + <th>" . _('GL Account For Cash Assignment') . "</th> + <th>" . _('GL Account Petty Cash Tab') . "</th> + </tr>"; $k=0; //row colour counter @@ -167,20 +169,20 @@ $sqldes="SELECT accountname FROM chartmaster - WHERE accountcode='". $myrow[6] . "'"; + WHERE accountcode='". $myrow['glaccountassignment'] . "'"; $ResultDes = DB_query($sqldes,$db); $Description=DB_fetch_array($ResultDes); $sqlname="SELECT accountname FROM chartmaster - WHERE accountcode='". $myrow[7] . "'"; + WHERE accountcode='". $myrow['glaccountpcash'] . "'"; $ResultName = DB_query($sqlname,$db); $DescriptionName=DB_fetch_array($ResultName); - printf('<td>%s</td> + printf("<td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -188,19 +190,21 @@ <td>%s</td> <td>%s</td> <td>%s</td> - <td><a href="%sSelectedTab=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedTab=%s&delete=yes" onclick="return confirm("' . _('Are you sure you wish to delete this code and all the description it may have set up?') . '");">' . _('Delete') . '</td> - </tr>', + <td>%s</td> + <td><a href='%sSelectedTab=%s'>" . _('Edit') . "</td> + <td><a href='%sSelectedTab=%s&delete=yes' onclick=\"return confirm('" . _('Are you sure you wish to delete this code and all the description it may have set up?') . "');\">" . _('Delete') . "</td> + </tr>", $myrow['tabcode'], $myrow['usercode'], $myrow['typetabcode'], $myrow['currency'], number_format($myrow['tablimit'],2), $myrow['authorizer'], + $myrow[6], $myrow['glaccountassignment'].' - '.$Description[0], $myrow['glaccountpcash'].' - '.$DescriptionName[0], - $_SERVER['PHP_SELF'] . '?' , $myrow['tabcode'], - $_SERVER['PHP_SELF'] . '?' , $myrow['tabcode']); + $_SERVER['PHP_SELF'] . '?' . SID, $myrow['tabcode'], + $_SERVER['PHP_SELF'] . '?' . SID, $myrow['tabcode']); } //END WHILE LIST LOOP echo '</table>'; @@ -209,11 +213,11 @@ //end of ifs and buts! if (isset($SelectedTab)) { - echo '<p><div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Show All Tabs Defined') . '</a></div><p>'; + echo '<p><div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '">' . _('Show All Petty Cash Tabs Defined') . '</a></div><p>'; } if (!isset($_GET['delete'])) { - echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; + echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p><table class=selection>'; //Main table @@ -226,30 +230,30 @@ $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); - $_POST['TabCode'] = $myrow['tabcode']; + $_POST['tabcode'] = $myrow['tabcode']; $_POST['SelectUser'] = $myrow['usercode']; $_POST['SelectTabs'] = $myrow['typetabcode']; $_POST['SelectCurrency'] = $myrow['currency']; - $_POST['TabLimit'] = $myrow['tablimit']; + $_POST['tablimit'] = $myrow['tablimit']; + $_POST['SelectAssigner'] = $myrow['assigner']; $_POST['SelectAuthorizer'] = $myrow['authorizer']; $_POST['glaccountcash'] = $myrow['glaccountassignment']; - $_POST['GLAccountPcashTab'] = $myrow['glaccountpcash']; + $_POST['glaccountpcashtab'] = $myrow['glaccountpcash']; - echo '<input type=hidden name="SelectedTab" value="' . $SelectedTab . '">'; - echo '<input type=hidden name="TabCode" value="' . $_POST['TabCode']. '">'; - echo '<table class="selection"> <tr><td>' . _('Tab Code') . ':</td><td>'; + echo "<input type=hidden name='SelectedTab' VALUE=" . $SelectedTab . ">"; + echo "<input type=hidden name='tabcode' VALUE=" . $_POST['tabcode']. ">"; + echo "<table class=selection> <tr><td>" . _('Tabcode') . ":</td><td>"; - // We dont allow the user to change an existing type code + // We dont allow the user to change an existing tab code - echo $_POST['TabCode'] . '</td></tr>'; + echo $_POST['tabcode'] . '</td></tr>'; } else { - // This is a new type so the user may volunteer a type code - echo '<table class="selection"> - <tr><td>' . _('Tab Code') . ':</td> - <td><input type="Text"' . (in_array('TypeTabCode',$Errors) ? 'class="inputerror"' : '' ) .' name="TabCode"></td></tr>'; + // This is a new tab so the user may volunteer a tab code + echo "<table class=selection><tr><td>" . _('Tabcode') . ":</td><td><input type='Text' + " . (in_array('TypeTabCode',$Errors) ? 'class="inputerror"' : '' ) ." name='tabcode'></td></tr>"; } @@ -257,7 +261,7 @@ $_POST['typetabdescription']=''; } - echo '<tr><td>' . _('User Name') . ':</td><td><select name="SelectUser">'; + echo '<tr><td>' . _('User Name') . ":</td><td><select name='SelectUser'>"; DB_free_result($result); $SQL = "SELECT userid @@ -267,16 +271,17 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectUser']) and $myrow['userid']==$_POST['SelectUser']) { - echo '<option selected VALUE="' . $myrow['userid'] . '">' . $myrow['userid'] . '</option>'; + echo "<option selected VALUE='"; } else { - echo '<option VALUE="' . $myrow['userid'] . '">' . $myrow['userid'] . '</option>'; + echo "<option VALUE='"; } + echo $myrow['userid'] . "'>" . $myrow['userid']; } //end while loop get user echo '</select></td></tr>'; - echo '<tr><td>' . _('Type Of Tab') . ':</td><td><select name="SelectTabs">'; + echo '<tr><td>' . _('Type Of Tab') . ":</td><td><select name='SelectTabs'>"; DB_free_result($result); $SQL = "SELECT typetabcode FROM pctypetabs ORDER BY typetabcode"; @@ -285,43 +290,43 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectTabs']) and $myrow['typetabcode']==$_POST['SelectTabs']) { - echo '<option selected VALUE="' . $myrow['typetabcode'] . '">' . $myrow['typetabcode'] . '</option>'; + echo "<option selected VALUE='"; } else { - echo '<option VALUE="' . $myrow['typetabcode'] . '">' . $myrow['typetabcode'] . '</option>'; + echo "<option VALUE='"; } + echo $myrow['typetabcode'] . "'>" . $myrow['typetabcode']; } //end while loop get type of tab echo '</select></td></tr>'; - echo '<tr><td>' . _('Currency') . ':</td><td><select name="SelectCurrency">'; + echo '<tr><td>' . _('Currency') . ":</td><td><select name='SelectCurrency'>"; DB_free_result($result); - $SQL = "SELECT currency, - currabrev - FROM currencies"; + $SQL = "SELECT currency,currabrev + FROM currencies"; $result = DB_query($SQL,$db); while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectCurrency']) and $myrow['currabrev']==$_POST['SelectCurrency']) { - echo '<option selected VALUE="' . $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; + echo "<option selected VALUE='"; } else { - echo '<option VALUE="' . $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; + echo "<option VALUE='"; } + echo $myrow['currabrev'] . "'>" . $myrow['currency']; } //end while loop get type of tab echo '</select></td></tr>'; - if (!isset($_POST['TabLimit'])) { - $_POST['TabLimit']=0; + if (!isset($_POST['tablimit'])) { + $_POST['tablimit']=0; } - echo '<tr><td>' . _('Limit Of Tab') . ':</td> - <td><input type="Text" class="number" name="TabLimit" size="12" maxlength="11" value="' . $_POST['TabLimit'] . '"></td></tr>'; + echo "<tr><td>" . _('Limit Of Tab') . ":</td><td><input type='Text' class='number' name='tablimit' size='12' maxlength='11' value='" . $_POST['tablimit'] . "'></td></tr>"; - echo '<tr><td>' . _('Authorizer') . ':</td><td><select name="SelectAuthorizer">'; + echo '<tr><td>' . _('Cash Assigner') . ":</td><td><select name='SelectAssigner'>"; DB_free_result($result); $SQL = "SELECT userid @@ -331,17 +336,37 @@ $result = DB_query($SQL,$db); while ($myrow = DB_fetch_array($result)) { + if (isset($_POST['SelectAssigner']) and $myrow['userid']==$_POST['SelectAssigner']) { + echo "<option selected VALUE='"; + } else { + echo "<option VALUE='"; + } + echo $myrow['userid'] . "'>" . $myrow['userid']; + + } //end while loop get assigner + + echo '<tr><td>' . _('Authorizer') . ":</td><td><select name='SelectAuthorizer'>"; + + DB_free_result($result); + $SQL = "SELECT userid + FROM www_users + ORDER BY userid"; + + $result = DB_query($SQL,$db); + + while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectAuthorizer']) and $myrow['userid']==$_POST['SelectAuthorizer']) { - echo '<option selected VALUE="' . $myrow['userid'] . '">' . $myrow['userid'] . '</option>'; + echo "<option selected VALUE='"; } else { - echo '<option VALUE="' . $myrow['userid'] . '">' . $myrow['userid'] . '</option>'; + echo "<option VALUE='"; } + echo $myrow['userid'] . "'>" . $myrow['userid']; } //end while loop get authorizer echo '</select></td></tr>'; - echo '<tr><td>' . _('GL Account Cash Assignment') . ':</td><td><select name="glaccountcash">'; + echo '<tr><td>' . _('GL Account Cash Assignment') . ":</td><td><select name='glaccountcash'>"; DB_free_result($result); $SQL = "SELECT chartmaster.accountcode, chartmaster.accountname @@ -353,16 +378,17 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['glaccountcash']) and $myrow['accountcode']==$_POST['glaccountcash']) { - echo '<option selected VALUE="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; + echo "<option selected VALUE='"; } else { - echo '<option VALUE="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; + echo "<option VALUE='"; } + echo $myrow['accountcode'] . "'>" . $myrow['accountcode'] . ' - ' . $myrow['accountname']; } //end while loop echo '</select></td></tr>'; - echo '<tr><td>' . _('GL Account Petty Cash Tab') . ':</td><td><select name="GLAccountPcashTab">'; + echo '<tr><td>' . _('GL Account Petty Cash Tab') . ":</td><td><select name='glaccountpcashtab'>"; DB_free_result($result); $SQL = "SELECT accountcode, accountname @@ -372,11 +398,12 @@ $result = DB_query($SQL,$db); while ($myrow = DB_fetch_array($result)) { - if (isset($_POST['GLAccountPcashTab']) and $myrow['accountcode']==$_POST['GLAccountPcashTab']) { - echo '<option selected VALUE="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; + if (isset($_POST['glaccountpcashtab']) and $myrow['accountcode']==$_POST['glaccountpcashtab']) { + echo "<option selected VALUE='"; } else { - echo '<option VALUE="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; + echo "<option VALUE='"; } + echo $myrow['accountcode'] . "'>" . $myrow['accountcode'] . ' - ' . $myrow['accountname']; } //end while loop This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-05-07 21:48:43
|
Revision: 5259 http://weberp.svn.sourceforge.net/weberp/?rev=5259&view=rev Author: tim_schofield Date: 2011-05-07 21:48:36 +0000 (Sat, 07 May 2011) Log Message: ----------- Improvements to layout, correct quoting layouts take out defaults and force selection, add error checking and activate cancel button Modified Paths: -------------- trunk/PcTabs.php trunk/includes/session.inc Added Paths: ----------- trunk/sql/mysql/updates/82.php Modified: trunk/PcTabs.php =================================================================== --- trunk/PcTabs.php 2011-05-07 21:38:39 UTC (rev 5258) +++ trunk/PcTabs.php 2011-05-07 21:48:36 UTC (rev 5259) @@ -16,6 +16,19 @@ $SelectedTab = strtoupper($_GET['SelectedTab']); } +if (isset($_POST['Cancel'])) { + unset($SelectedTab); + unset($_POST['tabcode'] ); + unset($_POST['SelectUser'] ); + unset($_POST['SelectTabs']); + unset($_POST['SelectCurrency']); + unset($_POST['tablimit']); + unset($_POST['SelectAssigner']); + unset($_POST['SelectAuthorizer']); + unset($_POST['glaccountcash']); + unset($_POST['glaccountpcashtab']); +} + if (isset($Errors)) { unset($Errors); } @@ -43,6 +56,36 @@ echo prnMsg(_('The Tab code must be twenty characters or less long'),'error'); $Errors[$i] = 'TabCode'; $i++; + } elseif (($_POST['SelectUser'])=='') { + $InputError = 1; + echo prnMsg(_('You must select a User for this tab'),'error'); + $Errors[$i] = 'UserName'; + $i++; + } elseif (($_POST['SelectTabs'])=='') { + $InputError = 1; + echo prnMsg(_('You must select a type of tab from the list'),'error'); + $Errors[$i] = 'TabType'; + $i++; + } elseif (($_POST['SelectAssigner'])=='') { + $InputError = 1; + echo prnMsg(_('You must select a User to assign cash to this tab'),'error'); + $Errors[$i] = 'AssignerName'; + $i++; + } elseif (($_POST['SelectAuthorizer'])=='') { + $InputError = 1; + echo prnMsg(_('You must select a User to authorise this tab'),'error'); + $Errors[$i] = 'AuthorizerName'; + $i++; + } elseif (($_POST['glaccountcash'])=='') { + $InputError = 1; + echo prnMsg(_('You must select a General ledger code for the cash to be assigned from'),'error'); + $Errors[$i] = 'GLCash'; + $i++; + } elseif (($_POST['glaccountpcashtab'])=='') { + $InputError = 1; + echo prnMsg(_('You must select a General ledger code for this petty cash tab'),'error'); + $Errors[$i] = 'GLTab'; + $i++; } if (isset($SelectedTab) AND $InputError !=1) { @@ -108,6 +151,7 @@ prnMsg($msg,'success'); unset($SelectedTab); + unset($_POST['tabcode'] ); unset($_POST['SelectUser'] ); unset($_POST['SelectTabs']); unset($_POST['SelectCurrency']); @@ -138,23 +182,31 @@ links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ - $sql = "SELECT * - FROM pctabs - ORDER BY tabcode"; + $sql = "SELECT tabcode, + usercode, + typetabcode, + currency, + tablimit, + assigner, + authorizer, + glaccountassignment, + glaccountpcash + FROM pctabs + ORDER BY tabcode"; $result = DB_query($sql,$db); echo '<br><table class=selection>'; - echo "<tr> - <th>" . _('Tab Code') . "</th> - <th>" . _('User Name') . "</th> - <th>" . _('Type Of Tab') . "</th> - <th>" . _('Currency') . "</th> - <th>" . _('Limit') . "</th> - <th>" . _('Assigner') . "</th> - <th>" . _('Authorizer') . "</th> - <th>" . _('GL Account For Cash Assignment') . "</th> - <th>" . _('GL Account Petty Cash Tab') . "</th> - </tr>"; + echo '<tr> + <th>' . _('Tab Code') . '</th> + <th>' . _('User Name') . '</th> + <th>' . _('Type Of Tab') . '</th> + <th>' . _('Currency') . '</th> + <th>' . _('Limit') . '</th> + <th>' . _('Assigner') . '</th> + <th>' . _('Authorizer') . '</th> + <th>' . _('GL Account For Cash Assignment') . '</th> + <th>' . _('GL Account Petty Cash Tab') . '</th> + </tr>'; $k=0; //row colour counter @@ -182,7 +234,7 @@ $DescriptionName=DB_fetch_array($ResultName); - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -191,9 +243,9 @@ <td>%s</td> <td>%s</td> <td>%s</td> - <td><a href='%sSelectedTab=%s'>" . _('Edit') . "</td> - <td><a href='%sSelectedTab=%s&delete=yes' onclick=\"return confirm('" . _('Are you sure you wish to delete this code and all the description it may have set up?') . "');\">" . _('Delete') . "</td> - </tr>", + <td><a href="%sSelectedTab=%s">' . _('Edit') . '</td> + <td><a href="%sSelectedTab=%s&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this code and all the description it may have set up?') . '");\'>' . _('Delete') . '</td> + </tr>', $myrow['tabcode'], $myrow['usercode'], $myrow['typetabcode'], @@ -213,11 +265,11 @@ //end of ifs and buts! if (isset($SelectedTab)) { - echo '<p><div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '">' . _('Show All Petty Cash Tabs Defined') . '</a></div><p>'; + echo '<p><div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Show All Petty Cash Tabs Defined') . '</a></div><p>'; } if (!isset($_GET['delete'])) { - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p><table class=selection>'; //Main table @@ -241,9 +293,9 @@ $_POST['glaccountpcashtab'] = $myrow['glaccountpcash']; - echo "<input type=hidden name='SelectedTab' VALUE=" . $SelectedTab . ">"; - echo "<input type=hidden name='tabcode' VALUE=" . $_POST['tabcode']. ">"; - echo "<table class=selection> <tr><td>" . _('Tabcode') . ":</td><td>"; + echo '<input type=hidden name="SelectedTab" VALUE="' . $SelectedTab . '">'; + echo '<input type=hidden name="tabcode" VALUE="' . $_POST['tabcode']. '">'; + echo '<table class=selection> <tr><td>' . _('Tabcode') . ':</td><td>'; // We dont allow the user to change an existing tab code @@ -252,55 +304,59 @@ } else { // This is a new tab so the user may volunteer a tab code - echo "<table class=selection><tr><td>" . _('Tabcode') . ":</td><td><input type='Text' - " . (in_array('TypeTabCode',$Errors) ? 'class="inputerror"' : '' ) ." name='tabcode'></td></tr>"; - + if (isset($_POST['tabcode'])) { + echo '<table class=selection><tr><td>' . _('Tabcode') . ':</td><td><input type="text" value="'.$_POST['tabcode'].'" + ' . (in_array('TypeTabCode',$Errors) ? 'class="inputerror"' : '' ) .' name="tabcode"></td></tr>'; + } else { + echo '<table class=selection><tr><td>' . _('Tabcode') . ':</td><td><input type="text" + ' . (in_array('TypeTabCode',$Errors) ? 'class="inputerror"' : '' ) .' name="tabcode"></td></tr>'; + } } - if (!isset($_POST['typetabdescription'])) { - $_POST['typetabdescription']=''; - } + echo '<tr><td>' . _('User Name') . ':</td><td><select name="SelectUser">'; - echo '<tr><td>' . _('User Name') . ":</td><td><select name='SelectUser'>"; + $SQL = "SELECT userid, + realname + FROM www_users + ORDER BY userid"; - DB_free_result($result); - $SQL = "SELECT userid - FROM www_users ORDER BY userid"; + $UsersResult = DB_query($SQL,$db); - $result = DB_query($SQL,$db); - - while ($myrow = DB_fetch_array($result)) { + echo '<option value=""></option>'; + while ($myrow = DB_fetch_array($UsersResult)) { if (isset($_POST['SelectUser']) and $myrow['userid']==$_POST['SelectUser']) { - echo "<option selected VALUE='"; + echo '<option selected value="' . $myrow['userid'] . '">' . $myrow['userid'].' - '.$myrow['realname'] . '</option>'; } else { - echo "<option VALUE='"; + echo '<option value="' . $myrow['userid'] . '">' . $myrow['userid'].' - '.$myrow['realname'] . '</option>'; } - echo $myrow['userid'] . "'>" . $myrow['userid']; - } //end while loop get user + } //end while loop get authorizer echo '</select></td></tr>'; - echo '<tr><td>' . _('Type Of Tab') . ":</td><td><select name='SelectTabs'>"; + echo '<tr><td>' . _('Type Of Tab') . ':</td><td><select name="SelectTabs">'; DB_free_result($result); - $SQL = "SELECT typetabcode FROM pctypetabs ORDER BY typetabcode"; + $SQL = "SELECT typetabcode, + typetabdescription + FROM pctypetabs + ORDER BY typetabcode"; $result = DB_query($SQL,$db); + echo '<option value=""></option>'; while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectTabs']) and $myrow['typetabcode']==$_POST['SelectTabs']) { - echo "<option selected VALUE='"; + echo '<option selected VALUE="'.$myrow['typetabcode'] . '">' . $myrow['typetabcode'].' - ' . $myrow['typetabdescription'] . '</option>'; } else { - echo "<option VALUE='"; + echo '<option VALUE="'.$myrow['typetabcode'] . '">' . $myrow['typetabcode'].' - ' . $myrow['typetabdescription'] . '</option>'; } - echo $myrow['typetabcode'] . "'>" . $myrow['typetabcode']; } //end while loop get type of tab echo '</select></td></tr>'; - echo '<tr><td>' . _('Currency') . ":</td><td><select name='SelectCurrency'>"; + echo '<tr><td>' . _('Currency') . ':</td><td><select name="SelectCurrency">'; DB_free_result($result); $SQL = "SELECT currency,currabrev @@ -308,14 +364,15 @@ $result = DB_query($SQL,$db); + echo '<option value=""></option>'; while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectCurrency']) and $myrow['currabrev']==$_POST['SelectCurrency']) { - echo "<option selected VALUE='"; + echo '<option selected VALUE="' . $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; + } else if (!isset($_POST['SelectCurrency']) and ($_SESSION['CompanyRecord']['currencydefault']==$myrow['currabrev'])) { + echo '<option selected VALUE="' . $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; } else { - echo "<option VALUE='"; + echo '<option value=' . $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; } - echo $myrow['currabrev'] . "'>" . $myrow['currency']; - } //end while loop get type of tab echo '</select></td></tr>'; @@ -324,49 +381,41 @@ $_POST['tablimit']=0; } - echo "<tr><td>" . _('Limit Of Tab') . ":</td><td><input type='Text' class='number' name='tablimit' size='12' maxlength='11' value='" . $_POST['tablimit'] . "'></td></tr>"; + echo '<tr><td>' . _('Limit Of Tab') . ':</td><td><input type="text" class="number" name="tablimit" size="12" maxlength="11" value="' . $_POST['tablimit'] . '"></td></tr>'; - echo '<tr><td>' . _('Cash Assigner') . ":</td><td><select name='SelectAssigner'>"; + echo '<tr><td>' . _('Cash Assigner') . ':</td><td><select name="SelectAssigner">'; - DB_free_result($result); - $SQL = "SELECT userid - FROM www_users - ORDER BY userid"; + DB_data_seek($UsersResult); - $result = DB_query($SQL,$db); - - while ($myrow = DB_fetch_array($result)) { + echo '<option value=""></option>'; + while ($myrow = DB_fetch_array($UsersResult)) { if (isset($_POST['SelectAssigner']) and $myrow['userid']==$_POST['SelectAssigner']) { - echo "<option selected VALUE='"; + echo '<option selected value="' . $myrow['userid'] . '">' . $myrow['userid'].' - '.$myrow['realname'] . '</option>'; } else { - echo "<option VALUE='"; + echo '<option value="' . $myrow['userid'] . '">' . $myrow['userid'].' - '.$myrow['realname'] . '</option>'; } - echo $myrow['userid'] . "'>" . $myrow['userid']; - } //end while loop get assigner + } //end while loop get authorizer - echo '<tr><td>' . _('Authorizer') . ":</td><td><select name='SelectAuthorizer'>"; + echo '</select></td></tr>'; - DB_free_result($result); - $SQL = "SELECT userid - FROM www_users - ORDER BY userid"; + echo '<tr><td>' . _('Authorizer') . ':</td><td><select name="SelectAuthorizer">'; - $result = DB_query($SQL,$db); + DB_data_seek($UsersResult); - while ($myrow = DB_fetch_array($result)) { + echo '<option value=""></option>'; + while ($myrow = DB_fetch_array($UsersResult)) { if (isset($_POST['SelectAuthorizer']) and $myrow['userid']==$_POST['SelectAuthorizer']) { - echo "<option selected VALUE='"; + echo '<option selected VALUE="' . $myrow['userid'] . '">' . $myrow['userid'].' - '.$myrow['realname'] . '</option>'; } else { - echo "<option VALUE='"; + echo '<option VALUE="' . $myrow['userid'] . '">' . $myrow['userid'].' - '.$myrow['realname'] . '</option>'; } - echo $myrow['userid'] . "'>" . $myrow['userid']; } //end while loop get authorizer echo '</select></td></tr>'; - echo '<tr><td>' . _('GL Account Cash Assignment') . ":</td><td><select name='glaccountcash'>"; + echo '<tr><td>' . _('GL Account Cash Assignment') . ':</td><td><select name="glaccountcash">'; DB_free_result($result); $SQL = "SELECT chartmaster.accountcode, chartmaster.accountname @@ -376,19 +425,19 @@ $result = DB_query($SQL,$db); + echo '<option value=""></option>'; while ($myrow = DB_fetch_array($result)) { if (isset($_POST['glaccountcash']) and $myrow['accountcode']==$_POST['glaccountcash']) { - echo "<option selected VALUE='"; + echo '<option selected VALUE="'.$myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; } else { - echo "<option VALUE='"; + echo '<option VALUE="'.$myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; } - echo $myrow['accountcode'] . "'>" . $myrow['accountcode'] . ' - ' . $myrow['accountname']; } //end while loop echo '</select></td></tr>'; - echo '<tr><td>' . _('GL Account Petty Cash Tab') . ":</td><td><select name='glaccountpcashtab'>"; + echo '<tr><td>' . _('GL Account Petty Cash Tab') . ':</td><td><select name="glaccountpcashtab">'; DB_free_result($result); $SQL = "SELECT accountcode, accountname @@ -397,13 +446,13 @@ $result = DB_query($SQL,$db); + echo '<option value=""></option>'; while ($myrow = DB_fetch_array($result)) { if (isset($_POST['glaccountpcashtab']) and $myrow['accountcode']==$_POST['glaccountpcashtab']) { - echo "<option selected VALUE='"; + echo '<option selected VALUE="'.$myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; } else { - echo "<option VALUE='"; + echo '<option VALUE="'.$myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; } - echo $myrow['accountcode'] . "'>" . $myrow['accountcode'] . ' - ' . $myrow['accountname']; } //end while loop Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-05-07 21:38:39 UTC (rev 5258) +++ trunk/includes/session.inc 2011-05-07 21:48:36 UTC (rev 5259) @@ -13,7 +13,7 @@ header('Location:' . $rootpath . '/install/index.php'); } include($PathPrefix . 'config.php'); -$DBVersion=81; +$DBVersion=82; if (isset($SessionSavePath)){ session_save_path($SessionSavePath); } Added: trunk/sql/mysql/updates/82.php =================================================================== --- trunk/sql/mysql/updates/82.php (rev 0) +++ trunk/sql/mysql/updates/82.php 2011-05-07 21:48:36 UTC (rev 5259) @@ -0,0 +1,10 @@ +<?php + +AddColumn('assigner', 'pctabs', 'VARCHAR( 20 )', 'NOT NULL', '', 'tablimit', $db); + +$sql="UPDATE pctabs SET assigner = authorizer"; +$result=DB_query($sql, $db); + +UpdateDBNo(82, $db); + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-05-12 05:17:49
|
Revision: 5289 http://weberp.svn.sourceforge.net/weberp/?rev=5289&view=rev Author: tim_schofield Date: 2011-05-12 05:17:43 +0000 (Thu, 12 May 2011) Log Message: ----------- Ensure that purchasing details get passed through to the order correctly, when order is made from the SelectProduct.php screen Modified Paths: -------------- trunk/PO_Header.php trunk/SelectProduct.php Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-05-12 05:17:02 UTC (rev 5288) +++ trunk/PO_Header.php 2011-05-12 05:17:43 UTC (rev 5289) @@ -180,6 +180,9 @@ $_SESSION['PO'.$identifier]->SupplierID = $_GET['SelectedSupplier']; $_SESSION['RequireSupplierSelection'] = 0; $_POST['Select'] = $_GET['SelectedSupplier']; + $_SESSION['PO'.$identifier]->DeliveryDate = DateAdd(date($_SESSION['DefaultDateFormat']), 'd', $_GET['LeadTime']); + $_SESSION['PO'.$identifier]->Initiator = $_SESSION['UserID']; + $_SESSION['PO'.$identifier]->StatusMessage = ''; /* * the item (its item code) that should be purchased @@ -374,6 +377,7 @@ $_POST['SuppDelAdd4']=$_SESSION['PO'.$identifier]->SuppDelAdd4; $_POST['SuppDelAdd5']=$_SESSION['PO'.$identifier]->SuppDelAdd5; $_POST['SuppDelAdd6']=$_SESSION['PO'.$identifier]->SuppDelAdd6; + $_POST['DeliveryDate']=$_SESSION['PO'.$identifier]->DeliveryDate; } @@ -441,6 +445,7 @@ $_SESSION['PO'.$identifier]->SuppDelAdd6 = $_POST['SuppDelAdd6']; $_SESSION['PO'.$identifier]->SuppTel = $_POST['SuppTel']; $_SESSION['PO'.$identifier]->Port = $_POST['Port']; + } else { prnMsg( _('You do not have the authority to raise Purchase Orders for') . ' ' . $myrow['suppname'] .'. ' . _('Please Consult your system administrator for more information.') . '<br />' . _('You can setup authorisations'). ' ' . '<a href="PO_AuthorisationLevels.php">' . _('here') . '</a>', 'warn'); include('includes/footer.inc'); @@ -490,7 +495,6 @@ $_POST['SuppTel'] = $myrow['telephone']; $_POST['Port'] = $myrow['port']; - $_SESSION['PO'.$identifier]->SupplierID = $_POST['Select']; $_SESSION['RequireSupplierSelection'] = 0; $_SESSION['PO'.$identifier]->SupplierName = $_POST['SupplierName']; @@ -652,7 +656,7 @@ $PurchItemRow['price'], $PurchItemRow['units'], $PurchItemRow['stockact'], - date($_SESSION['DefaultDateFormat']), + $_SESSION['PO'.$identifier]->DeliveryDate, 0, 0, '', Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2011-05-12 05:17:02 UTC (rev 5288) +++ trunk/SelectProduct.php 2011-05-12 05:17:43 UTC (rev 5289) @@ -381,7 +381,7 @@ echo '<td class="select">' . _('No') . '</td>'; } echo '<td class="select">'; - echo '<a href="' . $rootpath . '/PO_Header.php?&NewOrder=Yes' . '&SelectedSupplier=' . $SuppRow['supplierid'] . '&StockID=' . $StockID . '&Quantity='.$SuppRow['minorderqty'].'">' . _('Order') . ' </a></td>'; + echo '<a href="' . $rootpath . '/PO_Header.php?&NewOrder=Yes' . '&SelectedSupplier=' . $SuppRow['supplierid'] . '&StockID=' . $StockID . '&Quantity='.$SuppRow['minorderqty'].'&LeadTime='.$SuppRow['leadtime'].'">' . _('Order') . ' </a></td>'; echo '</tr>'; } echo '</table></td>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-05-13 19:40:36
|
Revision: 5301 http://weberp.svn.sourceforge.net/weberp/?rev=5301&view=rev Author: tim_schofield Date: 2011-05-13 19:40:29 +0000 (Fri, 13 May 2011) Log Message: ----------- Improvements to Bank reconciliation and bank matching Modified Paths: -------------- trunk/BankMatching.php trunk/BankReconciliation.php Modified: trunk/BankMatching.php =================================================================== --- trunk/BankMatching.php 2011-05-13 19:39:21 UTC (rev 5300) +++ trunk/BankMatching.php 2011-05-13 19:40:29 UTC (rev 5301) @@ -1,10 +1,8 @@ <?php -/* $Revision: 1.23 $ */ + /* $Id$*/ -//$PageSecurity = 7; - -include("includes/session.inc"); +include('includes/session.inc'); $title = _('Bank Account Matching'); include('includes/header.inc'); @@ -29,9 +27,16 @@ exit; } +if (isset($_GET['Account'])) { + $_POST['BankAccount']=$_GET['Account']; + $_POST['ShowTransactions']=true; + $_POST['Ostg_or_All']='Ostg'; + $_POST['First20_or_All']='All'; +} + if (isset($_POST['Update']) AND $_POST['RowCounter']>1){ for ($Counter=1;$Counter <= $_POST['RowCounter']; $Counter++){ - if (isset($_POST["Clear_" . $Counter]) and $_POST["Clear_" . $Counter]==True){ + if (isset($_POST['Clear_' . $Counter]) and $_POST['Clear_' . $Counter]==True){ /*Get amount to be cleared */ $sql = "SELECT amount, exrate @@ -83,9 +88,9 @@ $resultBankActs = DB_query($sql,$db); while ($myrow=DB_fetch_array($resultBankActs)){ if (isset($_POST['BankAccount']) and $myrow['accountcode']==$_POST['BankAccount']){ - echo "<option selected Value='" . $myrow['accountcode'] . "'>" . $myrow['bankaccountname']; + echo '<option selected Value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . '</option>'; } else { - echo "<option Value='" . $myrow['accountcode'] . "'>" . $myrow['bankaccountname']; + echo '<option Value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . '</option>'; } } @@ -108,30 +113,34 @@ <td><select tabindex="4" name="Ostg_or_All">'; if ($_POST['Ostg_or_All']=='All'){ - echo '<option selected Value="All">' . _('Show all') . ' ' . $TypeName . ' ' . _('in the date range'); - echo '<option Value="Ostdg">' . _('Show unmatched') . ' ' . $TypeName . ' ' . _('only'); + echo '<option selected Value="All">' . _('Show all') . ' ' . $TypeName . ' ' . _('in the date range') . '</option>'; + echo '<option Value="Ostdg">' . _('Show unmatched') . ' ' . $TypeName . ' ' . _('only') . '</option>'; } else { echo '<option Value="All">' . _('Show all') . ' ' . $TypeName . ' ' . _('in the date range'); - echo '<option selected Value="Ostdg">' . _('Show unmatched') . ' ' . $TypeName . ' ' . _('only'); + echo '<option selected Value="Ostdg">' . _('Show unmatched') . ' ' . $TypeName . ' ' . _('only') . '</option>'; } echo '</select></td></tr>'; echo '<tr><td colspan=3>' . _('Choose to display only the first 20 matching') . ' ' . $TypeName . ' ' . _('or all') . ' ' . $TypeName . ' ' . _('meeting the criteria') . ':</td><td><select tabindex="5" name="First20_or_All">'; if ($_POST['First20_or_All']=='All'){ - echo '<option selected Value="All">' . _('Show all') . ' ' . $TypeName . ' ' . _('in the date range'); - echo '<option Value="First20">' . _('Show only the first 20') . ' ' . $TypeName; + echo '<option selected Value="All">' . _('Show all') . ' ' . $TypeName . ' ' . _('in the date range') . '</option>'; + echo '<option Value="First20">' . _('Show only the first 20') . ' ' . $TypeName . '</option>'; } else { - echo '<option Value="All">' . _('Show all') . ' ' . $TypeName . ' ' . _('in the date range'); - echo '<option selected Value="First20">' . _('Show only the first 20') . ' ' . $TypeName; + echo '<option Value="All">' . _('Show all') . ' ' . $TypeName . ' ' . _('in the date range') . '</option>'; + echo '<option selected Value="First20">' . _('Show only the first 20') . ' ' . $TypeName . '</option>'; } echo '</select></td></tr>'; echo '</table><br><div class="centre"><input tabindex="6" type=submit name="ShowTransactions" VALUE="' . _('Show selected') . ' ' . $TypeName . '">'; -echo "<p><a href='$rootpath/BankReconciliation.php?" . SID . "'>" . _('Show reconciliation') . '</a></div>'; -echo '<hr>'; +if (isset($_POST['BankAccount'])) { + echo '<p><a href="'.$rootpath.'/BankReconciliation.php?Account='.$_POST['BankAccount'].'">' . _('Show reconciliation') . '</a></div>'; +} else { + echo '<p><a href="'.$rootpath.'/BankReconciliation.php">' . _('Show reconciliation') . '</a></div>'; +} + $InputError=0; if (!Is_Date($_POST['BeforeDate'])){ $InputError =1; @@ -151,10 +160,11 @@ $SQLBeforeDate = FormatDateForSQL($_POST['BeforeDate']); $SQLAfterDate = FormatDateForSQL($_POST['AfterDate']); - if ($_POST["Ostg_or_All"]=='All'){ + if ($_POST['Ostg_or_All']=='All'){ if ($Type=='Payments'){ $sql = "SELECT banktransid, ref, + chequeno, amountcleared, transdate, amount/exrate as amt, @@ -169,6 +179,7 @@ } else { /* Type must == Receipts */ $sql = "SELECT banktransid, ref, + chequeno, amountcleared, transdate, amount/exrate as amt, @@ -184,6 +195,7 @@ if ($Type=='Payments'){ $sql = "SELECT banktransid, ref, + chequeno, amountcleared, transdate, amount/exrate as amt, @@ -198,6 +210,7 @@ } else { /* Type must == Receipts */ $sql = "SELECT banktransid, ref, + chequeno, amountcleared, transdate, amount/exrate as amt, @@ -211,14 +224,15 @@ ORDER BY transdate"; } } - if ($_POST["First20_or_All"]!='All'){ + if ($_POST['First20_or_All']!='All'){ $sql = $sql . " LIMIT 20"; } $ErrMsg = _('The payments with the selected criteria could not be retrieved because'); $PaymentsResult = DB_query($sql, $db, $ErrMsg); - $TableHeader = '<tr><th>'. _('Ref'). '</th> + $TableHeader = '<tr><th>'. _('Cheque No') . '</th> + <th>' . _('Ref') . '</th> <th>' . $TypeName . '</th> <th>' . _('Date') . '</th> <th>' . _('Amount') . '</th> @@ -238,15 +252,17 @@ $Outstanding = $myrow['amt']- $myrow['amountcleared']; if (ABS($Outstanding)<0.009){ /*the payment is cleared dont show the check box*/ - printf("<tr bgcolor='#CCCEEE'> + printf('<tr bgcolor="#CCCEEE"> <td>%s</td> <td>%s</td> <td>%s</td> + <td>%s</td> <td class=number>%s</td> <td class=number>%s</td> <td colspan=2>%s</td> - <td><input type='checkbox' name='Unclear_%s'><input type=hidden name='BankTrans_%s' VALUE=%s></td> - </tr>", + <td><input type="checkbox" name="Unclear_%s"><input type=hidden name="BankTrans_%s" VALUE=%s></td> + </tr>', + $myrow['chequeno'], $myrow['ref'], $myrow['banktranstype'], $DisplayTranDate, @@ -266,14 +282,16 @@ $k=1; } - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> + <td>%s</td> <td class=number>%s</td> <td class=number>%s</td> - <td><input type='checkbox' name='Clear_%s'><input type=hidden name='BankTrans_%s' VALUE=%s></td> - <td colspan=2><input type='text' maxlength=15 size=15 class=number name='AmtClear_%s'></td> - </tr>", + <td><input type="checkbox" name="Clear_%s"><input type=hidden name="BankTrans_%s" VALUE=%s></td> + <td colspan=2><input type="text" maxlength=15 size=15 class=number name="AmtClear_%s"></td> + </tr>', + $myrow['chequeno'], $myrow['ref'], $myrow['banktranstype'], $DisplayTranDate, @@ -302,4 +320,4 @@ echo '</form>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/BankReconciliation.php =================================================================== --- trunk/BankReconciliation.php 2011-05-13 19:39:21 UTC (rev 5300) +++ trunk/BankReconciliation.php 2011-05-13 19:40:29 UTC (rev 5301) @@ -1,10 +1,7 @@ <?php -/* $Revision: 1.15 $ */ /* $Id$*/ -//$PageSecurity = 7; - include ('includes/session.inc'); $title = _('Bank Reconciliation'); @@ -13,12 +10,18 @@ echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; +if (isset($_GET['Account'])) { + $_POST['BankAccount']=$_GET['Account']; + $_POST['ShowRec']=true; +} + if (isset($_POST['PostExchangeDifference']) and is_numeric($_POST['DoExchangeDifference'])){ - if (!is_numeric($_POST['BankStatmentBalance'])){ + if (!is_numeric($_POST['BankStatementBalance'])){ prnMsg(_('The entry in the bank statement balance is not numeric. The balance on the bank statement should be entered. The exchange difference has not been calculated and no general ledger journal has been created'),'warn'); - echo '<p>' . $_POST['BankStatmentBalance']; + echo '<p>' . $_POST['BankStatementBalance']; } else { /* Now need to get the currency of the account and the current table ex rate */ $SQL = "SELECT rate, bankaccountname @@ -33,7 +36,7 @@ $BankAccountName = $CurrencyRow[1]; $CalculatedBalance = $_POST['DoExchangeDifference']; - $ExchangeDifference = ($CalculatedBalance - $_POST['BankStatmentBalance'])/$ExRate; + $ExchangeDifference = ($CalculatedBalance - $_POST['BankStatementBalance'])/$ExRate; include ('includes/SQL_CommonFunctions.inc'); $ExDiffTransNo = GetNextTransNo(36,$db); @@ -86,7 +89,7 @@ -echo '<table>'; +echo '<table class="selection">'; $SQL = "SELECT bankaccountname, accountcode FROM bankaccounts"; @@ -97,7 +100,8 @@ echo '<tr><td>' . _('Bank Account') . ':</td><td><select tabindex="1" name="BankAccount">'; if (DB_num_rows($AccountsResults)==0){ - echo '</select></td></tr></table><p>' . _('Bank Accounts have not yet been defined') . '. ' . _('You must first') . "<a href='" . $rootpath . "/BankAccounts.php'>" . _('define the bank accounts') . '</a>' . ' ' . _('and general ledger accounts to be affected') . '.'; + echo '</select></td></tr></table><p>' . _('Bank Accounts have not yet been defined') . '. ' . _('You must first') . + '<a href="' . $rootpath . '/BankAccounts.php">' . _('define the bank accounts') . '</a>' . ' ' . _('and general ledger accounts to be affected') . '.'; include('includes/footer.inc'); exit; } else { @@ -163,6 +167,7 @@ amountcleared, (amount/exrate)-amountcleared as outstanding, ref, + chequeno, transdate, systypes.typename, transno @@ -185,6 +190,7 @@ <th>' . _('Type') . '</th> <th>' . _('Number') . '</th> <th>' . _('Reference') . '</th> + <th>' . _('Cheque No') . '</th> <th>' . _('Orig Amount') . '</th> <th>' . _('Outstanding') . '</th> </tr>'; @@ -208,6 +214,7 @@ <td>%s</td> <td>%s</td> <td>%s</td> + <td>%s</td> <td class=number>%01.2f</td> <td class=number>%01.2f</td> </tr>', @@ -215,6 +222,7 @@ $myrow['typename'], $myrow['transno'], $myrow['ref'], + $myrow['chequeno'], $myrow['amt'], $myrow['outstanding']); @@ -234,6 +242,7 @@ amountcleared, (amount/exrate)-amountcleared as outstanding, ref, + chequeno, transdate, systypes.typename, transno @@ -257,6 +266,7 @@ <th>' . _('Type') . '</th> <th>' . _('Number') . '</th> <th>' . _('Reference') . '</th> + <th>' . _('Cheque No') . '</th> <th>' . _('Orig Amount') . '</th> <th>' . _('Outstanding') . '</th> </tr>'; @@ -280,6 +290,7 @@ <td>%s</td> <td>%s</td> <td>%s</td> + <td>%s</td> <td class=number>%01.2f</td> <td class=number>%01.2f</td> </tr>', @@ -287,6 +298,7 @@ $myrow['typename'], $myrow['transno'], $myrow['ref'], + $myrow['chequeno'], $myrow['amt'], $myrow['outstanding'] ); @@ -307,7 +319,7 @@ if (isset($_POST['DoExchangeDifference'])){ echo '<input type="hidden" name="DoExchangeDifference" value=' . $FXStatementBalance . '>'; echo '<tr><td colspan=6>' . _('Enter the actual bank statement balance') . ' (' . $BankCurrCode . ')</b></td> - <td class=number><input type="text" name="BankStatmentBalance" maxlength=15 size=15 value=' . $_POST['BankStatmentBalance'] . '><td></tr>'; + <td class=number><input type="text" name="BankStatementBalance" maxlength=15 size=15 value=' . $_POST['BankStatementBalance'] . '><td></tr>'; echo '<tr><td colspan=7 align="center"><input type="submit" name="PostExchangeDifference" value="' . _('Calculate and Post Exchange Difference') . '" onclick="return confirm(\'' . _('This will create a general ledger journal to write off the exchange difference in the current balance of the account. It is important that the exchange rate above reflects the current value of the bank account currency') . ' - ' . _('Are You Sure?') . '\');"></td></tr>'; } @@ -323,8 +335,13 @@ echo '</table>'; } -echo '<p><div class="centre"><a tabindex="4" href="' . $rootpath . '/BankMatching.php?' . SID . '&Type=Payments">' . _('Match off cleared payments') . '</a>'; -echo '<br><a tabindex="5" href="' . $rootpath . '/BankMatching.php?' . SID . '&Type=Receipts">' . _('Match off cleared deposits') . '</a></div>'; +if (isset($_POST['BankAccount'])) { + echo '<p><div class="centre"><a tabindex="4" href="' . $rootpath . '/BankMatching.php?Type=Payments&Account='.$_POST['BankAccount'].'">' . _('Match off cleared payments') . '</a>'; + echo '<br><a tabindex="5" href="' . $rootpath . '/BankMatching.php?Type=Receipts&Account='.$_POST['BankAccount'].'">' . _('Match off cleared deposits') . '</a></div>'; +} else { + echo '<p><div class="centre"><a tabindex="4" href="' . $rootpath . '/BankMatching.php?Type=Payments">' . _('Match off cleared payments') . '</a>'; + echo '<br><a tabindex="5" href="' . $rootpath . '/BankMatching.php?Type=Receipts">' . _('Match off cleared deposits') . '</a></div>'; +} echo '</form>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-05-17 19:20:00
|
Revision: 5304 http://weberp.svn.sourceforge.net/weberp/?rev=5304&view=rev Author: tim_schofield Date: 2011-05-17 19:19:52 +0000 (Tue, 17 May 2011) Log Message: ----------- Improvements to Cash Sales Modified Paths: -------------- trunk/.bzrignore trunk/CounterSales.php trunk/includes/GetPrice.inc trunk/includes/SelectOrderItems_IntoCart.inc Modified: trunk/.bzrignore =================================================================== --- trunk/.bzrignore 2011-05-16 17:53:41 UTC (rev 5303) +++ trunk/.bzrignore 2011-05-17 19:19:52 UTC (rev 5304) @@ -2,3 +2,5 @@ .bzrignore geany_run_script.sh companies/weberpdemo/reportwriter/graph.png +config.php +.bzrignore Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-05-16 17:53:41 UTC (rev 5303) +++ trunk/CounterSales.php 2011-05-17 19:19:52 UTC (rev 5304) @@ -22,11 +22,8 @@ } if (isset($_SESSION['Items'.$identifier])){ //update the Items object variable with the data posted from the form - $_SESSION['Items'.$identifier]->CustRef = $_POST['CustRef']; - $_SESSION['Items'.$identifier]->Comments = $_POST['Comments']; - $_SESSION['Items'.$identifier]->DeliverTo = $_POST['DeliverTo']; - $_SESSION['Items'.$identifier]->PhoneNo = $_POST['PhoneNo']; - $_SESSION['Items'.$identifier]->Email = $_POST['Email']; + $_SESSION['Items'.$identifier]->CustRef = _('Cash Sale'); + $_SESSION['Items'.$identifier]->Comments = _('Cash Sale') . ' ' . DATE($_SESSION['DefaultDateFormat']); } if (isset($_POST['QuickEntry'])){ @@ -504,6 +501,8 @@ $_SESSION['Items'.$identifier]->update_cart_item($OrderLine->LineNumber, $Quantity, $Price, + $OrderLine->Units, + $OrderLine->ConversionFactor, ($DiscountPercentage/100), $Narrative, 'Yes', /*Update DB */ @@ -697,7 +696,7 @@ */ echo '<br /> - <table width="90%" cellpadding="2" colspan="7"> + <table width="90%" cellpadding="2" colspan="7" class="selection"> <tr bgcolor="#800000">'; echo '<th>' . _('Item Code') . '</th> <th>' . _('Item Description') . '</th> @@ -803,9 +802,9 @@ </tr> </table>'; echo '<input type="hidden" name="TaxTotal" value="'.$TaxTotal.'" />'; - echo '<table><tr><td>'; + echo '<br /><table><tr><td>'; //nested table - echo '<table><tr> + echo '<table class="selection"><tr> <td>'. _('Picked Up By') .':</td> <td><input type="text" size="25" maxlength="25" name="DeliverTo" value="' . stripslashes($_SESSION['Items'.$identifier]->DeliverTo) . '" /></td> </tr>'; @@ -855,12 +854,12 @@ if (!isset($_POST['AmountPaid'])){ $_POST['AmountPaid'] =0; } - echo '<tr><td>' . _('Amount Paid') . ':</td><td><input type="text" class="number" name="AmountPaid" maxlength="12" size="12" value="' . $_POST['AmountPaid'] . '" /></td></tr>'; + echo '<tr><td>' . _('Amount Paid') . ':</td><td><input type="text" class="number" name="AmountPaid" maxlength="12" size="12" value="' . ($_SESSION['Items'.$identifier]->total+$TaxTotal) . '" /></td></tr>'; echo '</table>'; //end the sub table in the second column of master table echo '</th></tr></table>'; //end of column/row/master table echo '<br /><div class="centre"><input type="submit" name="Recalculate" value="' . _('Re-Calculate') . '" /> - <input type="submit" name="ProcessSale" value="' . _('Process The Sale') . '" /></div><hr />'; + <input type="submit" name="ProcessSale" value="' . _('Process The Sale') . '" /></div><br />'; } # end of if lines @@ -1957,8 +1956,9 @@ * end of Invoice Processing * ***************************** */ +// This code needs sorting out, but until then : +$ImageSource = _('No Image'); - /* Now show the stock item selection search stuff below */ if (!isset($_POST['ProcessSale'])){ if (isset($_POST['PartSearch']) and $_POST['PartSearch']!=''){ @@ -2000,8 +2000,6 @@ $k=0; //row colour counter while ($myrow=DB_fetch_array($result2)) { - // This code needs sorting out, but until then : - $ImageSource = _('No Image'); // Find the quantity in stock at location $QohSql = "SELECT sum(quantity) FROM locstock @@ -2094,6 +2092,9 @@ $rootpath, SID, $myrow['stockid']); + + echo '<input type="hidden" name="Units' . $myrow['stockid'] . '" value="' . $myrow['units'] . '" />'; + if ($j==1) { $jsCall = '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.itm'.$myrow['stockid'].');}</script>'; } @@ -2251,7 +2252,7 @@ } $OnOrder = $PurchQty + $WoQty; - $Available = $qoh - $DemandQty + $OnOrder; + $Available = $QOH - $DemandQty + $OnOrder; printf('<td>%s</td> <td>%s</td> @@ -2274,6 +2275,9 @@ $rootpath, SID, $myrow['stockid']); + + echo '<input type="hidden" name="Units' . $myrow['stockid'] . '" value="' . $myrow['units'] . '" />'; + if ($j==1) { $jsCall = '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.itm'.$myrow['stockid'].');}</script>'; } @@ -2298,7 +2302,7 @@ else { /* show the quick entry form variable */ echo '<div class="page_help_text"><b>' . _('Use this form to add items quickly if the item codes are already known') . '</b></div><br /> - <table border="1"> + <table class="selection"> <tr>'; /*do not display colum unless customer requires po line number by sales order line*/ echo '<th>' . _('Item Code') . '</th> @@ -2333,4 +2337,4 @@ } echo '</form>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/includes/GetPrice.inc =================================================================== --- trunk/includes/GetPrice.inc 2011-05-16 17:53:41 UTC (rev 5303) +++ trunk/includes/GetPrice.inc 2011-05-17 19:19:52 UTC (rev 5304) @@ -4,7 +4,8 @@ $Price = 0; /*Search by branch and customer for a date specified price */ - $sql="SELECT prices.price + $sql="SELECT prices.price, + prices.conversionfactor FROM prices, debtorsmaster WHERE debtorsmaster.salestype=prices.typeabbrev @@ -21,7 +22,8 @@ if (DB_num_rows($result)==0){ /*Need to try same specific search but for a default price with a zero end date */ $sql="SELECT prices.price, - prices.startdate + prices.startdate, + prices.conversionfactor FROM prices, debtorsmaster WHERE debtorsmaster.salestype=prices.typeabbrev @@ -39,7 +41,8 @@ if (DB_num_rows($result)==0){ /* No result returned for customer and branch search try for just a customer match */ - $sql = "SELECT prices.price + $sql = "SELECT prices.price, + prices.conversionfactor FROM prices, debtorsmaster WHERE debtorsmaster.salestype=prices.typeabbrev @@ -56,7 +59,8 @@ if (DB_num_rows($result)==0){ //if no specific price between the dates maybe there is a default price with no end date specified $sql = "SELECT prices.price, - prices.startdate + prices.startdate, + prices.conversionfactor FROM prices, debtorsmaster WHERE debtorsmaster.salestype=prices.typeabbrev @@ -74,7 +78,8 @@ if (DB_num_rows($result)==0){ /*No special customer specific pricing use the customers normal price list but look for special limited time prices with specific end date*/ - $sql = "SELECT prices.price + $sql = "SELECT prices.price, + prices.conversionfactor FROM prices, debtorsmaster WHERE debtorsmaster.salestype=prices.typeabbrev @@ -90,7 +95,8 @@ if (DB_num_rows($result)==0){ /*No special customer specific pricing use the customers normal price list but look for default price with 0000-00-00 end date*/ $sql = "SELECT prices.price, - prices.startdate + prices.startdate, + prices.conversionfactor FROM prices, debtorsmaster WHERE debtorsmaster.salestype=prices.typeabbrev @@ -107,7 +113,8 @@ if (DB_num_rows($result)==0){ /* Now use the default salestype/price list cos all else has failed */ - $sql="SELECT prices.price + $sql="SELECT prices.price, + prices.conversionfactor FROM prices, debtorsmaster WHERE prices.stockid = '" . $StockID . "' @@ -124,7 +131,8 @@ /* Now use the default salestype/price list cos all else has failed */ $sql="SELECT prices.price, - prices.startdate + prices.startdate, + prices.conversionfactor FROM prices, debtorsmaster WHERE prices.stockid = '" . $StockID . "' @@ -141,7 +149,9 @@ if (DB_num_rows($result)==0){ /*Not even a price set up in the default price list so return 0 */ prnMsg(_('There are no prices set up for') . ' ' . $StockID,'warn'); - Return 0; + $Prices[0]=0; + $Prices[1]=1; + return $Prices; } } } @@ -155,11 +165,13 @@ /*There is a price from one of the above so return that */ $myrow=DB_fetch_row($result); - Return $myrow[0]; + return $myrow; } else { - Return 0; + $Prices[0]=0; + $Prices[1]=1; + return $Prices; } } -?> \ No newline at end of file +?> Modified: trunk/includes/SelectOrderItems_IntoCart.inc =================================================================== --- trunk/includes/SelectOrderItems_IntoCart.inc 2011-05-16 17:53:41 UTC (rev 5303) +++ trunk/includes/SelectOrderItems_IntoCart.inc 2011-05-17 19:19:52 UTC (rev 5304) @@ -108,8 +108,9 @@ $Discount = 0; } - $Price = GetPrice($NewItem, $_SESSION['Items'.$identifier]->DebtorNo,$_SESSION['Items'.$identifier]->Branch, $db); - + $PriceArray = GetPrice($NewItem, $_SESSION['Items'.$identifier]->DebtorNo,$_SESSION['Items'.$identifier]->Branch, $db); + $Price=$PriceArray[0]; + $ConversionFactor=$PriceArray[1]; $WithinCreditLimit = true; if (!isset($_SESSION['WarnOnce']) and $_SESSION['Items'.$identifier]->SpecialInstructions) { @@ -157,7 +158,7 @@ $myItemRow['eoq'], $myItemRow['nextserialno'], $ExRate, - $_POST['ConversionFactor'.$NewItem]); + $ConversionFactor); } } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-06-13 06:21:40
|
Revision: 5352 http://weberp.svn.sourceforge.net/weberp/?rev=5352&view=rev Author: tim_schofield Date: 2011-06-13 06:21:26 +0000 (Mon, 13 Jun 2011) Log Message: ----------- Replace upper case html with lower c ase Modified Paths: -------------- trunk/Areas.php trunk/BOMInquiry.php trunk/BOMListing.php trunk/BOMs.php trunk/BankAccounts.php trunk/BankMatching.php trunk/COGSGLPostings.php trunk/CompanyPreferences.php trunk/ConfirmDispatch_Invoice.php trunk/CreditItemsControlled.php trunk/CreditStatus.php trunk/Credit_Invoice.php trunk/Currencies.php trunk/CustEDISetup.php trunk/CustomerBranches.php trunk/CustomerReceipt.php trunk/CustomerTransInquiry.php trunk/CustomerTypes.php trunk/Customers.php trunk/DailySalesInquiry.php trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/EDIMessageFormat.php trunk/EmailCustTrans.php trunk/ExchangeRateTrend.php trunk/Factors.php trunk/FixedAssetItems.php trunk/FixedAssetTransfer.php trunk/FreightCosts.php trunk/GLAccountCSV.php trunk/GLAccountInquiry.php trunk/GLAccountReport.php trunk/GLAccounts.php trunk/GLBalanceSheet.php trunk/GLProfit_Loss.php trunk/GLTagProfit_Loss.php trunk/GLTrialBalance.php trunk/GeocodeSetup.php trunk/GoodsReceivedControlled.php trunk/Locations.php trunk/MRPReport.php trunk/Manufacturers.php trunk/PDFChequeListing.php trunk/PDFCustomerList.php trunk/PDFDIFOT.php trunk/PDFDeliveryDifferences.php trunk/PDFLowGP.php trunk/PDFOrderStatus.php trunk/PDFOrdersInvoiced.php trunk/PDFPeriodStockTransListing.php trunk/PDFPriceList.php trunk/PDFRemittanceAdvice.php trunk/PDFStockCheckComparison.php trunk/PDFSuppTransListing.php trunk/PO_PDFPurchOrder.php trunk/PO_SelectOSPurchOrder.php trunk/PaymentMethods.php trunk/PaymentTerms.php trunk/PcAssignCashToTab.php trunk/PcAuthorizeExpenses.php trunk/PcClaimExpensesFromTab.php trunk/PcExpenses.php trunk/PcReportTab.php trunk/PcTabs.php trunk/PcTypeTabs.php trunk/PricesBasedOnMarkUp.php trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php trunk/ReverseGRN.php trunk/SalesAnalReptCols.php trunk/SalesAnalRepts.php trunk/SalesCategories.php trunk/SalesGLPostings.php trunk/SalesGraph.php trunk/SalesPeople.php trunk/SalesTypes.php trunk/SelectAsset.php trunk/SelectCreditItems.php trunk/SelectGLAccount.php trunk/SelectRecurringSalesOrder.php trunk/SelectSalesOrder.php trunk/ShipmentCosting.php trunk/Shipments.php trunk/Shippers.php trunk/Shipt_Select.php trunk/SpecialOrder.php trunk/StockAdjustments.php trunk/StockCheck.php trunk/StockCostUpdate.php trunk/StockCounts.php trunk/StockLocMovements.php trunk/StockLocTransfer.php trunk/StockLocTransferReceive.php trunk/StockMovements.php trunk/StockQuantityByDate.php trunk/StockReorderLevel.php trunk/StockSerialItemResearch.php trunk/StockStatus.php trunk/StockTransfers.php trunk/StockUsage.php trunk/SuppContractChgs.php trunk/SuppInvGRNs.php trunk/SuppPaymentRun.php trunk/SuppShiptChgs.php trunk/SuppTransGLAnalysis.php trunk/SupplierAllocations.php trunk/SupplierBalsAtPeriodEnd.php trunk/SupplierContacts.php trunk/SupplierInquiry.php trunk/SupplierInvoice.php trunk/SupplierTenderCreate.php trunk/SupplierTenders.php trunk/SupplierTransInquiry.php trunk/SupplierTypes.php trunk/Suppliers.php trunk/Tax.php trunk/TaxAuthorities.php trunk/TaxAuthorityRates.php trunk/TaxCategories.php trunk/TaxProvinces.php trunk/TopItems.php trunk/UnitsOfMeasure.php trunk/UserSettings.php trunk/WWW_Access.php trunk/WWW_Users.php trunk/WorkCentres.php trunk/WorkOrderEntry.php trunk/Z_ChangeBranchCode.php trunk/Z_ChangeCustomerCode.php trunk/Z_ChangeStockCategory.php trunk/Z_ChangeStockCode.php trunk/Z_ChangeSupplierCode.php trunk/Z_DeleteSalesTransActions.php trunk/Z_ImportFixedAssets.php trunk/Z_ImportStocks.php trunk/Z_MakeNewCompany.php trunk/Z_ReApplyCostToSA.php trunk/Z_RePostGLFromPeriod.php trunk/Z_UpdateChartDetailsBFwd.php trunk/Z_Upgrade_3.04-3.05.php trunk/Z_Upgrade_3.05-3.06.php trunk/Z_Upgrade_3.07-3.08.php trunk/Z_Upgrade_3.08-3.09.php trunk/Z_Upgrade_3.09-3.10.php trunk/Z_Upgrade_3.10-3.11.php trunk/Z_Upgrade_3.11-4.00.php trunk/Z_UploadForm.php trunk/Z_poAddLanguage.php trunk/Z_poEditLangHeader.php trunk/Z_poEditLangModule.php trunk/Z_poEditLangRemaining.php trunk/Z_poRebuildDefault.php trunk/includes/InputSerialItemsExisting.php Added Paths: ----------- trunk/build/check_syntax.sh Removed Paths: ------------- trunk/build/syntax_check.sh Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/Areas.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -196,8 +196,8 @@ $_POST['AreaCode'] = $myrow['areacode']; $_POST['AreaDescription'] = $myrow['areadescription']; - echo '<input type=hidden name=SelectedArea VALUE=' . $SelectedArea . '>'; - echo '<input type=hidden name=AreaCode VALUE=' .$_POST['AreaCode'] . '>'; + echo '<input type=hidden name=SelectedArea value=' . $SelectedArea . '>'; + echo '<input type=hidden name=AreaCode value=' .$_POST['AreaCode'] . '>'; echo '<table class=selection><tr><td>' . _('Area Code') . ':</td><td>' . $_POST['AreaCode'] . '</td></tr>'; } else { Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/BOMInquiry.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -23,7 +23,7 @@ " <b>" . _('description') . "</b>:</font></td><td><input tabindex='1' type='Text' name='Keywords' size=20 maxlength=25></td> <td><font size=3><b>" . _('OR') . "</b></font></td><td><font size=1>" . _('Enter extract of the') . " <b>" . _('Stock Code') . "</b>:</font></td><td><input tabindex='2' type='Text' name='StockCode' size=15 maxlength=20></td> - </tr></table><br><div class='centre'><input tabindex='3' type=submit name='Search' VALUE=" . _('Search Now') . "></div><br>"; + </tr></table><br><div class='centre'><input tabindex='3' type=submit name='Search' value=" . _('Search Now') . "></div><br>"; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; } @@ -113,7 +113,7 @@ $StockOnHand = number_format($myrow['totalonhand'],2); } $tabindex=$j+4; - printf("<td><input tabindex='".$tabindex."' type=submit name='StockID' VALUE='%s'</td> + printf("<td><input tabindex='".$tabindex."' type=submit name='StockID' value='%s'</td> <td>%s</td> <td class=number>%s</td> <td>%s</td></tr>", Modified: trunk/BOMListing.php =================================================================== --- trunk/BOMListing.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/BOMListing.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -121,9 +121,9 @@ echo '<form action=' . $_SERVER['PHP_SELF'] . ' method="POST"><table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<tr><td>' . _('From Inventory Part Code') . ':' . '</font></td><td><input tabindex="1" type=text name=FromCriteria size=20 maxlength=20 VALUE="1"></td></tr>'; + echo '<tr><td>' . _('From Inventory Part Code') . ':' . '</font></td><td><input tabindex="1" type=text name=FromCriteria size=20 maxlength=20 value="1"></td></tr>'; - echo '<tr><td>' . _('To Inventory Part Code') . ':' . '</td><td><input tabindex="2" type=text name=ToCriteria size=20 maxlength=20 VALUE="zzzzzzz"></td></tr>'; + echo '<tr><td>' . _('To Inventory Part Code') . ':' . '</td><td><input tabindex="2" type=text name=ToCriteria size=20 maxlength=20 value="zzzzzzz"></td></tr>'; echo '</table><br><div class="centre"><input tabindex="3" type=Submit Name="PrintPDF" Value="' . _('Print PDF') . '"></div>'; Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/BOMs.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -578,15 +578,15 @@ $_POST['AutoIssue'] = $myrow['autoissue']; prnMsg(_('Edit the details of the selected component in the fields below') . '. <br>' . _('Click on the Enter Information button to update the component details'),'info'); - echo '<br><input type=hidden name="SelectedParent" VALUE="'.$SelectedParent.'">'; - echo '<input type=hidden name="SelectedComponent" VALUE="'.$SelectedComponent.'">'; + echo '<br><input type=hidden name="SelectedParent" value="'.$SelectedParent.'">'; + echo '<input type=hidden name="SelectedComponent" value="'.$SelectedComponent.'">'; echo '<table class=selection>'; echo '<tr><th colspan=13><div class="centre"><font color=blue size=3><b>'. ('Edit Component Details') .'</font></b></th></tr>'; echo '<tr><td>' . _('Component') . ':</td><td><b>' . $SelectedComponent . '</b></td></tr>'; } else { //end of if $SelectedComponent - echo '<input type=hidden name="SelectedParent" VALUE="'.$SelectedParent.'">'; + echo '<input type=hidden name="SelectedParent" value="'.$SelectedParent.'">'; /* echo "Enter the details of a new component in the fields below. <br>Click on 'Enter Information' to add the new component, once all fields are completed."; */ echo '<table class=selection>'; @@ -627,7 +627,7 @@ while ($myrow = DB_fetch_array($result)) { - echo '<option VALUE="'.$myrow['stockid'].'">' . str_pad($myrow['stockid'],21, '_', STR_PAD_RIGHT) . $myrow['description'] . '</option>'; + echo '<option value="'.$myrow['stockid'].'">' . str_pad($myrow['stockid'],21, '_', STR_PAD_RIGHT) . $myrow['description'] . '</option>'; } //end while loop echo '</select></td></tr>'; @@ -641,9 +641,9 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['LocCode']) and $myrow['loccode']==$_POST['LocCode']) { - echo '<option selected VALUE="'.$myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option selected value="'.$myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option VALUE="'.$myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option value="'.$myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } //end while loop @@ -665,9 +665,9 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['WorkCentreAdded']) and $myrow['code']==$_POST['WorkCentreAdded']) { - echo '<option selected VALUE="'.$myrow['code'] . '">' . $myrow['description'] . '</option>'; + echo '<option selected value="'.$myrow['code'] . '">' . $myrow['description'] . '</option>'; } else { - echo '<option VALUE="'.$myrow['code'] . '">' . $myrow['description'] . '</option>'; + echo '<option value="'.$myrow['code'] . '">' . $myrow['description'] . '</option>'; } } //end while loop @@ -694,10 +694,10 @@ echo '<tr><td>' . _('Effective After') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td> <td><input ' . (in_array('EffectiveAfter',$Errors) ? 'class="inputerror"' : '' ) . - ' tabindex="5" type="Text" name="EffectiveAfter" class=date alt="'.$_SESSION['DefaultDateFormat'].'" size=11 maxlength=10 VALUE=' . $_POST['EffectiveAfter'] .'> + ' tabindex="5" type="Text" name="EffectiveAfter" class=date alt="'.$_SESSION['DefaultDateFormat'].'" size=11 maxlength=10 value=' . $_POST['EffectiveAfter'] .'> </td></tr><tr><td>' . _('Effective To') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td><td> <input ' . (in_array('EffectiveTo',$Errors) ? 'class="inputerror"' : '' ) . - ' tabindex="6" type="Text" name="EffectiveTo" class=date alt="'.$_SESSION['DefaultDateFormat'].'" size=11 maxlength=10 VALUE="' . $_POST['EffectiveTo'] .'"></td></tr>'; + ' tabindex="6" type="Text" name="EffectiveTo" class=date alt="'.$_SESSION['DefaultDateFormat'].'" size=11 maxlength=10 value="' . $_POST['EffectiveTo'] .'"></td></tr>'; if ($ParentMBflag=='M' OR $ParentMBflag=='G'){ echo '<tr><td>' . _('Auto Issue this Component to Work Orders') . ':</td> @@ -708,17 +708,17 @@ $_POST['AutoIssue'] = $_SESSION['AutoIssue']; } if ($_POST['AutoIssue']==0) { - echo '<option selected VALUE=0>' . _('No') . '</option>'; - echo '<option VALUE=1>' . _('Yes') . '</option>'; + echo '<option selected value=0>' . _('No') . '</option>'; + echo '<option value=1>' . _('Yes') . '</option>'; } else { - echo '<option selected VALUE=1>' . _('Yes') . '</option>'; - echo '<option VALUE=0>' . _('No') . '</option>'; + echo '<option selected value=1>' . _('Yes') . '</option>'; + echo '<option value=0>' . _('No') . '</option>'; } echo '</select></td></tr>'; } else { - echo '<input type=hidden name="AutoIssue" VALUE=0>'; + echo '<input type=hidden name="AutoIssue" value=0>'; } echo '</table><br><div class="centre"><input tabindex="8" type="Submit" name="Submit" value="' . _('Enter Information') . '"></form></div>'; @@ -829,7 +829,7 @@ $StockOnHand = number_format($myrow['totalonhand'],2); } $tab = $j+3; - printf('<td><input tabindex="'.$tab.'" type=submit name="Select" VALUE="%s" /></td> + printf('<td><input tabindex="'.$tab.'" type=submit name="Select" value="%s" /></td> <td>%s</td> <td class=number>%s</td> <td>%s</td></tr>', Modified: trunk/BankAccounts.php =================================================================== --- trunk/BankAccounts.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/BankAccounts.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -279,8 +279,8 @@ $_POST['CurrCode'] = $myrow['currcode']; $_POST['DefAccount'] = $myrow['invoice']; - echo '<input type=hidden name=SelectedBankAccount VALUE=' . $SelectedBankAccount . '>'; - echo '<input type=hidden name=AccountCode VALUE=' . $_POST['AccountCode'] . '>'; + echo '<input type=hidden name=SelectedBankAccount value=' . $SelectedBankAccount . '>'; + echo '<input type=hidden name=AccountCode value=' . $_POST['AccountCode'] . '>'; echo '<table class=selection> <tr><td>' . _('Bank Account GL Code') . ':</td><td>'; echo $_POST['AccountCode'] . '</td></tr>'; } else { //end of if $Selectedbank account only do the else when a new record is being entered @@ -298,9 +298,9 @@ $result = DB_query($sql,$db); while ($myrow = DB_fetch_array($result)) { if (isset($_POST['AccountCode']) and $myrow['accountcode']==$_POST['AccountCode']) { - echo '<option selected VALUE="'.$myrow['accountcode'] . '">' . $myrow['accountname'] . '</option>'; + echo '<option selected value="'.$myrow['accountcode'] . '">' . $myrow['accountname'] . '</option>'; } else { - echo '<option VALUE="'.$myrow['accountcode'] . '">' . $myrow['accountname'] . '</option>'; + echo '<option value="'.$myrow['accountcode'] . '">' . $myrow['accountname'] . '</option>'; } } //end while loop @@ -338,9 +338,9 @@ $result = DB_query("SELECT currabrev, currency FROM currencies",$db); while ($myrow = DB_fetch_array($result)) { if ($myrow['currabrev']==$_POST['CurrCode']) { - echo '<option selected VALUE="'.$myrow['currabrev'] . '">' . $myrow['currabrev'] . '</option>'; + echo '<option selected value="'.$myrow['currabrev'] . '">' . $myrow['currabrev'] . '</option>'; } else { - echo '<option VALUE="'.$myrow['currabrev'] . '">' . $myrow['currabrev'] . '</option>'; + echo '<option value="'.$myrow['currabrev'] . '">' . $myrow['currabrev'] . '</option>'; } } //end while loop @@ -356,13 +356,13 @@ $result = DB_query("SELECT invoice FROM bankaccounts where accountcode =" . $SelectedBankAccount ,$db); while ($myrow = DB_fetch_array($result)) { if ($myrow['invoice']== 1) { - echo '<option selected VALUE=1>'._('Yes').'</option><option value=0>'._('No').'</option>'; + echo '<option selected value=1>'._('Yes').'</option><option value=0>'._('No').'</option>'; } else { - echo '<option selected VALUE=0>'._('No').'</option><option value=1>'._('Yes').'</option>'; + echo '<option selected value=0>'._('No').'</option><option value=1>'._('Yes').'</option>'; } }//end while loop } else { - echo '<option VALUE=1>'._('Yes').'</option><option value=0>'._('No').'</option>'; + echo '<option value=1>'._('Yes').'</option><option value=0>'._('No').'</option>'; } echo '</select></td>'; Modified: trunk/BankMatching.php =================================================================== --- trunk/BankMatching.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/BankMatching.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -133,7 +133,7 @@ echo '</select></td></tr>'; -echo '</table><br><div class="centre"><input tabindex="6" type=submit name="ShowTransactions" VALUE="' . _('Show selected') . ' ' . $TypeName . '">'; +echo '</table><br><div class="centre"><input tabindex="6" type=submit name="ShowTransactions" value="' . _('Show selected') . ' ' . $TypeName . '">'; if (isset($_POST['BankAccount'])) { echo '<p><a href="'.$rootpath.'/BankReconciliation.php?Account='.$_POST['BankAccount'].'">' . _('Show reconciliation') . '</a></div>'; @@ -260,7 +260,7 @@ <td class=number>%s</td> <td class=number>%s</td> <td colspan=2>%s</td> - <td><input type="checkbox" name="Unclear_%s"><input type=hidden name="BankTrans_%s" VALUE=%s></td> + <td><input type="checkbox" name="Unclear_%s"><input type=hidden name="BankTrans_%s" value=%s></td> </tr>', $myrow['chequeno'], $myrow['ref'], @@ -288,7 +288,7 @@ <td>%s</td> <td class=number>%s</td> <td class=number>%s</td> - <td><input type="checkbox" name="Clear_%s"><input type=hidden name="BankTrans_%s" VALUE=%s></td> + <td><input type="checkbox" name="Clear_%s"><input type=hidden name="BankTrans_%s" value=%s></td> <td colspan=2><input type="text" maxlength=15 size=15 class=number name="AmtClear_%s"></td> </tr>', $myrow['chequeno'], @@ -314,7 +314,7 @@ } //end of while loop - echo '</table><br><div class="centre"><input type=hidden name="RowCounter" value=' . $i . '><input type=submit name="Update" VALUE="' . _('Update Matching') . '"></div>'; + echo '</table><br><div class="centre"><input type=hidden name="RowCounter" value=' . $i . '><input type=submit name="Update" value="' . _('Update Matching') . '"></div>'; } Modified: trunk/COGSGLPostings.php =================================================================== --- trunk/COGSGLPostings.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/COGSGLPostings.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -258,7 +258,7 @@ $_POST['StkCat'] = $myrow['stkcat']; $_POST['SalesType'] = $myrow['salestype']; - echo '<input type=hidden name="SelectedCOGSPostingID" VALUE="' . $SelectedCOGSPostingID . '">'; + echo '<input type=hidden name="SelectedCOGSPostingID" value="' . $SelectedCOGSPostingID . '">'; } //end of if $SelectedCOGSPostingID only do the else when a new record is being entered @@ -275,9 +275,9 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['Area']) and $myrow['areacode']==$_POST['Area']) { - echo '<option selected VALUE="'.$myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; + echo '<option selected value="'.$myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; } else { - echo '<option VALUE="'.$myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; + echo '<option value="'.$myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; } } //end while loop @@ -289,13 +289,13 @@ echo '</select></td></tr> <tr><td>' . _('Stock Category') . ':</td> <td><select tabindex=2 name="StkCat"> - <option VALUE="ANY">' . _('Any Other') . '</option>'; + <option value="ANY">' . _('Any Other') . '</option>'; while ($myrow = DB_fetch_array($result)) { if (isset($_POST['StkCat']) and $myrow["categoryid"]==$_POST['StkCat']) { - echo '<option selected VALUE="'.$myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; + echo '<option selected value="'.$myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } else { - echo '<option VALUE="'.$myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; + echo '<option value="'.$myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } } //end while loop @@ -308,13 +308,13 @@ echo '</select></td></tr> <tr><td>' . _('Sales Type') . ' / ' . _('Price List') . ':</td> <td><select tabindex=3 name="SalesType"> - <option VALUE="AN">' . _('Any Other') . '</option>'; + <option value="AN">' . _('Any Other') . '</option>'; while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SalesType']) and $myrow['typeabbrev']==$_POST['SalesType']) { - echo '<option selected VALUE="'.$myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; + echo '<option selected value="'.$myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; } else { - echo '<option VALUE="'.$myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; + echo '<option value="'.$myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; } } //end while loop @@ -337,9 +337,9 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['GLCode']) and $myrow['accountcode']==$_POST['GLCode']) { - echo '<option selected VALUE="'.$myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; + echo '<option selected value="'.$myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; } else { - echo '<option VALUE="'.$myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; + echo '<option value="'.$myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; } } //end while loop Modified: trunk/CompanyPreferences.php =================================================================== --- trunk/CompanyPreferences.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/CompanyPreferences.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -279,9 +279,9 @@ while ($myrow = DB_fetch_array($result)) { if ($_POST['CurrencyDefault']==$myrow['currabrev']){ - echo '<option selected VALUE="'. $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; + echo '<option selected value="'. $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; } else { - echo '<option VALUE="' . $myrow['currabrev'] . '">' . $myrow['currency']. '</option>'; + echo '<option value="' . $myrow['currabrev'] . '">' . $myrow['currency']. '</option>'; } } //end while loop @@ -302,9 +302,9 @@ while ($myrow = DB_fetch_row($result)) { if ($_POST['DebtorsAct']==$myrow[0]){ - echo '<option selected VALUE="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option selected value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; } else { - echo '<option VALUE="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; } } //end while loop @@ -316,9 +316,9 @@ while ($myrow = DB_fetch_row($result)) { if ($_POST['CreditorsAct']==$myrow[0]){ - echo '<option selected VALUE="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option selected value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; } else { - echo '<option VALUE="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; } } //end while loop @@ -330,9 +330,9 @@ while ($myrow = DB_fetch_row($result)) { if ($_POST['PayrollAct']==$myrow[0]){ - echo '<option selected VALUE="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option selected value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; } else { - echo '<option VALUE="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; } } //end while loop @@ -344,9 +344,9 @@ while ($myrow = DB_fetch_row($result)) { if ($_POST['GRNAct']==$myrow[0]){ - echo '<option selected VALUE="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option selected value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; } else { - echo '<option VALUE="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; } } //end while loop @@ -358,9 +358,9 @@ while ($myrow = DB_fetch_row($result)) { if ($_POST['RetainedEarnings']==$myrow[0]){ - echo '<option selected VALUE="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option selected value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; } else { - echo '<option VALUE="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; } } //end while loop @@ -381,9 +381,9 @@ while ($myrow = DB_fetch_row($result)) { if ($_POST['FreightAct']==$myrow[0]){ - echo '<option selected VALUE="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option selected value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; } else { - echo '<option VALUE="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; } } //end while loop @@ -396,9 +396,9 @@ while ($myrow = DB_fetch_row($result)) { if ($_POST['ExchangeDiffAct']==$myrow[0]){ - echo '<option selected VALUE="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option selected value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; } else { - echo '<option VALUE="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; } } //end while loop @@ -411,9 +411,9 @@ while ($myrow = DB_fetch_row($result)) { if ($_POST['PurchasesExchangeDiffAct']==$myrow[0]){ - echo '<option selected VALUE="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option selected value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; } else { - echo '<option VALUE="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; } } //end while loop @@ -426,9 +426,9 @@ while ($myrow = DB_fetch_row($result)) { if ($_POST['PytDiscountAct']==$myrow[0]){ - echo '<option selected VALUE="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option selected value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; } else { - echo '<option VALUE="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; } } //end while loop @@ -440,11 +440,11 @@ <td><select tabindex="23" Name=GLLink_Debtors>'; if ($_POST['GLLink_Debtors']==0){ - echo '<option selected VALUE=0>' . _('No') . '</option>'; - echo '<option VALUE=1>' . _('Yes') . '</option>'; + echo '<option selected value=0>' . _('No') . '</option>'; + echo '<option value=1>' . _('Yes') . '</option>'; } else { - echo '<option selected VALUE=1>' . _('Yes') . '</option>'; - echo '<option VALUE=0>' . _('No') . '</option>'; + echo '<option selected value=1>' . _('Yes') . '</option>'; + echo '<option value=0>' . _('No') . '</option>'; } echo '</select></td></tr>'; @@ -453,11 +453,11 @@ <td><select tabindex="24" Name=GLLink_Creditors>'; if ($_POST['GLLink_Creditors']==0){ - echo '<option selected VALUE=0>' . _('No') . '</option>'; - echo '<option VALUE=1>' . _('Yes') . '</option>'; + echo '<option selected value=0>' . _('No') . '</option>'; + echo '<option value=1>' . _('Yes') . '</option>'; } else { - echo '<option selected VALUE=1>' . _('Yes') . '</option>'; - echo '<option VALUE=0>' . _('No') . '</option>'; + echo '<option selected value=1>' . _('Yes') . '</option>'; + echo '<option value=0>' . _('No') . '</option>'; } echo '</select></td></tr>'; @@ -466,11 +466,11 @@ <td><select tabindex="25" Name=GLLink_Stock>'; if ($_POST['GLLink_Stock']==0){ - echo '<option selected VALUE=0>' . _('No') . '</option>'; - echo '<option VALUE=1>' . _('Yes') . '</option>'; + echo '<option selected value=0>' . _('No') . '</option>'; + echo '<option value=1>' . _('Yes') . '</option>'; } else { - echo '<option selected VALUE=1>' . _('Yes') . '</option>'; - echo '<option VALUE=0>' . _('No') . '</option>'; + echo '<option selected value=1>' . _('Yes') . '</option>'; + echo '<option value=0>' . _('No') . '</option>'; } echo '</select></td></tr>'; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/ConfirmDispatch_Invoice.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -474,7 +474,7 @@ echo '<td class=number>' . $_SESSION['Items']->FreightCost . '</td>'; } else { echo '<td class=number><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" - name="ChargeFreightCost" VALUE="' . $_SESSION['Items']->FreightCost . '"></td>'; + name="ChargeFreightCost" value="' . $_SESSION['Items']->FreightCost . '"></td>'; } $_POST['ChargeFreightCost'] = $_SESSION['Items']->FreightCost; } @@ -504,7 +504,7 @@ echo $FreightTaxLine->TaxRate * 100 ; } else { echo '<input type="text" class="number" name="FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . - '" maxlength="4" size="4" VALUE="' . $FreightTaxLine->TaxRate * 100 . '">'; + '" maxlength="4" size="4" value="' . $FreightTaxLine->TaxRate * 100 . '">'; } if ($FreightTaxLine->TaxOnTax ==1){ @@ -1659,7 +1659,7 @@ $j++; echo '<br><input type=submit tabindex='.$j.' name="ProcessInvoice" Value="'._('Process Invoice').'" /></div>'; - echo '<input type=hidden name="ShipVia" VALUE="' . $_SESSION['Items']->ShipVia . '">'; + echo '<input type=hidden name="ShipVia" value="' . $_SESSION['Items']->ShipVia . '">'; } echo '</form>'; Modified: trunk/CreditItemsControlled.php =================================================================== --- trunk/CreditItemsControlled.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/CreditItemsControlled.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -70,7 +70,7 @@ echo '<div class="centre">'; if ($CreditLink == 'Credit_Invoice.php'){ - echo '<input type=hidden name="CreditInvoice" VALUE="Yes">'; + echo '<input type=hidden name="CreditInvoice" value="Yes">'; } echo '<br><a href="' . $rootpath . '/' . $CreditLink . '?' . SID . '">'. _('Back to Credit Note Entry'). '</a>'; Modified: trunk/CreditStatus.php =================================================================== --- trunk/CreditStatus.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/CreditStatus.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -213,8 +213,8 @@ $_POST['ReasonDescription'] = $myrow['reasondescription']; $_POST['DisallowInvoices'] = $myrow['dissallowinvoices']; - echo '<input type=hidden name="SelectedReason" VALUE="' . $SelectedReason . '">'; - echo '<input type=hidden name="ReasonCode" VALUE="' . $_POST['ReasonCode'] . '">'; + echo '<input type=hidden name="SelectedReason" value="' . $SelectedReason . '">'; + echo '<input type=hidden name="ReasonCode" value="' . $_POST['ReasonCode'] . '">'; echo '<table class=selection><tr><td>'. _('Status Code') .':</td><td>'; echo $_POST['ReasonCode'] . '</td></tr>'; @@ -226,7 +226,7 @@ <tr> <td>'. _('Status Code') .':</td> <td><input ' . (in_array('ReasonCode',$Errors) ? 'class="inputerror"' : '' ) . - ' tabindex=1 type="text" name="ReasonCode" VALUE="'. $_POST['ReasonCode'] .'" size=3 maxlength=2></td> + ' tabindex=1 type="text" name="ReasonCode" value="'. $_POST['ReasonCode'] .'" size=3 maxlength=2></td> </tr>'; } @@ -236,7 +236,7 @@ echo '<tr> <td>'. _('Description') .':</td> <td><input ' . (in_array('ReasonDescription',$Errors) ? 'class="inputerror"' : '' ) . - ' tabindex=2 type="text" name="ReasonDescription" VALUE="'. $_POST['ReasonDescription'] .'" size="28" maxlength="30"> + ' tabindex=2 type="text" name="ReasonDescription" value="'. $_POST['ReasonDescription'] .'" size="28" maxlength="30"> </td></tr> <tr><td>'. _('Disallow Invoices') . '</td>'; if (isset($_POST['DisallowInvoices']) and $_POST['DisallowInvoices']==1) { Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/Credit_Invoice.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -328,8 +328,8 @@ $DisplayLineTotal = number_format($LineTotal,2); $j++; - echo "<td><input tabindex=".$j." type=text class=number name='Price_" . $LnItm->LineNumber . "' maxlength=12 size=6 VALUE=" . $LnItm->Price . "></td> - <td><input tabindex=".$j." type=text class=number name='Discount_" . $LnItm->LineNumber . "' maxlength=3 size=3 VALUE=" . ($LnItm->DiscountPercent * 100) . "></td> + echo "<td><input tabindex=".$j." type=text class=number name='Price_" . $LnItm->LineNumber . "' maxlength=12 size=6 value=" . $LnItm->Price . "></td> + <td><input tabindex=".$j." type=text class=number name='Discount_" . $LnItm->LineNumber . "' maxlength=3 size=3 value=" . ($LnItm->DiscountPercent * 100) . "></td> <td class=number>$DisplayLineTotal</td>"; /*Need to list the taxes applicable to this line */ @@ -423,7 +423,7 @@ } if (!isset($_POST['ProcessCredit'])) { - echo '<input type=text class=number name=FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . ' maxlength=4 size=4 VALUE=' . $FreightTaxLine->TaxRate * 100 . '>'; + echo '<input type=text class=number name=FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . ' maxlength=4 size=4 value=' . $FreightTaxLine->TaxRate * 100 . '>'; } if ($FreightTaxLine->TaxOnTax ==1){ $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * ($_SESSION['CreditItems']->FreightCost + $FreightTaxTotal)); @@ -1463,15 +1463,15 @@ if (!isset($_POST['CreditType']) OR $_POST['CreditType']=="Return"){ echo '<option selected value="Return">' . _('Goods returned to store') . '</option>'; - echo '<option VALUE="WriteOff">' . _('Goods written off') . '</option>'; - echo '<option VALUE="ReverseOverCharge">' . _('Reverse overcharge') . '</option>'; + echo '<option value="WriteOff">' . _('Goods written off') . '</option>'; + echo '<option value="ReverseOverCharge">' . _('Reverse overcharge') . '</option>'; } elseif($_POST['CreditType']=='WriteOff') { echo '<option selected value="WriteOff">' . _('Goods written off') . '</option>'; - echo '<option VALUE="Return">' . _('Goods returned to store') . '</option>'; - echo '<option VALUE="ReverseOverCharge">' . _('Reverse overcharge') . '</option>'; + echo '<option value="Return">' . _('Goods returned to store') . '</option>'; + echo '<option value="ReverseOverCharge">' . _('Reverse overcharge') . '</option>'; } else { - echo '<option VALUE="WriteOff">' . _('Goods written off') . '</option>'; - echo '<option VALUE="Return">' . _('Goods returned to store') . '</option>'; + echo '<option value="WriteOff">' . _('Goods written off') . '</option>'; + echo '<option value="Return">' . _('Goods returned to store') . '</option>'; echo '<option selected value="ReverseOverCharge">' . _('Reverse overcharge') . '</option>'; } echo "</select></td></tr>"; Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/Currencies.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -300,8 +300,8 @@ - echo '<input type="hidden" name="SelectedCurrency" VALUE="' . $SelectedCurrency . '">'; - echo '<input type="hidden" name="Abbreviation" VALUE="' . $_POST['Abbreviation'] . '">'; + echo '<input type="hidden" name="SelectedCurrency" value="' . $SelectedCurrency . '">'; + echo '<input type="hidden" name="Abbreviation" value="' . $_POST['Abbreviation'] . '">'; echo '<table class=selection><tr> <td>' . _('ISO 4217 Currency Code').':</td> <td>'; @@ -317,22 +317,22 @@ echo '<tr><td>'._('Currency Name').':</td>'; echo '<td>'; if (!isset($_POST['CurrencyName'])) {$_POST['CurrencyName']='';} - echo '<input ' . (in_array('CurrencyName',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="CurrencyName" size=20 maxlength=20 VALUE="' . $_POST['CurrencyName'] . '">'; + echo '<input ' . (in_array('CurrencyName',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="CurrencyName" size=20 maxlength=20 value="' . $_POST['CurrencyName'] . '">'; echo '</td></tr>'; echo '<tr><td>'._('Country').':</td>'; echo '<td>'; if (!isset($_POST['Country'])) {$_POST['Country']='';} - echo '<input ' . (in_array('Country',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Country" size=30 maxlength=50 VALUE="' . $_POST['Country'] . '">'; + echo '<input ' . (in_array('Country',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Country" size=30 maxlength=50 value="' . $_POST['Country'] . '">'; echo '</td></tr>'; echo '<tr><td>'._('Hundredths Name').':</td>'; echo '<td>'; if (!isset($_POST['HundredsName'])) {$_POST['HundredsName']='';} - echo '<input ' . (in_array('HundredsName',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="HundredsName" size=10 maxlength=15 VALUE="'. $_POST['HundredsName'].'">'; + echo '<input ' . (in_array('HundredsName',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="HundredsName" size=10 maxlength=15 value="'. $_POST['HundredsName'].'">'; echo '</td></tr>'; echo '<tr><td>'._('Exchange Rate').':</td>'; echo '<td>'; if (!isset($_POST['ExchangeRate'])) {$_POST['ExchangeRate']='';} - echo '<input ' . (in_array('ExchangeRate',$Errors) ? 'class="inputerror"' : '' ) .' type="text" class=number name="ExchangeRate" size=10 maxlength=9 VALUE='. $_POST['ExchangeRate'].'>'; + echo '<input ' . (in_array('ExchangeRate',$Errors) ? 'class="inputerror"' : '' ) .' type="text" class=number name="ExchangeRate" size=10 maxlength=9 value='. $_POST['ExchangeRate'].'>'; echo '</td></tr>'; echo '</table>'; Modified: trunk/CustEDISetup.php =================================================================== --- trunk/CustEDISetup.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/CustEDISetup.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -101,11 +101,11 @@ if ($myrow['ediinvoices']==0){ - echo '<option selected VALUE=0>'._('Disabled'); - echo '<option VALUE=1>'._('Enabled'); + echo '<option selected value=0>'._('Disabled'); + echo '<option value=1>'._('Enabled'); } else { - echo '<option VALUE=0>'._('Disabled'); - echo '<option selected VALUE=1>'._('Enabled'); + echo '<option value=0>'._('Disabled'); + echo '<option selected value=1>'._('Enabled'); } echo "</select><a href='$rootpath/EDIMessageFormat.php?" . SID . "&MessageType=INVOIC&PartnerCode=" . $_SESSION['CustomerID'] . "'>"._('Create') . '/' . _('Edit Invoice Message Format').'</a></td></tr>'; @@ -115,11 +115,11 @@ if ($myrow['ediorders']==0){ - echo '<option selected VALUE=0>'._('Disabled'); - echo '<option VALUE=1>'._('Enabled'); + echo '<option selected value=0>'._('Disabled'); + echo '<option value=1>'._('Enabled'); } else { - echo '<option VALUE=0>'._('Disabled'); - echo '<option selected VALUE=1>'._('Enabled'); + echo '<option value=0>'._('Disabled'); + echo '<option selected value=1>'._('Enabled'); } echo '</select></td></tr>'; Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/CustomerBranches.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -538,8 +538,8 @@ $_POST['DeliverBlind'] = $myrow['deliverblind']; } - echo '<input type=hidden name="SelectedBranch" VALUE="' . $SelectedBranch . '">'; - echo '<input type=hidden name="BranchCode" VALUE="' . $_POST['BranchCode'] . '">'; + echo '<input type=hidden name="SelectedBranch" value="' . $SelectedBranch . '">'; + echo '<input type=hidden name="BranchCode" value="' . $_POST['BranchCode'] . '">'; echo '<p Class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . _('Change Details for Branch'). ' '. $SelectedBranch . '</p>'; @@ -643,9 +643,9 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['Salesman']) and $myrow['salesmancode']==$_POST['Salesman']) { - echo '<option selected VALUE="'.$myrow['salesmancode'] . '">' . $myrow['salesmanname'] . '</option>'; + echo '<option selected value="'.$myrow['salesmancode'] . '">' . $myrow['salesmanname'] . '</option>'; } else { - echo '<option VALUE="'.$myrow['salesmancode'] . '">' . $myrow['salesmanname'] . '</option>'; + echo '<option value="'.$myrow['salesmancode'] . '">' . $myrow['salesmanname'] . '</option>'; } } //end while loop @@ -667,9 +667,9 @@ echo '<td><select tabindex=14 name="Area">'; while ($myrow = DB_fetch_array($result)) { if (isset($_POST['Area']) and $myrow['areacode']==$_POST['Area']) { - echo '<option selected VALUE="'.$myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; + echo '<option selected value="'.$myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; } else { - echo '<option VALUE="'.$myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; + echo '<option value="'.$myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; } } //end while loop @@ -693,9 +693,9 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['DefaultLocation']) and $myrow['loccode']==$_POST['DefaultLocation']) { - echo '<option selected VALUE="'.$myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option selected value="'.$myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option VALUE="'.$myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option value="'.$myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } //end while loop @@ -747,9 +747,9 @@ while ($myrow = DB_fetch_array($result)) { if (isset($_POST['TaxGroup']) and $myrow['taxgroupid']==$_POST['TaxGroup']) { - echo '<option selected VALUE="'. $myrow['taxgroupid'] . '">' . $myrow['taxgroupdescription'] . '</option>'; + echo '<option selected value="'. $myrow['taxgroupid'] . '">' . $myrow['taxgroupdescription'] . '</option>'; } else { - echo '<option VALUE="'. $myrow['taxgroupid'] . '">' . $myrow['taxgroupdescription'] . '</option>'; + echo '<option value="'. $myrow['taxgroupid'] . '">' . $myrow['taxgroupdescription'] . '</option>'; } ; @@ -758,11 +758,11 @@ echo '</select></td></tr>'; echo '<tr><td>'._('Transactions on this branch').':</td><td><select tabindex=20 name="DisableTrans">'; if ($_POST['DisableTrans']==0){ - echo '<option selected VALUE=0>' . _('Enabled') . '</option>'; - echo '<option VALUE=1>' . _('Disabled') . '</option>'; + echo '<option selected value=0>' . _('Enabled') . '</option>'; + echo '<option value=1>' . _('Disabled') . '</option>'; } else { - echo '<option selected VALUE=1>' . _('Disabled') . '</option>'; - echo '<option VALUE=0>' . _('Enabled') . '</option>'; + echo '<option selected value=1>' . _('Disabled') . '</option>'; + echo '<option value=0>' . _('Enabled') . '</option>'; } echo ' </select></td></tr>'; @@ -772,9 +772,9 @@ $ShipperResults = DB_query($SQL,$db); while ($myrow=DB_fetch_array($ShipperResults)){ if (isset($_POST['DefaultShipVia'])and $myrow['shipper_id']==$_POST['DefaultShipVia']){ - echo '<option selected VALUE=' . $myrow['shipper_id'] . '>' . $myrow['shippername'] . '</option>'; + echo '<option selected value=' . $myrow['shipper_id'] . '>' . $myrow['shippername'] . '</option>'; }else { - echo '<option VALUE=' . $myrow['shipper_id'] . '>' . $myrow['shippername'] . '</option>'; + echo '<option value=' . $myrow['shipper_id'] . '>' . $myrow['shippername'] . '</option>'; } } @@ -786,9 +786,9 @@ echo '<tr><td>' . _('Default Packlist') . ':</td><td><select tabindex=22 name="DeliverBlind">'; for ($p = 1; $p <= 2; $p++) { if ($p == $_POST['DeliverBlind']) { - echo '<option VALUE=' . $p . ' selected>'; + echo '<option value=' . $p . ' selected>'; } else { - echo '<option VALUE=' . $p . '>'; + echo '<option value=' . $p . '>'; } switch ($p) { case 1: Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/CustomerReceipt.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -1074,7 +1074,7 @@ } if (isset($_SESSION['ReceiptBatch']->Items) and count($_SESSION['ReceiptBatch']->Items) > 0){ - echo '<div class="centre"><br/><input tabindex="13" type="submit" name="CommitBatch" VALUE="' . _('Accept and Process Batch') . '"></div>'; + echo '<div class="centre"><br/><input tabindex="13" type="submit" name="CommitBatch" value="' . _('Accept and Process Batch') . '"></div>'; } echo '</form>'; Modified: trunk/CustomerTransInquiry.php =================================================================== --- trunk/CustomerTransInquiry.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/CustomerTransInquiry.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -43,10 +43,10 @@ if (!isset($_POST['ToDate'])){ $_POST['ToDate'] = Date($_SESSION['DefaultDateFormat']); } -echo '<td>' . _('From') . ':</td><td><input tabindex="2" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="TEXT" name="FromDate" maxlength="10" size="11" VALUE="' . $_POST['FromDate'] . '"></td>'; -echo '<td>' . _('To') . ':</td><td><input tabindex="3" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="TEXT" name="ToDate" maxlength="10" size="11" VALUE="' . $_POST['ToDate'] . '"></td>'; +echo '<td>' . _('From') . ':</td><td><input tabindex="2" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="TEXT" name="FromDate" maxlength="10" size="11" value="' . $_POST['FromDate'] . '"></td>'; +echo '<td>' . _('To') . ':</td><td><input tabindex="3" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="TEXT" name="ToDate" maxlength="10" size="11" value="' . $_POST['ToDate'] . '"></td>'; -echo "</tr></table><br><div class='centre'><input tabindex=4 type=submit name='ShowResults' VALUE='" . _('Show Transactions') . "'>"; +echo "</tr></table><br><div class='centre'><input tabindex=4 type=submit name='ShowResults' value='" . _('Show Transactions') . "'>"; echo '</form></div>'; Modified: trunk/CustomerTypes.php =================================================================== --- trunk/CustomerTypes.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/CustomerTypes.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -241,8 +241,8 @@ $_POST['typeid'] = $myrow['typeid']; $_POST['typename'] = $myrow['typename']; - echo '<input type=hidden name="SelectedType" VALUE="' . $SelectedType . '">'; - echo '<input type=hidden name="typeid" VALUE=' . $_POST['typeid'] . '">'; + echo '<input type=hidden name="SelectedType" value="' . $SelectedType . '">'; + echo '<input type=hidden name="typeid" value=' . $_POST['typeid'] . '">'; echo '<table class=selection> <tr><td>'; // We dont allow the user to change an existing type code Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/Customers.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -588,14 +588,14 @@ echo '</select></td></tr>'; echo '<tr><td>' . _('Invoice Addressing') . ':</td><td><select tabindex="19" name="AddrInvBranch">'; - echo '<option selected VALUE=0>' . _('Address to HO') . '</option>'; - echo '<option VALUE=1>' . _('Address to Branch') . '</option>'; + echo '<option selected value=0>' . _('Address to HO') . '</option>'; + echo '<option value=1>' . _('Address to Branch') . '</option>'; echo '</select></td></tr>'; echo'</table></td></tr></table>'; if ($DataError ==0){ echo '<br /><div class="centre"><input tabindex=20 type="Submit" name="submit" value="' . _('Add New Customer') . - '"> <input tabindex=21 type=submit action=RESET VALUE="' . _('Reset') . '"></div>'; + '"> <input tabindex=21 type=submit action=RESET value="' . _('Reset') . '"></div>'; } echo '</form>'; @@ -749,9 +749,9 @@ <td><select name="typeid">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['typeid']==$myrow['typeid']){ - echo '<option selected VALUE="'. $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; + echo '<option selected value="'. $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } else { - echo '<option VALUE="'. $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; + echo '<option value="'. $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } } //end while loop DB_data_seek($result,0); @@ -791,9 +791,9 @@ <td><select name="PaymentTerms">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['PaymentTerms']==$myrow['termsindicator']){ - echo '<option selected VALUE="'. $myrow['termsindicator'] . '">' . $myrow['terms'] . '</option>'; + echo '<option selected value="'. $myrow['termsindicator'] . '">' . $myrow['terms'] . '</option>'; } else { - echo '<option VALUE='. $myrow['termsindicator'] . '">' . $myrow['terms'] . '</option>'; + echo '<option value='. $myrow['termsindicator'] . '">' . $myrow['terms'] . '</option>'; } } //end while loop DB_data_seek($result,0); @@ -810,9 +810,9 @@ <td><select name="HoldReason">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['HoldReason']==$myrow['reasoncode']){ - echo '<option selected VALUE='. $myrow['reasoncode'] . '">' . $myrow['reasondescription'] . '</option>'; + echo '<option selected value='. $myrow['reasoncode'] . '">' . $myrow['reasondescription'] . '</option>'; } else { - echo '<option VALUE='. $myrow['reasoncode'] . '">' . $myrow['reasondescription'] . '</option>'; + echo '<option value='. $myrow['reasoncode'] . '">' . $myrow['reasondescription'] . '</option>'; } } //end while loop DB_data_seek($result,0); @@ -867,11 +867,11 @@ echo '<tr><td>' . _('Invoice Addressing') . ':</td> <td><select name="AddrInvBranch">'; if ($_POST['InvAddrBranch']==0){ - echo '<option selected VALUE=0>' . _('Address to HO') . '</option>'; - echo '<option VALUE=1>' . _('Address to Branch') . '</option>'; + echo '<option selected value=0>' . _('Address to HO') . '</option>'; + echo '<option value=1>' . _('Address to Branch') . '</option>'; } else { - echo '<option VALUE=0>' . _('Address to HO') . '</option>'; - echo '<option selected VALUE=1>' . _('Address to Branch') . '</option>'; + echo '<option value=0>' . _('Address to HO') . '</option>'; + echo '<option selected value=1>' . _('Address to Branch') . '</option>'; } } @@ -895,7 +895,7 @@ <th>' . _('Phone Number') . '</th> <th>' . _('Notes') . '</th> <th>' . _('Edit') . '</th> - <th colspan=2><input type="Submit" name="addcontact" VALUE="Add Contact"></th></tr>'; + <th colspan=2><input type="Submit" name="addcontact" value="Add Contact"></th></tr>'; } $k=0; //row colour counter @@ -941,7 +941,7 @@ } }//END WHILE LIST LOOP echo '</table>'; - // echo "<input type='Submit' name='addcontact' VALUE='" . _('ADD Contact') . "'>"; + // echo "<input type='Submit' name='addcontact' value='" . _('ADD Contact') . "'>"; echo '<form method="post" action=' . $_SERVER['PHP_SELF'] . '?DebtorNo="'.$DebtorNo.'"&ID='.$ID.'&Edit'.$Edit.'>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($Edit) and $Edit!='') { @@ -995,11 +995,11 @@ echo'</td></tr></table>'; if (isset($_POST['New']) and $_POST['New']) { - echo '<div class="centre"><input type="Submit" name="submit" VALUE="' . _('Add New Customer') . - '"> <input type=submit name="reset" VALUE="' . _('Reset') . '"></div></form>'; + echo '<div class="centre"><input type="Submit" name="submit" value="' . _('Add New Customer') . + '"> <input type=submit name="reset" value="' . _('Reset') . '"></div></form>'; } else if (!isset($_GET['Modify'])){ - echo '<br /><div class="centre"><input type="Submit" name="submit" VALUE="' . _('Update Customer') . '">'; - echo ' <input type="Submit" name="delete" VALUE="' . _('Delete Customer') . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">'; + echo '<br /><div class="centre"><input type="Submit" name="submit" value="' . _('Update Customer') . '">'; + echo ' <input type="Submit" name="delete" value="' . _('Delete Customer') . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">'; } if(isset($_POST['addcontact']) AND (isset($_POST['addcontact'])!='')) { Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/DailySalesInquiry.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -55,7 +55,7 @@ } echo '</select></td>'; -echo '</tr></table><br /><div class="centre"><input tabindex=4 type=submit name="ShowResults" VALUE="' . _('Show Daily Sales For The Selected Month') . '">'; +echo '</tr></table><br /><div class="centre"><input tabindex=4 type=submit name="ShowResults" value="' . _('Show Daily Sales For The Selected Month') . '">'; echo '</form></div>'; echo '<br />'; /*Now get and display the sales data returned */ Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/DebtorsAtPeriodEnd.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -155,7 +155,7 @@ while ($myrow = DB_fetch_array($Periods,$db)){ - echo '<option VALUE=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']); + echo '<option value=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']); } } Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/DeliveryDetails.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -1045,10 +1045,10 @@ } echo '<tr><td>'. _('Charge Freight Cost inc tax') .':</td>'; -echo '<td><input type=text class=number size=10 maxlength=12 name="FreightCost" VALUE=' . $_SESSION['Items'.$identifier]->FreightCost . '></td>'; +echo '<td><input type=text class=number size=10 maxlength=12 name="FreightCost" value=' . $_SESSION['Items'.$identifier]->FreightCost . '></td>'; if ($_SESSION['DoFreightCalc']==true){ - echo '<td><input type=submit name="Update" VALUE="' . _('Recalc Freight Cost') . '"></td></tr>'; + echo '<td><input type=submit name="Update" value="' . _('Recalc Freight Cost') . '"></td></tr>'; } if ((!isset($_POST['ShipVia']) OR $_POST['ShipVia']=='') AND isset($_SESSION['Items'.$identifier]->ShipVia)){ @@ -1077,8 +1077,8 @@ echo '<option selected value=1>' . _('Yes'); echo '<option value=0>' . _('No'); } else { - echo '<option VALUE=1>' . _('Yes'); - echo '<option selected VALUE=0>' . _('No'); + echo '<option value=1>' . _('Yes'); + echo '<option selected value=0>' . _('No'); } echo '</select></td></tr>'; @@ -1089,9 +1089,9 @@ if ($_SESSION['ExistingOrder']==0){ echo '<br><br><input type=submit name="ProcessOrder" value="' . _('Place Order') . '">'; - echo '<br><br><input type=submit name="MakeRecurringOrder" VALUE="' . _('Create Recurring Order') . '">'; + echo '<br><br><input type=submit name="MakeRecurringOrder" value="' . _('Create Recurring Order') . '">'; } else { - echo '<br><input type=submit name="ProcessOrder" VALUE="' . _('Commit Order Changes') . '">'; + echo '<br><input type=submit name="ProcessOrder" value="' . _('Commit Order Changes') . '">'; } echo '</div></form>'; Modified: trunk/EDIMessageFormat.php =================================================================== --- trunk/EDIMessageFormat.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/EDIMessageFormat.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -190,12 +190,12 @@ echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '?MessageType=INVOIC&PartnerCode=' . $myrow['partnercode'] . '">' . _('Review Message Lines') . '</a></div>'; - echo '<input type=hidden name="SelectedMessageLine" VALUE="' . $SelectedMessageLine . '">'; - echo '<input type=hidden name="MessageType" VALUE="' . $myrow['messagetype'] . '">'; - echo '<input type=hidden name="PartnerCode" VALUE="' . $myrow['partnercode'] . '">'; + echo '<input type=hidden name="SelectedMessageLine" value="' . $SelectedMessageLine . '">'; + echo '<input type=hidden name="MessageType" value="' . $myrow['messagetype'] . '">'; + echo '<input type=hidden name="PartnerCode" value="' . $myrow['partnercode'] . '">'; } else { //end of if $SelectedMessageLine only do the else when a new record is being entered - echo '<input type=hidden name="MessageType" VALUE="' . $MessageType . '">'; - echo '<input type=hidden name="PartnerCode" VALUE="' . $PartnerCode . '">'; + echo '<input type=hidden name="MessageType" value="' . $MessageType . '">'; + echo '<input type=hidden name="PartnerCode" value="' . $PartnerCode . '">'; } echo '<table class=selection>'; @@ -209,18 +209,18 @@ echo '<select tabindex=2 name="Section">'; if ($_POST['Section']=='Heading') { - echo '<option selected VALUE="Heading">' . _('Heading') . '</option>'; + echo '<option selected value="Heading">' . _('Heading') . '</option>'; } else { echo '<option value="Heading">' . _('Heading') . '</option>'; } if (isset($_POST['Section']) and $_POST['Section']=='Detail') { - echo '<option selected VALUE="Detail">' . _('Detail') . '</option>'; + echo '<option selected value="Detail">' . _('Detail') . '</option>'; } else { echo '<option value="Detail">' . _('Detail') . '</option>'; } if (isset($_POST['Section']) and $_POST['Section']=='Summary') { - echo '<option selected VALUE="Summary">' . _('Summary') . '</option>'; + echo '<option selected value="Summary">' . _('Summary') . '</option>'; } else { echo '<option value="Summary">' . _('Summary') . '</option>'; } @@ -238,7 +238,7 @@ echo '</td></tr>'; echo '<tr><td>' . _('Line Text') . ':' .'</td>'; echo '<td>'; -echo '<input tabindex=4 type="Text" name="LineText" size=50 maxlength=50 VALUE='.$_POST['LineText'] .'>'; +echo '<input tabindex=4 type="Text" name="LineText" size=50 maxlength=50 value='.$_POST['LineText'] .'>'; echo '</td></tr>'; echo '</table><br>'; if (isset($_GET['SelectedMessageLine'])) { Modified: trunk/EmailCustTrans.php =================================================================== --- trunk/EmailCustTrans.php 2011-06-13 05:57:29 UTC (rev 5351) +++ trunk/EmailCustTrans.php 2011-06-13 06:21:26 UTC (rev 5352) @@ -40,8 +40,8 @@ echo '<form action="' . $_SERVER['PHP_SELF'] . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<input type=hidden name="TransNo" VALUE="' . $_GET['FromTransNo'] . '">'; -echo '<input type=hidden name="InvOrCredit" VALUE="' . $_GET['InvOrCredit'] . '>'; +echo '<input type=hidden name="TransNo" value="' . $_GET['FromTransNo'] . '">'; +echo '<input type=hidden name="InvOrCredit" value="' . $_GET['InvOrCredit'] . '>'; echo '<br /><table>'; @@ -63,10 +63,10 @@ } echo '<tr><td>' . _('Email') . ' ' . $_GET['InvOrCredit'] . ' ' .... [truncated message content] |
From: <tim...@us...> - 2011-06-14 07:50:03
|
Revision: 5353 http://weberp.svn.sourceforge.net/weberp/?rev=5353&view=rev Author: tim_schofield Date: 2011-06-14 07:49:51 +0000 (Tue, 14 Jun 2011) Log Message: ----------- Replace all instances of <br> tag with correctly formed <br /> tag Modified Paths: -------------- trunk/AccountSections.php trunk/AddCustomerContacts.php trunk/AddCustomerNotes.php trunk/AddCustomerTypeNotes.php trunk/AgedDebtors.php trunk/AgedSuppliers.php trunk/Areas.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/BOMInquiry.php trunk/BOMListing.php trunk/BOMs.php trunk/BankAccounts.php trunk/BankMatching.php trunk/BankReconciliation.php trunk/ConfirmDispatchControlled_Invoice.php trunk/ConfirmDispatch_Invoice.php trunk/CreditItemsControlled.php trunk/CreditStatus.php trunk/Credit_Invoice.php trunk/Currencies.php trunk/CustEDISetup.php trunk/CustLoginSetup.php trunk/CustWhereAlloc.php trunk/CustomerAllocations.php trunk/CustomerBranches.php trunk/CustomerInquiry.php trunk/CustomerReceipt.php trunk/CustomerTransInquiry.php trunk/CustomerTypes.php trunk/Customers.php trunk/DailyBankTransactions.php trunk/DailySalesInquiry.php trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/DiscountCategories.php trunk/DiscountMatrix.php trunk/EDIMessageFormat.php trunk/EDIProcessOrders.php trunk/EDISendInvoices.php trunk/EmailConfirmation.php trunk/EmailCustTrans.php trunk/FTP_RadioBeacon.php trunk/Factors.php trunk/FixedAssetItems.php trunk/FixedAssetLocations.php trunk/FixedAssetRegister.php trunk/FixedAssetTransfer.php trunk/FormDesigner.php trunk/FreightCosts.php trunk/GLAccountCSV.php trunk/GLAccountInquiry.php trunk/GLAccountReport.php trunk/GLAccounts.php trunk/GLBalanceSheet.php trunk/GLProfit_Loss.php trunk/GLTagProfit_Loss.php trunk/GLTags.php trunk/GLTrialBalance.php trunk/GeocodeSetup.php trunk/GetStockImage.php trunk/GoodsReceived.php trunk/GoodsReceivedControlled.php trunk/InventoryPlanningPrefSupplier.php trunk/InventoryQuantities.php trunk/Labels.php trunk/Locations.php trunk/MRPCalendar.php trunk/MRPDemandTypes.php trunk/MRPDemands.php trunk/MRPPlannedPurchaseOrders.php trunk/MRPReschedules.php trunk/MRPShortages.php trunk/MailInventoryValuation.php trunk/Manufacturers.php trunk/Numbers/Words/lang.cs.php trunk/Numbers/Words/lang.lt.php trunk/OrderDetails.php trunk/OutstandingGRNs.php trunk/PDFChequeListing.php trunk/PDFCustomerList.php trunk/PDFDIFOT.php trunk/PDFDeliveryDifferences.php trunk/PDFGrn.php trunk/PDFLowGP.php trunk/PDFOrderStatus.php trunk/PDFOrdersInvoiced.php trunk/PDFPeriodStockTransListing.php trunk/PDFPriceList.php trunk/PDFPrintLabel.php trunk/PDFQuotation.php trunk/PDFQuotationPortrait.php trunk/PDFRemittanceAdvice.php trunk/PDFStockCheckComparison.php trunk/PDFStockLocTransfer.php trunk/PDFStockTransfer.php trunk/PDFTopItems.php trunk/POReport.php trunk/PO_AuthorisationLevels.php trunk/PO_AuthoriseMyOrders.php trunk/PO_Chk_ShiptRef_JobRef.php trunk/PO_Items.php trunk/PO_OrderDetails.php trunk/PO_PDFPurchOrder.php trunk/PO_SelectOSPurchOrder.php trunk/PO_SelectPurchOrder.php trunk/PaymentAllocations.php trunk/PaymentMethods.php trunk/PaymentTerms.php trunk/PcAssignCashToTab.php trunk/PcAuthorizeExpenses.php trunk/PcClaimExpensesFromTab.php trunk/PcExpenses.php trunk/PcReportTab.php trunk/PcTabs.php trunk/PcTypeTabs.php trunk/Prices.php trunk/PricesByCost.php trunk/Prices_Customer.php trunk/PrintCustOrder.php trunk/PrintCustOrder_generic.php trunk/PrintCustStatements.php trunk/PrintCustTrans.php trunk/PrintSalesOrder_generic.php trunk/PurchData.php trunk/RecurringSalesOrders.php trunk/ReorderLevel.php trunk/ReorderLevelLocation.php trunk/ReverseGRN.php trunk/SMTPServer.php trunk/SalesAnalReptCols.php trunk/SalesCategories.php trunk/SalesGraph.php trunk/SalesPeople.php trunk/SalesTypes.php trunk/SecurityTokens.php trunk/SelectAsset.php trunk/SelectCreditItems.php trunk/SelectCustomer.php trunk/SelectGLAccount.php trunk/SelectSalesOrder.php trunk/SelectSupplier.php trunk/ShipmentCosting.php trunk/Shipments.php trunk/Shippers.php trunk/Shipt_Select.php trunk/SpecialOrder.php trunk/StockAdjustments.php trunk/StockAdjustmentsControlled.php trunk/StockCategories.php trunk/StockCheck.php trunk/StockCostUpdate.php trunk/StockCounts.php trunk/StockDispatch.php trunk/StockLocMovements.php trunk/StockLocStatus.php trunk/StockLocTransfer.php trunk/StockLocTransferReceive.php trunk/StockMovements.php trunk/StockSerialItemResearch.php trunk/StockSerialItems.php trunk/StockTransferControlled.php trunk/StockTransfers.php trunk/StockUsage.php trunk/StockUsageGraph.php trunk/Stocks.php trunk/SuppContractChgs.php trunk/SuppCreditGRNs.php trunk/SuppFixedAssetChgs.php trunk/SuppInvGRNs.php trunk/SuppLoginSetup.php trunk/SuppPaymentRun.php trunk/SuppPriceList.php trunk/SuppShiptChgs.php trunk/SuppTransGLAnalysis.php trunk/SupplierContacts.php trunk/SupplierCredit.php trunk/SupplierInvoice.php trunk/SupplierTenderCreate.php trunk/SupplierTenders.php trunk/SupplierTypes.php trunk/Suppliers.php trunk/Tax.php trunk/TaxAuthorities.php trunk/TaxAuthorityRates.php trunk/TaxCategories.php trunk/TaxGroups.php trunk/TaxProvinces.php trunk/UnitsOfMeasure.php trunk/UpgradeDatabase.php trunk/WWW_Access.php trunk/WWW_Users.php trunk/WhereUsedInquiry.php trunk/WorkCentres.php trunk/WorkOrderCosting.php trunk/WorkOrderReceive.php trunk/WorkOrderStatus.php trunk/Z_BottomUpCosts.php trunk/Z_ChangeCustomerCode.php trunk/Z_ChangeStockCategory.php trunk/Z_ChangeStockCode.php trunk/Z_ChangeSupplierCode.php trunk/Z_CheckAllocs.php trunk/Z_DataExport.php trunk/Z_DeleteCreditNote.php trunk/Z_DeleteInvoice.php trunk/Z_ImportChartOfAccounts.php trunk/Z_ImportFixedAssets.php trunk/Z_ImportGLAccountGroups.php trunk/Z_ImportGLAccountSections.php trunk/Z_ImportPartCodes.php trunk/Z_MakeNewCompany.php trunk/Z_MakeStockLocns.php trunk/Z_ReverseSuppPaymentRun.php trunk/Z_SalesIntegrityCheck.php trunk/Z_UpdateChartDetailsBFwd.php trunk/Z_Upgrade_3.10-3.11.php trunk/Z_Upgrade_3.11-4.00.php trunk/Z_index.php trunk/Z_poAddLanguage.php trunk/Z_poEditLangHeader.php trunk/Z_poEditLangModule.php trunk/Z_poEditLangRemaining.php trunk/Z_poRebuildDefault.php trunk/doc/Manual/ManualAPIFunctions.php trunk/doc/Manual/ManualARInquiries.html trunk/doc/Manual/ManualARReports.html trunk/doc/Manual/ManualARTransactions.html trunk/doc/Manual/ManualAccountsPayable.html trunk/doc/Manual/ManualAccountsReceivable.html trunk/doc/Manual/ManualContents.php trunk/doc/Manual/ManualContributors.html trunk/doc/Manual/ManualCreatingNewSystem.html trunk/doc/Manual/ManualCreditStatus.html trunk/doc/Manual/ManualCurrencies.html trunk/doc/Manual/ManualFixedAssets.html trunk/doc/Manual/ManualGeneralLedger.html trunk/doc/Manual/ManualGettingStarted.html trunk/doc/Manual/ManualHeader.html trunk/doc/Manual/ManualIntroduction.html trunk/doc/Manual/ManualInventory.html trunk/doc/Manual/ManualMRP.html trunk/doc/Manual/ManualManufacturing.html trunk/doc/Manual/ManualMultilanguage.html trunk/doc/Manual/ManualNewScripts.html trunk/doc/Manual/ManualPaymentTerms.html trunk/doc/Manual/ManualPettyCash.html trunk/doc/Manual/ManualPrices.html trunk/doc/Manual/ManualPurchaseOrdering.html trunk/doc/Manual/ManualReportBuilder.html trunk/doc/Manual/ManualRequirements.html trunk/doc/Manual/ManualSalesAnalysis.html trunk/doc/Manual/ManualSalesOrders.html trunk/doc/Manual/ManualSalesPeople.html trunk/doc/Manual/ManualSalesTypes.html trunk/doc/Manual/ManualSecuritySchema.html trunk/doc/Manual/ManualShipments.html trunk/doc/Manual/ManualSpecialUtilities.html trunk/doc/Manual/ManualSystemConventions.html trunk/doc/Manual/ManualTax.html trunk/geocode.php trunk/includes/DefineLabelClass.php trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsExisting.php trunk/includes/InputSerialItemsFile.php trunk/includes/InputSerialItemsKeyed.php trunk/includes/InputSerialItemsSequential.php trunk/includes/OutputSerialItems.php trunk/includes/tcpdf/2dbarcodes.php trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/tcpdf.php trunk/reportwriter/FormMaker.php trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/RCFunctions.inc trunk/reportwriter/admin/forms/ReportsCritSetup.html trunk/reportwriter/admin/forms/ReportsImport.html trunk/reportwriter/admin/forms/TplFrmCBlk.html trunk/reportwriter/admin/forms/TplFrmCDta.html trunk/reportwriter/admin/forms/TplFrmData.html trunk/reportwriter/admin/forms/TplFrmLine.html trunk/reportwriter/admin/forms/TplFrmPgNum.html trunk/reportwriter/admin/forms/TplFrmRect.html trunk/reportwriter/admin/forms/TplFrmTBlk.html trunk/reportwriter/admin/forms/TplFrmTbl.html trunk/reportwriter/admin/forms/TplFrmText.html trunk/reportwriter/admin/forms/TplFrmTtl.html trunk/reportwriter/forms/TplFrmLine.html trunk/reportwriter/languages/en_US/reports.php trunk/sql/mysql/upgrade2.9-2.9a.sql Removed Paths: ------------- trunk/xmlrpc/Changelog Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2011-06-13 06:21:26 UTC (rev 5352) +++ trunk/AccountSections.php 2011-06-14 07:49:51 UTC (rev 5353) @@ -136,7 +136,7 @@ $myrow = DB_fetch_row($result); if ($myrow[0]>0) { prnMsg( _('Cannot delete this account section because general ledger accounts groups have been created using this section'),'warn'); - echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('general ledger accounts groups that refer to this account section') . '</font>'; + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('general ledger accounts groups that refer to this account section') . '</font>'; } else { //Fetch section name Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2011-06-13 06:21:26 UTC (rev 5352) +++ trunk/AddCustomerContacts.php 2011-06-14 07:49:51 UTC (rev 5353) @@ -17,7 +17,7 @@ } elseif (isset($_GET['DebtorNo'])){ $DebtorNo = $_GET['DebtorNo']; } -echo "<a href='" . $rootpath . '/Customers.php?' . SID .'&DebtorNo='.$DebtorNo."'>" . _('Back to Customers') . '</a><br>'; +echo "<a href='" . $rootpath . '/Customers.php?' . SID .'&DebtorNo='.$DebtorNo."'>" . _('Back to Customers') . '</a><br />'; $SQLname="SELECT name from debtorsmaster where debtorno='".$DebtorNo."'"; $Result = DB_query($SQLname,$db); $row = DB_fetch_array($Result); @@ -72,11 +72,11 @@ if ($InputError !=1) { $result = DB_query($sql,$db); - //echo '<br>'.$sql; + //echo '<br />'.$sql; - echo '<br>'; + echo '<br />'; prnMsg($msg, 'success'); - echo '<br>'; + echo '<br />'; unset($Id); unset($_POST['conName']); unset($_POST['conRole']); @@ -92,9 +92,9 @@ $sql="DELETE FROM custcontacts WHERE contid=".$Id." and debtorno='".$DebtorNo."'"; $result = DB_query($sql,$db); - //echo '<br>'.$sql; + //echo '<br />'.$sql; - echo '<br>'; + echo '<br />'; prnMsg( _('The contact record has been deleted'), 'success'); unset($Id); unset($_GET['delete']); @@ -105,7 +105,7 @@ $sql = "SELECT * FROM custcontacts where debtorno='".$DebtorNo."' ORDER BY contid"; $result = DB_query($sql,$db); - //echo '<br>'.$sql; + //echo '<br />'.$sql; echo '<table class=selection>'; echo '<tr> @@ -163,7 +163,7 @@ and debtorno='".$DebtorNo."'"; $result = DB_query($sql, $db); - //echo '<br>'.$sql; + //echo '<br />'.$sql; $myrow = DB_fetch_array($result); Modified: trunk/AddCustomerNotes.php =================================================================== --- trunk/AddCustomerNotes.php 2011-06-13 06:21:26 UTC (rev 5352) +++ trunk/AddCustomerNotes.php 2011-06-14 07:49:51 UTC (rev 5353) @@ -17,7 +17,7 @@ } elseif (isset($_GET['DebtorNo'])){ $DebtorNo = $_GET['DebtorNo']; } -echo "<a href='" . $rootpath . '/SelectCustomer.php?' . SID .'&DebtorNo='.$DebtorNo."'>" . _('Back to Select Customer') . '</a><br>'; +echo "<a href='" . $rootpath . '/SelectCustomer.php?' . SID .'&DebtorNo='.$DebtorNo."'>" . _('Back to Select Customer') . '</a><br />'; if ( isset($_POST['submit']) ) { //initialise no input errors assumed initially before we test @@ -62,9 +62,9 @@ if ($InputError !=1) { $result = DB_query($sql,$db); - //echo '<br>'.$sql; + //echo '<br />'.$sql; - echo '<br>'; + echo '<br />'; prnMsg($msg, 'success'); unset($Id); unset($_POST['note']); @@ -81,9 +81,9 @@ $sql="DELETE FROM custnotes WHERE noteid='".$Id."' and debtorno='".$DebtorNo."'"; $result = DB_query($sql,$db); - //echo '<br>'.$sql; + //echo '<br />'.$sql; - echo '<br>'; + echo '<br />'; prnMsg( _('The contact note record has been deleted'), 'success'); unset($Id); unset($_GET['delete']); @@ -99,7 +99,7 @@ $sql = "SELECT * FROM custnotes where debtorno='".$DebtorNo."' ORDER BY date DESC"; $result = DB_query($sql,$db); - //echo '<br>'.$sql; + //echo '<br />'.$sql; echo '<table class=selection>'; echo '<tr> @@ -156,7 +156,7 @@ and debtorno='".$DebtorNo."'"; $result = DB_query($sql, $db); - //echo '<br>'.$sql; + //echo '<br />'.$sql; $myrow = DB_fetch_array($result); Modified: trunk/AddCustomerTypeNotes.php =================================================================== --- trunk/AddCustomerTypeNotes.php 2011-06-13 06:21:26 UTC (rev 5352) +++ trunk/AddCustomerTypeNotes.php 2011-06-14 07:49:51 UTC (rev 5353) @@ -17,7 +17,7 @@ } elseif (isset($_GET['DebtorType'])){ $DebtorType = $_GET['DebtorType']; } -echo "<a href='" . $rootpath . '/SelectCustomer.php?' . SID .'&DebtorType='.$DebtorType."'>" . _('Back to Select Customer') . '</a><br>'; +echo "<a href='" . $rootpath . '/SelectCustomer.php?' . SID .'&DebtorType='.$DebtorType."'>" . _('Back to Select Customer') . '</a><br />'; if ( isset($_POST['submit']) ) { //initialise no input errors assumed initially before we test @@ -62,9 +62,9 @@ if ($InputError !=1) { $result = DB_query($sql,$db); - //echo '<br>'.$sql; + //echo '<br />'.$sql; - echo '<br>'; + echo '<br />'; prnMsg($msg, 'success'); unset($Id); unset($_POST['note']); @@ -78,9 +78,9 @@ $sql="DELETE FROM debtortypenotes WHERE noteid='".$Id."' and typeid='".$DebtorType."'"; $result = DB_query($sql,$db); - //echo '<br>'.$sql; + //echo '<br />'.$sql; - echo '<br>'; + echo '<br />'; prnMsg( _('The contact group note record has been deleted'), 'success'); unset($Id); unset($_GET['delete']); @@ -97,7 +97,7 @@ $sql = "SELECT * FROM debtortypenotes where typeid='".$DebtorType."' ORDER BY date DESC"; $result = DB_query($sql,$db); - //echo '<br>'.$sql; + //echo '<br />'.$sql; echo '<table class=selection>'; echo '<tr> @@ -155,7 +155,7 @@ and typeid='".$DebtorType."'"; $result = DB_query($sql, $db); - //echo '<br>'.$sql; + //echo '<br />'.$sql; $myrow = DB_fetch_array($result); @@ -189,7 +189,7 @@ echo '<tr><td>'. _('Priority').':</td>'; echo '<td><input type="Text" name="priority" value="'. $_POST['priority'].'" size=1 maxlength=3></td></td> </table>'; - echo '<br><div class="centre"><input type="Submit" name="submit" value="'. _('Enter Information').'"></div>'; + echo '<br /><div class="centre"><input type="Submit" name="submit" value="'. _('Enter Information').'"></div>'; echo '</form>'; Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2011-06-13 06:21:26 UTC (rev 5352) +++ trunk/AgedDebtors.php 2011-06-14 07:49:51 UTC (rev 5353) @@ -267,9 +267,9 @@ $title = _('Aged Customer Account Analysis') . ' - ' . _('Problem Report') . '.... '; include('includes/header.inc'); echo '<p>' . _('The customer details could not be retrieved by the SQL because') . ' ' . DB_error_msg($db); - echo '<br><a href="'.$rootpath.'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br /><a href="'.$rootpath.'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo '<br>'.$SQL; + echo '<br />'.$SQL; } include('includes/footer.inc'); exit; @@ -364,10 +364,10 @@ if (DB_error_no($db) !=0) { $title = _('Aged Customer Account Analysis') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); - echo '<br><br>' . _('The details of outstanding transactions for customer') . ' - ' . $AgedAnalysis['debtorno'] . ' ' . _('could not be retrieved because') . ' - ' . DB_error_msg($db); - echo '<br><a href="'.$rootpath.'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br /><br />' . _('The details of outstanding transactions for customer') . ' - ' . $AgedAnalysis['debtorno'] . ' ' . _('could not be retrieved because') . ' - ' . DB_error_msg($db); + echo '<br /><a href="'.$rootpath.'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo '<br>' . _('The SQL that failed was') . '<p>' . $sql; + echo '<br />' . _('The SQL that failed was') . '<p>' . $sql; } include('includes/footer.inc'); exit; @@ -439,7 +439,7 @@ if ($debug==1){ prnMsg($SQL,'info'); } - echo '<br><a href="'.$rootpath.'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br /><a href="'.$rootpath.'/index.php">' . _('Back to the menu') . '</a>'; include('includes/footer.inc'); exit; } @@ -517,7 +517,7 @@ echo '<option value="Yes">' . _('Detailed Report'); echo '</select></td></tr>'; - echo '</table><br><div class="centre"><input tabindex="7" type=submit name="PrintPDF" value="' . _('Print PDF') , '"></div>'; + echo '</table><br /><div class="centre"><input tabindex="7" type=submit name="PrintPDF" value="' . _('Print PDF') , '"></div>'; } include('includes/footer.inc'); Modified: trunk/AgedSuppliers.php =================================================================== --- trunk/AgedSuppliers.php 2011-06-13 06:21:26 UTC (rev 5352) +++ trunk/AgedSuppliers.php 2011-06-14 07:49:51 UTC (rev 5353) @@ -105,9 +105,9 @@ $title = _('Aged Supplier Account Analysis') . ' - ' . _('Problem Report') ; include("includes/header.inc"); prnMsg(_('The Supplier details could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); - echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; + echo "<br /><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>$SQL"; + echo "<br />$SQL"; } include('includes/footer.inc'); exit; @@ -186,10 +186,10 @@ if (DB_error_no($db) !=0) { $title = _('Aged Supplier Account Analysis - Problem Report'); include('includes/header.inc'); - echo '<br>' . _('The details of outstanding transactions for Supplier') . ' - ' . $AgedAnalysis['supplierid'] . ' ' . _('could not be retrieved because') . ' - ' . DB_error_msg($db); - echo "<br><a href='$rootpath/index.php'>" . _('Back to the menu') . '</a>'; + echo '<br />' . _('The details of outstanding transactions for Supplier') . ' - ' . $AgedAnalysis['supplierid'] . ' ' . _('could not be retrieved because') . ' - ' . DB_error_msg($db); + echo "<br /><a href='$rootpath/index.php'>" . _('Back to the menu') . '</a>'; if ($debug==1){ - echo '<br>' . _('The SQL that failed was') . '<br>' . $sql; + echo '<br />' . _('The SQL that failed was') . '<br />' . $sql; } include('includes/footer.inc'); exit; @@ -317,7 +317,7 @@ echo "<option value='Yes'>" . _('Detailed Report'); echo '</select></td></tr>'; - echo '</table><br><div class="centre"><input tabindex="6" type=submit name="PrintPDF" value="' . _('Print PDF') . '"></div>'; + echo '</table><br /><div class="centre"><input tabindex="6" type=submit name="PrintPDF" value="' . _('Print PDF') . '"></div>'; } include('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2011-06-13 06:21:26 UTC (rev 5352) +++ trunk/Areas.php 2011-06-14 07:49:51 UTC (rev 5353) @@ -114,7 +114,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg( _('Cannot delete this area because customer branches have been created using this area'),'warn'); - echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('branches using this area code'); + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('branches using this area code'); } else { $sql= "SELECT COUNT(*) FROM salesanalysis WHERE salesanalysis.area ='$SelectedArea'"; @@ -123,7 +123,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg( _('Cannot delete this area because sales analysis records exist that use this area'),'warn'); - echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('sales analysis records referring this area code'); + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('sales analysis records referring this area code'); } } @@ -179,7 +179,7 @@ if (!isset($_GET['delete'])) { - echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '"><br>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '"><br />'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedArea)) { Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2011-06-13 06:21:26 UTC (rev 5352) +++ trunk/BOMIndented.php 2011-06-14 07:49:51 UTC (rev 5353) @@ -151,9 +151,9 @@ $title = _('Indented BOM Listing') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The Indented BOM Listing could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); - echo '<br><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo '<br>'.$sql; + echo '<br />'.$sql; } include('includes/footer.inc'); exit; @@ -237,7 +237,7 @@ $title = _('Print Indented BOM Listing Error'); include('includes/header.inc'); prnMsg(_('There were no items for the selected assembly'),'error'); - echo '<br><a href="'.$rootpath.'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br /><a href="'.$rootpath.'/index.php">' . _('Back to the menu') . '</a>'; include('includes/footer.inc'); exit; } else { Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2011-06-13 06:21:26 UTC (rev 5352) +++ trunk/BOMIndentedReverse.php 2011-06-14 07:49:51 UTC (rev 5353) @@ -153,9 +153,9 @@ $title = _('Indented BOM Listing') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The Indented BOM Listing could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); - echo "<br><a href='" .$rootpath .'/index.php?' . SID . "'>" . _('Back to the menu') . '</a>'; + echo "<br /><a href='" .$rootpath .'/index.php?' . SID . "'>" . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>$sql"; + echo "<br />$sql"; } include('includes/footer.inc'); exit; @@ -232,7 +232,7 @@ $title = _('Print Reverse Indented BOM Listing Error'); include('includes/header.inc'); prnMsg(_('There were no items for the selected component'),'error'); - echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; + echo "<br /><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; include('includes/footer.inc'); exit; } else { Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2011-06-13 06:21:26 UTC (rev 5352) +++ trunk/BOMInquiry.php 2011-06-14 07:49:51 UTC (rev 5353) @@ -14,16 +14,16 @@ } if (!isset($_POST['StockID'])) { - echo "<form action=" . $_SERVER['PHP_SELF'] . "?" . SID ." method=post><b><br></b>". + echo "<form action=" . $_SERVER['PHP_SELF'] . "?" . SID ." method=post><b><br /></b>". '<div class="page_help_text">'. _('Select a manufactured part') . " (" . _('or Assembly or Kit part') . ") " . - _('to view the costed bill of materials') . "." . "<br><font size=1>" . + _('to view the costed bill of materials') . "." . "<br /><font size=1>" . _('Parts must be defined in the stock item entry') . "/" . _('modification screen as manufactured') . ", " . _('kits or assemblies to be available for construction of a bill of material').'</div>' - ."</font><br><table class=selection cellpadding=3 colspan=4><tr><td><font size=1>" . _('Enter text extracts in the') . + ."</font><br /><table class=selection cellpadding=3 colspan=4><tr><td><font size=1>" . _('Enter text extracts in the') . " <b>" . _('description') . "</b>:</font></td><td><input tabindex='1' type='Text' name='Keywords' size=20 maxlength=25></td> <td><font size=3><b>" . _('OR') . "</b></font></td><td><font size=1>" . _('Enter extract of the') . " <b>" . _('Stock Code') . "</b>:</font></td><td><input tabindex='2' type='Text' name='StockCode' size=15 maxlength=20></td> - </tr></table><br><div class='centre'><input tabindex='3' type=submit name='Search' value=" . _('Search Now') . "></div><br>"; + </tr></table><br /><div class='centre'><input tabindex='3' type=submit name='Search' value=" . _('Search Now') . "></div><br />"; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; } @@ -88,7 +88,7 @@ if (isset($_POST['Search']) and isset($result) AND !isset($SelectedParent)) { - echo '<br><hr><br><table class=selection cellpadding=2 colspan=7>'; + echo '<br /><hr><br /><table class=selection cellpadding=2 colspan=7>'; $TableHeader = '<tr><th>' . _('Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('On Hand') . '</th> @@ -127,7 +127,7 @@ } //end of while loop - echo '</table><br>'; + echo '</table><br />'; } if (isset($StockID) and $StockID!=""){ Modified: trunk/BOMListing.php =================================================================== --- trunk/BOMListing.php 2011-06-13 06:21:26 UTC (rev 5352) +++ trunk/BOMListing.php 2011-06-14 07:49:51 UTC (rev 5353) @@ -50,7 +50,7 @@ prnMsg(_('The Bill of Material listing could not be retrieved by the SQL because'),'error'); echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo '<br>' . $SQL; + echo '<br />' . $SQL; } include('includes/footer.inc'); exit; @@ -126,7 +126,7 @@ echo '<tr><td>' . _('To Inventory Part Code') . ':' . '</td><td><input tabindex="2" type=text name=ToCriteria size=20 maxlength=20 value="zzzzzzz"></td></tr>'; - echo '</table><br><div class="centre"><input tabindex="3" type=Submit Name="PrintPDF" Value="' . _('Print PDF') . '"></div>'; + echo '</table><br /><div class="centre"><input tabindex="3" type=Submit Name="PrintPDF" Value="' . _('Print PDF') . '"></div>'; echo '<script>defaultControl(document.forms[0].FromCriteria);</script>'; } include('includes/footer.inc');; Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2011-06-13 06:21:26 UTC (rev 5352) +++ trunk/BOMs.php 2011-06-14 07:49:51 UTC (rev 5353) @@ -28,7 +28,7 @@ while ($row = DB_fetch_array($c_result)) { - //echo '<br>Parent: ' . $parent . ' Level: ' . $level . ' row[component]: ' . $row['component'] .'<br>'; + //echo '<br />Parent: ' . $parent . ' Level: ' . $level . ' row[component]: ' . $row['component'] .'<br />'; if ($parent != $row['component']) { // indent and display the title of this child $BOMTree[$i]['Level'] = $level; // Level @@ -246,7 +246,7 @@ } if(!Date1GreaterThanDate2($_POST['EffectiveTo'], $_POST['EffectiveAfter'])){ $InputError = 1; - prnMsg(_('The effective to date must be a date after the effective after date') . '<br>' . _('The effective to date is') . ' ' . DateDiff($_POST['EffectiveTo'], $_POST['EffectiveAfter'], 'd') . ' ' . _('days before the effective after date') . '! ' . _('No updates have been performed') . '.<br>' . _('Effective after was') . ': ' . $_POST['EffectiveAfter'] . ' ' . _('and effective to was') . ': ' . $_POST['EffectiveTo'],'error'); + prnMsg(_('The effective to date must be a date after the effective after date') . '<br />' . _('The effective to date is') . ' ' . DateDiff($_POST['EffectiveTo'], $_POST['EffectiveAfter'], 'd') . ' ' . _('days before the effective after date') . '! ' . _('No updates have been performed') . '.<br />' . _('Effective after was') . ': ' . $_POST['EffectiveAfter'] . ' ' . _('and effective to was') . ': ' . $_POST['EffectiveTo'],'error'); $Errors[$i] = 'EffectiveAfter'; $i++; $Errors[$i] = 'EffectiveTo'; @@ -341,7 +341,7 @@ /*The component must already be on the BOM */ - prnMsg( _('The component') . ' ' . $_POST['Component'] . ' ' . _('is already recorded as a component of') . ' ' . $SelectedParent . '.' . '<br>' . _('Whilst the quantity of the component required can be modified it is inappropriate for a component to appear more than once in a bill of material'),'error'); + prnMsg( _('The component') . ' ' . $_POST['Component'] . ' ' . _('is already recorded as a component of') . ' ' . $SelectedParent . '.' . '<br />' . _('Whilst the quantity of the component required can be modified it is inappropriate for a component to appear more than once in a bill of material'),'error'); $Errors[$i]='ComponentCode'; } @@ -416,7 +416,7 @@ break; } - echo '<br><div class=centre><a href=' . $_SERVER['PHP_SELF'] . '?' . SID . '>' . _('Select a Different BOM') . '</a></div><br>'; + echo '<br /><div class=centre><a href=' . $_SERVER['PHP_SELF'] . '?' . SID . '>' . _('Select a Different BOM') . '</a></div><br />'; echo '<table class=selection>'; // Display Manufatured Parent Items $sql = "SELECT bom.parent, @@ -453,7 +453,7 @@ $DbgMsg = _('The SQL used to retrieve description of the parent part was'); $result=DB_query($sql,$db,$ErrMsg,$DbgMsg); if( DB_num_rows($result) > 0 ) { - echo (($reqnl)?'<br>':'').'<tr><td><div class="centre">'._('Assembly parent items').' : '; + echo (($reqnl)?'<br />':'').'<tr><td><div class="centre">'._('Assembly parent items').' : '; $ix = 0; while ($myrow = DB_fetch_array($result)){ echo (($ix)?', ':'').'<a href="'.$_SERVER['PHP_SELF'] . '?' . SID . 'Select='.$myrow['parent'].'">'. @@ -473,7 +473,7 @@ $DbgMsg = _('The SQL used to retrieve description of the parent part was'); $result=DB_query($sql,$db,$ErrMsg,$DbgMsg); if( DB_num_rows($result) > 0 ) { - echo (($reqnl)?'<br>':'').'<tr><td><div class="centre">'._('Kit sets').' : '; + echo (($reqnl)?'<br />':'').'<tr><td><div class="centre">'._('Kit sets').' : '; $ix = 0; while ($myrow = DB_fetch_array($result)){ echo (($ix)?', ':'').'<a href="'.$_SERVER['PHP_SELF'] . '?' . SID . 'Select='.$myrow['parent'].'">'. @@ -493,7 +493,7 @@ $DbgMsg = _('The SQL used to retrieve description of the parent part was'); $result=DB_query($sql,$db,$ErrMsg,$DbgMsg); if( DB_num_rows($result) > 0 ) { - echo (($reqnl)?'<br>':'').'<tr><td><div class="centre">'._('Phantom').' : '; + echo (($reqnl)?'<br />':'').'<tr><td><div class="centre">'._('Phantom').' : '; $ix = 0; while ($myrow = DB_fetch_array($result)){ echo (($ix)?', ':'').'<a href="'.$_SERVER['PHP_SELF'] . '?Select='.$myrow['parent'].'">'. @@ -502,7 +502,7 @@ } //end while loop echo '</div></td></tr>'; } - echo '</table><br><table class=selection>'; + echo '</table><br /><table class=selection>'; echo '<tr><th colspan=13><div class="centre"><font color=blue size=3><b>'.$SelectedParent .' - ' . $myrow[0] . ' ('. $MBdesc. ') </font></b></th></tr>'; // *** POPAD&T @@ -547,7 +547,7 @@ } } // *** end POPAD&T - echo '</table><br>'; + echo '</table><br />'; if (! isset($_GET['delete'])) { @@ -577,8 +577,8 @@ $_POST['Quantity'] = $myrow['quantity']; $_POST['AutoIssue'] = $myrow['autoissue']; - prnMsg(_('Edit the details of the selected component in the fields below') . '. <br>' . _('Click on the Enter Information button to update the component details'),'info'); - echo '<br><input type=hidden name="SelectedParent" value="'.$SelectedParent.'">'; + prnMsg(_('Edit the details of the selected component in the fields below') . '. <br />' . _('Click on the Enter Information button to update the component details'),'info'); + echo '<br /><input type=hidden name="SelectedParent" value="'.$SelectedParent.'">'; echo '<input type=hidden name="SelectedComponent" value="'.$SelectedComponent.'">'; echo '<table class=selection>'; echo '<tr><th colspan=13><div class="centre"><font color=blue size=3><b>'. ('Edit Component Details') .'</font></b></th></tr>'; @@ -587,7 +587,7 @@ } else { //end of if $SelectedComponent echo '<input type=hidden name="SelectedParent" value="'.$SelectedParent.'">'; - /* echo "Enter the details of a new component in the fields below. <br>Click on 'Enter Information' to add the new component, once all fields are completed."; + /* echo "Enter the details of a new component in the fields below. <br />Click on 'Enter Information' to add the new component, once all fields are completed."; */ echo '<table class=selection>'; echo '<tr><th colspan=13><div class="centre"><font color=blue size=3><b>'. ('New Component Details') .'</font></b></th></tr>'; @@ -721,7 +721,7 @@ echo '<input type=hidden name="AutoIssue" value=0>'; } - echo '</table><br><div class="centre"><input tabindex="8" type="Submit" name="Submit" value="' . _('Enter Information') . '"></form></div>'; + echo '</table><br /><div class="centre"><input tabindex="8" type="Submit" name="Submit" value="' . _('Enter Information') . '"></form></div>'; } //end if record deleted no point displaying form to add record @@ -792,19 +792,19 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title; echo '<form action="' . $_SERVER['PHP_SELF'] . '" method=post>' . '<div class="page_help_text">'. _('Select a manufactured part') . ' (' . _('or Assembly or Kit part') . ') ' . - _('to maintain the bill of material for using the options below') . '.' . '<br><font size=1>' . + _('to maintain the bill of material for using the options below') . '.' . '<br /><font size=1>' . _('Parts must be defined in the stock item entry') . '/' . _('modification screen as manufactured') . ', ' . _('kits or assemblies to be available for construction of a bill of material') .'</div>'. - '</font><br><table class=selection cellpadding=3 colspan=4><tr><td><font size=1>' . _('Enter text extracts in the') . + '</font><br /><table class=selection cellpadding=3 colspan=4><tr><td><font size=1>' . _('Enter text extracts in the') . ' <b>' . _('description') . '</b>:</font></td><td><input tabindex="1" type="Text" name="Keywords" size=20 maxlength=25></td> <td><font size=3><b>' . _('OR') . '</b></font></td><td><font size=1>' . _('Enter extract of the') . ' <b>' . _('Stock Code') . '</b>:</font></td><td><input tabindex="2" type="Text" name="StockCode" size=15 maxlength=18></td> - </tr></table><br><div class="centre"><input tabindex="3" type=submit name="Search" value="' . _('Search Now') . '"></div>'; + </tr></table><br /><div class="centre"><input tabindex="3" type=submit name="Search" value="' . _('Search Now') . '"></div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($_POST['Search']) and isset($result) AND !isset($SelectedParent)) { - echo '<br><table cellpadding=2 colspan=7 class=selection>'; + echo '<br /><table cellpadding=2 colspan=7 class=selection>'; $TableHeader = '<tr><th>' . _('Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('On Hand') . '</th> Modified: trunk/BankAccounts.php =================================================================== --- trunk/BankAccounts.php 2011-06-13 06:21:26 UTC (rev 5352) +++ trunk/BankAccounts.php 2011-06-14 07:49:51 UTC (rev 5353) @@ -11,7 +11,7 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Bank') . '" alt="" />' . ' ' . $title . '</p>'; - echo '<div class="page_help_text">' . _('Update Bank Account details. Account Code is for SWIFT or BSB type Bank Codes. Set Default for Invoices to "yes" to print Account details on Invoices (only one account can be set to "yes").') . '.</div><br>'; + echo '<div class="page_help_text">' . _('Update Bank Account details. Account Code is for SWIFT or BSB type Bank Codes. Set Default for Invoices to "yes" to print Account details on Invoices (only one account can be set to "yes").') . '.</div><br />'; if (isset($_GET['SelectedBankAccount'])) { $SelectedBankAccount=$_GET['SelectedBankAccount']; @@ -93,7 +93,7 @@ invoice ='" . $_POST['DefAccount'] . "' WHERE accountcode = '" . $SelectedBankAccount . "'"; prnMsg(_('Note that it is not possible to change the currency of the account once there are transactions against it'),'warn'); - echo '<br>'; + echo '<br />'; } else { $sql = "UPDATE bankaccounts SET bankaccountname='" . $_POST['BankAccountName'] . "', @@ -136,7 +136,7 @@ $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); prnMsg($msg,'success'); - echo '<br>'; + echo '<br />'; unset($_POST['AccountCode']); unset($_POST['BankAccountName']); unset($_POST['BankAccountNumber']); @@ -160,7 +160,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg(_('Cannot delete this bank account because transactions have been created using this account'),'warn'); - echo '<br> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('transactions with this bank account code'); + echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('transactions with this bank account code'); } if (!$CancelDelete) { @@ -188,7 +188,7 @@ WHERE bankaccounts.accountcode = chartmaster.accountcode"; $ErrMsg = _('The bank accounts set up could not be retrieved because'); - $DbgMsg = _('The SQL used to retrieve the bank account details was') . '<br>' . $sql; + $DbgMsg = _('The SQL used to retrieve the bank account details was') . '<br />' . $sql; $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); echo '<table class="selection">'; @@ -216,7 +216,7 @@ } else { $defacc=_('Yes'); } - printf('<td>%s<br><font size=2>%s</font></td> + printf('<td>%s<br /><font size=2>%s</font></td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -367,7 +367,7 @@ echo '</select></td>'; -echo '</tr></table><br> +echo '</tr></table><br /> <div class="centre"><input tabindex="7" type="Submit" name="submit" value="'. _('Enter Information') .'"></div>'; echo '</form>'; Modified: trunk/BankMatching.php =================================================================== --- trunk/BankMatching.php 2011-06-13 06:21:26 UTC (rev 5352) +++ trunk/BankMatching.php 2011-06-14 07:49:51 UTC (rev 5353) @@ -74,7 +74,7 @@ $_POST['ShowTransactions'] = True; } -echo '<div class="page_help_text">' . _('Use this screen to match webERP Receipts and Payments to your Bank Statement. Check your bank statement and click the check-box when you find the matching transaction.') . '</div><br>'; +echo '<div class="page_help_text">' . _('Use this screen to match webERP Receipts and Payments to your Bank Statement. Check your bank statement and click the check-box when you find the matching transaction.') . '</div><br />'; echo '<form action="'. $_SERVER['PHP_SELF'] . '?' . SID . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -133,7 +133,7 @@ echo '</select></td></tr>'; -echo '</table><br><div class="centre"><input tabindex="6" type=submit name="ShowTransactions" value="' . _('Show selected') . ' ' . $TypeName . '">'; +echo '</table><br /><div class="centre"><input tabindex="6" type=submit name="ShowTransactions" value="' . _('Show selected') . ' ' . $TypeName . '">'; if (isset($_POST['BankAccount'])) { echo '<p><a href="'.$rootpath.'/BankReconciliation.php?Account='.$_POST['BankAccount'].'">' . _('Show reconciliation') . '</a></div>'; @@ -314,7 +314,7 @@ } //end of while loop - echo '</table><br><div class="centre"><input type=hidden name="RowCounter" value=' . $i . '><input type=submit name="Update" value="' . _('Update Matching') . '"></div>'; + echo '</table><br /><div class="centre"><input type=hidden name="RowCounter" value=' . $i . '><input type=submit name="Update" value="' . _('Update Matching') . '"></div>'; } Modified: trunk/BankReconciliation.php =================================================================== --- trunk/BankReconciliation.php 2011-06-13 06:21:26 UTC (rev 5352) +++ trunk/BankReconciliation.php 2011-06-14 07:49:51 UTC (rev 5353) @@ -120,7 +120,7 @@ include ('includes/GLPostings.inc'); -echo '</table><p><div class="centre"><input type=submit tabindex="2" name="ShowRec" value="' . _('Show bank reconciliation statement') . '"></div><br>'; +echo '</table><p><div class="centre"><input type=submit tabindex="2" name="ShowRec" value="' . _('Show bank reconciliation statement') . '"></div><br />'; if (isset($_POST['ShowRec']) OR isset($_POST['DoExchangeDifference'])){ @@ -337,10 +337,10 @@ if (isset($_POST['BankAccount'])) { echo '<p><div class="centre"><a tabindex="4" href="' . $rootpath . '/BankMatching.php?Type=Payments&Account='.$_POST['BankAccount'].'">' . _('Match off cleared payments') . '</a>'; - echo '<br><a tabindex="5" href="' . $rootpath . '/BankMatching.php?Type=Receipts&Account='.$_POST['BankAccount'].'">' . _('Match off cleared deposits') . '</a></div>'; + echo '<br /><a tabindex="5" href="' . $rootpath . '/BankMatching.php?Type=Receipts&Account='.$_POST['BankAccount'].'">' . _('Match off cleared deposits') . '</a></div>'; } else { echo '<p><div class="centre"><a tabindex="4" href="' . $rootpath . '/BankMatching.php?Type=Payments">' . _('Match off cleared payments') . '</a>'; - echo '<br><a tabindex="5" href="' . $rootpath . '/BankMatching.php?Type=Receipts">' . _('Match off cleared deposits') . '</a></div>'; + echo '<br /><a tabindex="5" href="' . $rootpath . '/BankMatching.php?Type=Receipts">' . _('Match off cleared deposits') . '</a></div>'; } echo '</form>'; include('includes/footer.inc'); Modified: trunk/ConfirmDispatchControlled_Invoice.php =================================================================== --- trunk/ConfirmDispatchControlled_Invoice.php 2011-06-13 06:21:26 UTC (rev 5352) +++ trunk/ConfirmDispatchControlled_Invoice.php 2011-06-14 07:49:51 UTC (rev 5353) @@ -17,8 +17,8 @@ $LineNo = (int)$_POST['LineNo']; } else { echo '<div class="centre"><a href="' . $rootpath . '/ConfirmDispatch_Invoice.php?' . SID . '">'. - _('Select a line item to invoice').'</a><br>'; - echo '<br>'; + _('Select a line item to invoice').'</a><br />'; + echo '<br />'; prnMsg( _('This page can only be opened if a line item on a sales order to be invoiced has been selected') . '. ' . _('Please do that first'),'error'); echo '</div>'; include('includes/footer.inc'); @@ -28,7 +28,7 @@ if (!isset($_SESSION['Items']) OR !isset($_SESSION['ProcessingOrder'])) { /* This page can only be called with a sales order number to invoice */ echo '<div class="centre"><a href="' . $rootpath . '/SelectSalesOrder.php?' . SID . '">'. _('Select a sales order to invoice'). - '</a><br>'; + '</a><br />'; prnMsg( _('This page can only be opened if a sales order and line item has been selected Please do that first'),'error'); echo '</div>'; include('includes/footer.inc'); @@ -43,7 +43,7 @@ //Make sure this item is really controlled if ( $LineItem->Controlled != 1 ){ echo '<div class="centre"><a href="' . $rootpath . '/ConfirmDispatch_Invoice.php?' . SID . '">'. _('Back to the Sales Order'). '</a></div>'; - echo '<br>'; + echo '<br />'; prnMsg( _('The line item must be defined as controlled to require input of the batch numbers or serial numbers being sold'),'error'); include('includes/footer.inc'); exit; @@ -54,9 +54,9 @@ ********************************************/ echo '<div class="centre">'; -echo '<br><a href="'. $rootpath. '/ConfirmDispatch_Invoice.php?' . SID . '">'. _('Back to Confirmation of Dispatch') . '/' . _('Invoice'). '</a>'; +echo '<br /><a href="'. $rootpath. '/ConfirmDispatch_Invoice.php?' . SID . '">'. _('Back to Confirmation of Dispatch') . '/' . _('Invoice'). '</a>'; -echo '<br><font size=2><b>'. _('Dispatch of up to').' '. number_format($LineItem->Quantity-$LineItem->QtyInv, $LineItem->DecimalPlaces). ' '. _('Controlled items').' ' . $LineItem->StockID . ' - ' . $LineItem->ItemDescription . ' '. _('on order').' ' . $_SESSION['Items']->OrderNo . ' '. _('to'). ' ' . $_SESSION['Items']->CustomerName . '</b></font></div>'; +echo '<br /><font size=2><b>'. _('Dispatch of up to').' '. number_format($LineItem->Quantity-$LineItem->QtyInv, $LineItem->DecimalPlaces). ' '. _('Controlled items').' ' . $LineItem->StockID . ' - ' . $LineItem->ItemDescription . ' '. _('on order').' ' . $_SESSION['Items']->OrderNo . ' '. _('to'). ' ' . $_SESSION['Items']->CustomerName . '</b></font></div>'; /** vars needed by InputSerialItem : **/ $StockID = $LineItem->StockID; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-06-13 06:21:26 UTC (rev 5352) +++ trunk/ConfirmDispatch_Invoice.php 2011-06-14 07:49:51 UTC (rev 5353) @@ -18,7 +18,7 @@ if (!isset($_GET['OrderNumber']) && !isset($_SESSION['ProcessingOrder'])) { /* This page can only be called with an order number for invoicing*/ echo '<div class="centre"><a href="' . $rootpath . '/SelectSalesOrder.php?' . SID . '">' . _('Select a sales order to invoice'). '</a></div>'; - echo '<br><br>'; + echo '<br /><br />'; prnMsg( _('This page can only be opened if an order has been selected Please select an order first from the delivery details screen click on Confirm for invoicing'), 'error' ); include ('includes/footer.inc'); exit; @@ -187,7 +187,7 @@ } /* line items from sales order details */ } else { /* there are no line items that have a quantity to deliver */ - echo '<br>'; + echo '<br />'; prnMsg( _('There are no ordered items with a quantity left to deliver. There is nothing left to invoice')); include('includes/footer.inc'); exit; @@ -197,7 +197,7 @@ } else { /*end if the order was returned sucessfully */ - echo '<br>'. + echo '<br />'. prnMsg( _('This order item could not be retrieved. Please select another order'), 'warn'); include ('includes/footer.inc'); exit; @@ -268,15 +268,15 @@ <th>' . _('Item Description' ) . '</th> <th>' . _('Ordered') . '</th> <th>' . _('Units') . '</th> - <th>' . _('Already') . '<br>' . _('Sent') . '</th> + <th>' . _('Already') . '<br />' . _('Sent') . '</th> <th>' . _('This Dispatch') . '</th> <th>' . _('Price') . '</th> <th>' . _('Discount') . '</th> - <th>' . _('Total') . '<br>' . _('Excl Tax') . '</th> + <th>' . _('Total') . '<br />' . _('Excl Tax') . '</th> <th>' . _('Tax Authority') . '</th> <th>' . _('Tax %') . '</th> - <th>' . _('Tax') . '<br>' . _('Amount') . '</th> - <th>' . _('Total') . '<br>' . _('Incl Tax') . '</th> + <th>' . _('Tax') . '<br />' . _('Amount') . '</th> + <th>' . _('Total') . '<br />' . _('Incl Tax') . '</th> </tr>'; $_SESSION['Items']->total = 0; @@ -399,7 +399,7 @@ } echo '</tr>'; if (strlen($LnItm->Narrative)>1){ - $narrative=str_replace('\r\n','<br>', $LnItm->Narrative); + $narrative=str_replace('\r\n','<br />', $LnItm->Narrative); echo $RowStarter . '<td colspan=12>' . stripslashes($narrative) . '</td></tr>'; } }//end foreach ($line) @@ -486,7 +486,7 @@ $i=0; // initialise the number of taxes iterated through foreach ($_SESSION['Items']->FreightTaxes as $FreightTaxLine) { if ($i>0){ - echo '<br>'; + echo '<br />'; } echo $FreightTaxLine->TaxAuthDescription; $i++; @@ -497,7 +497,7 @@ $i=0; foreach ($_SESSION['Items']->FreightTaxes as $FreightTaxLine) { if ($i>0){ - echo '<br>'; + echo '<br />'; } if (isset($_POST['ProcessInvoice'])) { @@ -547,7 +547,7 @@ $DefaultDispatchDate = $_POST['DispatchDate']; } -echo '</table><br>'; +echo '</table><br />'; @@ -671,12 +671,12 @@ /*there should be the same number of items returned from this query as there are lines on the invoice - if not then someone has already invoiced or credited some lines */ if ($debug==1){ - echo '<br>'.$SQL; - echo '<br>' . _('Number of rows returned by SQL') . ':' . DB_num_rows($Result); - echo '<br>' . _('Count of items in the session') . ' ' . count($_SESSION['Items']->LineItems); + echo '<br />'.$SQL; + echo '<br />' . _('Number of rows returned by SQL') . ':' . DB_num_rows($Result); + echo '<br />' . _('Count of items in the session') . ' ' . count($_SESSION['Items']->LineItems); } - echo '<br>'; + echo '<br />'; prnMsg( _('This order has been changed or invoiced since this delivery was started to be confirmed') . '. ' . _('Processing halted') . '. ' . _('To enter and confirm this dispatch') . '/' . _('invoice the order must be re-selected and re-read again to update the changes made by the other user'), 'error'); unset($_SESSION['Items']->LineItems); @@ -691,13 +691,13 @@ if ($_SESSION['Items']->LineItems[$myrow['orderlineno']]->Quantity != $myrow['quantity'] OR $_SESSION['Items']->LineItems[$myrow['orderlineno']]->QtyInv != $myrow['qtyinvoiced']) { - echo '<br>'. _('Orig order for'). ' ' . $myrow['orderlineno'] . ' '. _('has a quantity of'). ' ' . + echo '<br />'. _('Orig order for'). ' ' . $myrow['orderlineno'] . ' '. _('has a quantity of'). ' ' . $myrow['quantity'] . ' '. _('and an invoiced qty of'). ' ' . $myrow['qtyinvoiced'] . ' '. _('the session shows quantity of'). ' ' . $_SESSION['Items']->LineItems[$myrow['orderlineno']]->Quantity . ' ' . _('and quantity invoice of'). ' ' . $_SESSION['Items']->LineItems[$myrow['orderlineno']]->QtyInv; prnMsg( _('This order has been changed or invoiced since this delivery was started to be confirmed') . ' ' . _('Processing halted.') . ' ' . _('To enter and confirm this dispatch, it must be re-selected and re-read again to update the changes made by the other user'), 'error'); - echo '<br>'; + echo '<br />'; echo '<div class="centre"><a href="'. $rootpath . '/SelectSalesOrder.php?' . SID . '">'. _('Select a sales order for confirming deliveries and invoicing'). '</a></div>'; @@ -884,7 +884,7 @@ 'BO' )"; - $ErrMsg = '<br>' . _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The order delivery differences log record could not be inserted because'); + $ErrMsg = '<br />' . _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The order delivery differences log record could not be inserted because'); $DbgMsg = _('The following SQL to insert the order delivery differences record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } /*end of order delivery differences log entries */ @@ -1210,7 +1210,7 @@ salesanalysis.salesperson"; $ErrMsg = _('The count of existing Sales analysis records could not run because'); - $DbgMsg = '<br>'. _('SQL to count the no of sales analysis records'); + $DbgMsg = '<br />'. _('SQL to count the no of sales analysis records'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); $myrow = DB_fetch_row($Result); @@ -1343,7 +1343,7 @@ '" . (-$OrderLine->Price * $OrderLine->QtyDispatched/$_SESSION['CurrencyRate']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales GL posting could not be inserted because'); - $DbgMsg = '<br>' ._('The following SQL to insert the GLTrans record was used'); + $DbgMsg = '<br />' ._('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); if ($OrderLine->DiscountPercent !=0){ @@ -1455,7 +1455,7 @@ '" . ($DisposalRow['cost']-$DisposalRow['accumdepn']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The disposal net book value GL posting could not be inserted because'); - $DbgMsg = '<br>' ._('The following SQL to insert the GLTrans record was used'); + $DbgMsg = '<br />' ._('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } @@ -1477,7 +1477,7 @@ '" . (-$OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The disposal proceeds GL posting could not be inserted because'); - $DbgMsg = '<br>' ._('The following SQL to insert the GLTrans record was used'); + $DbgMsg = '<br />' ._('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } // end if the item being sold was an asset @@ -1505,7 +1505,7 @@ '" . ($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "', '" . $DefaultDispatchDate . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The fixed asset transaction could not be inserted because'); - $DbgMsg = '<br>' ._('The following SQL to insert the fixed asset transaction record was used'); + $DbgMsg = '<br />' ._('The following SQL to insert the fixed asset transaction record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); $SQL = "UPDATE fixedassets SET disposalproceeds ='" . ($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "', @@ -1513,7 +1513,7 @@ WHERE assetid ='" . $AssetNumber . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The fixed asset record could not be updated for the disposal because'); - $DbgMsg = '<br>' ._('The following SQL to update the fixed asset record was used'); + $DbgMsg = '<br />' ._('The following SQL to update the fixed asset record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } @@ -1607,15 +1607,15 @@ echo prnMsg( _('Invoice number'). ' '. $InvoiceNo .' '. _('processed'), 'success'); - echo '<br><div class="centre">'; + echo '<br /><div class="centre">'; if ($_SESSION['InvoicePortraitFormat']==0){ - echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="">' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTrans.php?' . SID . 'FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Landscape') . ')</a><br><br>'; + echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="">' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTrans.php?' . SID . 'FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Landscape') . ')</a><br /><br />'; } else { - echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="">' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTransPortrait.php?' . SID . 'FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Portrait') . ')</a><br><br>'; + echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="">' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTransPortrait.php?' . SID . 'FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Portrait') . ')</a><br /><br />'; } - echo '<a href="'.$rootpath.'/SelectSalesOrder.php?' . SID . '">'. _('Select another order for invoicing'). '</a><br><br>'; - echo '<a href="'.$rootpath.'/SelectOrderItems.php?' . SID . 'NewOrder=Yes">'._('Sales Order Entry').'</a></div><br>'; + echo '<a href="'.$rootpath.'/SelectSalesOrder.php?' . SID . '">'. _('Select another order for invoicing'). '</a><br /><br />'; + echo '<a href="'.$rootpath.'/SelectOrderItems.php?' . SID . 'NewOrder=Yes">'._('Sales Order Entry').'</a></div><br />'; /*end of process invoice */ @@ -1653,11 +1653,11 @@ $j++; echo '</table> - <br><div class="centre"> - <input type=submit tabindex='.$j.' name=Update Value=' . _('Update'). '><br>'; + <br /><div class="centre"> + <input type=submit tabindex='.$j.' name=Update Value=' . _('Update'). '><br />'; $j++; - echo '<br><input type=submit tabindex='.$j.' name="ProcessInvoice" Value="'._('Process Invoice').'" /></div>'; + echo '<br /><input type=submit tabindex='.$j.' name="ProcessInvoice" Value="'._('Process Invoice').'" /></div>'; echo '<input type=hidden name="ShipVia" value="' . $_SESSION['Items']->ShipVia . '">'; } Modified: trunk/CreditItemsControlled.php =================================================================== --- trunk/CreditItemsControlled.php 2011-06-13 06:21:26 UTC (rev 5352) +++ trunk/CreditItemsControlled.php 2011-06-14 07:49:51 UTC (rev 5353) @@ -29,7 +29,7 @@ } elseif (isset($_POST['LineNo'])){ $LineNo = $_POST['LineNo']; } else { - echo '<div class="centre"><a href="' . $rootpath . '/' . $CreditLink . '?' . SID . '">'. _('Select Credit Items'). '</a><br><br>'; + echo '<div class="centre"><a href="' . $rootpath . '/' . $CreditLink . '?' . SID . '">'. _('Select Credit Items'). '</a><br /><br />'; prnMsg( _('This page can only be opened if a Line Item on a credit note has been selected.') . ' ' . _('Please do that first'), 'error'); echo '</div>'; include('includes/footer.inc'); @@ -40,7 +40,7 @@ if (!isset($_SESSION['CreditItems'])) { /* This page can only be called with a credit note entry part entered */ - echo '<div class="centre"><a href="' . $rootpath . '/' . $CreditLink . '?' . SID . '">'. _('Select Credit Items'). '</a><br><br>'; + echo '<div class="centre"><a href="' . $rootpath . '/' . $CreditLink . '?' . SID . '">'. _('Select Credit Items'). '</a><br /><br />'; prnMsg( _('This page can only be opened if a controlled credit note line item has been selected.') . ' ' . _('Please do that first'),'error'); echo '</div>'; include('includes/footer.inc'); @@ -54,7 +54,7 @@ //Make sure this item is really controlled if ( $LineItem->Controlled != 1 ){ echo '<div class="centre"><a href="' . $rootpath . '/' . $CreditLink . '?' . SID . '">'. _('Back to Credit Note Entry').'</a></div>'; - echo '<br>'; + echo '<br />'; prnMsg( _('Notice') . ' - ' . _('The line item must be defined as controlled to r... [truncated message content] |
From: <tim...@us...> - 2011-06-14 08:28:44
|
Revision: 5354 http://weberp.svn.sourceforge.net/weberp/?rev=5354&view=rev Author: tim_schofield Date: 2011-06-14 08:28:33 +0000 (Tue, 14 Jun 2011) Log Message: ----------- Ensure every <p> tag has a closing tag Modified Paths: -------------- trunk/AddCustomerContacts.php trunk/AddCustomerNotes.php trunk/AddCustomerTypeNotes.php trunk/AgedDebtors.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/BOMs.php trunk/BankAccounts.php trunk/BankMatching.php trunk/BankReconciliation.php trunk/COGSGLPostings.php trunk/Credit_Invoice.php trunk/CustLoginSetup.php trunk/CustomerAllocations.php trunk/CustomerBranches.php trunk/CustomerReceipt.php trunk/CustomerTypes.php trunk/DailyBankTransactions.php trunk/DeliveryDetails.php trunk/EDIMessageFormat.php trunk/EDIProcessOrders.php trunk/EmailConfirmation.php trunk/ExchangeRateTrend.php trunk/FTP_RadioBeacon.php trunk/Factors.php trunk/FixedAssetLocations.php trunk/FixedAssetRegister.php trunk/FormDesigner.php trunk/GLAccountCSV.php trunk/GLAccountInquiry.php trunk/GLAccountReport.php trunk/GLAccounts.php trunk/GLBalanceSheet.php trunk/GLProfit_Loss.php trunk/GLTagProfit_Loss.php trunk/GLTransInquiry.php trunk/GLTrialBalance.php trunk/GoodsReceived.php trunk/InventoryQuantities.php trunk/Locations.php trunk/MRP.php trunk/MRPDemandTypes.php trunk/MRPPlannedPurchaseOrders.php trunk/MRPPlannedWorkOrders.php trunk/MRPReport.php trunk/MailInventoryValuation.php trunk/Manufacturers.php trunk/Numbers/Words/lang.cs.php trunk/Numbers/Words/lang.dk.php trunk/Numbers/Words/lang.fr_BE.php trunk/Numbers/Words/lang.it_IT.php trunk/PDFQuotation.php trunk/PDFQuotationPortrait.php trunk/PDFStockCheckComparison.php trunk/PDFStockLocTransfer.php trunk/PO_Header.php trunk/PO_Items.php trunk/PO_PDFPurchOrder.php trunk/PaymentMethods.php trunk/PaymentTerms.php trunk/Payments.php trunk/PcAssignCashToTab.php trunk/PcAuthorizeExpenses.php trunk/PcClaimExpensesFromTab.php trunk/PcExpenses.php trunk/PcExpensesTypeTab.php trunk/PcTabs.php trunk/PcTypeTabs.php trunk/Prices.php trunk/PricesBasedOnMarkUp.php trunk/PricesByCost.php trunk/Prices_Customer.php trunk/PrintCustOrder.php trunk/PrintCustOrder_generic.php trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php trunk/PrintSalesOrder_generic.php trunk/PurchData.php trunk/RecurringSalesOrders.php trunk/ReorderLevel.php trunk/SalesAnalReptCols.php trunk/SalesAnalRepts.php trunk/SalesAnalysis_UserDefined.php trunk/SalesInquiry.php trunk/SalesTypes.php trunk/SelectAsset.php trunk/SelectCreditItems.php trunk/SelectCustomer.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/SelectSalesOrder.php trunk/SelectSupplier.php trunk/Shipments.php trunk/SpecialOrder.php trunk/StockCategories.php trunk/StockCheck.php trunk/StockDispatch.php trunk/StockLocStatus.php trunk/StockLocTransfer.php trunk/StockLocTransferReceive.php trunk/StockStatus.php trunk/StockTransfers.php trunk/StockUsage.php trunk/Stocks.php trunk/SuppContractChgs.php trunk/SuppCreditGRNs.php trunk/SuppFixedAssetChgs.php trunk/SuppInvGRNs.php trunk/SuppLoginSetup.php trunk/SuppPaymentRun.php trunk/SuppShiptChgs.php trunk/SuppTransGLAnalysis.php trunk/SupplierAllocations.php trunk/SupplierCredit.php trunk/SupplierInquiry.php trunk/SupplierInvoice.php trunk/SupplierTenderCreate.php trunk/SupplierTenders.php trunk/SupplierTypes.php trunk/Suppliers.php trunk/TaxAuthorities.php trunk/TaxCategories.php trunk/TaxProvinces.php trunk/UnitsOfMeasure.php trunk/UpgradeDatabase.php trunk/WorkCentres.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/Z_ChangeBranchCode.php trunk/Z_ChangeCustomerCode.php trunk/Z_ChangeStockCategory.php trunk/Z_ChangeStockCode.php trunk/Z_CheckDebtorsControl.php trunk/Z_CopyBOM.php trunk/Z_CreateCompany.php trunk/Z_DeleteSalesTransActions.php trunk/Z_MakeNewCompany.php trunk/Z_MakeStockLocns.php trunk/Z_ReApplyCostToSA.php trunk/Z_Upgrade_3.07-3.08.php trunk/Z_Upgrade_3.08-3.09.php trunk/Z_Upgrade_3.09-3.10.php trunk/Z_Upgrade_3.10-3.11.php trunk/Z_Upgrade_3.11-4.00.php trunk/Z_index.php trunk/Z_poAdmin.php trunk/api/api_xml-rpc.php trunk/doc/Manual/ManualAPIFunctions.php trunk/geo_displaymap_customers.php trunk/geo_displaymap_suppliers.php trunk/geocode.php trunk/includes/FailedLogin.php trunk/includes/InputSerialItemsFile.php trunk/includes/PDFSalesAnalysis.inc trunk/locale/zh_CN.utf8/Manual/ManualAPIFunctions.php trunk/locale/zh_HK.utf8/Manual/ManualAPIFunctions.php Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/AddCustomerContacts.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -148,7 +148,7 @@ if (isset($Id)) { ?> <div class="centre"><a href="<?php echo $_SERVER['PHP_SELF'] . '?' . SID .'&DebtorNo='.$DebtorNo;?>"><?=_('Review all contacts for this Customer')?></a></div> <?php } ?> -<p> +<br /> <?php if (!isset($_GET['delete'])) { Modified: trunk/AddCustomerNotes.php =================================================================== --- trunk/AddCustomerNotes.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/AddCustomerNotes.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -142,7 +142,7 @@ if (isset($Id)) { echo '<div class="centre"><a href="'.$_SERVER['PHP_SELF'] . '?' . SID .'&DebtorNo='.$DebtorNo.'"><?='._('Review all notes for this Customer').'</a></div>'; } -echo '<p>'; +echo '<br />'; if (!isset($_GET['delete'])) { Modified: trunk/AddCustomerTypeNotes.php =================================================================== --- trunk/AddCustomerTypeNotes.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/AddCustomerTypeNotes.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -140,7 +140,7 @@ if (isset($Id)) { ?> <div class="cantre"><a href="<?php echo $_SERVER['PHP_SELF'] . '?' . SID .'&DebtorType='.$DebtorType;?>"><?=_('Review all notes for this Customer Type')?></a></div> <?php } ?> -<p> +<br /> <?php if (!isset($_GET['delete'])) { Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/AgedDebtors.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -266,7 +266,7 @@ if (DB_error_no($db) !=0) { $title = _('Aged Customer Account Analysis') . ' - ' . _('Problem Report') . '.... '; include('includes/header.inc'); - echo '<p>' . _('The customer details could not be retrieved by the SQL because') . ' ' . DB_error_msg($db); + echo '<br />' . _('The customer details could not be retrieved by the SQL because') . ' ' . DB_error_msg($db); echo '<br /><a href="'.$rootpath.'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ echo '<br />'.$SQL; @@ -367,7 +367,7 @@ echo '<br /><br />' . _('The details of outstanding transactions for customer') . ' - ' . $AgedAnalysis['debtorno'] . ' ' . _('could not be retrieved because') . ' - ' . DB_error_msg($db); echo '<br /><a href="'.$rootpath.'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo '<br />' . _('The SQL that failed was') . '<p>' . $sql; + echo '<br />' . _('The SQL that failed was') . '<br />' . $sql; } include('includes/footer.inc'); exit; Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/BOMIndented.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -267,7 +267,7 @@ echo '<option selected value="yes">' . _('Print With Alternating Highlighted Lines') . '</option>'; echo '<option value="no">' . _('Plain Print') . '</option>'; echo '</select></td></tr>'; - echo '</table><p><div class="centre"><input type=submit name="PrintPDF" value="' . _('Print PDF') . '"></div>'; + echo '</table><br /><div class="centre"><input type=submit name="PrintPDF" value="' . _('Print PDF') . '"></div>'; include('includes/footer.inc'); Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/BOMIndentedReverse.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -255,7 +255,7 @@ echo "<option selected value='yes'>" . _('Print With Alternating Highlighted Lines'); echo "<option value='no'>" . _('Plain Print'); echo '</select></td></tr>'; - echo "</table><p><div class='centre'><input type=submit name='PrintPDF' value='" . _('Print PDF') . "'></div>"; + echo "</table><br /><div class='centre'><input type=submit name='PrintPDF' value='" . _('Print PDF') . "'></div>"; include('includes/footer.inc'); Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/BOMs.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -789,7 +789,7 @@ if (!isset($SelectedParent)) { - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title . '</p>'; echo '<form action="' . $_SERVER['PHP_SELF'] . '" method=post>' . '<div class="page_help_text">'. _('Select a manufactured part') . ' (' . _('or Assembly or Kit part') . ') ' . _('to maintain the bill of material for using the options below') . '.' . '<br /><font size=1>' . Modified: trunk/BankAccounts.php =================================================================== --- trunk/BankAccounts.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/BankAccounts.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -243,12 +243,12 @@ //END WHILE LIST LOOP - echo '</table><p>'; + echo '</table><br />'; } if (isset($SelectedBankAccount)) { echo '<br />'; - echo '<div class="centre"><p><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '">' . _('Show All Bank Accounts Defined') . '</a></div>'; + echo '<div class="centre"><p><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '">' . _('Show All Bank Accounts Defined') . '</a></p></div>'; echo '<br />'; } Modified: trunk/BankMatching.php =================================================================== --- trunk/BankMatching.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/BankMatching.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -11,14 +11,16 @@ $Type = 'Receipts'; $TypeName =_('Receipts'); - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Bank Matching') . '" alt="" />' . ' ' . _('Bank Account Matching - Receipts') . '</p>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Bank Matching') . '" alt="" />' . + ' ' . _('Bank Account Matching - Receipts') . '</p>'; } elseif ((isset($_GET['Type']) AND $_GET['Type']=='Payments') OR (isset($_POST['Type']) and $_POST['Type']=='Payments')) { $Type = 'Payments'; $TypeName =_('Payments'); - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_delete.png" title="' . _('Bank Matching') . '" alt="" />' . ' ' . _('Bank Account Matching - Payments') . '</p>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_delete.png" title="' . _('Bank Matching') . + '" alt="" />' . ' ' . _('Bank Account Matching - Payments') . '</p>'; } else { @@ -136,9 +138,9 @@ echo '</table><br /><div class="centre"><input tabindex="6" type=submit name="ShowTransactions" value="' . _('Show selected') . ' ' . $TypeName . '">'; if (isset($_POST['BankAccount'])) { - echo '<p><a href="'.$rootpath.'/BankReconciliation.php?Account='.$_POST['BankAccount'].'">' . _('Show reconciliation') . '</a></div>'; + echo '<p><a href="'.$rootpath.'/BankReconciliation.php?Account='.$_POST['BankAccount'].'">' . _('Show reconciliation') . '</a></p></div>'; } else { - echo '<p><a href="'.$rootpath.'/BankReconciliation.php">' . _('Show reconciliation') . '</a></div>'; + echo '<p><a href="'.$rootpath.'/BankReconciliation.php">' . _('Show reconciliation') . '</a></p></div>'; } $InputError=0; Modified: trunk/BankReconciliation.php =================================================================== --- trunk/BankReconciliation.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/BankReconciliation.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -21,7 +21,7 @@ if (!is_numeric($_POST['BankStatementBalance'])){ prnMsg(_('The entry in the bank statement balance is not numeric. The balance on the bank statement should be entered. The exchange difference has not been calculated and no general ledger journal has been created'),'warn'); - echo '<p>' . $_POST['BankStatementBalance']; + echo '<br />' . $_POST['BankStatementBalance']; } else { /* Now need to get the currency of the account and the current table ex rate */ $SQL = "SELECT rate, bankaccountname @@ -100,7 +100,7 @@ echo '<tr><td>' . _('Bank Account') . ':</td><td><select tabindex="1" name="BankAccount">'; if (DB_num_rows($AccountsResults)==0){ - echo '</select></td></tr></table><p>' . _('Bank Accounts have not yet been defined') . '. ' . _('You must first') . + echo '</select></td></tr></table><br />' . _('Bank Accounts have not yet been defined') . '. ' . _('You must first') . '<a href="' . $rootpath . '/BankAccounts.php">' . _('define the bank accounts') . '</a>' . ' ' . _('and general ledger accounts to be affected') . '.'; include('includes/footer.inc'); exit; @@ -120,7 +120,7 @@ include ('includes/GLPostings.inc'); -echo '</table><p><div class="centre"><input type=submit tabindex="2" name="ShowRec" value="' . _('Show bank reconciliation statement') . '"></div><br />'; +echo '</table><br /><div class="centre"><input type=submit tabindex="2" name="ShowRec" value="' . _('Show bank reconciliation statement') . '"></div><br />'; if (isset($_POST['ShowRec']) OR isset($_POST['DoExchangeDifference'])){ @@ -336,10 +336,10 @@ } if (isset($_POST['BankAccount'])) { - echo '<p><div class="centre"><a tabindex="4" href="' . $rootpath . '/BankMatching.php?Type=Payments&Account='.$_POST['BankAccount'].'">' . _('Match off cleared payments') . '</a>'; + echo '<br /><div class="centre"><a tabindex="4" href="' . $rootpath . '/BankMatching.php?Type=Payments&Account='.$_POST['BankAccount'].'">' . _('Match off cleared payments') . '</a>'; echo '<br /><a tabindex="5" href="' . $rootpath . '/BankMatching.php?Type=Receipts&Account='.$_POST['BankAccount'].'">' . _('Match off cleared deposits') . '</a></div>'; } else { - echo '<p><div class="centre"><a tabindex="4" href="' . $rootpath . '/BankMatching.php?Type=Payments">' . _('Match off cleared payments') . '</a>'; + echo '<br /><div class="centre"><a tabindex="4" href="' . $rootpath . '/BankMatching.php?Type=Payments">' . _('Match off cleared payments') . '</a>'; echo '<br /><a tabindex="5" href="' . $rootpath . '/BankMatching.php?Type=Receipts">' . _('Match off cleared deposits') . '</a></div>'; } echo '</form>'; Modified: trunk/COGSGLPostings.php =================================================================== --- trunk/COGSGLPostings.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/COGSGLPostings.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -235,7 +235,7 @@ echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] .'">' . _('Show all cost of sales posting records') . '</a></div>'; } -echo '<p />'; +echo '<br />'; echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/Credit_Invoice.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -1527,7 +1527,7 @@ } $j++; echo '<tr><td>' . _('Credit note text') . '</td><td><textarea tabindex='.$j.' name=CreditText cols=31 rows=5>' . $_POST['CreditText'] . '</textarea></td></tr>'; - echo '</table><br /><div class="centre"><input TABINDEX='.$j.' type=submit name=Update Value=' . _('Update') . '><p>'; + echo '</table><br /><div class="centre"><input TABINDEX='.$j.' type=submit name=Update Value=' . _('Update') . '><br />'; $j++; echo '<input type="submit" tabindex='.$j++.' name="ProcessCredit" value="' . _('Process Credit') .'"></div>'; } Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/CustLoginSetup.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -34,7 +34,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer') . ' : ' . $_SESSION['CustomerID'] . ' - ' . $CustomerName. _(' has been selected') . '</p><br />';//'</p>'; -//echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/group_add.png" title="' . _('Search') . '" alt="">' . ' ' . $title.'<br />'; +//echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/group_add.png" title="' . _('Search') . '" alt="">' . ' ' . $title.'</p><br />'; //Make an array of the security roles where only one role is active and is ID 1 Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/CustomerAllocations.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -322,18 +322,19 @@ } - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Allocate Receipt') . '" alt="" />' . ' ' . _('Allocate Receipts') . '</p>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Allocate Receipt') . + '" alt="" />' . ' ' . _('Allocate Receipts') . '</p>'; - $TableHeader = "<tr> - <th>" . _('Trans Type') . "</th> - <th>" . _('Customer') . "</th> - <th>" . _('Cust No') . "</th> - <th>" . _('Number') . "</th> - <th>" . _('Date') . "</th> - <th>" . _('Total') . "</th> - <th>" . _('To Alloc') . "</th> - <th>" . _('Action') . "</th> - </tr>"; + $TableHeader = '<tr> + <th>' . _('Trans Type') . '</th> + <th>' . _('Customer') . '</th> + <th>' . _('Cust No') . '</th> + <th>' . _('Number') . '</th> + <th>' . _('Date') . '</th> + <th>' . _('Total') . '</th> + <th>' . _('To Alloc') . '</th> + <th>' . _('Action') . '</th> + </tr>'; if (isset($_POST['AllocTrans'])) { // Page called with trans number @@ -343,7 +344,7 @@ // Show trans already allocated and potential new allocations - echo '<p><table class=selection>'; + echo '<br /><table class=selection>'; echo '<tr><th colspan=7><div class="centre"><font color=blue><b>' . $_SESSION['Alloc']->DebtorNo . ' - ' . $_SESSION['Alloc']->CustomerName . '</b></div>'; if ($_SESSION['Alloc']->TransExRate != 1) { @@ -352,15 +353,15 @@ '</b><i> ('._('converted into local currency at an exchange rate of'). ' ' . $_SESSION['Alloc']->TransExRate . ')</i>'; } - echo "</th></tr><tr> - <th>" . _('Trans') . '<br />' . _('Type') . "</th> - <th>" . _('Trans') . '<br />' . _('Number') . "</th> - <th>" . _('Trans') . '<br />' . _('Date') . "</th> - <th>" . _('Total') . '<br />' . _('Amount') . "</th> - <th>" . _('Yet to') . '<br />' . _('Allocate') . "</th> - <th>" . _('This') . '<br />' . _('Allocation') . "</th> - <th>" . _('Running') . '<br />' . _('Balance') . "</th> - </tr>"; + echo '</th></tr><tr> + <th>' . _('Trans') . '<br />' . _('Type') . '</th> + <th>' . _('Trans') . '<br />' . _('Number') . '</th> + <th>' . _('Trans') . '<br />' . _('Date') . '</th> + <th>' . _('Total') . '<br />' . _('Amount') . '</th> + <th>' . _('Yet to') . '<br />' . _('Allocate') . '</th> + <th>' . _('This') . '<br />' . _('Allocation') . '</th> + <th>' . _('Running') . '<br />' . _('Balance') . '</th> + </tr>'; $Counter = 0; $TotalAllocated = 0; @@ -420,7 +421,7 @@ <td colspan=5 class=number><b>'._('Left to allocate').'</b></td> <td class=number><b>' . number_format($remaining-$TotalAllocated,2).'</b></td> </tr>'; - echo '</table><p>'; + echo '</table><br />'; echo "<input type=hidden name=TotalNumberOfAllocs value=" . $Counter . ">"; echo "<div class='centre'><input tabindex=".$j." type=submit name=UpdateDatabase value=" . _('Process Allocations') . ">"; echo "<input tabindex=".$j." type=submit name=Cancel value=" . _('Cancel') . "></div>"; @@ -477,7 +478,7 @@ echo '<td><a href=' . $_SERVER['PHP_SELF']. '?' . SID . '&AllocTrans=' . $myrow['id'] . '>' . _('Allocate') . '</a></td></tr>'; } DB_free_result($result); - echo '</table><p>'; + echo '</table><br />'; } else { /* Page called with no parameters */ unset($_SESSION['Alloc']->Allocs); @@ -548,13 +549,13 @@ $k++; } - echo "<td>" . $myrow['typename'] ."</td> - <td>" . $myrow['name'] . "</td> - <td>" . $myrow['debtorno'] . "</td> - <td>" . $myrow['transno'] . "</td> - <td>" . ConvertSQLDate($myrow['trandate']) . "</td> - <td class=number>" . number_format($myrow['total'],2) . "</td> - <td class=number>" . number_format($myrow['total']-$myrow['alloc'],2) . "</td>"; + echo '<td>' . $myrow['typename'] .'</td> + <td>' . $myrow['name'] . '</td> + <td>' . $myrow['debtorno'] . '</td> + <td>' . $myrow['transno'] . '</td> + <td>' . ConvertSQLDate($myrow['trandate']) . '</td> + <td class=number>' . number_format($myrow['total'],2) . '</td> + <td class=number>' . number_format($myrow['total']-$myrow['alloc'],2) . '</td>'; echo '<td>' . $allocate . '</td></tr>'; if ( $curTrans > $trans ) { @@ -565,7 +566,7 @@ } } DB_free_result($result); - echo '</table><p>'; + echo '</table><br />'; if ($trans == 0) { prnMsg(_('There are no allocations to be done'),'info'); Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/CustomerBranches.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -596,7 +596,7 @@ if (DB_num_rows($result)==0){ echo '</table>'; prnMsg(_('There are no sales people defined as yet') . ' - ' . _('customer branches must be allocated to a sales person') . '. ' . _('Please use the link below to define at least one sales person'),'error'); - echo '<p align="center"><a href="' . $rootpath . '/SalesPeople.php?">'._('Define Sales People') . '</a>'; + echo '<p align="center"><a href="' . $rootpath . '/SalesPeople.php?">'._('Define Sales People') . '</a></p>'; include('includes/footer.inc'); exit; } Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/CustomerReceipt.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -228,7 +228,8 @@ $k=0; //Table row counter for row styles $CustomerReceiptCounter=1; //Count lines of customer receipts in this batch - echo '<br /><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Allocate') . '" alt="" />' . ' ' . _('Summary of Receipt Batch').'</p><br />'; + echo '<br /><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Allocate') . + '" alt="" />' . ' ' . _('Summary of Receipt Batch').'</p><br />'; echo '<table class=selection><tr><th>'._('Batch Number').'</th> <th>'._('Date Banked').'</th> @@ -525,8 +526,10 @@ echo '<br />'; prnMsg( _('Receipt batch') . ' ' . $_SESSION['ReceiptBatch']->BatchNo . ' ' . _('has been successfully entered into the database'),'success'); - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="">' . ' ' . '<a href="' . $rootpath . '/PDFBankingSummary.php?BatchNo=' . $_SESSION['ReceiptBatch']->BatchNo . '">' . _('Print PDF Batch Summary') . '</a></p>'; - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/allocation.png" title="' . _('Allocate') . '" alt="">' . ' ' . '<a href="' . $rootpath . '/CustomerAllocations.php">' . _('Allocate Receipts') . '</a></p>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="">' . ' ' . + '<a href="' . $rootpath . '/PDFBankingSummary.php?BatchNo=' . $_SESSION['ReceiptBatch']->BatchNo . '">' . _('Print PDF Batch Summary') . '</a></p>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/allocation.png" title="' . _('Allocate') . '" alt="">' . ' ' . + '<a href="' . $rootpath . '/CustomerAllocations.php">' . _('Allocate Receipts') . '</a></p>'; unset($_SESSION['ReceiptBatch']); include('includes/footer.inc'); exit; @@ -718,16 +721,18 @@ $AccountsResults = DB_query($SQL,$db,$ErrMsg,$DbgMsg); if (isset($_POST['GLEntry'])) { - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Enter Receipt') . '" alt="">' . ' ' . _('General Ledger Receipt Entry') . '</p>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Enter Receipt') . '" alt="">' . + ' ' . _('General Ledger Receipt Entry') . '</p>'; } else { - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Enter Receipt') . '" alt="">' . ' ' . _('Enter Customer Receipt') . '</p>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Enter Receipt') . + '" alt="">' . ' ' . _('Enter Customer Receipt') . '</p>'; echo '<div class="page_help_text">' . _('To enter a payment TO a customer (ie. to pay out a credit note), enter a negative payment amount.') . '</div>'; } echo '<br /><table class=selection><tr><td>' . _('Bank Account') . ':</td> <td><select tabindex=1 name="BankAccount" onChange="ReloadForm(form1.BatchInput)">'; if (DB_num_rows($AccountsResults)==0){ - echo '</select></td></tr></table><p>'; + echo '</select></td></tr></table><br />'; prnMsg(_('Bank Accounts have not yet been defined') . '. ' . _('You must first') . ' ' . '<a href="' . $rootpath . '/BankAccounts.php">' . _('define the bank accounts') . '</a>' . _('and general ledger accounts to be affected'),'info'); include('includes/footer.inc'); exit; @@ -892,7 +897,10 @@ AND isset($_SESSION['ReceiptBatch'])){ /*a customer is selected */ - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . $_SESSION['CustomerRecord']['name'] . ' - (' . _('All amounts stated in') . ' ' . $_SESSION['CustomerRecord']['currency'] . ')' . _('Terms') . ': ' . $_SESSION['CustomerRecord']['terms'] . '<br/>' . _('Credit Limit') . ': ' . number_format($_SESSION['CustomerRecord']['creditlimit'],0) . ' ' . _('Credit Status') . ': ' . $_SESSION['CustomerRecord']['reasondescription']; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . + $_SESSION['CustomerRecord']['name'] . ' - (' . _('All amounts stated in') . ' ' . $_SESSION['CustomerRecord']['currency'] . ')' . + _('Terms') . ': ' . $_SESSION['CustomerRecord']['terms'] . '<br/>' . _('Credit Limit') . ': ' . + number_format($_SESSION['CustomerRecord']['creditlimit'],0) . ' ' . _('Credit Status') . ': ' . $_SESSION['CustomerRecord']['reasondescription'] . '</p>'; if ($_SESSION['CustomerRecord']['dissallowinvoices']!=0){ echo '<br /><font color=red size=4><b>' . _('ACCOUNT ON HOLD') . '</font></b><br/>'; @@ -1017,7 +1025,7 @@ /*Show the form to select a customer */ echo '<br />'; - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . _('Select a Customer') . '</b>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . _('Select a Customer') . '</p>'; echo '<table cellpadding=3 colspan=4 class=selection>'; echo '<tr><td>' . _('Text in the Customer') . ' ' . '<b>' . _('name') . '</b>:</td>'; echo '<td><input tabindex=9 type="text" name="Keywords" size=15 maxlength=25></td>'; Modified: trunk/CustomerTypes.php =================================================================== --- trunk/CustomerTypes.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/CustomerTypes.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -217,13 +217,13 @@ //end of ifs and buts! if (isset($SelectedType)) { - echo '<div class="centre"><p><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Show All Types Defined') . '</a></div><p>'; + echo '<div class="centre"><p><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Show All Types Defined') . '</a></p></div>'; } if (! isset($_GET['delete'])) { echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<p><table class=selection>'; //Main table + echo '<br /><table class=selection>'; //Main table // The user wish to EDIT an existing type @@ -264,7 +264,7 @@ echo '</td></tr></table>'; // close main table - echo '<p><div class="centre"><input type=submit name=submit value="' . _('Accept') . '"></div>'; + echo '<br /><div class="centre"><input type=submit name=submit value="' . _('Accept') . '"></div>'; echo '</form>'; Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/DailyBankTransactions.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -28,7 +28,7 @@ echo '<tr><td>' . _('Bank Account') . ':</td><td><select name="BankAccount">'; if (DB_num_rows($AccountsResults)==0){ - echo '</select></td></tr></table><p>'; + echo '</select></td></tr></table><br />'; prnMsg( _('Bank Accounts have not yet been defined. You must first') . ' <a href="' . $rootpath . '/BankAccounts.php">' . _('define the bank accounts') . '</a> ' . _('and general ledger accounts to be affected'),'warn'); include('includes/footer.inc'); exit; Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/DeliveryDetails.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -763,9 +763,9 @@ if (isset($_SESSION['Items'.$identifier]->SpecialInstructions) and strlen($_SESSION['Items'.$identifier]->SpecialInstructions)>0) { prnMsg($_SESSION['Items'.$identifier]->SpecialInstructions,'info'); } -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Delivery') . '" alt="" />' . ' ' . _('Delivery Details'); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer Code') . ' :<b> ' . $_SESSION['Items'.$identifier]->DebtorNo; -echo '</b> ' . _('Customer Name') . ' :<b> ' . $_SESSION['Items'.$identifier]->CustomerName . '</p>'; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Delivery') . '" alt="" />' . ' ' . _('Delivery Details') . '</p>'; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer Code') . ' :<b> ' . $_SESSION['Items'.$identifier]->DebtorNo . '</p>'; +echo '</b> ' . _('Customer Name') . ' :<b> ' . $_SESSION['Items'.$identifier]->CustomerName; //echo '<font size=4><b>'. _('Customer') .' : ' . $_SESSION['Items'.$identifier]->CustomerName . '</b></font>'; echo '<form action="' . $_SERVER['PHP_SELF'] . '?' . SID.'identifier='.$identifier . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -783,7 +783,7 @@ } echo '</b></div> <table cellpading=2 colspan=7> - <Tr> + <tr> <th>'. _('Item Code') .'</th> <th>'. _('Item Description') .'</th> <th>'. _('Quantity') .'</th> Modified: trunk/EDIMessageFormat.php =================================================================== --- trunk/EDIMessageFormat.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/EDIMessageFormat.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -100,7 +100,7 @@ echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<p><table border=0 width=100%> +echo '<br /><table border=0 width=100%> <p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>'; @@ -159,7 +159,7 @@ $myrow[0]); } //END WHILE LIST LOOP - echo '</table><p>'; + echo '</table><br />'; if (DB_num_rows($result)==0){ echo '<div class="centre"><input tabindex=1 type=submit name="NewEDIInvMsg" value="' . _('Create New EDI Invoice Message From Default Template') . '"></div><br />'; Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/EDIProcessOrders.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -526,7 +526,7 @@ $Result = DB_query("SELECT realname, email FROM www_users WHERE fullaccess=7 AND email <>''",$db); if (DB_num_rows($Result)==0){ /*There are no sysadmins with email address specified */ - $Recipients = array("'phil' <phil@localhost>"); + $Recipients = array("'tim' <tim@localhost>"); } else { /*Make an array of the sysadmin recipients */ $Recipients = array(); @@ -541,7 +541,7 @@ } else { $mail->setSubject(_('EDI Order Message') . ' ' . $Order->CustRef); - $EDICustServPerson ="'phil' <phil@localhost>"; + $EDICustServPerson ="'tim' <tim@localhost>"; $Recipients = array($EDICustServPerson); } Modified: trunk/EmailConfirmation.php =================================================================== --- trunk/EmailConfirmation.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/EmailConfirmation.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -83,12 +83,12 @@ if ($myrow['printedpackingslip']==1 AND ($_GET['Reprint']!='OK' OR !isset($_GET['Reprint']))){ $title = _('Print Packing Slip Error'); include('includes/header.inc'); - echo '<p>'; + echo '<br />'; prnMsg( _('The packing slip for order number') . ' ' . $_GET['TransNo'] . ' ' . _('has previously been printed') . '. ' . _('It was printed on'). ' ' . ConvertSQLDate($myrow['datepackingslipprinted']) . '<br />' . _('This check is there to ensure that duplicate packing slips are not produced and dispatched more than once to the customer'), 'warn' ); echo '<p><a href="' . $rootpath . '/PrintCustOrder.php?' . SID . '&TransNo=' . $_GET['TransNo'] . '&Reprint=OK">' - . _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed') . '</a><p>' . + . _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed') . '</a></p>' . '<a href="' . $rootpath. '/PrintCustOrder_generic.php?' . SID . '&TransNo=' . $_GET['TransNo'] . '&Reprint=OK">'. _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed'). '</a>'; echo '<br /><br /><br />'; Modified: trunk/ExchangeRateTrend.php =================================================================== --- trunk/ExchangeRateTrend.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/ExchangeRateTrend.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -51,7 +51,7 @@ echo '</table>'; /*close off the table in the third column */ - echo '<p><div class="centre"><input type=submit name=submit value="' . _('Accept') . '"></div>'; + echo '<br /><div class="centre"><input type=submit name=submit value="' . _('Accept') . '"></div>'; echo '</form>'; @@ -64,7 +64,7 @@ $graph = $CurrencyToShow. '/' . $FunctionalCurrency . $graph; $image = 'http://www.x-rates.com/d/' . $graph; - echo '<p></div><table class=selection>'; + echo '<br /></div><table class=selection>'; echo '<tr><th><div class="centre"><font size=4 color=BLUE><b><U>' . $FunctionalCurrency . ' / ' . $CurrencyToShow . '</b></U></font></th></tr>'; echo '<tr><td><img src=' . $image . ' alt="Trend Currently Unavailable"></td></tr>'; echo '</table>'; Modified: trunk/FTP_RadioBeacon.php =================================================================== --- trunk/FTP_RadioBeacon.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/FTP_RadioBeacon.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -184,8 +184,9 @@ $myrow = DB_fetch_array($result); if ($myrow['printedpackingslip']==1){ prnMsg(_('Order Number') . ' ' . $_GET['OrderNo'] . ' ' . _('has previously been sent to Radio Beacon') . '. ' . _('It was sent on') . ' ' . ConvertSQLDate($myrow['datepackingslipprinted']) . '<br />' . _('To re-send the order with the balance not previously dispatched and invoiced the order must be modified to allow a reprint (or re-send)') . '.<br />' . _('This check is there to ensure that duplication of dispatches to the customer are avoided'),'warn'); - echo '<p><a href="'.$rootpath.'/SelectOrderItems.php?ModifyOrderNumber=' . $_GET['OrderNo'] . '">' . _('Modify the order to allow a re-send or reprint') . ' (' . _('Select Delivery Details') . ')' . '</a>'; - echo '<p><a href="'.$rootpath.'/index.php">' . _('Back to the menu') . '</a>'; + echo '<p><a href="'.$rootpath.'/SelectOrderItems.php?ModifyOrderNumber=' . $_GET['OrderNo'] . '">' . + _('Modify the order to allow a re-send or reprint') . ' (' . _('Select Delivery Details') . ')' . '</a></p>'; + echo '<p><a href="'.$rootpath.'/index.php">' . _('Back to the menu') . '</a></p>'; include('includes/footer.inc'); exit; } @@ -262,7 +263,7 @@ } fclose($fp); - echo '<p>' . _('FTP Connection progress') . ' .....'; + echo '<p>' . _('FTP Connection progress') . ' .....</p>'; // set up basic connection $conn_id = ftp_connect($_SESSION['RadioBeaconFTP_server']); // login with username and password $login_result = ftp_login($conn_id, $_SESSION['RadioBeaconFTP_user_name'], $_SESSION['RadioBeaconFTP_user_pass']); // check connection @@ -286,11 +287,13 @@ $sql = "UPDATE salesorders SET printedpackingslip=1, datepackingslipprinted='" . Date('Y-m-d') . "' WHERE salesorders.orderno=" . $_GET['OrderNo']; $result = DB_query($sql,$db); - echo '<p>' . _('Order Number') . ' ' . $_GET['OrderNo'] . ' ' . _('has been sent via FTP to Radio Beacon a copy of the file that was sent is held on the server at') . '<br />' . $FileName; + echo '<p>' . _('Order Number') . ' ' . $_GET['OrderNo'] . ' ' . + _('has been sent via FTP to Radio Beacon a copy of the file that was sent is held on the server at') . '<br />' . $FileName . '</p>'; } else { /*perhaps several order headers returned or none (more likely) */ - echo '<p>' . _('The order') . ' ' . $_GET['OrderNo'] . ' ' . _('for dispatch via Radio Beacon could not be retrieved') . '. ' . _('Perhaps it is set to be dispatched from a different stock location'); + echo '<p>' . _('The order') . ' ' . $_GET['OrderNo'] . ' ' . _('for dispatch via Radio Beacon could not be retrieved') . '. ' . + _('Perhaps it is set to be dispatched from a different stock location') . '</p>'; } } /*there are line items outstanding for dispatch */ Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/Factors.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -207,7 +207,7 @@ echo '<td>' . $myrow['email'].'</td>'; echo '<td><a href="'.$rootpath . '/Factors.php?' . SID . '&FactorID='.$myrow['id'].'">'._('Edit').'</a></td></tr>'; } - echo "</table><p><div class='centre'>"; + echo "</table><br /><div class='centre'>"; echo "<br /><input tabindex=3 type='Submit' name='Create' value='" . _('Create New Factor') . "'>"; echo '</div></form>'; include('includes/footer.inc'); @@ -285,11 +285,12 @@ if (isset($_POST['Create'])) { - echo "</table><p><div class='centre'><input tabindex=12 type='Submit' name='submit' value='" . _('Insert New Factor') . "'></div>"; + echo "</table><br /><div class='centre'><input tabindex=12 type='Submit' name='submit' value='" . _('Insert New Factor') . "'></div>"; } else if (isset($_POST['amend'])) { - echo "</table><p><div class='centre'><input tabindex=13 type='Submit' name='update' value='" . _('Update Factor') . "'><p>"; + echo "</table><p><div class='centre'><input tabindex=13 type='Submit' name='update' value='" . _('Update Factor') . "'></p>"; prnMsg ( _('There is no second warning if you hit the delete button below') . '. ' . _('However checks will be made to ensure there are no suppliers are using this factor before the deletion is processed'), 'warn'); - echo "<p><input tabindex=14 type='Submit' name='delete' value='" . _('Delete Factor') . "' onclick=\"return confirm('" . _('Are you sure you wish to delete this factoring company?') . "');\"></form></div>"; + echo "<br /><input tabindex=14 type='Submit' name='delete' value='" . _('Delete Factor') . + "' onclick=\"return confirm('" . _('Are you sure you wish to delete this factoring company?') . "');\"></form></div>"; } Modified: trunk/FixedAssetLocations.php =================================================================== --- trunk/FixedAssetLocations.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/FixedAssetLocations.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -142,8 +142,8 @@ echo '<div class="centre">'; if (isset($_GET['SelectedLocation'])) { echo '<input type="Submit" name="update" value="' . _('Update Information') . '">'; - echo '<p>'; - echo '<p><center><input type="Submit" name="delete" value="' . _('Delete This Location') . '">'; + echo '<br />'; + echo '<br /><div class="centre"><input type="Submit" name="delete" value="' . _('Delete This Location') . '"></div>'; } else { echo '<input type="submit" name="submit" value="' . _('Enter Information') . '">'; } @@ -151,4 +151,4 @@ echo '</form>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/FixedAssetRegister.php =================================================================== --- trunk/FixedAssetRegister.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/FixedAssetRegister.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -235,7 +235,7 @@ } } else { include ('includes/header.inc'); - echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title; + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title . '</p>'; $result = DB_query("SELECT categoryid,categorydescription FROM fixedassetcategories", $db); echo '<form name="RegisterForm" method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '"><table class="selection">'; Modified: trunk/FormDesigner.php =================================================================== --- trunk/FormDesigner.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/FormDesigner.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -156,7 +156,8 @@ if (empty($_POST['preview'])) { $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/'.$_POST['FormName']); } -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Form Design') . '" alt="">' . ' ' . _('Form Design').'<br />'. $FormDesign['name'] . ''; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Form Design') . + '" alt="">' . ' ' . _('Form Design').'<br />'. $FormDesign['name'] . '</p>'; echo '<div class="page_help_text">' . _('Enter the changes that you want in the form layout below.') .'<br /> '. _('All measurements are in millimetres') . '.</div><br />'; $Papers=array('A4_Landscape', 'A4_Portrait', 'A5_Landscape', 'A5_Portrait', 'A3_Landscape', 'A3_Portrait', 'letter_Portrait', 'letter_Landscape', 'legal_Portrait', 'legal_Landscape'); // Possible paper sizes/orientations echo '<form method="post" id="Form" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; Modified: trunk/GLAccountCSV.php =================================================================== --- trunk/GLAccountCSV.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/GLAccountCSV.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -13,7 +13,8 @@ $SelectedPeriod = $_GET['Period']; } -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('General Ledger Account Inquiry') . '" alt="" />' . ' ' . _('General Ledger Account Report') . '</p>'; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . + _('General Ledger Account Inquiry') . '" alt="" />' . ' ' . _('General Ledger Account Report') . '</p>'; echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple accounts and periods') . '</div><br />'; @@ -77,7 +78,7 @@ echo '</select></td></tr>'; // End select tag -echo "</table><p> +echo "</table><br /> <div class='centre'><input type=submit name='MakeCSV' value='"._('Make CSV File')."'></div></form>"; /* End of the Form rest of script is what happens if the show button is hit*/ @@ -258,7 +259,7 @@ } /*end for each SelectedAccount */ fclose($fp); - echo '<p><a href="' . $FileName . '">' . _('click here') . '</a> ' . _('to view the file') . '<br />'; + echo '<p><a href="' . $FileName . '">' . _('click here') . '</a> ' . _('to view the file') . '</p><br />'; } /* end of if CreateCSV button hit */ include('includes/footer.inc'); Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/GLAccountInquiry.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -21,7 +21,8 @@ $SelectedPeriod = $_GET['Period']; } -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('General Ledger Account Inquiry') . '" alt="" />' . ' ' . _('General Ledger Account Inquiry') . '</p>'; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . + _('General Ledger Account Inquiry') . '" alt="" />' . ' ' . _('General Ledger Account Inquiry') . '</p>'; echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple periods') . '</div><br />'; @@ -76,7 +77,7 @@ } } echo '</select></td></tr><table>'; -echo '<p><div class="centre"><input type=submit name="Show" value="'._('Show Account Transactions').'"></div></form>'; +echo '<p><div class="centre"><input type=submit name="Show" value="'._('Show Account Transactions').'"></div></p></form>'; /* End of the Form rest of script is what happens if the show button is hit*/ @@ -313,7 +314,7 @@ if (isset($ShowIntegrityReport) and $ShowIntegrityReport==True){ if (!isset($IntegrityReport)) {$IntegrityReport='';} prnMsg( _('There are differences between the sum of the transactions and the recorded movements in the ChartDetails table') . '. ' . _('A log of the account differences for the periods report shows below'),'warn'); - echo '<p>'.$IntegrityReport; + echo '<br />'.$IntegrityReport; } include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/GLAccountReport.php =================================================================== --- trunk/GLAccountReport.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/GLAccountReport.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -249,7 +249,8 @@ include('includes/header.inc'); include('includes/GLPostings.inc'); - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('General Ledger Account Inquiry') . '" alt="" />' . ' ' . _('General Ledger Account Report') . '</p>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . + _('General Ledger Account Inquiry') . '" alt="" />' . ' ' . _('General Ledger Account Report') . '</p>'; echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple accounts and periods') . '</div><br />'; @@ -313,7 +314,7 @@ echo '</select></td></tr>'; // End select tag - echo '</table><p> + echo '</table><br /> <div class="centre"> <input type=submit name="RunReport" value="' ._('Run Report'). '"></div> </form>'; Modified: trunk/GLAccounts.php =================================================================== --- trunk/GLAccounts.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/GLAccounts.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -335,13 +335,13 @@ //end of ifs and buts! -echo '<p>'; +echo '<br />'; if (isset($SelectedAccount)) { echo "<div class='centre'><a href='" . $_SERVER['PHP_SELF'] . '?' . SID ."'>" . _('Show All Accounts') . '</a></div>'; } -echo '<p>'; +echo '<br />'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/GLBalanceSheet.php =================================================================== --- trunk/GLBalanceSheet.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/GLBalanceSheet.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -26,7 +26,7 @@ echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<p><table class="selection"><tr><td>'._('Select the balance date').':</td><td><select Name="BalancePeriodEnd">'; + echo '<br /><table class="selection"><tr><td>'._('Select the balance date').':</td><td><select Name="BalancePeriodEnd">'; $periodno=GetPeriod(Date($_SESSION['DefaultDateFormat']), $db); $sql = "SELECT lastdate_in_period FROM periods WHERE periodno='".$periodno . "'"; Modified: trunk/GLProfit_Loss.php =================================================================== --- trunk/GLProfit_Loss.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/GLProfit_Loss.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -37,7 +37,7 @@ $period=GetPeriod($FromDate, $db); /*Show a form to allow input of criteria for profit and loss to show */ - echo '<p><table class="selection"> + echo '<br /><table class="selection"> <tr><td>'._('Select Period From'). ':</td><td><select Name="FromPeriod">'; @@ -115,7 +115,7 @@ if ($NumberOfMonths > 12){ include('includes/header.inc'); - echo '<p>'; + echo '<br />'; prnMsg(_('A period up to 12 months in duration can be specified') . ' - ' . _('the system automatically shows a comparative for the same period from the previous year') . ' - ' . _('it cannot do this if a period of more than 12 months is specified') . '. ' . _('Please select an alternative period range'),'error'); include('includes/footer.inc'); exit; @@ -580,7 +580,9 @@ $AccountsResult = DB_query($SQL,$db,_('No general ledger accounts were returned by the SQL because'),_('The SQL that failed was')); - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('General Ledger Profit Loss Inquiry') . '" alt="" />' . ' ' . _('Statement of Profit and Loss for the') . ' ' . $NumberOfMonths . ' ' . _('months to') . ' and including ' . $PeriodToDate . '</p>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . + _('General Ledger Profit Loss Inquiry') . '" alt="" />' . ' ' . _('Statement of Profit and Loss for the') . ' ' . + $NumberOfMonths . ' ' . _('months to') . ' and including ' . $PeriodToDate . '</p>'; /*show a table of the accounts info returned by the SQL Account Code , Account Name , Month Actual, Month Budget, Period Actual, Period Budget */ Modified: trunk/GLTagProfit_Loss.php =================================================================== --- trunk/GLTagProfit_Loss.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/GLTagProfit_Loss.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -130,7 +130,7 @@ if ($NumberOfMonths > 12){ include('includes/header.inc'); - echo '<p>'; + echo '<br />'; prnMsg(_('A period up to 12 months in duration can be specified') . ' - ' . _('the system automatically shows a comparative for the same period from the previous year') . ' - ' . _('it cannot do this if a period of more than 12 months is specified') . '. ' . _('Please select an alternative period range'),'error'); include('includes/footer.inc'); exit; @@ -450,7 +450,7 @@ $NumberOfMonths = $_POST['ToPeriod'] - $_POST['FromPeriod'] + 1; if ($NumberOfMonths >12){ - echo '<p>'; + echo '<br />'; prnMsg(_('A period up to 12 months in duration can be specified') . ' - ' . _('the system automatically shows a comparative for the same period from the previous year') . ' - ' . _('it cannot do this if a period of more than 12 months is specified') . '. ' . _('Please select an alternative period range'),'error'); include('includes/footer.inc'); exit; Modified: trunk/GLTransInquiry.php =================================================================== --- trunk/GLTransInquiry.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/GLTransInquiry.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -191,7 +191,7 @@ <td class=number>' . number_format((-$CreditTotal),2) . '</td> <td colspan=2> </td> </tr>'; - echo '</table><p>'; + echo '</table><br />'; } } Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/GLTrialBalance.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -161,7 +161,7 @@ if (DB_num_rows($AccountsResult)==0){ $title = _('Print Trial Balance Error'); include('includes/header.inc'); - echo '<p>'; + echo '<br />'; prnMsg( _('There were no entries to print out for the selections specified') ); echo '<br /><a href="'. $rootpath.'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; include('includes/footer.inc'); Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/GoodsReceived.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -717,10 +717,10 @@ echo '<br /><div class="centre"><a href="' . $rootpath . '/PO_Items.php?=' . SID . '">' . _('Modify Order Items'). '</a></div>'; - echo '<br /><div class="centre"><input type=submit name=Update Value=' . _('Update') . '><p>'; + echo '<br /><div class="centre"><input type=submit name=Update Value=' . _('Update') . '><br />'; echo '<input type=submit name="ProcessGoodsReceived" Value="' . _('Process Goods Received') . '"></div>'; } echo '</form>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/InventoryQuantities.php =================================================================== --- trunk/InventoryQuantities.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/InventoryQuantities.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -161,7 +161,7 @@ if (DB_num_rows($result1)==0){ echo '</table></td></tr> </table> - <p>'; + <br />'; prnMsg(_('There are no stock categories currently defined please use the link below to set them up'),'warn'); echo '<br /><a href="' . $rootpath . '/StockCategories.php?' . SID .'">' . _('Define Stock Categories') . '</a>'; include ('includes/footer.inc'); @@ -185,7 +185,7 @@ } } echo '</select></td></tr>'; - echo '</table><p><div class="centre"><input type=submit name="PrintPDF" value="' . _('Print PDF') . '"></div>'; + echo '</table><br /><div class="centre"><input type=submit name="PrintPDF" value="' . _('Print PDF') . '"></div>'; include('includes/footer.inc'); Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/Locations.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -370,7 +370,7 @@ //end of ifs and buts! -echo "<p>"; +echo '<br />'; if (isset($SelectedLocation)) { echo '<a href="' . $_SERVER['PHP_SELF'] . '">' . _('Review Records') . '</a>'; } Modified: trunk/MRP.php =================================================================== --- trunk/MRP.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/MRP.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -554,7 +554,7 @@ echo '<td>' . _('Use Shrinkage') . ':  </td><td>' . $useshrinkage . '</td></tr>'; echo '</table></td>'; } - echo '<p><form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; + echo '<br /><form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<td><table class=selection>'; // Generate selections for Location Modified: trunk/MRPDemandTypes.php =================================================================== --- trunk/MRPDemandTypes.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/MRPDemandTypes.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -138,7 +138,7 @@ echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Show all Demand Types') . '</a></div>'; } -echo '<p><form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; +echo '<br /><form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedDT) and !isset($_GET['delete'])) { Modified: trunk/MRPPlannedPurchaseOrders.php =================================================================== --- trunk/MRPPlannedPurchaseOrders.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/MRPPlannedPurchaseOrders.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -277,7 +277,7 @@ echo '</select></td></tr>'; echo '<tr><td>' . _('Cut Off Date') . ':</td><td><input type ="text" class=date alt="'.$_SESSION['DefaultDateFormat'] . '" name="cutoffdate" size="10" value="'.date($_SESSION['DefaultDateFormat']).'"></td></tr>'; - echo '</table><p><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '"></div></form>'; + echo '</table><br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '"></div></form>'; include('includes/footer.inc'); Modified: trunk/MRPPlannedWorkOrders.php =================================================================== --- trunk/MRPPlannedWorkOrders.php 2011-06-14 07:49:51 UTC (rev 5353) +++ trunk/MRPPlannedWorkOrders.php 2011-06-14 08:28:33 UTC (rev 5354) @@ -339,7 +339,7 @@ echo '<option value="no">' . _('Plain Print') . '</option>'; echo '</select></td></tr>'; echo '<tr><td>' . _('Cut Off Date') . ':</td><td><input type ="text" class=date alt="'.$_SESSION['DefaultDateFormat'] .'" name="cutoffdate" size="10" value="'.date($_SESSION['DefaultDateFormat']).'"></tr>'; - echo '</table><p><div class="centre"><input type=submit name="Review" v... [truncated message content] |
From: <tim...@us...> - 2011-06-15 11:55:51
|
Revision: 5413 http://weberp.svn.sourceforge.net/weberp/?rev=5413&view=rev Author: tim_schofield Date: 2011-06-15 11:55:40 +0000 (Wed, 15 Jun 2011) Log Message: ----------- Ensure that all <option> tags have a </option> tag Modified Paths: -------------- trunk/AgedDebtors.php trunk/AgedSuppliers.php trunk/BOMIndentedReverse.php trunk/BankMatching.php trunk/ConfirmDispatch_Invoice.php trunk/CustEDISetup.php trunk/CustomerTransInquiry.php trunk/DailyBankTransactions.php trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/DiscountCategories.php trunk/DiscountMatrix.php trunk/FixedAssetTransfer.php trunk/FreightCosts.php trunk/GLAccountCSV.php trunk/GLAccountInquiry.php trunk/GLAccountReport.php trunk/GLAccounts.php trunk/GLBalanceSheet.php trunk/GLTagProfit_Loss.php trunk/InventoryPlanningPrefSupplier.php trunk/InventoryQuantities.php trunk/Locations.php trunk/MRPCreateDemands.php trunk/MRPPlannedPurchaseOrders.php trunk/MRPReschedules.php trunk/MRPShortages.php trunk/PDFChequeListing.php trunk/PDFCustomerList.php trunk/PDFDIFOT.php trunk/PDFDeliveryDifferences.php trunk/PDFOrderStatus.php trunk/PDFPriceList.php trunk/POReport.php trunk/PO_Items.php trunk/PO_PDFPurchOrder.php trunk/PO_SelectOSPurchOrder.php trunk/PO_SelectPurchOrder.php trunk/Payments.php trunk/PricesBasedOnMarkUp.php trunk/PricesByCost.php trunk/SalesAnalReptCols.php trunk/SalesCategories.php trunk/SalesGraph.php trunk/SalesInquiry.php trunk/SelectAsset.php trunk/SelectCreditItems.php trunk/SelectOrderItems.php trunk/SelectSalesOrder.php trunk/ShipmentCosting.php trunk/Shipments.php trunk/StockAdjustments.php trunk/StockCategories.php trunk/StockCheck.php trunk/StockCounts.php trunk/StockDispatch.php trunk/StockLocTransfer.php trunk/StockLocTransferReceive.php trunk/StockQuantityByDate.php trunk/StockTransfers.php trunk/Stocks.php trunk/SuppLoginSetup.php trunk/SuppPaymentRun.php trunk/SupplierTenders.php trunk/Suppliers.php trunk/SystemParameters.php trunk/Tax.php trunk/TaxGroups.php trunk/TopItems.php trunk/WorkOrderReceive.php trunk/Z_CheckDebtorsControl.php trunk/Z_DataExport.php trunk/Z_ReApplyCostToSA.php trunk/Z_RePostGLFromPeriod.php trunk/build/check_closing_tags.sh Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/AgedDebtors.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -513,8 +513,8 @@ echo '<tr><td>' . _('Summary or detailed report') . ':' . '</td> <td><select tabindex="6" name="DetailedReport">'; - echo '<option selected value="No">' . _('Summary Report'); - echo '<option value="Yes">' . _('Detailed Report'); + echo '<option selected value="No">' . _('Summary Report') . '</option>'; + echo '<option value="Yes">' . _('Detailed Report') . '</option>'; echo '</select></td></tr>'; echo '</table><br /><div class="centre"><input tabindex="7" type=submit name="PrintPDF" value="' . _('Print PDF') , '"></div>'; Modified: trunk/AgedSuppliers.php =================================================================== --- trunk/AgedSuppliers.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/AgedSuppliers.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -292,8 +292,8 @@ echo '<tr><td>' . _('All balances or overdues only') . ':' . "</td> <td><select tabindex='3' name='All_Or_Overdues'>"; - echo "<option selected value='All'>" . _('All suppliers with balances'); - echo "<option value='OverduesOnly'>" . _('Overdue accounts only'); + echo "<option selected value='All'>" . _('All suppliers with balances') . '</option>'; + echo "<option value='OverduesOnly'>" . _('Overdue accounts only') . '</option>'; echo '</select></td></tr>'; echo '<tr><td>' . _('For suppliers trading in') . ':' . "</td> @@ -304,17 +304,17 @@ while ($myrow=DB_fetch_array($result)){ if ($myrow['currabrev'] == $_SESSION['CompanyRecord']['currencydefault']){ - echo "<option selected value='" . $myrow["currabrev"] . "'>" . $myrow['currency']; + echo "<option selected value='" . $myrow["currabrev"] . "'>" . $myrow['currency'] . '</option>'; } else { - echo "<option value='" . $myrow['currabrev'] . "'>" . $myrow['currency']; + echo "<option value='" . $myrow['currabrev'] . "'>" . $myrow['currency'] . '</option>'; } } echo '</select></td></tr>'; echo '<tr><td>' . _('Summary or Detailed Report') . ':' . "</td> <td><select tabindex='5' name='DetailedReport'>"; - echo "<option selected value='No'>" . _('Summary Report'); - echo "<option value='Yes'>" . _('Detailed Report'); + echo "<option selected value='No'>" . _('Summary Report') . '</option>'; + echo "<option value='Yes'>" . _('Detailed Report') . '</option>'; echo '</select></td></tr>'; echo '</table><br /><div class="centre"><input tabindex="6" type=submit name="PrintPDF" value="' . _('Print PDF') . '"></div>'; @@ -322,4 +322,4 @@ include('includes/footer.inc'); } /*end of else not PrintPDF */ -?> +?> \ No newline at end of file Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/BOMIndentedReverse.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -252,8 +252,8 @@ echo '<tr><td>' . _('Part') . ":</td>"; echo "<td><input type ='text' name='Part' size='20'>"; echo '<tr><td>' . _('Print Option') . ":</td><td><select name='Fill'>"; - echo "<option selected value='yes'>" . _('Print With Alternating Highlighted Lines'); - echo "<option value='no'>" . _('Plain Print'); + echo "<option selected value='yes'>" . _('Print With Alternating Highlighted Lines') . '</option>'; + echo "<option value='no'>" . _('Plain Print') . '</option>'; echo '</select></td></tr>'; echo "</table><br /><div class='centre'><input type=submit name='PrintPDF' value='" . _('Print PDF') . "'></div>"; Modified: trunk/BankMatching.php =================================================================== --- trunk/BankMatching.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/BankMatching.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -118,7 +118,7 @@ echo '<option selected Value="All">' . _('Show all') . ' ' . $TypeName . ' ' . _('in the date range') . '</option>'; echo '<option Value="Ostdg">' . _('Show unmatched') . ' ' . $TypeName . ' ' . _('only') . '</option>'; } else { - echo '<option Value="All">' . _('Show all') . ' ' . $TypeName . ' ' . _('in the date range'); + echo '<option Value="All">' . _('Show all') . ' ' . $TypeName . ' ' . _('in the date range') . '</option>'; echo '<option selected Value="Ostdg">' . _('Show unmatched') . ' ' . $TypeName . ' ' . _('only') . '</option>'; } echo '</select></td></tr>'; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/ConfirmDispatch_Invoice.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -1643,7 +1643,9 @@ $j++; echo '<tr> <td>'._('Action For Balance'). ':</td> - <td><select tabindex='.$j.' name=BOPolicy><option selected Value="BO">'._('Automatically put balance on back order').'<option Value="CAN">'._('Cancel any quantities not delivered').'</select></td> + <td><select tabindex='.$j.' name=BOPolicy> + <option selected Value="BO">'._('Automatically put balance on back order') . '</option>'. + '<option Value="CAN">'._('Cancel any quantities not delivered') . '</option>'.'</select></td> </tr>'; $j++; echo '<tr> Modified: trunk/CustEDISetup.php =================================================================== --- trunk/CustEDISetup.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/CustEDISetup.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -101,11 +101,11 @@ if ($myrow['ediinvoices']==0){ - echo '<option selected value=0>'._('Disabled'); - echo '<option value=1>'._('Enabled'); + echo '<option selected value=0>'._('Disabled') . '</option>'; + echo '<option value=1>'._('Enabled') . '</option>'; } else { - echo '<option value=0>'._('Disabled'); - echo '<option selected value=1>'._('Enabled'); + echo '<option value=0>'._('Disabled') . '</option>'; + echo '<option selected value=1>'._('Enabled') . '</option>'; } echo "</select><a href='$rootpath/EDIMessageFormat.php?" . SID . "&MessageType=INVOIC&PartnerCode=" . $_SESSION['CustomerID'] . "'>"._('Create') . '/' . _('Edit Invoice Message Format').'</a></td></tr>'; @@ -115,11 +115,11 @@ if ($myrow['ediorders']==0){ - echo '<option selected value=0>'._('Disabled'); - echo '<option value=1>'._('Enabled'); + echo '<option selected value=0>'._('Disabled') . '</option>'; + echo '<option value=1>'._('Enabled') . '</option>'; } else { - echo '<option value=0>'._('Disabled'); - echo '<option selected value=1>'._('Enabled'); + echo '<option value=0>'._('Disabled') . '</option>'; + echo '<option selected value=1>'._('Enabled') . '</option>'; } echo '</select></td></tr>'; @@ -132,11 +132,11 @@ <td><select tabindex=4 name='EDITransport'>"; if ($myrow['editransport']=='email'){ - echo "<option selected value='email'>"._('Email Attachments'); - echo "<option value='ftp'>"._('File Transfer Protocol (FTP)'); + echo "<option selected value='email'>"._('Email Attachments') . '</option>'; + echo "<option value='ftp'>"._('File Transfer Protocol (FTP)') . '</option>'; } else { - echo "<option value='email'>"._('Email Attachments'); - echo "<option selected value='ftp'>"._('File Transfer Protocol (FTP)'); + echo "<option value='email'>"._('Email Attachments') . '</option>'; + echo "<option selected value='ftp'>"._('File Transfer Protocol (FTP)') . '</option>'; } echo '</select></td></tr>'; Modified: trunk/CustomerTransInquiry.php =================================================================== --- trunk/CustomerTransInquiry.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/CustomerTransInquiry.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -23,16 +23,16 @@ $sql = "SELECT typeid, typename FROM systypes WHERE typeid >= 10 AND typeid <= 14"; $resultTypes = DB_query($sql,$db); -echo "<option Value='All'> All"; +echo "<option Value='All'> All" . '</option>'; while ($myrow=DB_fetch_array($resultTypes)){ if (isset($_POST['TransType'])){ if ($myrow['typeid'] == $_POST['TransType']){ - echo "<option selected Value='" . $myrow['typeid'] . "'>" . $myrow['typename']; + echo "<option selected Value='" . $myrow['typeid'] . "'>" . $myrow['typename'] . '</option>'; } else { - echo "<option Value='" . $myrow['typeid'] . "'>" . $myrow['typename']; + echo "<option Value='" . $myrow['typeid'] . "'>" . $myrow['typename'] . '</option>'; } } else { - echo "<option Value='" . $myrow['typeid'] . "'>" . $myrow['typename']; + echo "<option Value='" . $myrow['typeid'] . "'>" . $myrow['typename'] . '</option>'; } } echo '</select></td>'; Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/DailyBankTransactions.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -39,9 +39,9 @@ $_POST['BankAccount']=$myrow['accountcode']; } if ($_POST['BankAccount']==$myrow['accountcode']){ - echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode']; + echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode'] . '</option>'; } else { - echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode']; + echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode'] . '</option>'; } } echo '</select></td></tr>'; Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/DebtorsAtPeriodEnd.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -155,7 +155,7 @@ while ($myrow = DB_fetch_array($Periods,$db)){ - echo '<option value=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']); + echo '<option value=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/DeliveryDetails.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -927,9 +927,9 @@ while ($myrow=DB_fetch_row($StkLocsResult)){ if ($_SESSION['Items'.$identifier]->Location==$myrow[1]){ - echo '<option selected value="'.$myrow[1].'">'.$myrow[0]; + echo '<option selected value="'.$myrow[1].'">'.$myrow[0] . '</option>'; } else { - echo '<option value="'.$myrow[1].'">'.$myrow[0]; + echo '<option value="'.$myrow[1].'">'.$myrow[0] . '</option>'; } } @@ -1034,8 +1034,8 @@ echo '<tr> <td>'. _('Reprint packing slip') .':</td> <td><select name="ReprintPackingSlip">'; - echo '<option value=0>' . _('Yes'); - echo '<option selected value=1>' . _('No'); + echo '<option value=0>' . _('Yes') . '</option>'; + echo '<option selected value=1>' . _('No') . '</option>'; echo '</select> '. _('Last printed') .': ' . ConvertSQLDate($_SESSION['DatePackingSlipPrinted']) . '</td></tr>'; } else { @@ -1063,9 +1063,9 @@ $ShipperResults = DB_query($sql,$db,$ErrMsg,$DbgMsg); while ($myrow=DB_fetch_array($ShipperResults)){ if ($myrow['shipper_id']==$_POST['ShipVia']){ - echo '<option selected value=' . $myrow['shipper_id'] . '>' . $myrow['shippername']; + echo '<option selected value=' . $myrow['shipper_id'] . '>' . $myrow['shippername'] . '</option>'; }else { - echo '<option value=' . $myrow['shipper_id'] . '>' . $myrow['shippername']; + echo '<option value=' . $myrow['shipper_id'] . '>' . $myrow['shippername'] . '</option>'; } } @@ -1074,11 +1074,11 @@ echo '<tr><td>'. _('Quotation Only') .':</td><td><select name="Quotation">'; if ($_SESSION['Items'.$identifier]->Quotation==1){ - echo '<option selected value=1>' . _('Yes'); - echo '<option value=0>' . _('No'); + echo '<option selected value=1>' . _('Yes') . '</option>'; + echo '<option value=0>' . _('No') . '</option>'; } else { - echo '<option value=1>' . _('Yes'); - echo '<option selected value=0>' . _('No'); + echo '<option value=1>' . _('Yes') . '</option>'; + echo '<option selected value=0>' . _('No') . '</option>'; } echo '</select></td></tr>'; Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/DiscountCategories.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -83,7 +83,6 @@ } else { echo '<option value="' . $myrow['discountcategory'] . '">' . $myrow['discountcategory']. '</option>'; } - echo '</option>'; } echo '</select></td>'; Modified: trunk/DiscountMatrix.php =================================================================== --- trunk/DiscountMatrix.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/DiscountMatrix.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -122,7 +122,6 @@ } else { echo '<option value="' . $myrow['discountcategory'] . '">' . $myrow['discountcategory'] . '</option>'; } - echo '</option>'; } echo '</select></td>'; } else { Modified: trunk/FixedAssetTransfer.php =================================================================== --- trunk/FixedAssetTransfer.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/FixedAssetTransfer.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -40,9 +40,9 @@ while ($myrow = DB_fetch_array($result)) { if ($myrow['categoryid'] == $_POST['AssetCat']) { - echo '<option selected value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription']; + echo '<option selected value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } else { - echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription']; + echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } } Modified: trunk/FreightCosts.php =================================================================== --- trunk/FreightCosts.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/FreightCosts.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -40,7 +40,7 @@ <td><select name="ShipperID">'; while ($myrow = DB_fetch_array($ShipperResults)){ - echo '<option value=' . $myrow['shipper_id'] . '>' . $myrow['shippername']; + echo '<option value=' . $myrow['shipper_id'] . '>' . $myrow['shippername'] . '</option>'; } echo '</select></td></tr> <tr> Modified: trunk/GLAccountCSV.php =================================================================== --- trunk/GLAccountCSV.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/GLAccountCSV.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -67,7 +67,7 @@ ORDER BY tagref"; $result=DB_query($SQL,$db); -echo '<option value=0>0 - '._('All tags'); +echo '<option value=0>0 - '._('All tags') . '</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'] . '</option>'; Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/GLAccountInquiry.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -38,9 +38,9 @@ $Account = DB_query($sql,$db); while ($myrow=DB_fetch_array($Account,$db)){ if($myrow['accountcode'] == $SelectedAccount){ - echo '<option selected value=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' ' . $myrow['accountname']; + echo '<option selected value=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' ' . $myrow['accountname'] . '</option>'; } else { - echo '<option value=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' ' . $myrow['accountname']; + echo '<option value=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' ' . $myrow['accountname'] . '</option>'; } } echo '</select></td></tr>'; @@ -54,12 +54,12 @@ ORDER BY tagref"; $result=DB_query($SQL,$db); -echo '<option value=0>0 - '._('All tags'); +echo '<option value=0>0 - '._('All tags') . '</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']; + echo '<option selected value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } else { - echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription']; + echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } } echo '</select></td></tr>'; @@ -70,10 +70,10 @@ $id=0; while ($myrow=DB_fetch_array($Periods,$db)){ if(isset($SelectedPeriod[$id]) and $myrow['periodno'] == $SelectedPeriod[$id]){ - echo '<option selected value=' . $myrow['periodno'] . '>' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])); + echo '<option selected value=' . $myrow['periodno'] . '>' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])) . '</option>'; $id++; } else { - echo '<option value=' . $myrow['periodno'] . '>' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])); + echo '<option value=' . $myrow['periodno'] . '>' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])) . '</option>'; } } echo '</select></td></tr><table>'; Modified: trunk/GLAccountReport.php =================================================================== --- trunk/GLAccountReport.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/GLAccountReport.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -270,10 +270,10 @@ $i=0; while ($myrow=DB_fetch_array($AccountsResult,$db)){ if(isset($_POST['Account'][$i]) AND $myrow['accountcode'] == $_POST['Account'][$i]){ - echo '<option selected value=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' ' . $myrow['accountname']; + echo '<option selected value=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' ' . $myrow['accountname'] . '</option>'; $i++; } else { - echo '<option value=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' ' . $myrow['accountname']; + echo '<option value=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' ' . $myrow['accountname'] . '</option>'; } } echo '</select></td>'; @@ -286,10 +286,10 @@ while ($myrow=DB_fetch_array($Periods,$db)){ if (isset($SelectedPeriod[$id]) and $myrow['periodno'] == $SelectedPeriod[$id]){ - echo '<option selected value=' . $myrow['periodno'] . '>' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])); + echo '<option selected value=' . $myrow['periodno'] . '>' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])) . '</option>'; $id++; } else { - echo '<option value=' . $myrow['periodno'] . '>' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])); + echo '<option value=' . $myrow['periodno'] . '>' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])) . '</option>'; } } echo '</select></td></tr>'; @@ -303,12 +303,12 @@ ORDER BY tagref"; $result=DB_query($SQL,$db); - echo '<option value=0>0 - '._('All tags'); + echo '<option value=0>0 - '._('All tags') . '</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']; + echo '<option selected value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } else { - echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription']; + echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } } echo '</select></td></tr>'; Modified: trunk/GLAccounts.php =================================================================== --- trunk/GLAccounts.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/GLAccounts.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -251,11 +251,10 @@ while ($myrow = DB_fetch_array($result)){ if (isset($_POST['Group']) and $myrow[0]==$_POST['Group']){ - echo "<option selected value='"; + echo "<option selected value='".$myrow[0] . "'>" . $myrow[0] . '</option>'; } else { - echo "<option value='"; + echo "<option value='".$myrow[0] . "'>" . $myrow[0] . '</option>'; } - echo $myrow[0] . "'>" . $myrow[0]; } if (!isset($_GET['SelectedAccount']) or $_GET['SelectedAccount']=='') { Modified: trunk/GLBalanceSheet.php =================================================================== --- trunk/GLBalanceSheet.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/GLBalanceSheet.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -39,9 +39,9 @@ while ($myrow=DB_fetch_array($Periods,$db)){ if( $myrow['periodno']== $periodno){ - echo '<option selected value=' . $myrow['periodno'] . '>' . ConvertSQLDate($lastdate_in_period); + echo '<option selected value=' . $myrow['periodno'] . '>' . ConvertSQLDate($lastdate_in_period) . '</option>'; } else { - echo '<option value=' . $myrow['periodno'] . '>' . ConvertSQLDate($myrow['lastdate_in_period']); + echo '<option value=' . $myrow['periodno'] . '>' . ConvertSQLDate($myrow['lastdate_in_period']) . '</option>'; } } Modified: trunk/GLTagProfit_Loss.php =================================================================== --- trunk/GLTagProfit_Loss.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/GLTagProfit_Loss.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -75,7 +75,7 @@ if($myrow['periodno']==$DefaultToPeriod){ echo '<option selected value=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } else { - echo '<option VALUE =' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; + echo '<option value =' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } echo '</select></td></tr>'; @@ -88,7 +88,7 @@ ORDER BY tagref"; $result=DB_query($SQL,$db); - echo '<option value=0>0 - None'; + echo '<option value=0>0 - None' . '</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'] . '</option>'; Modified: trunk/InventoryPlanningPrefSupplier.php =================================================================== --- trunk/InventoryPlanningPrefSupplier.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/InventoryPlanningPrefSupplier.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -482,10 +482,10 @@ $sql = "SELECT loccode, locationname FROM locations"; $LocnResult=DB_query($sql,$db); - echo '<option Value="All">' . _('All Locations'); + echo '<option Value="All">' . _('All Locations') . '</option>'; while ($myrow=DB_fetch_array($LocnResult)){ - echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } echo '</select></td></tr>'; @@ -496,24 +496,24 @@ $_POST['NumberMonthsHolding']=1; } if ($_POST['NumberMonthsHolding']==0.5){ - echo '<option selected value="0.5">' . _('Two Weeks'); + echo '<option selected value="0.5">' . _('Two Weeks') . '</option>'; } else { - echo '<option value="0.5">' . _('Two Weeks'); + echo '<option value="0.5">' . _('Two Weeks') . '</option>'; } if ($_POST['NumberMonthsHolding']==1){ - echo '<option selected value="1">' . _('One Month'); + echo '<option selected value="1">' . _('One Month') . '</option>'; } else { - echo '<option selected value="1">' . _('One Month'); + echo '<option selected value="1">' . _('One Month') . '</option>'; } if ($_POST['NumberMonthsHolding']==1.5){ - echo '<option selected value="1.5">' . _('Six Weeks'); + echo '<option selected value="1.5">' . _('Six Weeks') . '</option>'; } else { - echo '<option value="1.5">' . _('Six Weeks'); + echo '<option value="1.5">' . _('Six Weeks') . '</option>'; } if ($_POST['NumberMonthsHolding']==2){ - echo '<option selected value="2">' . _('Two Months'); + echo '<option selected value="2">' . _('Two Months') . '</option>'; } else { - echo '<option value="2">' . _('Two Months'); + echo '<option value="2">' . _('Two Months') . '</option>'; } echo '</select></td></tr>'; Modified: trunk/InventoryQuantities.php =================================================================== --- trunk/InventoryQuantities.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/InventoryQuantities.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -173,15 +173,15 @@ $_POST['StockCat']='All'; } if ($_POST['StockCat']=='All'){ - echo '<option selected value="All">' . _('All'); + echo '<option selected value="All">' . _('All') . '</option>'; } else { - echo '<option value="All">' . _('All'); + echo '<option value="All">' . _('All') . '</option>'; } while ($myrow1 = DB_fetch_array($result1)) { if ($myrow1['categoryid']==$_POST['StockCat']){ - echo '<option selected value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription']; + echo '<option selected value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } else { - echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription']; + echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } } echo '</select></td></tr>'; Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/Locations.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -505,9 +505,9 @@ $TaxProvinceResult = DB_query("SELECT taxprovinceid, taxprovincename FROM taxprovinces",$db); while ($myrow=DB_fetch_array($TaxProvinceResult)){ if ($_POST['TaxProvince']==$myrow['taxprovinceid']){ - echo '<option selected value=' . $myrow['taxprovinceid'] . '>' . $myrow['taxprovincename']; + echo '<option selected value=' . $myrow['taxprovinceid'] . '>' . $myrow['taxprovincename'] . '</option>'; } else { - echo '<option value=' . $myrow['taxprovinceid'] . '>' . $myrow['taxprovincename']; + echo '<option value=' . $myrow['taxprovinceid'] . '>' . $myrow['taxprovincename'] . '</option>'; } } Modified: trunk/MRPCreateDemands.php =================================================================== --- trunk/MRPCreateDemands.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/MRPCreateDemands.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -192,7 +192,7 @@ $result = DB_query($sql,$db); while ($myrow = DB_fetch_array($result)) { echo '<option value="'; - echo $myrow['mrpdemandtype'] . '">' . $myrow['mrpdemandtype'] . ' - ' .$myrow['description']; + echo $myrow['mrpdemandtype'] . '">' . $myrow['mrpdemandtype'] . ' - ' .$myrow['description'] . '</option>'; } //end while loop echo '</select></td></tr>'; echo '<tr><td>' . _('Inventory Category') . ':</td><td><select name="CategoryID">'; Modified: trunk/MRPPlannedPurchaseOrders.php =================================================================== --- trunk/MRPPlannedPurchaseOrders.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/MRPPlannedPurchaseOrders.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -272,8 +272,8 @@ echo '<option value="Monthly">' . _('Monthly') . '</option>'; echo '</select></td></tr>'; echo '<tr><td>' . _('Print Option') . ':</td><td><select name="Fill">'; - echo '<option selected value="yes">' . _('Print With Alternating Highlighted Lines'); - echo '<option value="no">' . _('Plain Print'); + echo '<option selected value="yes">' . _('Print With Alternating Highlighted Lines') . '</option>'; + echo '<option value="no">' . _('Plain Print') . '</option>'; echo '</select></td></tr>'; echo '<tr><td>' . _('Cut Off Date') . ':</td><td><input type ="text" class=date alt="'.$_SESSION['DefaultDateFormat'] . '" name="cutoffdate" size="10" value="'.date($_SESSION['DefaultDateFormat']).'"></td></tr>'; Modified: trunk/MRPReschedules.php =================================================================== --- trunk/MRPReschedules.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/MRPReschedules.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -129,8 +129,8 @@ echo '<br /><br /><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Print Option') . ':</td><td><select name="Fill">'; - echo '<option selected value="yes">' . _('Print With Alternating Highlighted Lines'); - echo '<option value="no">' . _('Plain Print'); + echo '<option selected value="yes">' . _('Print With Alternating Highlighted Lines') . '</option>'; + echo '<option value="no">' . _('Plain Print') . '</option>'; echo '</select></td></tr>'; echo '<tr><td>' . _('Selection') . ':</td><td><select name="Selection">'; echo '<option selected value="All">' . _('All').'</option>'; Modified: trunk/MRPShortages.php =================================================================== --- trunk/MRPShortages.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/MRPShortages.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -239,14 +239,14 @@ echo '<table class="selection">'; echo '</select></td></tr>'; echo '<tr><td>' . _('Inventory Category') . ':</td><td><select name="CategoryID">'; - echo '<option selected value="All">' . _('All Stock Categories'); + echo '<option selected value="All">' . _('All Stock Categories') . '</option>'; $sql = "SELECT categoryid, categorydescription FROM stockcategory"; $result = DB_query($sql,$db); while ($myrow = DB_fetch_array($result)) { echo '<option value="'; - echo $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' .$myrow['categorydescription']; + echo $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' .$myrow['categorydescription'] . '</option>'; } //end while loop echo '<tr><td>' . _('Sort') . ':</td><td><select name="Sort">'; echo '<option selected value="extcost">' . _('Extended Shortage Dollars').'</option>'; Modified: trunk/PDFChequeListing.php =================================================================== --- trunk/PDFChequeListing.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/PDFChequeListing.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -52,7 +52,7 @@ echo '<select name="BankAccount">'; while ($myrow=DB_fetch_array($result)){ - echo '<option value=' . $myrow['accountcode'] . '>' . $myrow['bankaccountname']; + echo '<option value=' . $myrow['accountcode'] . '>' . $myrow['bankaccountname'] . '</option>'; } Modified: trunk/PDFCustomerList.php =================================================================== --- trunk/PDFCustomerList.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/PDFCustomerList.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -375,7 +375,7 @@ $sql="SELECT areacode, areadescription FROM areas"; $AreasResult= DB_query($sql,$db); - echo '<option selected value="All">' . _('All Areas'); + echo '<option selected value="All">' . _('All Areas') . '</option>'; While ($myrow = DB_fetch_array($AreasResult)){ echo '<option value="' . $myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; @@ -390,7 +390,7 @@ $SalesFolkResult = DB_query($sql,$db); While ($myrow = DB_fetch_array($SalesFolkResult)){ - echo '<option value="' . $myrow['salesmancode'] . '">' . $myrow['salesmanname']; + echo '<option value="' . $myrow['salesmancode'] . '">' . $myrow['salesmanname'] . '</option>'; } echo '</select></td></tr>'; Modified: trunk/PDFDIFOT.php =================================================================== --- trunk/PDFDIFOT.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/PDFDIFOT.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -44,27 +44,27 @@ echo "<select name='CategoryID'>"; - echo "<option selected value='All'>" . _('Over All Categories'); + echo "<option selected value='All'>" . _('Over All Categories') . '</option>'; while ($myrow=DB_fetch_array($result)){ - echo "<option value='" . $myrow['categoryid'] . "'>" . $myrow['categorydescription']; + echo "<option value='" . $myrow['categoryid'] . "'>" . $myrow['categorydescription'] . '</option>'; } echo '</select></td></tr>'; echo '<tr><td>' . _('Inventory Location') . ":</td><td><select name='Location'>"; - echo "<option selected value='All'>" . _('All Locations'); + echo "<option selected value='All'>" . _('All Locations') . '</option>'; $result= DB_query("SELECT loccode, locationname FROM locations",$db); while ($myrow=DB_fetch_array($result)){ - echo "<option value='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo "<option value='" . $myrow['loccode'] . "'>" . $myrow['locationname'] . '</option>'; } echo '</select></td></tr>'; echo '<tr><td>' . _('Email the report off') . ":</td><td><select name='Email'>"; - echo "<option selected value='No'>" . _('No'); - echo "<option value='Yes'>" . _('Yes'); + echo "<option selected value='No'>" . _('No') . '</option>'; + echo "<option value='Yes'>" . _('Yes') . '</option>'; echo "</select></td></tr></table><br /><div class='centre'><input type=submit name='Go' value='" . _('Create PDF') . "'></div>"; if ($InputError==1){ Modified: trunk/PDFDeliveryDifferences.php =================================================================== --- trunk/PDFDeliveryDifferences.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/PDFDeliveryDifferences.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -41,27 +41,27 @@ echo "<select name='CategoryID'>"; - echo "<option selected value='All'>" . _('Over All Categories'); + echo "<option selected value='All'>" . _('Over All Categories') . '</option>'; while ($myrow=DB_fetch_array($result)){ - echo "<option value='" . $myrow['categoryid'] . "'>" . $myrow['categorydescription']; + echo "<option value='" . $myrow['categoryid'] . "'>" . $myrow['categorydescription'] . '</option>'; } echo '</select></td></tr>'; echo '<tr><td>' . _('Inventory Location') . ":</td><td><select name='Location'>"; - echo "<option selected value='All'>" . _('All Locations'); + echo "<option selected value='All'>" . _('All Locations') . '</option>'; $result= DB_query("SELECT loccode, locationname FROM locations",$db); while ($myrow=DB_fetch_array($result)){ - echo "<option value='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + echo "<option value='" . $myrow['loccode'] . "'>" . $myrow['locationname'] . '</option>'; } echo '</select></td></tr>'; echo '<tr><td>' . _('Email the report off') . ":</td><td><select name='Email'>"; - echo "<option selected value='No'>" . _('No'); - echo "<option value='Yes'>" . _('Yes'); + echo "<option selected value='No'>" . _('No') . '</option>'; + echo "<option value='Yes'>" . _('Yes') . '</option>'; echo "</select></td></tr></table><br /><div class='centre'><input type=submit name='Go' value='" . _('Create PDF') . "'></div>"; if ($InputError==1){ Modified: trunk/PDFOrderStatus.php =================================================================== --- trunk/PDFOrderStatus.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/PDFOrderStatus.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -62,7 +62,7 @@ } echo '</select></td></tr>'; - echo '<tr><td>' . _('Back Order Only') . ':</td><td><select name="BackOrders">' . '</option>'; + echo '<tr><td>' . _('Back Order Only') . ':</td><td><select name="BackOrders">'; echo '<option selected value="Yes">' . _('Only Show Back Orders') . '</option>'; echo '<option value="No">' . _('Show All Orders') . '</option>'; echo '</select></td></tr></table><br /><div class="centre"><input type=submit name="Go" value="' . _('Create PDF') . '"></div>'; Modified: trunk/PDFPriceList.php =================================================================== --- trunk/PDFPriceList.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/PDFPriceList.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -262,7 +262,7 @@ $sql="SELECT categoryid, categorydescription FROM stockcategory ORDER BY categoryid"; $CatResult= DB_query($sql,$db); While ($myrow = DB_fetch_array($CatResult)){ - echo "<option value='" . $myrow['categoryid'] . "'>" . $myrow['categoryid'] . ' - ' . $myrow['categorydescription']; + echo "<option value='" . $myrow['categoryid'] . "'>" . $myrow['categoryid'] . ' - ' . $myrow['categorydescription'] . '</option>'; } echo '</select></td></tr>'; @@ -272,7 +272,7 @@ DB_data_seek($CatResult,0); While ($myrow = DB_fetch_array($CatResult)){ - echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' . $myrow['categorydescription']; + echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' . $myrow['categorydescription'] . '</option>'; } echo '</select></td></tr>'; @@ -281,19 +281,19 @@ $SalesTypesResult=DB_query($sql,$db); while ($myrow=DB_fetch_array($SalesTypesResult)){ - echo '<option Value="' . $myrow['typeabbrev'] . '">' . $myrow['sales_type']; + echo '<option Value="' . $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; } echo '</select></td></tr>'; echo '<tr><td>' . _('Show Gross Profit %') . ':</td><td><select name="ShowGPPercentages">'; - echo '<option selected Value="No">'. _('Prices Only'); - echo '<option Value="Yes">'. _('Show GP % too'); + echo '<option selected Value="No">'. _('Prices Only') . '</option>'; + echo '<option Value="Yes">'. _('Show GP % too') . '</option>'; echo '</select></td></tr>'; echo '<tr><td>' . _('Price Listing Type'). ':</td><td><select name="CustomerSpecials">'; - echo '<option selected Value="Sales Type Prices">'. _('Default Sales Type Prices'); - echo '<option Value="Customer Special Prices Only">'. _('Customer Special Prices Only'); - echo '<option Value="Full Description">'. _('Full Description'); + echo '<option selected Value="Sales Type Prices">'. _('Default Sales Type Prices') . '</option>'; + echo '<option Value="Customer Special Prices Only">'. _('Customer Special Prices Only') . '</option>'; + echo '<option Value="Full Description">'. _('Full Description') . '</option>'; echo '</select></td></tr>'; echo '<tr><td>' . _('Effective As At') . ':</td><td><input type="text" size=11 class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveDate" value="' . Date($_SESSION['DefaultDateFormat']) . '">'; Modified: trunk/POReport.php =================================================================== --- trunk/POReport.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/POReport.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -1419,14 +1419,14 @@ echo '<tr><td>' . _('Report Type') . ':</td>'; echo "<td><select name='ReportType'>"; - echo "<option selected value='Detail'>" . _('Detail'); - echo "<option value='Summary'>" . _('Summary'); + echo "<option selected value='Detail'>" . _('Detail') . '</option>'; + echo "<option value='Summary'>" . _('Summary') . '</option>'; echo '</select></td><td> </td></tr>'; echo '<tr><td>' . _('Date Type') . ':</td>'; echo "<td><select name='DateType'>"; - echo "<option selected value='Order'>" . _('Order Date'); - echo "<option value='Delivery'>" . _('Delivery Date'); + echo "<option selected value='Order'>" . _('Order Date') . '</option>'; + echo "<option value='Delivery'>" . _('Delivery Date') . '</option>'; echo '</select></td><td> </td></tr>'; echo '<tr> @@ -1438,8 +1438,8 @@ echo '<tr><td>' . _('Part Number') . ':</td>'; echo "<td><select name='PartNumberOp'>"; - echo "<option selected value='Equals'>" . _('Equals'); - echo "<option value='LIKE'>" . _('Begins With'); + echo "<option selected value='Equals'>" . _('Equals') . '</option>'; + echo "<option value='LIKE'>" . _('Begins With') . '</option>'; echo '</select>'; echo "  <input type='Text' name='PartNumber' size=20 maxlength=20 value="; if (isset($_POST['PartNumber'])) { @@ -1450,8 +1450,8 @@ echo '<tr><td>' . _('Supplier Number') . ':</td>'; echo "<td><select name='SupplierIdOp'>"; - echo "<option selected value='Equals'>" . _('Equals'); - echo "<option value='LIKE'>" . _('Begins With'); + echo "<option selected value='Equals'>" . _('Equals') . '</option>'; + echo "<option value='LIKE'>" . _('Begins With') . '</option>'; echo '</select>'; echo "  <input type='Text' name='SupplierId' size=10 maxlength=10 value="; if (isset($_POST['SupplierId'])) { @@ -1462,8 +1462,8 @@ echo '<tr><td>' . _('Supplier Name') . ':</td>'; echo '<td><select name="SupplierNameOp">'; - echo '<option selected value="LIKE">' . _('Begins With'); - echo '<option value="Equals">' . _('Equals'); + echo '<option selected value="LIKE">' . _('Begins With') . '</option>'; + echo '<option value="Equals">' . _('Equals') . '</option>'; echo '</select>'; echo '  <input type="text" name="SupplierName" size=30 maxlength=30 value='; if (isset($_POST['SupplierName'])) { Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/PO_Items.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -1046,7 +1046,7 @@ echo ':</font></tr><tr><td><select name="StockCat">'; - echo '<option selected value="All">' . _('All'); + echo '<option selected value="All">' . _('All') . '</option>'; while ($myrow1 = DB_fetch_array($result1)) { if (isset($_POST['StockCat']) and $_POST['StockCat']==$myrow1['categoryid']){ echo '<option selected value="'. $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; Modified: trunk/PO_PDFPurchOrder.php =================================================================== --- trunk/PO_PDFPurchOrder.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/PO_PDFPurchOrder.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -351,11 +351,11 @@ $_POST['PrintOrEmail'] = 'Print'; } if ($_POST['PrintOrEmail']=='Print'){ - echo '<option selected value="Print">'. _('Print'); - echo '<option value="Email">' . _('Email'); + echo '<option selected value="Print">'. _('Print') . '</option>'; + echo '<option value="Email">' . _('Email') . '</option>'; } else { - echo '<option value="Print">'. _('Print'); - echo '<option selected value="Email">'. _('Email'); + echo '<option value="Print">'. _('Print') . '</option>'; + echo '<option selected value="Email">'. _('Email') . '</option>'; } echo '</select></td></tr>'; echo '<tr><td>'. _('Show Amounts on the Order'). '</td><td> @@ -364,11 +364,11 @@ $_POST['ShowAmounts'] = 'Yes'; } if ($_POST['ShowAmounts']=='Yes'){ - echo '<option selected value="Yes">'. _('Yes'); - echo '<option value="No">' . _('No'); + echo '<option selected value="Yes">'. _('Yes') . '</option>'; + echo '<option value="No">' . _('No') . '</option>'; } else { - echo '<option value="Yes">'. _('Yes'); - echo '<option selected value="No">'. _('No'); + echo '<option value="Yes">'. _('Yes') . '</option>'; + echo '<option selected value="No">'. _('No') . '</option>'; } echo '</select></td></tr>'; if ($_POST['PrintOrEmail']=='Email'){ @@ -384,9 +384,9 @@ while ($ContactDetails = DB_fetch_array($ContactsResult)){ if (strlen($ContactDetails['email'])>2 AND strpos($ContactDetails['email'],'@')>0){ if ($_POST['EmailTo']==$ContactDetails['email']){ - echo '<option selected value="' . $ContactDetails['email'] . '">' . $ContactDetails['Contact'] . ' - ' . $ContactDetails['email']; + echo '<option selected value="' . $ContactDetails['email'] . '">' . $ContactDetails['Contact'] . ' - ' . $ContactDetails['email'] . '</option>'; } else { - echo '<option value="' . $ContactDetails['email'] . '">' . $ContactDetails['contact'] . ' - ' . $ContactDetails['email']; + echo '<option value="' . $ContactDetails['email'] . '">' . $ContactDetails['contact'] . ' - ' . $ContactDetails['email'] . '</option>'; } } } Modified: trunk/PO_SelectOSPurchOrder.php =================================================================== --- trunk/PO_SelectOSPurchOrder.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/PO_SelectOSPurchOrder.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -140,14 +140,14 @@ while ($myrow=DB_fetch_array($resultStkLocs)){ if (isset($_POST['StockLocation'])){ if ($myrow['loccode'] == $_POST['StockLocation']){ - echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } elseif ($myrow['loccode']== $_SESSION['UserStockLocation']){ - echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } @@ -191,9 +191,9 @@ while ($myrow1 = DB_fetch_array($result1)) { if (isset($_POST['StockCat']) and $myrow1['categoryid']==$_POST['StockCat']){ - echo "<option selected value='". $myrow1['categoryid'] . "'>" . $myrow1['categorydescription']; + echo "<option selected value='". $myrow1['categoryid'] . "'>" . $myrow1['categorydescription'] . '</option>'; } else { - echo "<option value='". $myrow1['categoryid'] . "'>" . $myrow1['categorydescription']; + echo "<option value='". $myrow1['categoryid'] . "'>" . $myrow1['categorydescription'] . '</option>'; } } echo "</select>"; Modified: trunk/PO_SelectPurchOrder.php =================================================================== --- trunk/PO_SelectPurchOrder.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/PO_SelectPurchOrder.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -110,14 +110,14 @@ while ($myrow = DB_fetch_array($resultStkLocs)) { if (isset($_POST['StockLocation'])) { if ($myrow['loccode'] == $_POST['StockLocation']) { - echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } elseif ($myrow['loccode'] == $_SESSION['UserStockLocation']) { - echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option selected Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } echo '</select> ' . _('Order Status:') .' <select name="Status">'; @@ -155,9 +155,9 @@ echo '<tr><td><font size=1>' . _('Select a stock category') . ':</font><select name="StockCat">'; while ($myrow1 = DB_fetch_array($result1)) { if (isset($_POST['StockCat']) and $myrow1['categoryid'] == $_POST['StockCat']) { - echo "<option selected value='" . $myrow1['categoryid'] . "'>" . $myrow1['categorydescription']; + echo "<option selected value='" . $myrow1['categoryid'] . "'>" . $myrow1['categorydescription'] . '</option>'; } else { - echo "<option value='" . $myrow1['categoryid'] . "'>" . $myrow1['categorydescription']; + echo "<option value='" . $myrow1['categoryid'] . "'>" . $myrow1['categorydescription'] . '</option>'; } } echo '</select><td><font size=1>' . _('Enter text extracts in the') . ' <b>' . _('description') . '</b>:</font></td>'; Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/Payments.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -771,9 +771,9 @@ } else { while ($myrow=DB_fetch_array($result)){ if ($_SESSION['PaymentDetail']->Currency==$myrow['currabrev']){ - echo '<option selected value=' . $myrow['currabrev'] . '>' . $myrow['currency']; + echo '<option selected value=' . $myrow['currabrev'] . '>' . $myrow['currency'] . '</option>'; } else { - echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['currency']; + echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['currency'] . '</option>'; } } echo '</select></td><td><i>' . _('The transaction currency does not need to be the same as the bank account currency') . '</i></td></tr>'; @@ -834,9 +834,9 @@ foreach ($PaytTypes as $PaytType) { if (isset($_POST['Paymenttype']) and $_POST['Paymenttype']==$PaytType){ - echo '<option selected value="' . $PaytType . '">' . $PaytType; + echo '<option selected value="' . $PaytType . '">' . $PaytType . '</option>'; } else { - echo '<option Value="' . $PaytType . '">' . $PaytType; + echo '<option Value="' . $PaytType . '">' . $PaytType . '</option>'; } } //end foreach echo '</select></td></tr>'; Modified: trunk/PricesBasedOnMarkUp.php =================================================================== --- trunk/PricesBasedOnMarkUp.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/PricesBasedOnMarkUp.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -26,7 +26,7 @@ <td><select name="PriceList">'; if (!isset($_POST['PriceList']) OR $_POST['PriceList']=='0'){ - echo '<option selected value="0">' . _('No Price List Selected'); + echo '<option selected value="0">' . _('No Price List Selected') . '</option>'; } while ($PriceLists=DB_fetch_array($PricesResult)){ @@ -48,7 +48,7 @@ <td><select name="CurrCode">'; if (!isset($_POST['CurrCode'])){ - echo '<option selected value=0>' . _('No Price List Currency Selected'); + echo '<option selected value=0>' . _('No Price List Currency Selected') . '</option>'; } while ($Currencies=DB_fetch_array($result)){ Modified: trunk/PricesByCost.php =================================================================== --- trunk/PricesByCost.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/PricesByCost.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -241,15 +241,15 @@ echo '<tr> <td>' . _('Category') . ':</td> <td><select name="StockCat">'; - echo '<option value="all">' . _('All Categories') . ''; + echo '<option value="all">' . _('All Categories') . '' . '</option>'; while ($myrow1 = DB_fetch_array($result1)) { - echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription']; + echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } echo '</select></td></tr>'; echo '<tr><td>' . _('Price') . ' <select name="Comparator">'; - echo '<option value="1">' . _('Less than or equal to') . ''; - echo '<option value="2">' . _('Greater than or equal to') . ''; + echo '<option value="1">' . _('Less than or equal to') . '' . '</option>'; + echo '<option value="2">' . _('Greater than or equal to') . '' . '</option>'; if ($_SESSION['WeightedAverageCosting']==1) { echo '</select>'.' '. _('Average Cost') . ' x </td>'; } else { Modified: trunk/SalesAnalReptCols.php =================================================================== --- trunk/SalesAnalReptCols.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/SalesAnalReptCols.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -398,11 +398,11 @@ $_POST['Calculation']=0; } if ($_POST['Calculation'] ==1){ - echo '<option selected Value=1>' . _('Yes'); - echo '<option Value=0>' . _('No'); + echo '<option selected Value=1>' . _('Yes') . '</option>'; + echo '<option Value=0>' . _('No') . '</option>'; } else { - echo '<option Value=1>' . _('Yes'); - echo '<option selected Value=0>' . _('No'); + echo '<option Value=1>' . _('Yes') . '</option>'; + echo '<option selected Value=0>' . _('No') . '</option>'; } echo '</select></td></tr>'; @@ -492,11 +492,11 @@ echo '<tr><td>' . _('Constant') . ':</td><td><input type="TEXT" size=10 maxlength=10 name="Constant" value=' . $_POST['Constant'] . '></td></tr>'; echo '<tr><td>' . _('Format Type') . ':</td><td><select name="ValFormat">'; if ($_POST['ValFormat']=='N'){ - echo '<option selected Value="N">' . _('Numeric'); - echo '<option Value="P">' . _('Percentage'); + echo '<option selected Value="N">' . _('Numeric') . '</option>'; + echo '<option Value="P">' . _('Percentage') . '</option>'; } else { - echo '<option Value="N">' . _('Numeric'); - echo '<option selected Value="P">' . _('Percentage'); + echo '<option Value="N">' . _('Numeric') . '</option>'; + echo '<option selected Value="P">' . _('Percentage') . '</option>'; } echo '</select></td></tr><input type=hidden name="BudgetOrActual" Value=0> <input type=hidden name="DataType" Value=""> Modified: trunk/SalesCategories.php =================================================================== --- trunk/SalesCategories.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/SalesCategories.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -388,7 +388,7 @@ // Only if the StockID is not already selected echo '<option value="'.$myrow['stockid'].'">'. $myrow['stockid'] . ' - "'. - $myrow['description'] . '"'; + $myrow['description'] . '"' . '</option>'; } } echo '</select>'; Modified: trunk/SalesGraph.php =================================================================== --- trunk/SalesGraph.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/SalesGraph.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -114,9 +114,9 @@ } while ($myrow=DB_fetch_array($CategoriesResult)){ if($myrow['categoryid']==$_POST['CategoryID']){ - echo '<option selected value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription']; + echo '<option selected value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } else { - echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription']; + echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } } echo '</select></td></tr>'; Modified: trunk/SalesInquiry.php =================================================================== --- trunk/SalesInquiry.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/SalesInquiry.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -1119,9 +1119,9 @@ echo '<tr><td>' . _('For Sales Areas') . ':</td><td><select name="Area">'; $sql="SELECT areacode, areadescription FROM areas"; $AreasResult= DB_query($sql,$db); - echo '<option selected value="All">' . _('All Areas'); + echo '<option selected value="All">' . _('All Areas') . '</option>'; While ($myrow = DB_fetch_array($AreasResult)){ - echo '<option value="' . $myrow['areacode'] . '">' . $myrow['areadescription']; + echo '<option value="' . $myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; } echo '</select></td></tr>'; Modified: trunk/SelectAsset.php =================================================================== --- trunk/SelectAsset.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/SelectAsset.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -84,9 +84,9 @@ while ($myrow = DB_fetch_array($result)) { if ($myrow['locationid'] == $_POST['AssetLocation']) { - echo '<option selected value="' . $myrow['locationid'] . '">' . $myrow['locationdescription']; + echo '<option selected value="' . $myrow['locationid'] . '">' . $myrow['locationdescription'] . '</option>'; } else { - echo '<option value="' . $myrow['locationid'] . '">' . $myrow['locationdescription']; + echo '<option value="' . $myrow['locationid'] . '">' . $myrow['locationdescription'] . '</option>'; } } echo '</select>'; Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2011-06-15 07:55:50 UTC (rev 5412) +++ trunk/SelectCreditItems.php 2011-06-15 11:55:40 UTC (rev 5413) @@ -820,17 +820,17 @@ echo '<br /><table class=selection><tr><td>' . _('Credit Note Type') . ' :</td><td><select name=CreditType>'; if (!isset($_POST['CreditType']) OR $_POST['CreditType']=='Return'){ - echo '<option selected value="Return">' . _('Goods returned to store'); - echo '<option value="WriteOff">' . _('Goods written off'); - echo '<option value="ReverseOverCharge">' . _('Reverse an Overcharge'); + echo '<option selected value="Return">' . _('Goods returned to store') . '</option>'; + echo '<option value="WriteOff">' . _('Goods written off') . '</option>'; + echo '<option value="ReverseOverCharge">' . _('Reverse an Overcharge') . '</option>'; } elseif ($_POST['CreditType']=='WriteOff') { - echo '<option selected value="WriteOff">' . _('Goods written off'); - echo '<option value="Return">' . _('Goods returned to store'); - echo '<option value="ReverseOverCharge">' . _('Reverse an Overcharge'); + echo '<option selected value="WriteOff">' . _('Goods written off') . '</option>'; + echo '<option value="Return">' . _('Goods returned to store') . '</option>'; + echo '<option value="ReverseOverCharge">' . _('Reverse an Ov... [truncated message content] |
From: <tim...@us...> - 2011-06-16 14:19:26
|
Revision: 5417 http://weberp.svn.sourceforge.net/weberp/?rev=5417&view=rev Author: tim_schofield Date: 2011-06-16 14:19:15 +0000 (Thu, 16 Jun 2011) Log Message: ----------- Add new field to keep the prices decimal places in the order line and show correctly on the invoice Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/DeliveryDetails.php trunk/Prices.php trunk/SelectOrderItems.php trunk/includes/DefineCartClass.php trunk/includes/GetPrice.inc trunk/includes/SelectOrderItems_IntoCart.inc trunk/includes/session.inc Added Paths: ----------- trunk/sql/mysql/updates/83.php trunk/sql/mysql/updates/84.php Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-06-15 13:07:05 UTC (rev 5416) +++ trunk/ConfirmDispatch_Invoice.php 2011-06-16 14:19:15 UTC (rev 5417) @@ -137,6 +137,7 @@ salesorderdetails.qtyinvoiced, salesorderdetails.narrative, salesorderdetails.orderlineno, + salesorderdetails.pricedecimals, salesorderdetails.poline, salesorderdetails.itemdue, stockmaster.materialcost + @@ -172,6 +173,7 @@ $myrow['controlled'], $myrow['serialised'], $myrow['decimalplaces'], + $myrow['pricedecimals'], htmlspecialchars_decode($myrow['narrative']), 'No', $myrow['orderlineno'], @@ -1070,7 +1072,7 @@ '" . $DefaultDispatchDate . "', '" . $_SESSION['Items']->DebtorNo . "', '" . $_SESSION['Items']->Branch . "', - '" . $LocalCurrencyPrice . "', + '" . round($LocalCurrencyPrice,$OrderLine->PriceDecimals) . "', '" . $PeriodNo . "', '" . $_SESSION['ProcessingOrder'] . "', '" . -$OrderLine->QtyDispatched . "', Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-06-15 13:07:05 UTC (rev 5416) +++ trunk/DeliveryDetails.php 2011-06-16 14:19:15 UTC (rev 5417) @@ -388,6 +388,7 @@ unitprice, units, conversionfactor, + pricedecimals, quantity, discountpercent, narrative, @@ -404,6 +405,7 @@ '" . $StockItem->Price . "', '" . $StockItem->Units . "', '" . $StockItem->ConversionFactor . "', + '" . $StockItem->PriceDecimals . "', '" . $StockItem->Quantity . "', '" . floatval($StockItem->DiscountPercent) . "', '" . DB_escape_string($StockItem->Narrative) . "', Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2011-06-15 13:07:05 UTC (rev 5416) +++ trunk/Prices.php 2011-06-16 14:19:15 UTC (rev 5417) @@ -99,7 +99,7 @@ } else { $SQLEndDate = '2030-01-01'; } - +/* $sql = "SELECT COUNT(typeabbrev) FROM prices WHERE prices.stockid='".$Item."' @@ -120,7 +120,7 @@ include('includes/footer.inc'); exit; } - +*/ if (isset($_POST['OldTypeAbbrev']) AND isset($_POST['OldCurrAbrev']) AND strlen($Item)>1 AND $InputError !=1) { /* Need to see if there is also a price entered that has an end date after the start date of this price and if @@ -155,7 +155,20 @@ } elseif ($InputError !=1) { /*Selected price is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new price form */ + $sql = "UPDATE prices SET + enddate='" . date('Y-m-d') . "' + WHERE prices.stockid='".$Item."' + AND startdate='" .FormatDateForSQL($_POST['StartDate']) . "' + AND enddate ='" . $SQLEndDate . "' + AND prices.typeabbrev='" . $_POST['TypeAbbrev'] . "' + AND prices.currabrev='" . $_POST['CurrAbrev'] . "' + AND prices.debtorno=''"; + $ErrMsg = _('Could not be update the existing prices'); + $result = DB_query($sql,$db,$ErrMsg); + + ReSequenceEffectiveDates ($Item, $_POST['TypeAbbrev'], $_POST['CurrAbrev'], $db) ; + $sql = "INSERT INTO prices (stockid, typeabbrev, currabrev, Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-06-15 13:07:05 UTC (rev 5416) +++ trunk/SelectOrderItems.php 2011-06-16 14:19:15 UTC (rev 5417) @@ -26,6 +26,7 @@ foreach ($_POST as $key => $value) { if (strstr($key,'itm')) { $NewItem_array[substr($key,3)] = trim($value); + $NewItem='Here'; } } } @@ -34,7 +35,6 @@ $NewItem = trim($_GET['NewItem']); } - if (empty($_GET['identifier'])) { /*unique session identifier to ensure that there is no conflict with other order entry sessions on the same machine */ $identifier=date('U'); @@ -201,6 +201,7 @@ salesorderdetails.narrative, salesorderdetails.itemdue, salesorderdetails.poline, + salesorderdetails.pricedecimals, locstock.quantity as qohatloc, stockmaster.mbflag, stockmaster.discountcategory, @@ -236,6 +237,7 @@ 0, /*Controlled*/ $myrow['serialised'], $myrow['decimalplaces'], + $myrow['pricedecimals'], $myrow['narrative'], 'No', /* Update DB */ $myrow['orderlineno'], @@ -1233,7 +1235,6 @@ exit; } - if (isset($NewItem)){ /* get the item details from the database and hold them in the cart object make the quantity 1 by default then add it to the cart */ /*Now figure out if the item is a kit set - the field MBFlag='K'*/ Modified: trunk/includes/DefineCartClass.php =================================================================== --- trunk/includes/DefineCartClass.php 2011-06-15 13:07:05 UTC (rev 5416) +++ trunk/includes/DefineCartClass.php 2011-06-16 14:19:15 UTC (rev 5417) @@ -86,6 +86,7 @@ $Controlled=0, $Serialised=0, $DecimalPlaces=0, + $PriceDecimals=2, $Narrative='', $UpdateDB='No', $LineNumber=-1, @@ -127,6 +128,7 @@ $Controlled, $Serialised, $DecimalPlaces, + $PriceDecimals, $Narrative, $TaxCategory, $ItemDue, @@ -438,6 +440,7 @@ Var $Controlled; Var $Serialised; Var $DecimalPlaces; + var $PriceDecimals; Var $SerialItems; Var $Narrative; Var $TaxCategory; @@ -467,6 +470,7 @@ $Controlled, $Serialised, $DecimalPlaces, + $PriceDecimals, $Narrative, $TaxCategory, $ItemDue, @@ -500,6 +504,7 @@ $this->Controlled = $Controlled; $this->Serialised = $Serialised; $this->DecimalPlaces = $DecimalPlaces; + $this->PriceDecimals = $PriceDecimals; $this->SerialItems = array(); $this->Narrative = $Narrative; $this->Taxes = array(); Modified: trunk/includes/GetPrice.inc =================================================================== --- trunk/includes/GetPrice.inc 2011-06-15 13:07:05 UTC (rev 5416) +++ trunk/includes/GetPrice.inc 2011-06-16 14:19:15 UTC (rev 5417) @@ -5,7 +5,8 @@ $Price = 0; /*Search by branch and customer for a date specified price */ $sql="SELECT prices.price, - prices.conversionfactor + prices.conversionfactor, + prices.decimalplaces FROM prices, debtorsmaster WHERE debtorsmaster.salestype=prices.typeabbrev @@ -16,14 +17,15 @@ AND prices.branchcode='" . $BranchCode . "' AND prices.startdate <='" . Date('Y-m-d') . "' AND prices.enddate >='" . Date('Y-m-d') . "'"; - + $ErrMsg = _('There is a problem in retrieving the pricing information for part') . ' ' . $StockID . ' ' . _('and for Customer') . ' ' . $DebtorNo . ' ' . _('the error message returned by the SQL server was'); $result = DB_query($sql, $db,$ErrMsg); if (DB_num_rows($result)==0){ /*Need to try same specific search but for a default price with a zero end date */ $sql="SELECT prices.price, prices.startdate, - prices.conversionfactor + prices.conversionfactor, + prices.decimalplaces FROM prices, debtorsmaster WHERE debtorsmaster.salestype=prices.typeabbrev @@ -35,14 +37,15 @@ AND prices.startdate <='" . Date('Y-m-d') . "' AND prices.enddate ='0000-00-00' ORDER BY prices.startdate DESC"; - + $result = DB_query($sql, $db,$ErrMsg); - + if (DB_num_rows($result)==0){ - + /* No result returned for customer and branch search try for just a customer match */ $sql = "SELECT prices.price, - prices.conversionfactor + prices.conversionfactor, + prices.decimalplaces FROM prices, debtorsmaster WHERE debtorsmaster.salestype=prices.typeabbrev @@ -53,14 +56,15 @@ AND prices.branchcode='' AND prices.startdate <='" . Date('Y-m-d') . "' AND prices.enddate >='" . Date('Y-m-d') . "'"; - - + + $result = DB_query($sql,$db,$ErrMsg); if (DB_num_rows($result)==0){ //if no specific price between the dates maybe there is a default price with no end date specified $sql = "SELECT prices.price, prices.startdate, - prices.conversionfactor + prices.conversionfactor, + prices.decimalplaces FROM prices, debtorsmaster WHERE debtorsmaster.salestype=prices.typeabbrev @@ -72,50 +76,53 @@ AND prices.startdate <='" . Date('Y-m-d') . "' AND prices.enddate >='0000-00-00' ORDER BY prices.startdate DESC"; - + $result = DB_query($sql,$db,$ErrMsg); - + if (DB_num_rows($result)==0){ - + /*No special customer specific pricing use the customers normal price list but look for special limited time prices with specific end date*/ $sql = "SELECT prices.price, - prices.conversionfactor + prices.conversionfactor, + prices.decimalplaces FROM prices, debtorsmaster WHERE debtorsmaster.salestype=prices.typeabbrev AND debtorsmaster.debtorno='" . $DebtorNo . "' AND prices.stockid = '" . $StockID . "' - AND prices.debtorno='' + AND prices.debtorno='' AND prices.currabrev = debtorsmaster.currcode AND prices.startdate <='" . Date('Y-m-d') . "' AND prices.enddate >='" . Date('Y-m-d') . "'"; - + $result = DB_query($sql,$db,$ErrMsg); - + if (DB_num_rows($result)==0){ /*No special customer specific pricing use the customers normal price list but look for default price with 0000-00-00 end date*/ $sql = "SELECT prices.price, prices.startdate, - prices.conversionfactor + prices.conversionfactor, + prices.decimalplaces FROM prices, debtorsmaster WHERE debtorsmaster.salestype=prices.typeabbrev AND debtorsmaster.debtorno='" . $DebtorNo . "' AND prices.stockid = '" . $StockID . "' - AND prices.debtorno='' + AND prices.debtorno='' AND prices.currabrev = debtorsmaster.currcode AND prices.startdate <='" . Date('Y-m-d') . "' AND prices.enddate ='0000-00-00' ORDER BY prices.startdate DESC"; - + $result = DB_query($sql,$db,$ErrMsg); - - if (DB_num_rows($result)==0){ - + + if (DB_num_rows($result)==0){ + /* Now use the default salestype/price list cos all else has failed */ $sql="SELECT prices.price, - prices.conversionfactor - FROM prices, + prices.conversionfactor, + prices.decimalplaces + FROM prices, debtorsmaster WHERE prices.stockid = '" . $StockID . "' AND prices.currabrev = debtorsmaster.currcode @@ -124,15 +131,16 @@ AND prices.debtorno='' AND prices.startdate <='" . Date('Y-m-d') . "' AND prices.enddate >='" . Date('Y-m-d') . "'";; - + $result = DB_query($sql, $db,$ErrMsg); - - if (DB_num_rows($result)==0){ - + + if (DB_num_rows($result)==0){ + /* Now use the default salestype/price list cos all else has failed */ $sql="SELECT prices.price, prices.startdate, - prices.conversionfactor + prices.conversionfactor, + prices.decimalplaces FROM prices, debtorsmaster WHERE prices.stockid = '" . $StockID . "' @@ -143,14 +151,15 @@ AND prices.startdate <='" . Date('Y-m-d') . "' AND prices.enddate ='0000-00-00' ORDER BY prices.startdate DESC"; - + $result = DB_query($sql, $db,$ErrMsg); - + if (DB_num_rows($result)==0){ /*Not even a price set up in the default price list so return 0 */ prnMsg(_('There are no prices set up for') . ' ' . $StockID,'warn'); $Prices[0]=0; $Prices[1]=1; + $Prices[2]=2; return $Prices; } } @@ -169,6 +178,7 @@ } else { $Prices[0]=0; $Prices[1]=1; + $Prices[2]=2; return $Prices; } Modified: trunk/includes/SelectOrderItems_IntoCart.inc =================================================================== --- trunk/includes/SelectOrderItems_IntoCart.inc 2011-06-15 13:07:05 UTC (rev 5416) +++ trunk/includes/SelectOrderItems_IntoCart.inc 2011-06-16 14:19:15 UTC (rev 5417) @@ -111,6 +111,7 @@ $PriceArray = GetPrice($NewItem, $_SESSION['Items'.$identifier]->DebtorNo,$_SESSION['Items'.$identifier]->Branch, $db); $Price=$PriceArray[0]; $ConversionFactor=$PriceArray[1]; + $PriceDecimals=$PriceArray[2]; $WithinCreditLimit = true; if (!isset($_SESSION['WarnOnce']) and $_SESSION['Items'.$identifier]->SpecialInstructions) { @@ -147,6 +148,7 @@ 0, /*Controlled - dont care */ $myItemRow['serialised'], /* need to know for autocreation wos */ $myItemRow['decimalplaces'], + $PriceDecimals, '', /*Narrative - none yet */ $UpdateDB, $NewLineNo, Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-06-15 13:07:05 UTC (rev 5416) +++ trunk/includes/session.inc 2011-06-16 14:19:15 UTC (rev 5417) @@ -13,7 +13,7 @@ header('Location:' . $rootpath . '/install/index.php'); } include($PathPrefix . 'config.php'); -$DBVersion=82; +$DBVersion=84; if (isset($SessionSavePath)){ session_save_path($SessionSavePath); } Added: trunk/sql/mysql/updates/83.php =================================================================== --- trunk/sql/mysql/updates/83.php (rev 0) +++ trunk/sql/mysql/updates/83.php 2011-06-16 14:19:15 UTC (rev 5417) @@ -0,0 +1,5 @@ +<?php + +UpdateDBNo(83, $db); + +?> \ No newline at end of file Added: trunk/sql/mysql/updates/84.php =================================================================== --- trunk/sql/mysql/updates/84.php (rev 0) +++ trunk/sql/mysql/updates/84.php 2011-06-16 14:19:15 UTC (rev 5417) @@ -0,0 +1,7 @@ +<?php + +AddColumn('pricedecimals', 'salesorderdetails', 'int( 11 )', 'NOT NULL', '2', 'decimalplaces', $db); + +UpdateDBNo(84, $db); + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-06-20 14:31:28
|
Revision: 5425 http://weberp.svn.sourceforge.net/weberp/?rev=5425&view=rev Author: tim_schofield Date: 2011-06-20 14:31:21 +0000 (Mon, 20 Jun 2011) Log Message: ----------- Correctly show quantities and price on the invoice Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/PrintCustTrans.php trunk/includes/session.inc Added Paths: ----------- trunk/sql/mysql/updates/85.php Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-06-20 14:25:16 UTC (rev 5424) +++ trunk/ConfirmDispatch_Invoice.php 2011-06-20 14:31:21 UTC (rev 5425) @@ -125,7 +125,8 @@ stockmaster.serialised, stockmaster.volume, stockmaster.kgs, - stockmaster.units, + salesorderdetails.units, + salesorderdetails.conversionfactor, stockmaster.decimalplaces, stockmaster.mbflag, stockmaster.taxcatid, @@ -181,7 +182,11 @@ '', $myrow['itemdue'], $myrow['poline'], - $myrow['standardcost']); /*NB NO Updates to DB */ + $myrow['standardcost'], + 1, + 0, + 1, + $myrow['conversionfactor']); /*NB NO Updates to DB */ /*Calculate the taxes applicable to this line item from the customer branch Tax Group and Item Tax Category */ @@ -943,7 +948,7 @@ $QtyOnHandPrior = 0; } - $SQL = "UPDATE locstock SET quantity = locstock.quantity - " . $OrderLine->QtyDispatched . " + $SQL = "UPDATE locstock SET quantity = locstock.quantity - " . $OrderLine->QtyDispatched/$OrderLine->ConversionFactor . " WHERE locstock.stockid = '" . $OrderLine->StockID . "' AND loccode = '" . $_SESSION['Items']->Location . "'"; @@ -1050,72 +1055,81 @@ $OrderLine->StandardCost=0; } if ($MBFlag=='B' OR $MBFlag=='M'){ - $SQL = "INSERT INTO stockmoves ( stockid, - type, - transno, - loccode, - trandate, - debtorno, - branchcode, - price, - prd, - reference, - qty, - discountpercent, - standardcost, - newqoh, - narrative ) - VALUES ('" . $OrderLine->StockID . "', - 10, - '" . $InvoiceNo . "', - '" . $_SESSION['Items']->Location . "', - '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', - '" . round($LocalCurrencyPrice,$OrderLine->PriceDecimals) . "', - '" . $PeriodNo . "', - '" . $_SESSION['ProcessingOrder'] . "', - '" . -$OrderLine->QtyDispatched . "', - '" . $OrderLine->DiscountPercent . "', - '" . $OrderLine->StandardCost . "', - '" . ($QtyOnHandPrior - $OrderLine->QtyDispatched) . "', - '" . DB_escape_string($OrderLine->Narrative) . "' )"; + $SQL = "INSERT INTO stockmoves (stockid, + type, + transno, + loccode, + trandate, + debtorno, + branchcode, + price, + prd, + reference, + qty, + discountpercent, + standardcost, + newqoh, + narrative, + units, + conversionfactor ) + VALUES ('" . $OrderLine->StockID . "', + 10, + '" . $InvoiceNo . "', + '" . $_SESSION['Items']->Location . "', + '" . $DefaultDispatchDate . "', + '" . $_SESSION['Items']->DebtorNo . "', + '" . $_SESSION['Items']->Branch . "', + '" . round($LocalCurrencyPrice,$OrderLine->PriceDecimals) . "', + '" . $PeriodNo . "', + '" . $_SESSION['ProcessingOrder'] . "', + '" . -$OrderLine->QtyDispatched/$OrderLine->ConversionFactor . "', + '" . $OrderLine->DiscountPercent . "', + '" . $OrderLine->StandardCost . "', + '" . ($QtyOnHandPrior - $OrderLine->QtyDispatched/$OrderLine->ConversionFactor) . "', + '" . DB_escape_string($OrderLine->Narrative) . "', + '" . $OrderLine->Units . "', + '" . $OrderLine->ConversionFactor . "' + )"; } else { // its an assembly or dummy and assemblies/dummies always have nil stock (by definition they are made up at the time of dispatch so new qty on hand will be nil if (empty($OrderLine->StandardCost)) { $OrderLine->StandardCost=0; } $SQL = "INSERT INTO stockmoves ( stockid, - type, - transno, - loccode, - trandate, - debtorno, - branchcode, - price, - prd, - reference, - qty, - discountpercent, - standardcost, - narrative ) - VALUES ('" . $OrderLine->StockID . "', - 10, - '" . $InvoiceNo . "', - '" . $_SESSION['Items']->Location . "', - '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', - '" . $LocalCurrencyPrice . "', - '" . $PeriodNo . "', - '" . $_SESSION['ProcessingOrder'] . "', - '" . -$OrderLine->QtyDispatched . "', - '" . $OrderLine->DiscountPercent . "', - '" . $OrderLine->StandardCost . "', - '" . DB_escape_string($OrderLine->Narrative) . "')"; + type, + transno, + loccode, + trandate, + debtorno, + branchcode, + price, + prd, + reference, + qty, + discountpercent, + standardcost, + narrative, + units, + conversionfactor ) + VALUES ('" . $OrderLine->StockID . "', + 10, + '" . $InvoiceNo . "', + '" . $_SESSION['Items']->Location . "', + '" . $DefaultDispatchDate . "', + '" . $_SESSION['Items']->DebtorNo . "', + '" . $_SESSION['Items']->Branch . "', + '" . $LocalCurrencyPrice . "', + '" . $PeriodNo . "', + '" . $_SESSION['ProcessingOrder'] . "', + '" . -$OrderLine->QtyDispatched/$OrderLine->ConversionFactor . "', + '" . $OrderLine->DiscountPercent . "', + '" . $OrderLine->StandardCost . "', + '" . DB_escape_string($OrderLine->Narrative) . "' + '" . $OrderLine->Units . "', + '" . $OrderLine->ConversionFactor . "' + )"; } - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement records could not be inserted because'); $DbgMsg = _('The following SQL to insert the stock movement records was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2011-06-20 14:25:16 UTC (rev 5424) +++ trunk/PrintCustTrans.php 2011-06-20 14:31:21 UTC (rev 5425) @@ -193,12 +193,13 @@ if ($InvOrCredit == 'Invoice') { $sql = "SELECT stockmoves.stockid, stockmaster.description, - -stockmoves.qty as quantity, + -stockmoves.qty*stockmoves.conversionfactor as quantity, stockmoves.discountpercent, ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . "* -stockmoves.qty) AS fxnet, (stockmoves.price * " . $ExchRate . ") AS fxprice, stockmoves.narrative, - stockmaster.units, + stockmoves.units, + stockmoves.conversionfactor, stockmaster.decimalplaces FROM stockmoves, stockmaster @@ -210,12 +211,13 @@ /* only credit notes to be retrieved */ $sql = "SELECT stockmoves.stockid, stockmaster.description, - stockmoves.qty as quantity, + stockmoves.qty*stockmoves.conversionfactor as quantity, stockmoves.discountpercent, ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . " * stockmoves.qty) AS fxnet, (stockmoves.price * " . $ExchRate . ") AS fxprice, stockmoves.narrative, - stockmaster.units, + stockmoves.units, + stockmoves.conversionfactor, stockmaster.decimalplaces FROM stockmoves, stockmaster @@ -599,12 +601,13 @@ </table>'; $sql = "SELECT stockmoves.stockid, stockmaster.description, - -stockmoves.qty as quantity, + -stockmoves.qty*stockmoves.conversionfactor as quantity, stockmoves.discountpercent, ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . "* -stockmoves.qty) AS fxnet, (stockmoves.price * " . $ExchRate . ") AS fxprice, stockmoves.narrative, - stockmaster.units + stockmoves.units, + stockmoves.conversionfactor FROM stockmoves, stockmaster WHERE stockmoves.stockid = stockmaster.stockid @@ -628,10 +631,11 @@ </tr></table>'; $sql = "SELECT stockmoves.stockid, stockmaster.description, - stockmoves.qty as quantity, + stockmoves.qty*stockmoves.conversionfactor as quantity, stockmoves.discountpercent, ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . " * stockmoves.qty) AS fxnet, (stockmoves.price * " . $ExchRate . ") AS fxprice, - stockmaster.units + stockmoves.units, + stockmoves.conversionfactor FROM stockmoves, stockmaster WHERE stockmoves.stockid = stockmaster.stockid Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-06-20 14:25:16 UTC (rev 5424) +++ trunk/includes/session.inc 2011-06-20 14:31:21 UTC (rev 5425) @@ -13,7 +13,7 @@ header('Location:' . $rootpath . '/install/index.php'); } include($PathPrefix . 'config.php'); -$DBVersion=84; +$DBVersion=85; if (isset($SessionSavePath)){ session_save_path($SessionSavePath); } Added: trunk/sql/mysql/updates/85.php =================================================================== --- trunk/sql/mysql/updates/85.php (rev 0) +++ trunk/sql/mysql/updates/85.php 2011-06-20 14:31:21 UTC (rev 5425) @@ -0,0 +1,8 @@ +<?php + +AddColumn('units', 'stockmoves', 'varchar(40)', 'NOT NULL', '', 'narrative', $db); +AddColumn('conversionfactor', 'stockmoves', 'double', 'NOT NULL', '1', 'units', $db); + +UpdateDBNo(85, $db); + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-06-20 15:11:11
|
Revision: 5429 http://weberp.svn.sourceforge.net/weberp/?rev=5429&view=rev Author: tim_schofield Date: 2011-06-20 15:11:04 +0000 (Mon, 20 Jun 2011) Log Message: ----------- Improvements to cash sales Modified Paths: -------------- trunk/CounterSales.php trunk/includes/SelectOrderItems_IntoCart.inc Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-06-20 14:49:09 UTC (rev 5428) +++ trunk/CounterSales.php 2011-06-20 15:11:04 UTC (rev 5429) @@ -17,13 +17,14 @@ if (empty($_GET['identifier'])) { $identifier=date('U'); + $_POST['PartSearch']=True; } else { $identifier=$_GET['identifier']; } if (isset($_SESSION['Items'.$identifier])){ //update the Items object variable with the data posted from the form $_SESSION['Items'.$identifier]->CustRef = _('Cash Sale'); - $_SESSION['Items'.$identifier]->Comments = _('Cash Sale') . ' ' . DATE($_SESSION['DefaultDateFormat']); + $_SESSION['Items'.$identifier]->Comments = _('Cash sale on') . ' ' . date($_SESSION['DefaultDateFormat']); } if (isset($_POST['QuickEntry'])){ @@ -32,7 +33,36 @@ if (isset($_POST['OrderItems'])){ foreach ($_POST as $key => $value) { - if (strstr($key,'itm')) { + if (strstr($key,'itm') and strstr($key,'batch')) { + $key=str_replace('~', ' ', trim($key)); + $sql="SELECT quantity + FROM stockserialitems + WHERE stockid='".substr($key,3, strpos($key, 'batch')-3)."' + AND serialno='".trim(substr($key, strpos($key, 'batch')+5))."'"; + $BatchQuantityResult=DB_query($sql, $db); + $BatchQuantityRow=DB_fetch_array($BatchQuantityResult); + if (!isset($NewItemArray[substr($key,3, strpos($key, 'batch')-3)])) { + if ($BatchQuantityRow['quantity']<trim($value)) { + prnMsg( _('Batch number').' '.trim(substr($key, strpos($key, 'batch')+5)).' '. + _('of item number').' '.substr($key,3, strpos($key, 'batch')-3).' '. + _('has insufficient items remaining in it to complete this sale').$BatchQuantityRow['quantity'].'x'.$value, 'info'); + } else { + $NewItemArray[substr($key,3, strpos($key, 'batch')-3)]['Quantity'] = trim($value); + $NewItemArray[substr($key,3, strpos($key, 'batch')-3)]['Batch']['Number'][] = trim(substr($key, strpos($key, 'batch')+5)); + $NewItemArray[substr($key,3, strpos($key, 'batch')-3)]['Batch']['Quantity'][] = trim($value); + } + } else { + if ($BatchQuantityRow['quantity']<trim($value)+$NewItemArray[substr($key,3, strpos($key, 'batch')-3)]['Quantity']) { + prnMsg( _('Batch number').' '.trim(substr($key, strpos($key, 'batch')+5)).' '. + _('of item number').' '.substr($key,3, strpos($key, 'batch')-3).' '. + _('has insufficient items remaining in it to complete this sale'), 'info'); + } else { + $NewItemArray[substr($key,3, strpos($key, 'batch')-3)]['Quantity'] += trim($value); + $NewItemArray[substr($key,3, strpos($key, 'batch')-3)]['Batch']['Number'][] = trim(substr($key, strpos($key, 'batch')+5)); + $NewItemArray[substr($key,3, strpos($key, 'batch')-3)]['Batch']['Quantity'][] = trim($value); + } + } + } elseif (strstr($key,'itm')) { $NewItemArray[substr($key,3)] = trim($value); } } @@ -115,6 +145,8 @@ $result =DB_query($sql,$db,$ErrMsg,$DbgMsg); $myrow = DB_fetch_array($result); +// $SalesType=$myrow['salestype']; + if ($myrow['dissallowinvoices'] != 1){ if ($myrow['dissallowinvoices']==2){ prnMsg($myrow['name'] . ' ' . _('Although this account is defined as the cash sale account for the location. The account is currently flagged as an account that needs to be watched. Please contact the credit control personnel to discuss'),'warn'); @@ -238,7 +270,6 @@ WHERE stockmaster.categoryid=stockcategory.categoryid AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 AND stockmaster.description " . LIKE . " '" . $SearchString . "' AND stockmaster.discontinued=0 ORDER BY stockmaster.stockid"; @@ -250,7 +281,6 @@ WHERE stockmaster.categoryid=stockcategory.categoryid AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 AND stockmaster.discontinued=0 AND stockmaster.description " . LIKE . " '" . $SearchString . "' AND stockmaster.categoryid='" . $_POST['StockCat'] . "' @@ -265,25 +295,25 @@ if ($_POST['StockCat']=='All'){ $SQL = "SELECT stockmaster.stockid, stockmaster.description, - stockmaster.units + stockmaster.units, + stockmaster.controlled FROM stockmaster, stockcategory WHERE stockmaster.categoryid=stockcategory.categoryid AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 AND stockmaster.discontinued=0 ORDER BY stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.stockid, stockmaster.description, - stockmaster.units + stockmaster.units, + stockmaster.controlled FROM stockmaster, stockcategory WHERE stockmaster.categoryid=stockcategory.categoryid AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 AND stockmaster.discontinued=0 AND stockmaster.categoryid='" . $_POST['StockCat'] . "' ORDER BY stockmaster.stockid"; @@ -293,23 +323,22 @@ if ($_POST['StockCat']=='All'){ $SQL = "SELECT stockmaster.stockid, stockmaster.description, - stockmaster.units + stockmaster.units, + stockmaster.controlled FROM stockmaster, stockcategory WHERE stockmaster.categoryid=stockcategory.categoryid AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 AND stockmaster.discontinued=0 ORDER BY stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.stockid, stockmaster.description, - stockmaster.units + stockmaster.units, + stockmaster.controlled FROM stockmaster, stockcategory WHERE stockmaster.categoryid=stockcategory.categoryid AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 AND stockmaster.discontinued=0 AND stockmaster.categoryid='" . $_POST['StockCat'] . "' ORDER BY stockmaster.stockid"; @@ -335,9 +364,9 @@ prnMsg (_('There are no products available meeting the criteria specified'),'info'); } if (DB_num_rows($SearchResult)==1){ - $myrow=DB_fetch_array($SearchResult); +/* $myrow=DB_fetch_array($SearchResult); $NewItem = $myrow['stockid']; - DB_data_seek($SearchResult,0); + DB_data_seek($SearchResult,0);*/ } if (DB_num_rows($SearchResult)< $_SESSION['DisplayRecordsMax']){ $Offset=0; @@ -445,8 +474,6 @@ } else if ($myrow['mbflag']=='G'){ prnMsg(_('Phantom assemblies cannot be sold, these items exist only as bills of materials used in other manufactured items. The following item has not been added to the order:') . ' ' . $NewItem, 'warn'); - } else if ($myrow['controlled']==1){ - prnMsg(_('The system does not currently cater for counter sales of lot controlled or serialised items'),'warn'); } else { /*Its not a kit set item*/ include('includes/SelectOrderItems_IntoCart.inc'); } @@ -609,7 +636,8 @@ if (isset($NewItemArray) and isset($_POST['OrderItems'])){ /* get the item details from the database and hold them in the cart object make the quantity 1 by default then add it to the cart */ /*Now figure out if the item is a kit set - the field MBFlag='K'*/ - foreach($NewItemArray as $NewItem => $NewItemQty) { + foreach($NewItemArray as $NewItem => $NewItemArray) { + $NewItemQty=$NewItemArray['Quantity']; if($NewItemQty > 0) { $sql = "SELECT stockmaster.mbflag FROM stockmaster @@ -648,7 +676,13 @@ $NewItemDue = date($_SESSION['DefaultDateFormat']); $NewPOLine = 0; include('includes/SelectOrderItems_IntoCart.inc'); - $_SESSION['Items'.$identifier]->GetTaxes(($_SESSION['Items'.$identifier]->LineCounter - 1)); + if ($_SESSION['Items'.$identifier]->LineCounter>0 and + $_SESSION['Items'.$identifier]->LineItems[$_SESSION['Items'.$identifier]->LineCounter - 1]->Controlled==1) { + $_SESSION['Items'.$identifier]->LineItems[$_SESSION['Items'.$identifier]->LineCounter - 1]->SerialItems=$NewItemArray['Batch']; + } + if ($_SESSION['Items'.$identifier]->LineCounter>0) { + $_SESSION['Items'.$identifier]->GetTaxes(($_SESSION['Items'.$identifier]->LineCounter - 1)); + } } } /* end of if its a new item */ } /*end of if its a new item */ @@ -743,10 +777,10 @@ echo '<td><a target="_blank" href="' . $rootpath . '/StockStatus.php?' . SID .'identifier='.$identifier . '&StockID=' . $OrderLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo . '">' . $OrderLine->StockID . '</a></td> <td>' . $OrderLine->ItemDescription . '</td>'; - echo '<td><input class="number" tabindex="2" type="text" name="Quantity_' . $OrderLine->LineNumber . '" size="6" maxlength="6" value="' . $OrderLine->Quantity . '" />'; + echo '<td><input class="number" tabindex="2" type="text" name="Quantity_' . ($OrderLine->LineNumber) . '" size="6" maxlength="6" value="' . ($OrderLine->Quantity) . '" />'; echo '</td> - <td class="number">' . $OrderLine->QOHatLoc . '</td> + <td class="number">' . number_format($OrderLine->QOHatLoc/$OrderLine->ConversionFactor,0) . '</td> <td>' . $OrderLine->Units . '</td>'; echo '<td><input class="number" type="text" name="Price_' . $OrderLine->LineNumber . '" size="16" maxlength="16" value="' . $OrderLine->Price . '" /></td> @@ -829,9 +863,11 @@ //now the payment stuff in this column $PaymentMethodsResult = DB_query("SELECT paymentid, paymentname FROM paymentmethods",$db); + $_POST['PaymentMethod']='Cash'; + echo '<tr><td>' . _('Payment Type') . ':</td><td><select name="PaymentMethod">'; while ($PaymentMethodRow = DB_fetch_array($PaymentMethodsResult)){ - if (isset($_POST['PaymentMethod']) and $_POST['PaymentMethod'] == $PaymentMethodRow['paymentid']){ + if (isset($_POST['PaymentMethod']) and $_POST['PaymentMethod'] == $PaymentMethodRow['paymentname']){ echo '<option selected="True" value="' . $PaymentMethodRow['paymentid'] . '">' . $PaymentMethodRow['paymentname'] . '</option>'; } else { echo '<option value="' . $PaymentMethodRow['paymentid'] . '">' . $PaymentMethodRow['paymentname'] . '</option>'; @@ -851,11 +887,10 @@ } echo '</select></td></tr>'; - if (!isset($_POST['AmountPaid'])){ - $_POST['AmountPaid'] =0; - } - echo '<tr><td>' . _('Amount Paid') . ':</td><td><input type="text" class="number" name="AmountPaid" maxlength="12" size="12" value="' . ($_SESSION['Items'.$identifier]->total+$TaxTotal) . '" /></td></tr>'; + $_POST['AmountPaid'] =($_SESSION['Items'.$identifier]->total+$TaxTotal); + echo '<tr><td>' . _('Amount Paid') . ':</td><td><input type="text" class="number" name="AmountPaid" maxlength="12" size="12" value="' . $_POST['AmountPaid'] . '" /></td></tr>'; + echo '</table>'; //end the sub table in the second column of master table echo '</th></tr></table>'; //end of column/row/master table echo '<br /><div class="centre"><input type="submit" name="Recalculate" value="' . _('Re-Calculate') . '" /> @@ -897,7 +932,7 @@ $Result = DB_query($SQL,$db,$ErrMsg); $CheckNegRow = DB_fetch_array($Result); if ($CheckNegRow['mbflag']=='B' OR $CheckNegRow['mbflag']=='M'){ - if ($CheckNegRow['quantity'] < $OrderLine->Quantity){ + if ($CheckNegRow['quantity'] < ($OrderLine->Quantity*$OrderLine->ConversionFactor)){ prnMsg( _('Invoicing the selected order would result in negative stock. The system parameters are set to prohibit negative stocks from occurring. This invoice cannot be created until the stock on hand is corrected.'),'error',$OrderLine->StockID . ' ' . $CheckNegRow['description'] . ' - ' . _('Negative Stock Prohibited')); $NegativesFound = true; } @@ -1298,7 +1333,7 @@ } $SQL = "UPDATE locstock - SET quantity = locstock.quantity - " . $OrderLine->Quantity . " + SET quantity = locstock.quantity - " . $OrderLine->Quantity*$OrderLine->ConversionFactor . " WHERE locstock.stockid = '" . $OrderLine->StockID . "' AND loccode = '" . $_SESSION['Items'.$identifier]->Location . "'"; @@ -1431,10 +1466,10 @@ '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . $OrderNo . "', - '" . -$OrderLine->Quantity . "', + '" . -$OrderLine->Quantity*$OrderLine->ConversionFactor . "', '" . $OrderLine->DiscountPercent . "', '" . $OrderLine->StandardCost . "', - '" . ($QtyOnHandPrior - $OrderLine->Quantity) . "', + '" . ($QtyOnHandPrior - $OrderLine->Quantity)*$OrderLine->ConversionFactor . "', '" . DB_escape_string($OrderLine->Narrative) . "' )"; } else { // its an assembly or dummy and assemblies/dummies always have nil stock (by definition they are made up at the time of dispatch so new qty on hand will be nil @@ -1466,7 +1501,7 @@ '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . $OrderNo . "', - '" . -$OrderLine->Quantity . "', + '" . -$OrderLine->Quantity*$OrderLine->ConversionFactor . "', '" . $OrderLine->DiscountPercent . "', '" . $OrderLine->StandardCost . "', '" . DB_escape_string($OrderLine->Narrative) . "')"; @@ -1479,6 +1514,32 @@ /*Get the ID of the StockMove... */ $StkMoveNo = DB_Last_Insert_ID($db,'stockmoves','stkmoveno'); + foreach ($OrderLine->SerialItems['Number'] as $i => $SerialItemNumber) { + $Batch[$SerialItemNumber]=$OrderLine->SerialItems['Quantity'][$i]; + $SQL="UPDATE stockserialitems + SET quantity=quantity-".$OrderLine->SerialItems['Quantity'][$i]*$OrderLine->ConversionFactor." + WHERE stockid='".$OrderLine->StockID."' + AND serialno='".$SerialItemNumber."'"; + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Batch numbers could not be updated'); + $DbgMsg = _('The following SQL to update the stock batch record was used'); + $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + + $SQL="INSERT INTO stockserialmoves + (stockmoveno, + stockid, + serialno, + moveqty) + VALUES ( + '" . $StkMoveNo . "', + '" . $OrderLine->StockID . "', + '" . $SerialItemNumber . "', + '" . -$OrderLine->SerialItems['Quantity'][$i]*$OrderLine->ConversionFactor . "' + )"; + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Batch numbers could not be updated'); + $DbgMsg = _('The following SQL to insert the stock batch movement was used'); + $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + } + /*Insert the taxes that applied to this line */ foreach ($OrderLine->Taxes as $Tax) { @@ -1940,7 +2001,7 @@ echo '<br /><div class="centre">'; if ($_SESSION['InvoicePortraitFormat']==0){ - echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTrans.php?' . SID . 'FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Landscape') . ')</a><br /><br />'; + echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a target="_blank" href="'.$rootpath.'/PDFReceipt.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this receipt'). '</a><br /><br />'; } else { echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTransPortrait.php?' . SID . 'FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Portrait') . ')</a><br /><br />'; } @@ -1956,6 +2017,7 @@ * end of Invoice Processing * ***************************** */ + // This code needs sorting out, but until then : $ImageSource = _('No Image'); @@ -1973,6 +2035,7 @@ $SQL="SELECT stockmaster.units, stockmaster.description, stockmaster.stockid, + stockmaster.controlled, salesorderdetails.stkcode, SUM(qtyinvoiced) Sales FROM salesorderdetails INNER JOIN stockmaster @@ -2092,7 +2155,7 @@ $rootpath, SID, $myrow['stockid']); - + echo '<input type="hidden" name="Units' . $myrow['stockid'] . '" value="' . $myrow['units'] . '" />'; if ($j==1) { @@ -2164,85 +2227,65 @@ $j = 1; echo '<form action="' . $_SERVER['PHP_SELF'] . '?' . SID .'identifier='.$identifier . '" method="post" name="orderform">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="table1">'; - echo '<tr><td><input type="hidden" name="previous" value="'.number_format($Offset-1).'" /><input tabindex="'.number_format($j+7).'" type="submit" name="Prev" value="'._('Prev').'" /></td>'; + echo '<table class="selection">'; + echo '<tr><td><input type="hidden" name="previous" value="'.number_format($Offset-1).'" /> + <input tabindex="'.number_format($j+7).'" type="submit" name="Prev" value="'._('Prev').'" /></td>'; echo '<td style="text-align:center" colspan="6"><input type="hidden" name="OrderItems" value="1" /><input tabindex="'.number_format($j+8).'" type="submit" value="'._('Add to Sale').'" /></td>'; - echo '<td><input type="hidden" name="NextList" value="'.number_format($Offset+1).'" /><input tabindex="'.number_format($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td></tr>'; + echo '<td><input type="hidden" name="NextList" value="'.number_format($Offset+1).'" /> + <input tabindex="'.number_format($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td></tr>'; $TableHeader = '<tr><th>' . _('Code') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Units') . '</th> - <th>' . _('On Hand') . '</th> - <th>' . _('On Demand') . '</th> - <th>' . _('On Order') . '</th> - <th>' . _('Available') . '</th> - <th>' . _('Quantity') . '</th></tr>'; + <th>' . _('Description') . '</th> + <th>' . _('Units') . '</th> + <th>' . _('On Hand') . '</th> + <th>' . _('Quantity') . '</th> + <th>' . _('Batch No') . '</th> + <th>' . _('Batch Qty') . '</th> + <th>' . _('Expiry Date') . '</th> + </tr>'; echo $TableHeader; $k=0; //row colour counter while ($myrow=DB_fetch_array($SearchResult)) { + $PricesSQL="SELECT price, + units, + conversionfactor, + decimalplaces + FROM prices + WHERE stockid='".$myrow['stockid']."' + AND typeabbrev='".$_SESSION['Items'.$identifier]->DefaultSalesType."' + AND '".date('Y-m-d')."' BETWEEN startdate and enddate"; + $PricesResult = DB_query($PricesSQL, $db); + if (DB_num_rows($PricesResult)>0) { + $PricesRow = DB_fetch_array($PricesResult); + $myrow['price']=$PricesRow['price']; + $myrow['units']=$PricesRow['units']; + $myrow['conversionfactor']=$PricesRow['conversionfactor']; + } else { + $myrow['conversionfactor']=1; + } + // Find the quantity in stock at location $QOHSql = "SELECT sum(quantity) AS QOH, stockmaster.decimalplaces FROM locstock INNER JOIN stockmaster + ON stockmaster.stockid=locstock.stockid WHERE locstock.stockid='" .$myrow['stockid'] . "' AND loccode = '" . $_SESSION['Items'.$identifier]->Location . "'"; $QOHResult = DB_query($QOHSql,$db); $QOHRow = DB_fetch_array($QOHResult); - $QOH = $QOHRow['QOH']; + $QOH = $QOHRow['QOH']/$myrow['conversionfactor']; - // Find the quantity on outstanding sales orders - $sql = "SELECT SUM(salesorderdetails.quantity-salesorderdetails.qtyinvoiced) AS dem - FROM salesorderdetails INNER JOIN salesorders - ON salesorders.orderno = salesorderdetails.orderno - WHERE salesorders.fromstkloc='" . $_SESSION['Items'.$identifier]->Location . "' - AND salesorderdetails.completed=0 - AND salesorders.quotation=0 - AND salesorderdetails.stkcode='" . $myrow['stockid'] . "'"; + $sql = "SELECT serialno, + expirationdate, + quantity + FROM stockserialitems + WHERE stockid='" . $myrow['stockid'] ."' + AND loccode='".$_SESSION['Items'.$identifier]->Location."'"; + $ErrMsg = _('The batch details cannot be found'); + $BatchResult = db_query($sql,$db,$ErrMsg); - $ErrMsg = _('The demand for this product from') . ' ' . $_SESSION['Items'.$identifier]->Location . ' ' . _('cannot be retrieved because'); - $DemandResult = DB_query($sql,$db,$ErrMsg); - - $DemandRow = DB_fetch_row($DemandResult); - if ($DemandRow[0] != null){ - $DemandQty = $DemandRow[0]; - } else { - $DemandQty = 0; - } - - // Find the quantity on purchase orders - $sql = "SELECT SUM(purchorderdetails.quantityord-purchorderdetails.quantityrecd) AS QOO - FROM purchorderdetails INNER JOIN purchorders - WHERE purchorderdetails.completed=0 - AND purchorders.status <>'Cancelled' - AND purchorders.status <>'Rejected' - AND purchorderdetails.itemcode='" . $myrow['stockid'] . "'"; - - $ErrMsg = _('The order details for this product cannot be retrieved because'); - $PurchResult = db_query($sql,$db,$ErrMsg); - - $PurchRow = db_fetch_row($PurchResult); - if ($PurchRow[0]!=null){ - $PurchQty = $PurchRow[0]; - } else { - $PurchQty = 0; - } - - // Find the quantity on works orders - $sql = "SELECT SUM(woitems.qtyreqd - woitems.qtyrecd) AS dedm - FROM woitems - WHERE stockid='" . $myrow['stockid'] ."'"; - $ErrMsg = _('The order details for this product cannot be retrieved because'); - $WoResult = db_query($sql,$db,$ErrMsg); - - $WoRow = db_fetch_row($WoResult); - if ($WoRow[0]!=null){ - $WoQty = $WoRow[0]; - } else { - $WoQty = 0; - } - if ($k==1){ echo '<tr class="EvenTableRows">'; $k=0; @@ -2250,32 +2293,54 @@ echo '<tr class="OddTableRows">'; $k=1; } - $OnOrder = $PurchQty + $WoQty; - $Available = $QOH - $DemandQty + $OnOrder; - - printf('<td>%s</td> + if ($myrow['controlled']==0) { + printf('<td>%s</td> <td>%s</td> <td>%s</td> <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td><font size="1"><input class="number" tabindex="'.number_format($j+7).'" type="textbox" size="6" name="itm'.$myrow['stockid'].'" value="0" /> + <td><font size="1"><input class="number" tabindex="'.number_format($j+7).'" type="textbox" size="15" name="itm'.$myrow['stockid'].'" value="0" /> </font></td> </tr>', $myrow['stockid'], $myrow['description'], $myrow['units'], - number_format($QOH, $QOHRow['decimalplaces']), - number_format($DemandQty, $QOHRow['decimalplaces']), - number_format($OnOrder, $QOHRow['decimalplaces']), - number_format($Available, $QOHRow['decimalplaces']), - $ImageSource, - $rootpath, - SID, - $myrow['stockid']); - + number_format($QOH, $QOHRow['decimalplaces'])); + } else { + $LastStockID=''; + while ($BatchRow=DB_fetch_array($BatchResult)) { + if ($LastStockID!=$myrow['stockid']) { + printf('<td>%s</td> + <td>%s</td> + <td>%s</td> + <td class="number">%s</td>', + $myrow['stockid'], + $myrow['description'], + $myrow['units'], + number_format($QOH, $QOHRow['decimalplaces'])); + } else { + echo '<td colspan=4>'; + } + $FilteredBatchRow['serialno']=str_replace(' ', '~', trim($BatchRow['serialno'])); + printf('<td><font size="1"><input class="number" tabindex="'.number_format($j+7).'" type="textbox" size="15" + name="itm'.$myrow['stockid'].'batch'.$FilteredBatchRow['serialno'].'" value="0" /> + </font></td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + </tr>', + $BatchRow['serialno'], + number_format($BatchRow['quantity']/$myrow['conversionfactor'], $QOHRow['decimalplaces']), + ConvertSQLDate($BatchRow['expirationdate'])); + $LastStockID=$myrow['stockid']; + } +/* if (!isset($_POST['itm'.$myrow['stockid']])) { + $_POST['itm'.$myrow['stockid']]=0; + } + echo '<td class="number"><input type="HIDDEN" name=="itm'.$myrow['stockid'].'" value="'.$_POST['itm'.$myrow['stockid']].'"><a href="'.$rootpath. + '/ConfirmDispatchControlled_Counter.php?StockID='.$myrow['stockid'].'&Location='.$_SESSION['UserStockLocation'].'">'. + $_POST['itm'.$myrow['stockid']].'</a></td></tr>'; */ + } echo '<input type="hidden" name="Units' . $myrow['stockid'] . '" value="' . $myrow['units'] . '" />'; if ($j==1) { Modified: trunk/includes/SelectOrderItems_IntoCart.inc =================================================================== --- trunk/includes/SelectOrderItems_IntoCart.inc 2011-06-20 14:49:09 UTC (rev 5428) +++ trunk/includes/SelectOrderItems_IntoCart.inc 2011-06-20 15:11:04 UTC (rev 5429) @@ -41,6 +41,7 @@ stockmaster.discountcategory, stockmaster.decimalplaces, stockmaster.discontinued, + stockmaster.controlled, stockmaster.serialised, stockmaster.eoq, stockmaster.nextserialno, @@ -145,7 +146,7 @@ NULL, /*Actual Dispatch Date */ 0, /*Qty Invoiced */ $myItemRow['discountcategory'], - 0, /*Controlled - dont care */ + $myItemRow['controlled'], /*Controlled - dont care */ $myItemRow['serialised'], /* need to know for autocreation wos */ $myItemRow['decimalplaces'], $PriceDecimals, @@ -168,4 +169,4 @@ } } } /* end of if not already on the order */ -?> +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-06-30 16:01:01
|
Revision: 5477 http://weberp.svn.sourceforge.net/weberp/?rev=5477&view=rev Author: tim_schofield Date: 2011-06-30 16:00:54 +0000 (Thu, 30 Jun 2011) Log Message: ----------- Add in a decimal places field, and style changes Modified Paths: -------------- trunk/SuppTransGLAnalysis.php trunk/includes/DefineSuppTransClass.php Modified: trunk/SuppTransGLAnalysis.php =================================================================== --- trunk/SuppTransGLAnalysis.php 2011-06-30 16:00:30 UTC (rev 5476) +++ trunk/SuppTransGLAnalysis.php 2011-06-30 16:00:54 UTC (rev 5477) @@ -6,8 +6,6 @@ include('includes/DefineSuppTransClass.php'); -//$PageSecurity = 5; - /* Session started in header.inc for password checking and authorisation level check */ include('includes/session.inc'); @@ -17,7 +15,7 @@ if (!isset($_SESSION['SuppTrans'])){ prnMsg(_('To enter a supplier invoice or credit note the supplier must first be selected from the supplier selection screen') . ', ' . _('then the link to enter a supplier invoice or supplier credit note must be clicked on'),'info'); - echo '<br /><a href="' . $rootpath . '/SelectSupplier.php?">' . _('Select A Supplier') . '</a>'; + echo '<br /><a href="' . $rootpath . '/SelectSupplier.php">' . _('Select A Supplier') . '</a>'; include('includes/footer.inc'); exit; /*It all stops here if there aint no supplier selected and transaction initiated ie $_SESSION['SuppTrans'] started off*/ @@ -63,10 +61,10 @@ if ($InputError == False){ $_SESSION['SuppTrans']->Add_GLCodes_To_Trans($_POST['GLCode'], - $GLActName, - $_POST['Amount'], - $_POST['JobRef'], - $_POST['Narrative']); + $GLActName, + $_POST['Amount'], + $_POST['JobRef'], + $_POST['Narrative']); unset($_POST['GLCode']); unset($_POST['Amount']); unset($_POST['JobRef']); @@ -76,9 +74,16 @@ } if (isset($_GET['Delete'])){ - $_SESSION['SuppTrans']->Remove_GLCodes_From_Trans($_GET['Delete']); +} +if (isset($_GET['Edit'])){ + $_POST['GLCode'] = $_SESSION['SuppTrans']->GLCodes[$_GET['Edit']]->GLCode; + $_POST['AcctSelection']= $_SESSION['SuppTrans']->GLCodes[$_GET['Edit']]->GLCode; + $_POST['Amount'] = $_SESSION['SuppTrans']->GLCodes[$_GET['Edit']]->Amount; + $_POST['JobRef'] = $_SESSION['SuppTrans']->GLCodes[$_GET['Edit']]->JobRef; + $_POST['Narrative'] = $_SESSION['SuppTrans']->GLCodes[$_GET['Edit']]->Narrative; + $_SESSION['SuppTrans']->Remove_GLCodes_From_Trans($_GET['Edit']); } /*Show all the selected GLCodes so far from the SESSION['SuppInv']->GLCodes array */ @@ -89,14 +94,14 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('General Ledger') . '" alt="" />' . ' ' . _('General Ledger Analysis of Credit Note From') . ' ' . $_SESSION['SuppTrans']->SupplierName. '</p>'; } -echo '<table cellpadding=2 class=selection>'; +echo '<table cellpadding=2 class="selection">'; $TableHeader = '<tr> - <th>' . _('Account') . '</th> - <th>' . _('Name') . '</th> - <th>' . _('Amount') . '<br />' . _('in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th> - <th>' . _('Narrative') . '</th> - </tr>'; + <th>' . _('Account') . '</th> + <th>' . _('Name') . '</th> + <th>' . _('Amount') . '<br />' . _('in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th> + <th>' . _('Narrative') . '</th> + </tr>'; echo $TableHeader; $TotalGLValue=0; $i=0; @@ -106,8 +111,9 @@ echo '<tr> <td>' . $EnteredGLCode->GLCode . '</td> <td>' . $EnteredGLCode->GLActName . '</td> - <td class=number>' . number_format($EnteredGLCode->Amount,2) . '</td> + <td class=number>' . number_format($EnteredGLCode->Amount,$_SESSION['SuppTrans']->CurrDecimalPlaces) . '</td> <td>' . $EnteredGLCode->Narrative . '</td> + <td><a href="' . $_SERVER['PHP_SELF'] . '?Edit=' . $EnteredGLCode->Counter . '">' . _('Edit') . '</a></td> <td><a href="' . $_SERVER['PHP_SELF'] . '?Delete=' . $EnteredGLCode->Counter . '">' . _('Delete') . '</a></td> </tr>'; @@ -121,20 +127,20 @@ } echo '<tr> - <td colspan=2 class=number><font size=4 color=BLUE>' . _('Total') . ':</font></td> - <td class=number><font size=2 color=navy><U>' . number_format($TotalGLValue,2) . '</U></font></td> + <td colspan=2 class=number><font size=4 color=blue>' . _('Total') . ':</font></td> + <td class=number><font size=2 color=navy><u>' . number_format($TotalGLValue,$_SESSION['SuppTrans']->CurrDecimalPlaces) . '</u></font></td> </tr> </table>'; if ($_SESSION['SuppTrans']->InvoiceOrCredit == 'Invoice'){ - echo '<br /><a href="' . $rootpath . '/SupplierInvoice.php">' . _('Back to Invoice Entry') . '</a>'; + echo '<div class="centre"><br /><a href="' . $rootpath . '/SupplierInvoice.php">' . _('Back to Invoice Entry') . '</a></div>'; } else { - echo '<br /><a href="' . $rootpath . '/SupplierCredit.php">' . _('Back to Credit Note Entry') . '</a>'; + echo '<div class="centre"><br /><a href="' . $rootpath . '/SupplierCredit.php">' . _('Back to Credit Note Entry') . '</a></div>'; } /*Set up a form to allow input of new GL entries */ -echo '<form action="' . $_SERVER['PHP_SELF'] . '?' . SID . '" method="post">'; +echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br /><table class=selection>'; @@ -182,7 +188,7 @@ </tr> </table><br />'; -echo '<input type="submit" name="AddGLCodeToTrans" value="' . _('Enter GL Line') . '">'; +echo '<div class="centre"><input type="submit" name="AddGLCodeToTrans" value="' . _('Enter GL Line') . '"></div>'; echo '</form>'; include('includes/footer.inc'); Modified: trunk/includes/DefineSuppTransClass.php =================================================================== --- trunk/includes/DefineSuppTransClass.php 2011-06-30 16:00:30 UTC (rev 5476) +++ trunk/includes/DefineSuppTransClass.php 2011-06-30 16:00:54 UTC (rev 5477) @@ -20,6 +20,7 @@ var $CreditorsAct; var $InvoiceOrCredit; var $ExRate; + var $CurrDecimalPlaces; var $Comments; var $TranDate; var $DueDate; @@ -74,85 +75,90 @@ while ($myrow = DB_fetch_array($GetTaxRatesResult)){ $this->Taxes[$myrow['calculationorder']] = new Tax($myrow['calculationorder'], - $myrow['taxauthid'], - $myrow['description'], - $myrow['taxrate'], - $myrow['taxontax'], - $myrow['purchtaxglaccount']); + $myrow['taxauthid'], + $myrow['description'], + $myrow['taxrate'], + $myrow['taxontax'], + $myrow['purchtaxglaccount']); } } //end method GetTaxes() function Add_GRN_To_Trans($GRNNo, - $PODetailItem, - $ItemCode, - $ItemDescription, - $QtyRecd, - $Prev_QuantityInv, - $This_QuantityInv, - $OrderPrice, - $ChgPrice, - $Complete, - $StdCostUnit=0, - $ShiptRef, - $JobRef, - $GLCode, - $PONo, - $AssetID=0){ + $PODetailItem, + $ItemCode, + $ItemDescription, + $QtyRecd, + $Prev_QuantityInv, + $This_QuantityInv, + $OrderPrice, + $ChgPrice, + $Complete, + $StdCostUnit=0, + $ShiptRef, + $JobRef, + $GLCode, + $PONo, + $AssetID=0, + $DecimalPlaces=2){ if ($This_QuantityInv!=0 AND isset($This_QuantityInv)){ $this->GRNs[$GRNNo] = new GRNs($GRNNo, - $PODetailItem, - $ItemCode, - $ItemDescription, - $QtyRecd, - $Prev_QuantityInv, - $This_QuantityInv, - $OrderPrice, - $ChgPrice, - $Complete, - $StdCostUnit, - $ShiptRef, - $JobRef, - $GLCode, - $PONo, - $AssetID); + $PODetailItem, + $ItemCode, + $ItemDescription, + $QtyRecd, + $Prev_QuantityInv, + $This_QuantityInv, + $OrderPrice, + $ChgPrice, + $Complete, + $StdCostUnit, + $ShiptRef, + $JobRef, + $GLCode, + $PONo, + $AssetID, + $DecimalPlaces=2); Return 1; } Return 0; } function Modify_GRN_To_Trans($GRNNo, - $PODetailItem, - $ItemCode, - $ItemDescription, - $QtyRecd, - $Prev_QuantityInv, - $This_QuantityInv, - $OrderPrice, - $ChgPrice, - $Complete, - $StdCostUnit, - $ShiptRef, - $JobRef, - $GLCode, - $Hold){ + $PODetailItem, + $ItemCode, + $ItemDescription, + $QtyRecd, + $Prev_QuantityInv, + $This_QuantityInv, + $OrderPrice, + $ChgPrice, + $Complete, + $StdCostUnit=0, + $ShiptRef, + $JobRef, + $GLCode, + $Hold, + $PONo, + $AssetID=0, + $DecimalPlaces=2){ if ($This_QuantityInv!=0 && isset($This_QuantityInv)){ $this->GRNs[$GRNNo]->Modify($PODetailItem, - $ItemCode, - $ItemDescription, - $QtyRecd, - $Prev_QuantityInv, - $This_QuantityInv, - $OrderPrice, - $ChgPrice, - $Complete, - $StdCostUnit, - $ShiptRef, - $JobRef, - $GLCode, - $Hold ); + $ItemCode, + $ItemDescription, + $QtyRecd, + $Prev_QuantityInv, + $This_QuantityInv, + $OrderPrice, + $ChgPrice, + $Complete, + $StdCostUnit, + $ShiptRef, + $JobRef, + $GLCode, + $Hold ); Return 1; } Return 0; @@ -162,34 +168,38 @@ if ($GRNSrc->This_QuantityInv!=0 && isset($GRNSrc->This_QuantityInv)){ $this->GRNs[$GRNSrc->GRNNo] = new GRNs($GRNSrc->GRNNo, - $GRNSrc->PODetailItem, - $GRNSrc->ItemCode, - $GRNSrc->ItemDescription, - $GRNSrc->QtyRecd, - $GRNSrc->Prev_QuantityInv, - $GRNSrc->This_QuantityInv, - $GRNSrc->OrderPrice, - $GRNSrc->ChgPrice, - $GRNSrc->Complete, - $GRNSrc->StdCostUnit, - $GRNSrc->ShiptRef, - $GRNSrc->JobRef, - $GRNSrc->GLCode, - $GRNSrc->PONo, - $GRNSrc->AssetID, - $GRNSrc->Hold); + $GRNSrc->PODetailItem, + $GRNSrc->ItemCode, + $GRNSrc->ItemDescription, + $GRNSrc->QtyRecd, + $GRNSrc->Prev_QuantityInv, + $GRNSrc->This_QuantityInv, + $GRNSrc->OrderPrice, + $GRNSrc->ChgPrice, + $GRNSrc->Complete, + $GRNSrc->StdCostUnit, + $GRNSrc->ShiptRef, + $GRNSrc->JobRef, + $GRNSrc->GLCode, + $GRNSrc->PONo, + $GRNSrc->AssetID, + $GRNSrc->Hold, + $GRNSrc->DecimalPlaces); Return 1; } Return 0; } - function Add_GLCodes_To_Trans($GLCode, $GLActName, $Amount, $Narrative){ + function Add_GLCodes_To_Trans($GLCode, + $GLActName, + $Amount, + $Narrative){ if ($Amount!=0 AND isset($Amount)){ $this->GLCodes[$this->GLCodesCounter] = new GLCodes($this->GLCodesCounter, - $GLCode, - $GLActName, - $Amount, - $Narrative); + $GLCode, + $GLActName, + $Amount, + $Narrative); $this->GLCodesCounter++; Return 1; } @@ -199,8 +209,8 @@ function Add_Shipt_To_Trans($ShiptRef, $Amount){ if ($Amount!=0){ $this->Shipts[$this->ShiptCounter] = new Shipment($this->ShiptCounter, - $ShiptRef, - $Amount); + $ShiptRef, + $Amount); $this->ShiptCounter++; Return 1; } @@ -210,8 +220,8 @@ function Add_Asset_To_Trans($AssetID, $Amount){ if ($Amount!=0){ $this->Assets[$this->AssetCounter] = new Asset($this->AssetCounter, - $AssetID, - $Amount); + $AssetID, + $Amount); $this->AssetCounter++; Return 1; } @@ -221,10 +231,10 @@ function Add_Contract_To_Trans($ContractRef, $Amount,$Narrative, $AnticipatedCost){ if ($Amount!=0){ $this->Contracts[$this->ContractsCounter] = new Contract($this->ContractsCounter, - $ContractRef, - $Amount, - $Narrative, - $AnticipatedCost); + $ContractRef, + $Amount, + $Narrative, + $AnticipatedCost); $this->ContractsCounter++; Return 1; } @@ -272,24 +282,26 @@ var $PONo; var $Hold; var $AssetID; + var $DecimalPlaces; function GRNs ($GRNNo, - $PODetailItem, - $ItemCode, - $ItemDescription, - $QtyRecd, - $Prev_QuantityInv, - $This_QuantityInv, - $OrderPrice, - $ChgPrice, - $Complete, - $StdCostUnit=0, - $ShiptRef, - $JobRef, - $GLCode, - $PONo, - $AssetID, - $Hold=0){ + $PODetailItem, + $ItemCode, + $ItemDescription, + $QtyRecd, + $Prev_QuantityInv, + $This_QuantityInv, + $OrderPrice, + $ChgPrice, + $Complete, + $StdCostUnit=0, + $ShiptRef, + $JobRef, + $GLCode, + $PONo, + $AssetID, + $Hold=0, + $DecimalPlaces=2){ /* Constructor function to add a new GRNs object with passed params */ @@ -310,6 +322,7 @@ $this->PONo = $PONo; $this->AssetID = $AssetID; $this->Hold = $Hold; + $this->DecimalPlaces = $DecimalPlaces; } function Modify ($PODetailItem, @@ -353,14 +366,14 @@ Var $Amount; Var $Narrative; - function GLCodes ($Counter, $GLCode, $GLActName, $Amount, $Narrative){ + function GLCodes ($Counter, $GLCode, $GLActName, $Amount, $Narrative){ /* Constructor function to add a new GLCodes object with passed params */ $this->Counter = $Counter; $this->GLCode = $GLCode; $this->GLActName = $GLActName; $this->Amount = $Amount; - $this->Narrative= $Narrative; + $this->Narrative = $Narrative; } } @@ -392,10 +405,10 @@ $this->Amount = $Amount; $result = DB_query("SELECT fixedassets.description, - fixedassetcategories.costact - FROM fixedassets INNER JOIN fixedassetcategories - ON fixedassets.assetcategoryid=fixedassetcategories.categoryid - WHERE assetid='" . $AssetID . "'",$db); + fixedassetcategories.costact + FROM fixedassets INNER JOIN fixedassetcategories + ON fixedassets.assetcategoryid=fixedassetcategories.categoryid + WHERE assetid='" . $AssetID . "'",$db); $AssetRow = DB_fetch_array($result); $this->Description = $AssetRow['description']; $this->CostAct = $AssetRow['costact']; @@ -430,11 +443,11 @@ Var $TaxOvAmount; function Tax ($TaxCalculationOrder, - $TaxAuthID, - $TaxAuthDescription, - $TaxRate, - $TaxOnTax, - $TaxGLCode){ + $TaxAuthID, + $TaxAuthDescription, + $TaxRate, + $TaxOnTax, + $TaxGLCode){ $this->TaxCalculationOrder = $TaxCalculationOrder; $this->TaxAuthID = $TaxAuthID; @@ -444,4 +457,5 @@ $this->TaxGLCode = $TaxGLCode; } } -?> + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-01 11:21:17
|
Revision: 5489 http://weberp.svn.sourceforge.net/weberp/?rev=5489&view=rev Author: tim_schofield Date: 2011-07-01 11:21:11 +0000 (Fri, 01 Jul 2011) Log Message: ----------- New field in Salesman table Modified Paths: -------------- trunk/SalesPeople.php trunk/includes/session.inc Added Paths: ----------- trunk/sql/mysql/updates/86.php Modified: trunk/SalesPeople.php =================================================================== --- trunk/SalesPeople.php 2011-07-01 11:20:55 UTC (rev 5488) +++ trunk/SalesPeople.php 2011-07-01 11:21:11 UTC (rev 5489) @@ -1,8 +1,6 @@ <?php -/* $Id$*/ +/* $Id: SalesPeople.php 4591 2011-06-09 10:33:38Z daintree $*/ -//$PageSecurity = 3; - include('includes/session.inc'); $title = _('Sales People Maintenance'); include('includes/header.inc'); @@ -78,6 +76,9 @@ if (!isset($_POST['Breakpoint'])){ $_POST['Breakpoint']=0; } + if (!isset($_POST['Current'])){ + $_POST['Current']=0; + } if (isset($SelectedSaleperson) AND $InputError !=1) { @@ -88,7 +89,8 @@ smantel='" . $_POST['SManTel'] . "', smanfax='" . $_POST['SManFax'] . "', breakpoint='" . $_POST['Breakpoint'] . "', - commissionrate2='" . $_POST['CommissionRate2'] . "' + commissionrate2='" . $_POST['CommissionRate2'] . "', + current='" . $_POST['Current'] . "' WHERE salesmancode = '".$SelectedSaleperson."'"; $msg = _('Salesperson record for') . ' ' . $_POST['SalesmanName'] . ' ' . _('has been updated'); @@ -102,14 +104,16 @@ commissionrate2, breakpoint, smantel, - smanfax) + smanfax, + current) VALUES ('" . $_POST['SalesmanCode'] . "', '" . $_POST['SalesmanName'] . "', '" . $_POST['CommissionRate1'] . "', '" . $_POST['CommissionRate2'] . "', '" . $_POST['Breakpoint'] . "', '" . $_POST['SManTel'] . "', - '" . $_POST['SManFax'] . "' + '" . $_POST['SManFax'] . "', + '" . $_POST['Current'] . "' )"; $msg = _('A new salesperson record has been added for') . ' ' . $_POST['SalesmanName']; @@ -130,6 +134,7 @@ unset($_POST['Breakpoint']); unset($_POST['SManFax']); unset($_POST['SManTel']); + unset($_POST['Current']); } } elseif (isset($_GET['delete'])) { @@ -176,7 +181,8 @@ smanfax, commissionrate1, breakpoint, - commissionrate2 + commissionrate2, + current FROM salesman"; $result = DB_query($sql,$db); @@ -187,7 +193,8 @@ <th>' . _('Facsimile') . '</th> <th>' . _('Comm Rate 1') . '</th> <th>' . _('Break') . '</th> - <th>' . _('Comm Rate 2') . '</th></tr>'; + <th>' . _('Comm Rate 2') . '</th> + <th>' . _('Current') . '</th></tr>'; $k=0; while ($myrow=DB_fetch_row($result)) { @@ -198,6 +205,7 @@ echo '<tr class="OddTableRows">'; $k++; } + if ($myrow[7] == 1) $ActiveText = _("Yes"); else $ActiveText = _("No"); printf(' <td>%s</td> @@ -207,6 +215,7 @@ <td class=number>%s</td> <td class=number>%s</td> <td class=number>%s</td> + <td>%s</td> <td><a href="%sSelectedSaleperson=%s">'. _('Edit') . '</a></td> <td><a href="%sSelectedSaleperson=%s&delete=1">' . _('Delete') . '</a></td> </tr>', @@ -217,6 +226,7 @@ $myrow[4], $myrow[5], $myrow[6], + $ActiveText, $_SERVER['PHP_SELF'] . '?' . SID . '&', $myrow[0], $_SERVER['PHP_SELF'] . '?' . SID . '&', @@ -244,7 +254,8 @@ smanfax, commissionrate1, breakpoint, - commissionrate2 + commissionrate2, + current FROM salesman WHERE salesmancode='".$SelectedSaleperson."'"; @@ -258,6 +269,7 @@ $_POST['CommissionRate1'] = $myrow['commissionrate1']; $_POST['Breakpoint'] = $myrow['breakpoint']; $_POST['CommissionRate2'] = $myrow['commissionrate2']; + $_POST['Current'] = $myrow['current']; echo '<input type=hidden name="SelectedSaleperson" value="' . $SelectedSaleperson . '">'; @@ -288,8 +300,10 @@ if (!isset($_POST['Breakpoint'])){ $_POST['Breakpoint']=0; } + if (!isset($_POST['Current'])){ + $_POST['Current']=0; + } - echo '<tr><td>' . _('Salesperson Name') . ':</td><td><input type="text" '. (in_array('SalesmanName',$Errors) ? 'class="inputerror"' : '' ) .' name="SalesmanName" size=30 maxlength=30 value="' . $_POST['SalesmanName'] . '"></td></tr>'; echo '<tr><td>' . _('Telephone No') . ':</td><td><input type="text" name="SManTel" size=20 maxlength=20 value="' . $_POST['SManTel'] . '"></td></tr>'; echo '<tr><td>' . _('Facsimile No') . ':</td><td><input type="text" name="SManFax" size=20 maxlength=20 value="' . $_POST['SManFax'] . '"></td></tr>'; @@ -297,6 +311,19 @@ echo '<tr><td>' . _('Breakpoint') . ':</td><td><input type="text" class=number name="Breakpoint" size=6 maxlength=6 value="' . $_POST['Breakpoint'] . '"></td></tr>'; echo '<tr><td>' . _('Commission Rate 2') . ':</td><td><input type="text" class=number name="CommissionRate2" size=5 maxlength=5 value="' . $_POST['CommissionRate2']. '"></td></tr>'; + echo '<tr><td>' . _('Current?') . ':</td><td><select name="Current">'; + if ($_POST['Current']==1){ + echo '<option selected value=1>' . _('Yes') . '</option>'; + } else { + echo '<option value=1>' . _('Yes') . '</option>'; + } + if ($_POST['Current']==0){ + echo '<option selected value=0>' . _('No') . '</option>'; + } else { + echo '<option value=0>' . _('No') . '</option>'; + } + echo '</select></td></tr>'; + echo '</table>'; echo '<br /><div class="centre"><input type="Submit" name="submit" value="' . _('Enter Information') . '"></div>'; Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-07-01 11:20:55 UTC (rev 5488) +++ trunk/includes/session.inc 2011-07-01 11:21:11 UTC (rev 5489) @@ -13,7 +13,7 @@ header('Location:' . $rootpath . '/install/index.php'); } include($PathPrefix . 'config.php'); -$DBVersion=85; +$DBVersion=86; if (isset($SessionSavePath)){ session_save_path($SessionSavePath); } Added: trunk/sql/mysql/updates/86.php =================================================================== --- trunk/sql/mysql/updates/86.php (rev 0) +++ trunk/sql/mysql/updates/86.php 2011-07-01 11:21:11 UTC (rev 5489) @@ -0,0 +1,7 @@ +<?php + +AddColumn('current', 'salesman', 'tinyint(4)', 'NOT NULL', '1', 'commissionrate2', $db); + +UpdateDBNo(86, $db); + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-01 14:54:56
|
Revision: 5498 http://weberp.svn.sourceforge.net/weberp/?rev=5498&view=rev Author: tim_schofield Date: 2011-07-01 14:54:49 +0000 (Fri, 01 Jul 2011) Log Message: ----------- Change the layout of the code and decimal places for currencies Modified Paths: -------------- trunk/Z_CheckDebtorsControl.php trunk/includes/GetConfig.php Modified: trunk/Z_CheckDebtorsControl.php =================================================================== --- trunk/Z_CheckDebtorsControl.php 2011-07-01 14:54:37 UTC (rev 5497) +++ trunk/Z_CheckDebtorsControl.php 2011-07-01 14:54:49 UTC (rev 5498) @@ -1,6 +1,5 @@ <?php /* $Id$*/ -//$PageSecurity=15; include('includes/session.inc'); $title=_('Debtors Control Integrity'); @@ -10,20 +9,15 @@ // //========[ SHOW OUR FORM ]=========== // - + echo '<a href="'. $rootpath . '/index.php?&Application=AR">' . _('Back to Customers') . '</a>'; // Page Border - echo '<table border=1 width=100%><tr><td bgcolor="#FFFFFF">'; - echo '<form method="post" action=' . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Purchase') . '" alt="" />' . ' ' . $title . '</p>'; + echo '<table class="selection">'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; // Context Navigation and Title - echo '<table width=100%> - <td width=37% align=left><a href="'. $rootpath . '/index.php?&Application=AR'. SID .'">' . _('Back to Customers') . '</a></td> - <td align=left><font size=4 color=blue><u><b>' . _('Debtors Control Integrity') . '</b></u></font></td> - </table><br />'; - echo '<table border=1>'; //Main table - echo '<td><table>'; // First column $DefaultFromPeriod = ( !isset($_POST['FromPeriod']) OR $_POST['FromPeriod']=='' ) ? 1 : $_POST['FromPeriod']; @@ -38,33 +32,32 @@ $DefaultToPeriod = $_POST['ToPeriod']; } - echo '<tr><td>' . _('Start Period:') . '</td><td><select name="FromPeriod">'; - $toSelect = '<tr><td>' . _('End Period:') .'</td><td><select name="ToPeriod">'; + echo '<tr> + <td>' . _('Start Period:') . '</td> + <td><select name="FromPeriod">'; + $ToSelect = '<tr> + <td>' . _('End Period:') .'</td> + <td><select name="ToPeriod">'; $SQL = "SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno"; - $perResult = DB_query($SQL,$db); + $PerResult = DB_query($SQL,$db); - while ( $perRow=DB_fetch_array($perResult) ) - { - $fromSelected = ( $perRow['periodno'] == $DefaultFromPeriod ) ? 'selected' : ''; - echo '<option ' . $fromSelected . ' value="' . $perRow['periodno'] . '">' .MonthAndYearFromSQLDate($perRow['lastdate_in_period']) . '</option>'; + while ( $PerRow=DB_fetch_array($PerResult) ) { + $FromSelected = ( $PerRow['periodno'] == $DefaultFromPeriod ) ? 'selected' : ''; + echo '<option ' . $FromSelected . ' value="' . $PerRow['periodno'] . '">' .MonthAndYearFromSQLDate($PerRow['lastdate_in_period']) . '</option>'; - $toSelected = ( $perRow['periodno'] == $DefaultToPeriod ) ? 'selected' : ''; - $toSelect .= '<option ' . $toSelected . ' value="' . $perRow['periodno'] . '">' . MonthAndYearFromSQLDate($perRow['lastdate_in_period']) . '</option>'; + $ToSelected = ( $PerRow['periodno'] == $DefaultToPeriod ) ? 'selected' : ''; + $ToSelect .= '<option ' . $ToSelected . ' value="' . $PerRow['periodno'] . '">' . MonthAndYearFromSQLDate($PerRow['lastdate_in_period']) . '</option>'; } - DB_free_result($perResult); + DB_free_result($PerResult); echo '</select></td></tr>'; - echo '</table></td>'; // End First column - echo '<td><table>'; // Start Second column - echo $toSelect . '</select></td></tr>'; + echo $ToSelect . '</select></td></tr></table>'; - echo '</table></td>'; // End Second column - echo '</table>'; //End the main table - echo '<br /><input type=submit name="Show" value="'._('Accept'). '">'; - echo '<input type=submit action=reset value="' . _('Cancel') .'">'; + echo '<br /><div class="centre"><input type=submit name="Show" value="'._('Accept'). '">'; + echo '<input type=submit action=reset value="' . _('Cancel') .'"></div>'; if ( isset($_POST['Show']) ) @@ -72,7 +65,7 @@ // //========[ SHOW SYNOPSYS ]=========== // - echo '<br /><table border=1>'; + echo '<br /><table class="selection">'; echo '<tr> <th>' . _('Period') . '</th> <th>' . _('Bal B/F in GL') . '</th> @@ -83,23 +76,23 @@ <th>' . _('Difference') . '</th> </tr>'; - $curPeriod = $_POST['FromPeriod']; - $glOpening = $invTotal = $recTotal = $glClosing = $calcTotal = $difTotal = 0; + $CurPeriod = $_POST['FromPeriod']; + $GLOpening = $InvTotal = $RecTotal = $GLClosing = $CalcTotal = $DiffTotal = 0; $j=0; - - while ( $curPeriod <= $_POST['ToPeriod'] ) + $Diff=0; + while ( $CurPeriod <= $_POST['ToPeriod'] ) { $SQL = "SELECT bfwd, actual FROM chartdetails - WHERE period = " . $curPeriod . " + WHERE period = " . $CurPeriod . " AND accountcode=" . $_SESSION['CompanyRecord']['debtorsact']; - $dtResult = DB_query($SQL,$db); - $dtRow = DB_fetch_array($dtResult); - DB_free_result($dtResult); + $DTResult = DB_query($SQL,$db); + $DTRow = DB_fetch_array($DTResult); + DB_free_result($DTResult); - $glOpening += $dtRow['bfwd']; - $glMovement = $dtRow['bfwd'] + $dtRow['actual']; + $GLOpening += $DTRow['bfwd']; + $GLMovement = $DTRow['bfwd'] + $DTRow['actual']; if ($j==1) { echo '<tr class="OddTableRows">'; @@ -108,58 +101,58 @@ echo '<tr class="EvenTableRows">'; $j++; } - echo '<td>' . $curPeriod . '</td> - <td class=number>' . number_format($dtRow['bfwd'],2) . '</td>'; + echo '<td>' . $CurPeriod . '</td> + <td class=number>' . number_format($DTRow['bfwd'],2) . '</td>'; $SQL = "SELECT SUM((ovamount+ovgst+ovdiscount)*rate) AS totinvnetcrds FROM debtortrans - WHERE prd = " . $curPeriod . " + WHERE prd = " . $CurPeriod . " AND (type=10 OR type=11)"; - $invResult = DB_query($SQL,$db); - $invRow = DB_fetch_array($invResult); - DB_free_result($invResult); + $InvResult = DB_query($SQL,$db); + $InvRow = DB_fetch_array($InvResult); + DB_free_result($InvResult); - $invTotal += $invRow['totinvnetcrds']; + $InvTotal += $InvRow['totinvnetcrds']; - echo '<td class=number>' . number_format($invRow['totinvnetcrds'],2) . '</td>'; + echo '<td class=number>' . number_format($InvRow['totinvnetcrds'],2) . '</td>'; $SQL = "SELECT SUM((ovamount+ovgst+ovdiscount)*rate) AS totreceipts FROM debtortrans - WHERE prd = " . $curPeriod . " + WHERE prd = " . $CurPeriod . " AND type=12"; - $recResult = DB_query($SQL,$db); - $recRow = DB_fetch_array($recResult); - DB_free_result($recResult); + $RecResult = DB_query($SQL,$db); + $RecRow = DB_fetch_array($RecResult); + DB_free_result($RecResult); - $recTotal += $recRow['totreceipts']; - $calcMovement = $dtRow['bfwd'] + $invRow['totinvnetcrds'] + $recRow['totreceipts']; + $RecTotal += $RecRow['totreceipts']; + $CalcMovement = $DTRow['bfwd'] + $InvRow['totinvnetcrds'] + $RecRow['totreceipts']; - echo '<td class=number>' . number_format($recRow['totreceipts'],2) . '</td>'; + echo '<td class=number>' . number_format($RecRow['totreceipts'],2) . '</td>'; - $glClosing += $glMovement; - $calcTotal += $calcMovement; - $difTotal += $diff; + $GLClosing += $GLMovement; + $CalcTotal += $CalcMovement; + $DiffTotal += $Diff; - $diff = ( $dtRow['bfwd'] == 0 ) ? 0 : round($glMovement,2) - round($calcMovement,2); - $color = ( $diff == 0 OR $dtRow['bfwd'] == 0 ) ? 'green' : 'red'; + $Diff = ( $DTRow['bfwd'] == 0 ) ? 0 : round($GLMovement,2) - round($CalcMovement,2); + $Color = ( $Diff == 0 OR $DTRow['bfwd'] == 0 ) ? 'green' : 'red'; - echo '<td class=number>' . number_format($glMovement,2) . '</td> - <td class=number>' . number_format(($calcMovement),2) . '</td> - <td class=number bgcolor=white><font color="' . $color . '">' . number_format($diff,2) . '</font></td> + echo '<td class=number>' . number_format($GLMovement,2) . '</td> + <td class=number>' . number_format(($CalcMovement),2) . '</td> + <td class=number bgcolor=white><font color="' . $Color . '">' . number_format($Diff,2) . '</font></td> </tr>'; - $curPeriod++; + $CurPeriod++; } - $difColor = ( $difTotal == 0 ) ? 'green' : 'red'; + $DiffColor = ( $DiffTotal == 0 ) ? 'green' : 'red'; echo '<tr bgcolor=white> <td>' . _('Total') . '</td> - <td class=number>' . number_format($glOpening,2) . '</td> - <td class=number>' . number_format($invTotal,2) . '</td> - <td class=number>' . number_format($recTotal,2) . '</td> - <td class=number>' . number_format($glClosing,2) . '</td> - <td class=number>' . number_format($calcTotal,2) . '</td> - <td class=number><font color="' . $difColor . '">' . number_format($difTotal,2) . '</font></td> + <td class=number>' . number_format($GLOpening,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class=number>' . number_format($InvTotal,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class=number>' . number_format($RecTotal,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class=number>' . number_format($GLClosing,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class=number>' . number_format($CalcTotal,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class=number><font color="' . $DiffColor . '">' . number_format($DiffTotal,$_SESSION['CompanyRecord']['decimalplaces']) . '</font></td> </tr>'; echo '</table></form>'; } Modified: trunk/includes/GetConfig.php =================================================================== --- trunk/includes/GetConfig.php 2011-07-01 14:54:37 UTC (rev 5497) +++ trunk/includes/GetConfig.php 2011-07-01 14:54:49 UTC (rev 5498) @@ -38,6 +38,14 @@ $_SESSION['DBUpdateNumber']=-1; header('Location: Z_UpgradeDatabase.php'); //divert to the db upgrade if the VersionNumber is not in the config table } + /* + check the decimalplaces field exists in currencies - this was added in 4.0 but is required in 4.04 as it is used everywhere as the default decimal places to show on all home currency amounts + */ + $result = DB_query("SELECT decimalplaces FROM currencies",$db,'','',false,false); + if (DB_error_no($db)!=0) { //then decimalplaces not already a field in currencies + $result = DB_query("ALTER TABLE `currencies` + ADD COLUMN `decimalplaces` tinyint(3) NOT NULL DEFAULT 2 AFTER `hundredsname`",$db); + } /* Also reads all the company data set up in the company record and returns an array */ @@ -64,9 +72,11 @@ freightact, gllink_debtors, gllink_creditors, - gllink_stock + gllink_stock, + decimalplaces FROM companies - WHERE coycode=1"; + INNER JOIN currencies ON companies.currencydefault=currencies.currabrev + WHERE coycode=1"; $ErrMsg = _('An error occurred accessing the database to retrieve the company information'); $ReadCoyResult = DB_query($sql,$db,$ErrMsg); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-02 22:09:29
|
Revision: 5530 http://weberp.svn.sourceforge.net/weberp/?rev=5530&view=rev Author: tim_schofield Date: 2011-07-02 22:09:23 +0000 (Sat, 02 Jul 2011) Log Message: ----------- Change the layout of the code and alter the name of field to keep code in line Modified Paths: -------------- trunk/PaymentMethods.php trunk/Payments.php trunk/includes/session.inc Modified: trunk/PaymentMethods.php =================================================================== --- trunk/PaymentMethods.php 2011-07-02 22:09:04 UTC (rev 5529) +++ trunk/PaymentMethods.php 2011-07-02 22:09:23 UTC (rev 5530) @@ -2,8 +2,6 @@ /* $Revision: 1.9 $ */ /* $Id$*/ -//$PageSecurity = 15; - include('includes/session.inc'); $title = _('Payment Methods'); @@ -73,17 +71,9 @@ SET paymentname='" . $_POST['MethodName'] . "', paymenttype = '" . $_POST['ForPayment'] . "', receipttype = '" . $_POST['ForReceipt'] . "', - forpreprint = '" . $_POST['ForPreprint']. "' - WHERE paymentname LIKE '".$OldName."'"; + usepreprintedstationery = '" . $_POST['UsePrePrintedStationery']. "' + WHERE paymentname " . LIKE . " '".$OldName."'"; - /* lets leave well alone existing entries - if ($_POST['MethodName'] != $OldMeasureName ) { - // Less work if not required this could take a while. - $sql = "UPDATE banktrans - SET banktranstype='" . $_POST['MethodName'] . "' - WHERE banktranstype ".LIKE." '" . $OldMeasureName . "'"; - } - */ } else { $InputError = 1; prnMsg( _('The payment method no longer exists.'),'error'); @@ -105,12 +95,12 @@ paymentname, paymenttype, receipttype, - forpreprint) + usepreprintedstationery) VALUES ( '" . $_POST['MethodName'] ."', '" . $_POST['ForPayment'] ."', '" . $_POST['ForReceipt'] ."', - '" . $_POST['ForPreprint'] ."' + '" . $_POST['UsePrePrintedStationery'] ."' )"; } $msg = _('Record inserted'); @@ -127,7 +117,7 @@ unset ($_POST['MethodName']); unset ($_POST['ForPayment']); unset ($_POST['ForReceipt']); - unset ($_POST['ForPreprint']); + unset ($_POST['UsePrePrintedStationery']); } elseif (isset($_GET['delete'])) { //the link to delete a selected record was clicked instead of the submit button @@ -149,7 +139,7 @@ prnMsg( _('Cannot delete this payment method because bank transactions have been created using this payment method'),'warn'); echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('bank transactions that refer to this payment method') . '</font>'; } else { - $sql="DELETE FROM paymentmethods WHERE paymentname LIKE '" . $OldMeasureName . "'"; + $sql="DELETE FROM paymentmethods WHERE paymentname " . LIKE . " '" . $OldMeasureName . "'"; $result = DB_query($sql,$db); prnMsg( $OldMeasureName . ' ' . _('payment method has been deleted') . '!','success'); echo '<br />'; @@ -179,7 +169,7 @@ paymentname, paymenttype, receipttype, - forpreprint + usepreprintedstationery FROM paymentmethods ORDER BY paymentid"; @@ -205,13 +195,13 @@ $k++; } - echo '<td>' . $myrow['paymentname'] . '</td>'; - echo '<td>' . ($myrow['paymenttype'] ? _('Yes') : _('No')) . '</td>'; - echo '<td>' . ($myrow['receipttype'] ? _('Yes') : _('No')) . '</td>'; - echo '<td>' . ($myrow['forpreprint'] ? _('Yes') : _('No')) . '</td>'; - echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '&SelectedPaymentID=' . $myrow['paymentid'] . '">' . _('Edit') . '</a></td>'; - echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '&SelectedPaymentID=' . $myrow['paymentid'] . '&delete=1">' . _('Delete') .'</a></td>'; - echo '</tr>'; + echo '<td>' . $myrow['paymentname'] . '</td> + <td>' . ($myrow['paymenttype'] ? _('Yes') : _('No')) . '</td> + <td>' . ($myrow['receipttype'] ? _('Yes') : _('No')) . '</td> + <td>' . ($myrow['usepreprintedstationery'] ? _('Yes') : _('No')) . '</td> + <td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedPaymentID=' . $myrow['paymentid'] . '">' . _('Edit') . '</a></td> + <td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedPaymentID=' . $myrow['paymentid'] . '&delete=1">' . _('Delete') .'</a></td> + </tr>'; } //END WHILE LIST LOOP echo '</table><br />'; @@ -236,7 +226,7 @@ paymentname, paymenttype, receipttype, - forpreprint + usepreprintedstationery FROM paymentmethods WHERE paymentid='" . $SelectedPaymentID . "'"; @@ -251,41 +241,42 @@ $_POST['MethodName'] = $myrow['paymentname']; $_POST['ForPayment'] = $myrow['paymenttype']; $_POST['ForReceipt'] = $myrow['receipttype']; - $_POST['ForPreprint'] = $myrow['forpreprint']; + $_POST['UsePrePrintedStationery'] = $myrow['usepreprintedstationery']; - echo '<input type=hidden name="SelectedPaymentID" value="' . $_POST['MethodID'] . '">'; - echo '<table class=selection>'; + echo '<input type="hidden" name="SelectedPaymentID" value="' . $_POST['MethodID'] . '">'; + echo '<table class="selection">'; } } else { $_POST['MethodName']=''; $_POST['ForPayment'] = 1; // Default is use for payment $_POST['ForReceipt'] = 1; // Default is use for receipts - $_POST['ForPreprint'] = 0; // Default is use for receipts + $_POST['UsePrePrintedStationery'] = 0; // Default is use for receipts echo '<table class=selection>'; } echo '<tr> <td>' . _('Payment Method') . ':' . '</td> - <td><input type="text" '. (in_array('MethodName',$Errors) ? 'class="inputerror"' : '' ) .' name="MethodName" size=30 maxlength=30 value="' . $_POST['MethodName'] . '"></td> + <td><input type="text" '. (in_array('MethodName',$Errors) ? 'class="inputerror"' : '' ) .' name="MethodName" size="30" maxlength="30" value="' . $_POST['MethodName'] . '"></td> </tr>'; echo '<tr> <td>' . _('Use For Payments') . ':' . '</td> - <td><select name="ForPayment">'; - echo '<option'.($_POST['ForPayment'] ? ' selected' : '') .' value="1">' . _('Yes') . '</option>'; - echo '<option'.($_POST['ForPayment'] ? '' : ' selected') .' value="0">' . _('No') . '</option>'; - echo '</select></td></tr>'; + <td><select name="ForPayment"> + <option' . ($_POST['ForPayment'] ? ' selected' : '') .' value="1">' . _('Yes') . '</option> + <option' . ($_POST['ForPayment'] ? '' : ' selected') .' value="0">' . _('No') . '</option> + </select></td> + </tr>'; echo '<tr> <td>' . _('Use For Receipts') . ':' . '</td> - <td><select name="ForReceipt">'; - echo '<option'.($_POST['ForReceipt'] ? ' selected' : '') .' value="1">' . _('Yes') . '</option>'; - echo '<option'.($_POST['ForReceipt'] ? '' : ' selected') .' value="0">' . _('No') . '</option>'; - echo '</select></td></tr>'; + <td><select name="ForReceipt"> + <option' . ($_POST['ForReceipt'] ? ' selected' : '') .' value="1">' . _('Yes') . '</option> + <option' . ($_POST['ForReceipt'] ? '' : ' selected') .' value="0">' . _('No') . '</option> + </select></td></tr>'; echo '<tr> <td>' . _('Use Pre-printed Stationery') . ':' . '</td> - <td><select name="ForPreprint">'; - echo '<option'.($_POST['ForPreprint'] ? ' selected' : '') .' value="1">' . _('Yes') . '</option>'; - echo '<option'.($_POST['ForPreprint'] ? '' : ' selected') .' value="0">' . _('No') . '</option>'; - echo '</select></td></tr>'; + <td><select name="UsePrePrintedStationery"> + <option' . ($_POST['UsePrePrintedStationery'] ? ' selected': '' ) .' value="1">' . _('Yes') . '</option> + <option' . ($_POST['UsePrePrintedStationery']==1 ? '' : ' selected' ) .' value="0">' . _('No') . '</option> + </select></td></tr>'; echo '</table>'; Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2011-07-02 22:09:04 UTC (rev 5529) +++ trunk/Payments.php 2011-07-02 22:09:23 UTC (rev 5530) @@ -246,7 +246,7 @@ $PeriodNo = GetPeriod($_SESSION['PaymentDetail']->DatePaid,$db); - $sql="SELECT forpreprint + $sql="SELECT usepreprintedstationery FROM paymentmethods WHERE paymentname='" . $_SESSION['PaymentDetail']->Paymenttype ."'"; $result=DB_query($sql, $db); Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-07-02 22:09:04 UTC (rev 5529) +++ trunk/includes/session.inc 2011-07-02 22:09:23 UTC (rev 5530) @@ -13,7 +13,7 @@ header('Location:' . $rootpath . '/install/index.php'); } include($PathPrefix . 'config.php'); -$DBVersion=86; +$DBVersion=87; if (isset($SessionSavePath)){ session_save_path($SessionSavePath); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-03 15:28:28
|
Revision: 5536 http://weberp.svn.sourceforge.net/weberp/?rev=5536&view=rev Author: tim_schofield Date: 2011-07-03 15:28:17 +0000 (Sun, 03 Jul 2011) Log Message: ----------- Add in chequeno field to banktrans table Modified Paths: -------------- trunk/includes/session.inc Added Paths: ----------- trunk/sql/mysql/updates/88.php Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-07-03 13:36:33 UTC (rev 5535) +++ trunk/includes/session.inc 2011-07-03 15:28:17 UTC (rev 5536) @@ -13,7 +13,7 @@ header('Location:' . $rootpath . '/install/index.php'); } include($PathPrefix . 'config.php'); -$DBVersion=87; +$DBVersion=88; if (isset($SessionSavePath)){ session_save_path($SessionSavePath); } Added: trunk/sql/mysql/updates/88.php =================================================================== --- trunk/sql/mysql/updates/88.php (rev 0) +++ trunk/sql/mysql/updates/88.php 2011-07-03 15:28:17 UTC (rev 5536) @@ -0,0 +1,7 @@ +<?php + +AddColumn('chequeno', 'banktrans', 'int( 11 )', 'NOT NULL', '0', 'ref', $db); + +UpdateDBNo(88, $db); + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-04 10:57:09
|
Revision: 5548 http://weberp.svn.sourceforge.net/weberp/?rev=5548&view=rev Author: tim_schofield Date: 2011-07-04 10:56:58 +0000 (Mon, 04 Jul 2011) Log Message: ----------- strtoupper to mb_strtoupper Modified Paths: -------------- trunk/Areas.php trunk/BOMExtendedQty.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/BOMInquiry.php trunk/Contracts.php trunk/CounterSales.php trunk/Currencies.php trunk/CustWhereAlloc.php trunk/CustomerBranches.php trunk/CustomerTypes.php trunk/Customers.php trunk/DiscountCategories.php trunk/Factors.php trunk/FixedAssetCategories.php trunk/FixedAssetItems.php trunk/FixedAssetLocations.php trunk/GLJournal.php trunk/GetStockImage.php trunk/Locations.php trunk/MRPCalendar.php trunk/MRPDemandTypes.php trunk/MRPDemands.php trunk/MRPPlannedWorkOrders.php trunk/MRPReport.php trunk/Manufacturers.php trunk/Numbers/Words/lang.dk.php trunk/Numbers/Words/lang.en_GB.php trunk/Numbers/Words/lang.en_US.php trunk/Numbers/Words/lang.es_AR.php trunk/Numbers/Words/lang.he.php trunk/Numbers/Words/lang.hu_HU.php trunk/Numbers/Words/lang.pl.php trunk/Numbers/Words/lang.pt_BR.php trunk/Numbers/Words/lang.ru.php trunk/OutstandingGRNs.php trunk/PDFQuotationPortrait.php trunk/PDFStockNegatives.php trunk/POReport.php trunk/PO_Items.php trunk/PcAssignCashToTab.php trunk/PcAuthorizeExpenses.php trunk/PcClaimExpensesFromTab.php trunk/PcExpenses.php trunk/PcExpensesTypeTab.php trunk/PcReportTab.php trunk/PcTabs.php trunk/PcTypeTabs.php trunk/Prices.php trunk/PrintCustStatements.php trunk/PrintSalesOrder_generic.php trunk/PurchData.php trunk/SalesCategories.php trunk/SalesInquiry.php trunk/SalesPeople.php trunk/SalesTypes.php trunk/SelectAsset.php trunk/SelectCustomer.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/SelectSalesOrder.php trunk/SelectSupplier.php trunk/SelectWorkOrder.php trunk/SpecialOrder.php trunk/StockAdjustments.php trunk/StockCategories.php trunk/StockCheck.php trunk/StockCostUpdate.php trunk/StockLocMovements.php trunk/StockLocStatus.php trunk/StockLocTransfer.php trunk/StockMovements.php trunk/StockQuantityByDate.php trunk/StockReorderLevel.php trunk/StockSerialItems.php trunk/StockStatus.php trunk/StockTransfers.php trunk/StockUsage.php trunk/StockUsageGraph.php trunk/Stocks.php trunk/SupplierTenderCreate.php trunk/SupplierTypes.php trunk/Suppliers.php trunk/WOSerialNos.php trunk/WhereUsedInquiry.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/Z_ChangeStockCategory.php trunk/Z_ChangeStockCode.php trunk/Z_ImportFixedAssets.php trunk/Z_ImportStocks.php trunk/Z_MakeNewCompany.php trunk/Z_ReApplyCostToSA.php trunk/Z_RePostGLFromPeriod.php trunk/Z_UpdateChartDetailsBFwd.php trunk/Z_index.php trunk/Z_poAddLanguage.php trunk/build/tests/PurchasingTest.php trunk/build/tests/includes/login.php trunk/includes/DefineCartClass.php trunk/includes/MiscFunctions.php trunk/includes/PDFInventoryValnPageHeader.inc trunk/includes/PDFOstdgGRNsPageHeader.inc trunk/includes/PDFQuotationPortraitPageHeader.inc trunk/includes/PDFSalesOrder_generic.inc trunk/includes/PDFStockCheckPageHeader.inc trunk/includes/PDFStockNegativesHeader.inc trunk/includes/RFC822.php trunk/includes/htmlMimeMail.php trunk/includes/mimePart.php trunk/includes/phplot/contrib/color_range.php trunk/includes/smtp.php trunk/includes/tcpdf/2dbarcodes.php trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/fonts/helvetica.php trunk/includes/tcpdf/fonts/helveticab.php trunk/includes/tcpdf/fonts/helveticabi.php trunk/includes/tcpdf/fonts/helveticai.php trunk/includes/tcpdf/fonts/times.php trunk/includes/tcpdf/fonts/timesb.php trunk/includes/tcpdf/fonts/timesbi.php trunk/includes/tcpdf/fonts/timesi.php trunk/includes/tcpdf/tcpdf.php trunk/reportwriter/WriteForm.inc trunk/reportwriter/admin/RCFunctions.inc trunk/xmlrpc/lib/xmlrpc.inc trunk/xmlrpc/lib/xmlrpcs.inc Property Changed: ---------------- trunk/CustWhereAlloc.php trunk/FixedAssetLocations.php trunk/GLJournal.php trunk/MRPPlannedWorkOrders.php trunk/OutstandingGRNs.php trunk/PDFQuotationPortrait.php trunk/PDFStockNegatives.php trunk/PrintSalesOrder_generic.php trunk/StockCheck.php trunk/WOSerialNos.php trunk/Z_ReApplyCostToSA.php trunk/Z_RePostGLFromPeriod.php trunk/Z_UpdateChartDetailsBFwd.php trunk/Z_index.php trunk/build/tests/PurchasingTest.php trunk/build/tests/includes/login.php trunk/includes/PDFInventoryValnPageHeader.inc trunk/includes/PDFOstdgGRNsPageHeader.inc trunk/includes/PDFQuotationPortraitPageHeader.inc trunk/includes/PDFSalesOrder_generic.inc trunk/includes/PDFStockCheckPageHeader.inc trunk/includes/PDFStockNegativesHeader.inc trunk/includes/RFC822.php trunk/includes/htmlMimeMail.php trunk/includes/mimePart.php trunk/includes/phplot/contrib/color_range.php trunk/includes/smtp.php trunk/includes/tcpdf/fonts/helvetica.php trunk/includes/tcpdf/fonts/helveticab.php trunk/includes/tcpdf/fonts/helveticabi.php trunk/includes/tcpdf/fonts/helveticai.php trunk/includes/tcpdf/fonts/times.php trunk/includes/tcpdf/fonts/timesb.php trunk/includes/tcpdf/fonts/timesbi.php trunk/includes/tcpdf/fonts/timesi.php Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/Areas.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -11,9 +11,9 @@ if (isset($_GET['SelectedArea'])){ - $SelectedArea = strtoupper($_GET['SelectedArea']); + $SelectedArea = mb_strtoupper($_GET['SelectedArea']); } elseif (isset($_POST['SelectedArea'])){ - $SelectedArea = strtoupper($_POST['SelectedArea']); + $SelectedArea = mb_strtoupper($_POST['SelectedArea']); } if (isset($Errors)) { @@ -31,7 +31,7 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - $_POST['AreaCode'] = strtoupper($_POST['AreaCode']); + $_POST['AreaCode'] = mb_strtoupper($_POST['AreaCode']); $sql = "SELECT count(areacode) from areas WHERE areacode='".$_POST['AreaCode']."'"; $result = DB_query($sql, $db); $myrow = DB_fetch_row($result); Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/BOMExtendedQty.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -307,7 +307,7 @@ $YPos -=$line_height; $pdf->addTextWrap($Left_Margin,$YPos,300,$FontSize,_('Extended Quantity BOM Listing For ') - . strtoupper($_POST['Part'])); + . mb_strtoupper($_POST['Part'])); $pdf->addTextWrap($Page_Width-$Right_Margin-140,$YPos,160,$FontSize,_('Printed') . ': ' . Date($_SESSION['DefaultDateFormat']) . ' ' . _('Page') . ' ' . $PageNumber,'left'); $YPos -=$line_height; Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/BOMIndented.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -314,7 +314,7 @@ $YPos =$YPos - (2*$line_height); $pdf->addTextWrap($Left_Margin+1,$YPos,40,$FontSize,_('Assembly:'),'',0); - $pdf->addTextWrap(85,$YPos,100,$FontSize,strtoupper($_POST['Part']),'',0); + $pdf->addTextWrap(85,$YPos,100,$FontSize,mb_strtoupper($_POST['Part']),'',0); $pdf->addTextWrap(185,$YPos,150,$FontSize,$assemblydesc,'',0); $YPos -=(2*$line_height); $Xpos = $Left_Margin+5; Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/BOMIndentedReverse.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -299,7 +299,7 @@ $YPos =$YPos - $line_height; $pdf->addTextWrap($Left_Margin+1,$YPos,60,$FontSize,_('Component:'),'',0); - $pdf->addTextWrap(100,$YPos,100,$FontSize,strtoupper($_POST['Part']),'',0); + $pdf->addTextWrap(100,$YPos,100,$FontSize,mb_strtoupper($_POST['Part']),'',0); $pdf->addTextWrap(200,$YPos,150,$FontSize,$assemblydesc,'',0); $YPos -=(2*$line_height); $Xpos = $Left_Margin+5; Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/BOMInquiry.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -8,9 +8,9 @@ include('includes/header.inc'); if (isset($_GET['StockID'])){ - $StockID =trim(strtoupper($_GET['StockID'])); + $StockID =trim(mb_strtoupper($_GET['StockID'])); } elseif (isset($_POST['StockID'])){ - $StockID =trim(strtoupper($_POST['StockID'])); + $StockID =trim(mb_strtoupper($_POST['StockID'])); } if (!isset($_POST['StockID'])) { Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/Contracts.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -111,7 +111,7 @@ $filename = $_SESSION['part_pics_dir'] . '/' . $_SESSION['Contract'.$identifier]->ContractRef . '.jpg'; //But check for the worst - if (strtoupper(substr(trim($_FILES['Drawing']['name']),strlen($_FILES['Drawing']['name'])-3))!='JPG'){ + if (mb_strtoupper(substr(trim($_FILES['Drawing']['name']),strlen($_FILES['Drawing']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['Drawing']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check @@ -614,7 +614,7 @@ } else { if (strlen($_POST['CustKeywords'])>0) { //insert wildcard characters in spaces - $_POST['CustKeywords'] = strtoupper(trim($_POST['CustKeywords'])); + $_POST['CustKeywords'] = mb_strtoupper(trim($_POST['CustKeywords'])); $SearchString = '%' . str_replace(' ', '%', $_POST['CustKeywords']) . '%'; $SQL = "SELECT custbranch.brname, @@ -633,7 +633,7 @@ } elseif (strlen($_POST['CustCode'])>0){ - $_POST['CustCode'] = strtoupper(trim($_POST['CustCode'])); + $_POST['CustCode'] = mb_strtoupper(trim($_POST['CustCode'])); $SQL = "SELECT custbranch.brname, custbranch.contactname, Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/CounterSales.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -258,7 +258,7 @@ } if (isset($_POST['Keywords']) AND strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; if ($_POST['StockCat']=='All'){ @@ -289,7 +289,7 @@ } else if (strlen($_POST['StockCode'])>0){ - $_POST['StockCode'] = strtoupper($_POST['StockCode']); + $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); $SearchString = '%' . $_POST['StockCode'] . '%'; if ($_POST['StockCat']=='All'){ @@ -414,7 +414,7 @@ $i++; if (isset($_POST[$QuickEntryCode])) { - $NewItem = strtoupper($_POST[$QuickEntryCode]); + $NewItem = mb_strtoupper($_POST[$QuickEntryCode]); } if (isset($_POST[$QuickEntryQty])) { $NewItemQty = $_POST[$QuickEntryQty]; Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/Currencies.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -209,7 +209,7 @@ $k++; } // Lets show the country flag - $ImageFile = 'flags/' . strtoupper($myrow[1]) . '.gif'; + $ImageFile = 'flags/' . mb_strtoupper($myrow[1]) . '.gif'; if(!file_exists($ImageFile)){ $ImageFile = 'flags/blank.gif'; Property changes on: trunk/CustWhereAlloc.php ___________________________________________________________________ Deleted: svn:executable - * Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/CustomerBranches.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -10,9 +10,9 @@ include('includes/header.inc'); if (isset($_GET['DebtorNo'])) { - $DebtorNo = strtoupper($_GET['DebtorNo']); + $DebtorNo = mb_strtoupper($_GET['DebtorNo']); } else if (isset($_POST['DebtorNo'])){ - $DebtorNo = strtoupper($_POST['DebtorNo']); + $DebtorNo = mb_strtoupper($_POST['DebtorNo']); } if (!isset($DebtorNo)) { @@ -25,9 +25,9 @@ if (isset($_GET['SelectedBranch'])){ - $SelectedBranch = strtoupper($_GET['SelectedBranch']); + $SelectedBranch = mb_strtoupper($_GET['SelectedBranch']); } else if (isset($_POST['SelectedBranch'])){ - $SelectedBranch = strtoupper($_POST['SelectedBranch']); + $SelectedBranch = mb_strtoupper($_POST['SelectedBranch']); } // This link is already available on the menu on this page @@ -50,7 +50,7 @@ //first off validate inputs sensible - $_POST['BranchCode'] = strtoupper($_POST['BranchCode']); + $_POST['BranchCode'] = mb_strtoupper($_POST['BranchCode']); if (ContainsIllegalCharacters($_POST['BranchCode']) OR strstr($_POST['BranchCode'],' ')) { $InputError = 1; Modified: trunk/CustomerTypes.php =================================================================== --- trunk/CustomerTypes.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/CustomerTypes.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -9,9 +9,9 @@ include('includes/header.inc'); if (isset($_POST['SelectedType'])){ - $SelectedType = strtoupper($_POST['SelectedType']); + $SelectedType = mb_strtoupper($_POST['SelectedType']); } elseif (isset($_GET['SelectedType'])){ - $SelectedType = strtoupper($_GET['SelectedType']); + $SelectedType = mb_strtoupper($_GET['SelectedType']); } if (isset($Errors)) { Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/Customers.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -28,7 +28,7 @@ //first off validate inputs sensible - $_POST['DebtorNo'] = strtoupper($_POST['DebtorNo']); + $_POST['DebtorNo'] = mb_strtoupper($_POST['DebtorNo']); $sql="SELECT COUNT(debtorno) FROM debtorsmaster WHERE debtorno='".$_POST['DebtorNo']."'"; $result=DB_query($sql,$db); Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/DiscountCategories.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -33,7 +33,7 @@ FROM stockmaster WHERE mbflag <>'K' AND mbflag<>'D' - AND stockid='" . strtoupper($_POST['StockID']) . "'",$db); + AND stockid='" . mb_strtoupper($_POST['StockID']) . "'",$db); if (DB_num_rows($result)==0){ $InputError = 1; prnMsg(_('The stock item entered must be set up as either a manufactured or purchased or assembly item'),'warn'); @@ -42,9 +42,9 @@ if ($InputError !=1) { $sql = "UPDATE stockmaster SET discountcategory='" . $_POST['DiscountCategory'] . "' - WHERE stockid='" . strtoupper($_POST['StockID']) . "'"; + WHERE stockid='" . mb_strtoupper($_POST['StockID']) . "'"; - $result = DB_query($sql,$db, _('The discount category') . ' ' . $_POST['DiscountCategory'] . ' ' . _('record for') . ' ' . strtoupper($_POST['StockID']) . ' ' . _('could not be updated because')); + $result = DB_query($sql,$db, _('The discount category') . ' ' . $_POST['DiscountCategory'] . ' ' . _('record for') . ' ' . mb_strtoupper($_POST['StockID']) . ' ' . _('could not be updated because')); prnMsg(_('The stock master has been updated with this discount category'),'success'); unset($_POST['DiscountCategory']); @@ -55,7 +55,7 @@ } elseif (isset($_GET['Delete']) and $_GET['Delete']=='yes') { /*the link to delete a selected record was clicked instead of the submit button */ - $sql="UPDATE stockmaster SET discountcategory='' WHERE stockid='" . trim(strtoupper($_GET['StockID'])) ."'"; + $sql="UPDATE stockmaster SET discountcategory='' WHERE stockid='" . trim(mb_strtoupper($_GET['StockID'])) ."'"; $result = DB_query($sql,$db); prnMsg( _('The stock master record has been updated to no discount category'),'success'); echo '<br />'; Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/Factors.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -9,10 +9,10 @@ include('includes/header.inc'); if (isset($_GET['FactorID'])){ - $FactorID = strtoupper($_GET['FactorID']); + $FactorID = mb_strtoupper($_GET['FactorID']); $_POST['amend']=True; } elseif (isset($_POST['FactorID'])){ - $FactorID = strtoupper($_POST['FactorID']); + $FactorID = mb_strtoupper($_POST['FactorID']); } else { unset($FactorID); } Modified: trunk/FixedAssetCategories.php =================================================================== --- trunk/FixedAssetCategories.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/FixedAssetCategories.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -12,9 +12,9 @@ _('Fixed Asset Categories') . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_GET['SelectedCategory'])){ - $SelectedCategory = strtoupper($_GET['SelectedCategory']); + $SelectedCategory = mb_strtoupper($_GET['SelectedCategory']); } else if (isset($_POST['SelectedCategory'])){ - $SelectedCategory = strtoupper($_POST['SelectedCategory']); + $SelectedCategory = mb_strtoupper($_POST['SelectedCategory']); } if (isset($_POST['submit'])) { @@ -27,7 +27,7 @@ //first off validate inputs sensible - $_POST['CategoryID'] = strtoupper($_POST['CategoryID']); + $_POST['CategoryID'] = mb_strtoupper($_POST['CategoryID']); if (strlen($_POST['CategoryID']) > 6) { $InputError = 1; Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/FixedAssetItems.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -42,7 +42,7 @@ $filename = $_SESSION['part_pics_dir'] . '/ASSET_' . $AssetID . '.jpg'; //But check for the worst - if (strtoupper(substr(trim($_FILES['ItemPicture']['name']),strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ + if (mb_strtoupper(substr(trim($_FILES['ItemPicture']['name']),strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['ItemPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check Property changes on: trunk/FixedAssetLocations.php ___________________________________________________________________ Deleted: svn:executable - * Property changes on: trunk/GLJournal.php ___________________________________________________________________ Deleted: svn:executable - * Modified: trunk/GetStockImage.php =================================================================== --- trunk/GetStockImage.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/GetStockImage.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -68,7 +68,7 @@ } $filepath = $_SESSION['part_pics_dir'] . $pathsep; -$stockid = trim(strtoupper($_GET['StockID'])); +$stockid = trim(mb_strtoupper($_GET['StockID'])); if( isset($_GET['bgcolor']) ) $bgcolor = $_GET['bgcolor']; if( isset($_GET['textcolor']) ) Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/Locations.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -25,7 +25,7 @@ /* actions to take once the user has clicked the submit button ie the page has called itself with some user input */ - $_POST['LocCode']=strtoupper($_POST['LocCode']); + $_POST['LocCode']=mb_strtoupper($_POST['LocCode']); if( trim($_POST['LocCode']) == '' ) { $InputError = 1; prnMsg( _('The location code may not be empty'), 'error'); Modified: trunk/MRPCalendar.php =================================================================== --- trunk/MRPCalendar.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/MRPCalendar.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -11,9 +11,9 @@ if (isset($_POST['ChangeDate'])){ - $ChangeDate =trim(strtoupper($_POST['ChangeDate'])); + $ChangeDate =trim(mb_strtoupper($_POST['ChangeDate'])); } elseif (isset($_GET['ChangeDate'])){ - $ChangeDate =trim(strtoupper($_GET['ChangeDate'])); + $ChangeDate =trim(mb_strtoupper($_GET['ChangeDate'])); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . Modified: trunk/MRPDemandTypes.php =================================================================== --- trunk/MRPDemandTypes.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/MRPDemandTypes.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -8,9 +8,9 @@ //SelectedDT is the Selected MRPDemandType if (isset($_POST['SelectedDT'])){ - $SelectedDT = trim(strtoupper($_POST['SelectedDT'])); + $SelectedDT = trim(mb_strtoupper($_POST['SelectedDT'])); } elseif (isset($_GET['SelectedDT'])){ - $SelectedDT = trim(strtoupper($_GET['SelectedDT'])); + $SelectedDT = trim(mb_strtoupper($_GET['SelectedDT'])); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . @@ -26,8 +26,8 @@ //first off validate inputs sensible - if (trim(strtoupper($_POST['MRPDemandType']) == 'WO') or - trim(strtoupper($_POST['MRPDemandType']) == 'SO')) { + if (trim(mb_strtoupper($_POST['MRPDemandType']) == 'WO') or + trim(mb_strtoupper($_POST['MRPDemandType']) == 'SO')) { $InputError = 1; prnMsg(_('The Demand Type is reserved for the system'),'error'); } @@ -57,7 +57,7 @@ $sql = "INSERT INTO mrpdemandtypes (mrpdemandtype, description) - VALUES ('" . trim(strtoupper($_POST['MRPDemandType'])) . "', + VALUES ('" . trim(mb_strtoupper($_POST['MRPDemandType'])) . "', '" . $_POST['Description'] . "' )"; $msg = _('The new demand type has been added to the database'); Modified: trunk/MRPDemands.php =================================================================== --- trunk/MRPDemands.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/MRPDemands.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -16,9 +16,9 @@ } if (isset($_POST['StockID'])){ - $StockID =trim(strtoupper($_POST['StockID'])); + $StockID =trim(mb_strtoupper($_POST['StockID'])); } elseif (isset($_GET['StockID'])){ - $StockID =trim(strtoupper($_GET['StockID'])); + $StockID =trim(mb_strtoupper($_GET['StockID'])); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . @@ -188,7 +188,7 @@ if ($myrow[0]>0) { //If $myrow[0] > 0, it means this is an edit, so do an update $sql = "UPDATE mrpdemands SET quantity = '" . $_POST['Quantity'] . "', - mrpdemandtype = '" . trim(strtoupper($_POST['MRPDemandtype'])) . "', + mrpdemandtype = '" . trim(mb_strtoupper($_POST['MRPDemandtype'])) . "', duedate = '" . $FormatedDuedate . "' WHERE demandid = '" . $DemandID . "'"; $msg = _("The MRP demand record has been updated for").' '.$StockID; @@ -200,7 +200,7 @@ quantity, duedate) VALUES ('" . $StockID . "', - '" . trim(strtoupper($_POST['MRPDemandtype'])) . "', + '" . trim(mb_strtoupper($_POST['MRPDemandtype'])) . "', '" . $_POST['Quantity'] . "', '" . $FormatedDuedate . "' )"; Property changes on: trunk/MRPPlannedWorkOrders.php ___________________________________________________________________ Deleted: svn:executable - * Modified: trunk/MRPReport.php =================================================================== --- trunk/MRPReport.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/MRPReport.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -569,7 +569,7 @@ } if ($_POST['Keywords']) { //insert wildcard characters in spaces - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; if ($_POST['StockCat'] == 'All') { $SQL = "SELECT stockmaster.stockid, @@ -608,7 +608,7 @@ ORDER BY stockmaster.stockid"; } } elseif (isset($_POST['StockCode'])) { - $_POST['StockCode'] = strtoupper($_POST['StockCode']); + $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); if ($_POST['StockCat'] == 'All') { $SQL = "SELECT stockmaster.stockid, stockmaster.description, Modified: trunk/Manufacturers.php =================================================================== --- trunk/Manufacturers.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/Manufacturers.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -9,10 +9,10 @@ include('includes/header.inc'); if (isset($_GET['ManufacturerID'])){ - $ManufacturerID = strtoupper($_GET['ManufacturerID']); + $ManufacturerID = mb_strtoupper($_GET['ManufacturerID']); $_POST['amend']=True; } elseif (isset($_POST['ManufacturerID'])){ - $ManufacturerID = strtoupper($_POST['ManufacturerID']); + $ManufacturerID = mb_strtoupper($_POST['ManufacturerID']); } else { unset($ManufacturerID); } Modified: trunk/Numbers/Words/lang.dk.php =================================================================== --- trunk/Numbers/Words/lang.dk.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/Numbers/Words/lang.dk.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -368,7 +368,7 @@ * @since Numbers_Words 0.4 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.en_GB.php =================================================================== --- trunk/Numbers/Words/lang.en_GB.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/Numbers/Words/lang.en_GB.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -380,7 +380,7 @@ * @since Numbers_Words 0.13.1 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.en_US.php =================================================================== --- trunk/Numbers/Words/lang.en_US.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/Numbers/Words/lang.en_US.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -472,7 +472,7 @@ * @since Numbers_Words 0.4 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.es_AR.php =================================================================== --- trunk/Numbers/Words/lang.es_AR.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/Numbers/Words/lang.es_AR.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -430,7 +430,7 @@ * @author Martin Marrese */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.he.php =================================================================== --- trunk/Numbers/Words/lang.he.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/Numbers/Words/lang.he.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -462,7 +462,7 @@ * @since Numbers_Words 0.4 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.hu_HU.php =================================================================== --- trunk/Numbers/Words/lang.hu_HU.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/Numbers/Words/lang.hu_HU.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -359,7 +359,7 @@ * @since Numbers_Words 0.4 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.pl.php =================================================================== --- trunk/Numbers/Words/lang.pl.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/Numbers/Words/lang.pl.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -439,7 +439,7 @@ * @since Numbers_Words 0.4 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.pt_BR.php =================================================================== --- trunk/Numbers/Words/lang.pt_BR.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/Numbers/Words/lang.pt_BR.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -279,7 +279,7 @@ * @since Numbers_Words 0.10.1 */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_name[$int_curr])){ $int_curr = $this->def_currency; } Modified: trunk/Numbers/Words/lang.ru.php =================================================================== --- trunk/Numbers/Words/lang.ru.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/Numbers/Words/lang.ru.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -599,7 +599,7 @@ */ function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) { - $int_curr = strtoupper($int_curr); + $int_curr = mb_strtoupper($int_curr); if (!isset($this->_currency_names[$int_curr])) { $int_curr = $this->def_currency; } Property changes on: trunk/OutstandingGRNs.php ___________________________________________________________________ Deleted: svn:executable - * Property changes on: trunk/PDFQuotationPortrait.php ___________________________________________________________________ Deleted: svn:executable - * Property changes on: trunk/PDFStockNegatives.php ___________________________________________________________________ Deleted: svn:executable - * Modified: trunk/POReport.php =================================================================== --- trunk/POReport.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/POReport.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -22,18 +22,18 @@ if (isset($_POST['submit']) or isset($_POST['submitcsv'])) { if (isset($_POST['PartNumber'])){ - $PartNumber = trim(strtoupper($_POST['PartNumber'])); + $PartNumber = trim(mb_strtoupper($_POST['PartNumber'])); } elseif (isset($_GET['PartNumber'])){ - $PartNumber = trim(strtoupper($_GET['PartNumber'])); + $PartNumber = trim(mb_strtoupper($_GET['PartNumber'])); } # Part Number operator - either LIKE or = $PartNumberOp = $_POST['PartNumberOp']; if (isset($_POST['SupplierId'])){ - $SupplierId = trim(strtoupper($_POST['SupplierId'])); + $SupplierId = trim(mb_strtoupper($_POST['SupplierId'])); } elseif (isset($_GET['SupplierId'])){ - $SupplierId = trim(strtoupper($_GET['SupplierId'])); + $SupplierId = trim(mb_strtoupper($_GET['SupplierId'])); } $SupplierIdOp = $_POST['SupplierIdOp']; @@ -46,9 +46,9 @@ } if (isset($_POST['SupplierName'])){ - $SupplierName = trim(strtoupper($_POST['SupplierName'])); + $SupplierName = trim(mb_strtoupper($_POST['SupplierName'])); } elseif (isset($_GET['SupplierName'])){ - $SupplierName = trim(strtoupper($_GET['SupplierName'])); + $SupplierName = trim(mb_strtoupper($_GET['SupplierName'])); } // Had to add supplierid to SummaryType when do summary by name because there could be several accounts Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/PO_Items.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -535,9 +535,9 @@ purchdata.minorderqty FROM purchdata WHERE purchdata.supplierno = '" . $_SESSION['PO'.$identifier]->SupplierID . "' - AND purchdata.stockid = '". strtoupper($_POST['StockID2']) . "'"; + AND purchdata.stockid = '". mb_strtoupper($_POST['StockID2']) . "'"; - $ErrMsg = _('The supplier pricing details for') . ' ' . strtoupper($_POST['StockID']) . ' ' . _('could not be retrieved because'); + $ErrMsg = _('The supplier pricing details for') . ' ' . mb_strtoupper($_POST['StockID']) . ' ' . _('could not be retrieved because'); $DbgMsg = _('The SQL used to retrieve the pricing details but failed was'); $LookupResult = DB_query($sql,$db,$ErrMsg,$DbgMsg); @@ -547,7 +547,7 @@ $_POST['ConversionFactor'] = $myrow['conversionfactor']; $_POST['MinimumOrderQty'] = $myrow['minorderqty']; } else { - prnMsg(_('Sorry') . ' ... ' . _('there is no purchasing data set up for this supplier') . ' - ' . $_SESSION['PO'.$identifier]->SupplierID . ' ' . _('and item') . ' ' . strtoupper($_POST['StockID']),'warn'); + prnMsg(_('Sorry') . ' ... ' . _('there is no purchasing data set up for this supplier') . ' - ' . $_SESSION['PO'.$identifier]->SupplierID . ' ' . _('and item') . ' ' . mb_strtoupper($_POST['StockID']),'warn'); } } Modified: trunk/PcAssignCashToTab.php =================================================================== --- trunk/PcAssignCashToTab.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/PcAssignCashToTab.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -8,9 +8,9 @@ include('includes/header.inc'); if (isset($_POST['SelectedTabs'])){ - $SelectedTabs = strtoupper($_POST['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_POST['SelectedTabs']); } elseif (isset($_GET['SelectedTabs'])){ - $SelectedTabs = strtoupper($_GET['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_GET['SelectedTabs']); } if (isset($_POST['SelectedIndex'])){ Modified: trunk/PcAuthorizeExpenses.php =================================================================== --- trunk/PcAuthorizeExpenses.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/PcAuthorizeExpenses.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -9,9 +9,9 @@ include('includes/SQL_CommonFunctions.inc'); if (isset($_POST['SelectedTabs'])){ - $SelectedTabs = strtoupper($_POST['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_POST['SelectedTabs']); } elseif (isset($_GET['SelectedTabs'])){ - $SelectedTabs = strtoupper($_GET['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_GET['SelectedTabs']); } if (isset($_POST['SelectedIndex'])){ Modified: trunk/PcClaimExpensesFromTab.php =================================================================== --- trunk/PcClaimExpensesFromTab.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/PcClaimExpensesFromTab.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -9,9 +9,9 @@ if (isset($_POST['SelectedTabs'])){ - $SelectedTabs = strtoupper($_POST['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_POST['SelectedTabs']); } elseif (isset($_GET['SelectedTabs'])){ - $SelectedTabs = strtoupper($_GET['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_GET['SelectedTabs']); } if (isset($_POST['SelectedIndex'])){ Modified: trunk/PcExpenses.php =================================================================== --- trunk/PcExpenses.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/PcExpenses.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -10,9 +10,9 @@ . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_POST['SelectedExpense'])){ - $SelectedExpense = strtoupper($_POST['SelectedExpense']); + $SelectedExpense = mb_strtoupper($_POST['SelectedExpense']); } elseif (isset($_GET['SelectedExpense'])){ - $SelectedExpense = strtoupper($_GET['SelectedExpense']); + $SelectedExpense = mb_strtoupper($_GET['SelectedExpense']); } if (isset($_POST['Cancel'])) { Modified: trunk/PcExpensesTypeTab.php =================================================================== --- trunk/PcExpensesTypeTab.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/PcExpensesTypeTab.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -11,9 +11,9 @@ . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_POST['SelectedType'])){ - $SelectedType = strtoupper($_POST['SelectedType']); + $SelectedType = mb_strtoupper($_POST['SelectedType']); } elseif (isset($_GET['SelectedType'])){ - $SelectedType = strtoupper($_GET['SelectedType']); + $SelectedType = mb_strtoupper($_GET['SelectedType']); } else { $SelectedType=''; } @@ -24,9 +24,9 @@ } if (isset($_POST['SelectedTabs'])){ - $SelectedTabs = strtoupper($_POST['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_POST['SelectedTabs']); } elseif (isset($_GET['SelectedTabs'])){ - $SelectedTabs = strtoupper($_GET['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_GET['SelectedTabs']); } if (isset($_POST['Cancel'])) { Modified: trunk/PcReportTab.php =================================================================== --- trunk/PcReportTab.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/PcReportTab.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -10,9 +10,9 @@ $title = _('Petty Cash Management Report'); if (isset($_POST['SelectedTabs'])){ - $SelectedTabs = strtoupper($_POST['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_POST['SelectedTabs']); } elseif (isset($_GET['SelectedTabs'])){ - $SelectedTabs = strtoupper($_GET['SelectedTabs']); + $SelectedTabs = mb_strtoupper($_GET['SelectedTabs']); } if ((! isset($_POST['FromDate']) AND ! isset($_POST['ToDate'])) OR isset($_POST['SelectDifferentDate'])){ Modified: trunk/PcTabs.php =================================================================== --- trunk/PcTabs.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/PcTabs.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -11,9 +11,9 @@ . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_POST['SelectedTab'])){ - $SelectedTab = strtoupper($_POST['SelectedTab']); + $SelectedTab = mb_strtoupper($_POST['SelectedTab']); } elseif (isset($_GET['SelectedTab'])){ - $SelectedTab = strtoupper($_GET['SelectedTab']); + $SelectedTab = mb_strtoupper($_GET['SelectedTab']); } if (isset($_POST['Cancel'])) { Modified: trunk/PcTypeTabs.php =================================================================== --- trunk/PcTypeTabs.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/PcTypeTabs.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -11,9 +11,9 @@ . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_POST['SelectedTab'])){ - $SelectedTab = strtoupper($_POST['SelectedTab']); + $SelectedTab = mb_strtoupper($_POST['SelectedTab']); } elseif (isset($_GET['SelectedTab'])){ - $SelectedTab = strtoupper($_GET['SelectedTab']); + $SelectedTab = mb_strtoupper($_GET['SelectedTab']); } if (isset($Errors)) { Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/Prices.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -16,9 +16,9 @@ if (isset($_GET['Item'])){ - $Item = trim(strtoupper($_GET['Item'])); + $Item = trim(mb_strtoupper($_GET['Item'])); }elseif (isset($_POST['Item'])){ - $Item = trim(strtoupper($_POST['Item'])); + $Item = trim(mb_strtoupper($_POST['Item'])); } if (!isset($_POST['TypeAbbrev']) OR $_POST['TypeAbbrev']==""){ Modified: trunk/PrintCustStatements.php =================================================================== --- trunk/PrintCustStatements.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/PrintCustStatements.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -38,12 +38,12 @@ If (isset($_POST['PrintPDF']) && isset($_POST['FromCust']) && $_POST['FromCust']!=''){ - $_POST['FromCust'] = strtoupper($_POST['FromCust']); + $_POST['FromCust'] = mb_strtoupper($_POST['FromCust']); If (!isset($_POST['ToCust'])){ $_POST['ToCust'] = $_POST['FromCust']; } else { - $_POST['ToCust'] = strtoupper($_POST['ToCust']); + $_POST['ToCust'] = mb_strtoupper($_POST['ToCust']); } include('includes/PDFStarter.php'); $pdf->addInfo('Title', _('Customer Statements') ); Property changes on: trunk/PrintSalesOrder_generic.php ___________________________________________________________________ Deleted: svn:executable - * Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/PurchData.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -8,15 +8,15 @@ include ('includes/header.inc'); if (isset($_GET['SupplierID'])) { - $SupplierID = trim(strtoupper($_GET['SupplierID'])); + $SupplierID = trim(mb_strtoupper($_GET['SupplierID'])); } elseif (isset($_POST['SupplierID'])) { - $SupplierID = trim(strtoupper($_POST['SupplierID'])); + $SupplierID = trim(mb_strtoupper($_POST['SupplierID'])); } if (isset($_GET['StockID'])) { - $StockID = trim(strtoupper($_GET['StockID'])); + $StockID = trim(mb_strtoupper($_GET['StockID'])); } elseif (isset($_POST['StockID'])) { - $StockID = trim(strtoupper($_POST['StockID'])); + $StockID = trim(mb_strtoupper($_POST['StockID'])); } if (isset($_POST['StockUOM'])) { Modified: trunk/SalesCategories.php =================================================================== --- trunk/SalesCategories.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/SalesCategories.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -13,24 +13,24 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_GET['SelectedCategory'])){ - $SelectedCategory = strtoupper($_GET['SelectedCategory']); + $SelectedCategory = mb_strtoupper($_GET['SelectedCategory']); } else if (isset($_POST['SelectedCategory'])){ - $SelectedCategory = strtoupper($_POST['SelectedCategory']); + $SelectedCategory = mb_strtoupper($_POST['SelectedCategory']); } if (isset($_GET['ParentCategory'])){ - $ParentCategory = strtoupper($_GET['ParentCategory']); + $ParentCategory = mb_strtoupper($_GET['ParentCategory']); } else if (isset($_POST['ParentCategory'])){ - $ParentCategory = strtoupper($_POST['ParentCategory']); + $ParentCategory = mb_strtoupper($_POST['ParentCategory']); } if( isset($ParentCategory) && $ParentCategory == 0 ) { unset($ParentCategory); } if (isset($_GET['EditName'])){ - $EditName = strtoupper($_GET['EditName']); + $EditName = mb_strtoupper($_GET['EditName']); } else if (isset($_POST['EditName'])){ - $EditName = strtoupper($_POST['EditName']); + $EditName = mb_strtoupper($_POST['EditName']); } if (isset($SelectedCategory) AND isset($_FILES['ItemPicture']) AND $_FILES['ItemPicture']['name'] !='') { @@ -41,7 +41,7 @@ $filename = $_SESSION['part_pics_dir'] . '/cat_' . $SelectedCategory . '.jpg'; //But check for the worst - if (strtoupper(substr(trim($_FILES['ItemPicture']['name']),strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ + if (mb_strtoupper(substr(trim($_FILES['ItemPicture']['name']),strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['ItemPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check Modified: trunk/SalesInquiry.php =================================================================== --- trunk/SalesInquiry.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/SalesInquiry.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -19,26 +19,26 @@ } if (isset($_POST['PartNumber'])){ - $PartNumber = trim(strtoupper($_POST['PartNumber'])); + $PartNumber = trim(mb_strtoupper($_POST['PartNumber'])); } elseif (isset($_GET['PartNumber'])){ - $PartNumber = trim(strtoupper($_GET['PartNumber'])); + $PartNumber = trim(mb_strtoupper($_GET['PartNumber'])); } # Part Number operator - either LIKE or = $PartNumberOp = $_POST['PartNumberOp']; if (isset($_POST['DebtorNo'])){ - $DebtorNo = trim(strtoupper($_POST['DebtorNo'])); + $DebtorNo = trim(mb_strtoupper($_POST['DebtorNo'])); } elseif (isset($_GET['DebtorNo'])){ - $DebtorNo = trim(strtoupper($_GET['DebtorNo'])); + $DebtorNo = trim(mb_strtoupper($_GET['DebtorNo'])); } $DebtorNoOp = $_POST['DebtorNoOp']; if (isset($_POST['DebtorName'])){ - $DebtorName = trim(strtoupper($_POST['DebtorName'])); + $DebtorName = trim(mb_strtoupper($_POST['DebtorName'])); } elseif (isset($_GET['DebtorName'])){ - $DebtorName = trim(strtoupper($_GET['DebtorName'])); + $DebtorName = trim(mb_strtoupper($_GET['DebtorName'])); } $DebtorNameOp = $_POST['DebtorNameOp']; Modified: trunk/SalesPeople.php =================================================================== --- trunk/SalesPeople.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/SalesPeople.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -6,9 +6,9 @@ include('includes/header.inc'); if (isset($_GET['SelectedSaleperson'])){ - $SelectedSaleperson =strtoupper($_GET['SelectedSaleperson']); + $SelectedSaleperson =mb_strtoupper($_GET['SelectedSaleperson']); } elseif(isset($_POST['SelectedSaleperson'])){ - $SelectedSaleperson =strtoupper($_POST['SelectedSaleperson']); + $SelectedSaleperson =mb_strtoupper($_POST['SelectedSaleperson']); } if (isset($Errors)) { Modified: trunk/SalesTypes.php =================================================================== --- trunk/SalesTypes.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/SalesTypes.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -8,9 +8,9 @@ include('includes/header.inc'); if (isset($_POST['SelectedType'])){ - $SelectedType = strtoupper($_POST['SelectedType']); + $SelectedType = mb_strtoupper($_POST['SelectedType']); } elseif (isset($_GET['SelectedType'])){ - $SelectedType = strtoupper($_GET['SelectedType']); + $SelectedType = mb_strtoupper($_GET['SelectedType']); } if (isset($Errors)) { Modified: trunk/SelectAsset.php =================================================================== --- trunk/SelectAsset.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/SelectAsset.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -25,7 +25,7 @@ } } if (isset($_POST['AssetCode'])) { - $_POST['AssetCode'] = trim(strtoupper($_POST['AssetCode'])); + $_POST['AssetCode'] = trim(mb_strtoupper($_POST['AssetCode'])); } // Always show the search facilities $SQL = "SELECT categoryid, @@ -123,7 +123,7 @@ if ($_POST['Keywords']) { //insert wildcard characters in spaces - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; if ($_POST['AssetCategory'] == 'ALL') { if ($_POST['AssetLocation']=='ALL'){ Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/SelectCustomer.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -90,7 +90,7 @@ } if ($_POST['Keywords'] AND (($_POST['CustCode']) OR ($_POST['CustPhone']) OR ($_POST['CustType']))) { $msg = _('Search Result: Customer Name has been used in search') . '<br />'; - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); } if ($_POST['CustCode'] AND $_POST['CustPhone'] == "" AND isset($_POST['CustType']) AND $_POST['Keywords'] == "") { $msg = _('Search Result: Customer Code has been used in search') . '<br />'; @@ -123,7 +123,7 @@ } else { if (strlen($_POST['Keywords']) > 0) { //using the customer name - $_POST['Keywords'] = strtoupper(trim($_POST['Keywords'])); + $_POST['Keywords'] = mb_strtoupper(trim($_POST['Keywords'])); //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; $SQL = "SELECT debtorsmaster.debtorno, @@ -143,7 +143,7 @@ WHERE debtorsmaster.name " . LIKE . " '$SearchString' AND debtorsmaster.typeid = debtortype.typeid"; } elseif (strlen($_POST['CustCode']) > 0) { - $_POST['CustCode'] = strtoupper(trim($_POST['CustCode'])); + $_POST['CustCode'] = mb_strtoupper(trim($_POST['CustCode'])); $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name, debtorsmaster.address1, Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/SelectOrderItems.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -306,7 +306,7 @@ } else { if (strlen($_POST['CustKeywords'])>0) { //insert wildcard characters in spaces - $_POST['CustKeywords'] = strtoupper(trim($_POST['CustKeywords'])); + $_POST['CustKeywords'] = mb_strtoupper(trim($_POST['CustKeywords'])); $SearchString = '%' . str_replace(' ', '%', $_POST['CustKeywords']) . '%'; $SQL = "SELECT custbranch.brname, @@ -329,7 +329,7 @@ } elseif (strlen($_POST['CustCode'])>0){ - $_POST['CustCode'] = strtoupper(trim($_POST['CustCode'])); + $_POST['CustCode'] = mb_strtoupper(trim($_POST['CustCode'])); $SQL = "SELECT custbranch.brname, custbranch.contactname, @@ -760,7 +760,7 @@ } if (isset($_POST['Keywords']) AND strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; if ($_POST['StockCat']=='All'){ @@ -794,7 +794,7 @@ } elseif (strlen($_POST['StockCode'])>0){ - $_POST['StockCode'] = strtoupper($_POST['StockCode']); + $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); $SearchString = '%' . $_POST['StockCode'] . '%'; if ($_POST['StockCat']=='All'){ @@ -923,7 +923,7 @@ $i++; if (isset($_POST[$QuickEntryCode])) { - $NewItem = strtoupper($_POST[$QuickEntryCode]); + $NewItem = mb_strtoupper($_POST[$QuickEntryCode]); } if (isset($_POST[$QuickEntryQty])) { $NewItemQty = $_POST[$QuickEntryQty]; Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/SelectProduct.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -8,8 +8,8 @@ if (isset($_GET['StockID'])) { //The page is called with a StockID - $_GET['StockID'] = trim(strtoupper($_GET['StockID'])); - $_POST['Select'] = trim(strtoupper($_GET['StockID'])); + $_GET['StockID'] = trim(mb_strtoupper($_GET['StockID'])); + $_POST['Select'] = trim(mb_strtoupper($_GET['StockID'])); } echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/inventory.png" title="' . _('Inventory Items') . '" alt="" />' . ' ' . _('Inventory Items') . '</p>'; if (isset($_GET['NewSearch']) or isset($_POST['Next']) or isset($_POST['Previous']) or isset($_POST['Go'])) { @@ -25,7 +25,7 @@ } } if (isset($_POST['StockCode'])) { - $_POST['StockCode'] = trim(strtoupper($_POST['StockCode'])); + $_POST['StockCode'] = trim(mb_strtoupper($_POST['StockCode'])); } // Always show the search facilities $SQL = "SELECT categoryid, @@ -549,7 +549,7 @@ } if ($_POST['Keywords']) { //insert wildcard characters in spaces - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; if ($_POST['StockCat'] == 'All') { $SQL = "SELECT stockmaster.stockid, @@ -590,7 +590,7 @@ ORDER BY stockmaster.stockid"; } } elseif (isset($_POST['StockCode'])) { - $_POST['StockCode'] = strtoupper($_POST['StockCode']); + $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); if ($_POST['StockCat'] == 'All') { $SQL = "SELECT stockmaster.stockid, stockmaster.description, Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/SelectSalesOrder.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -402,9 +402,9 @@ } if (isset($_POST['StockID'])){ - $StockID = trim(strtoupper($_POST['StockID'])); + $StockID = trim(mb_strtoupper($_POST['StockID'])); } elseif (isset($_GET['StockID'])){ - $StockID = trim(strtoupper($_GET['StockID'])); + $StockID = trim(mb_strtoupper($_GET['StockID'])); } if (!isset($StockID)) { Modified: trunk/SelectSupplier.php =================================================================== --- trunk/SelectSupplier.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/SelectSupplier.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -88,7 +88,7 @@ ORDER BY suppname"; } else { if (strlen($_POST['Keywords']) > 0) { - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; $SQL = "SELECT supplierid, @@ -102,7 +102,7 @@ WHERE suppname " . LIKE . " '$SearchString' ORDER BY suppname"; } elseif (strlen($_POST['SupplierCode']) > 0) { - $_POST['SupplierCode'] = strtoupper($_POST['SupplierCode']); + $_POST['SupplierCode'] = mb_strtoupper($_POST['SupplierCode']); $SQL = "SELECT supplierid, suppname, currcode, Modified: trunk/SelectWorkOrder.php =================================================================== --- trunk/SelectWorkOrder.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/SelectWorkOrder.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -91,9 +91,9 @@ } if (isset($_POST['StockID'])){ - $StockID = trim(strtoupper($_POST['StockID'])); + $StockID = trim(mb_strtoupper($_POST['StockID'])); } elseif (isset($_GET['StockID'])){ - $StockID = trim(strtoupper($_GET['StockID'])); + $StockID = trim(mb_strtoupper($_GET['StockID'])); } if (!isset($StockID)) { Modified: trunk/SpecialOrder.php =================================================================== --- trunk/SpecialOrder.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/SpecialOrder.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -332,7 +332,7 @@ if ($PartCount[0]!=0){ $PartAlreadyExists =True; if (strlen($PartCode)==20){ - $PartCode = "*" . strtoupper(substr($_SESSION['SPL']->PurchOrderNo,0,13)) . "_" . $SPLLine->LineNo; + $PartCode = "*" . mb_strtoupper(substr($_SESSION['SPL']->PurchOrderNo,0,13)) . "_" . $SPLLine->LineNo; } $PartCode = $PartCode . $Counter; $Counter++; Modified: trunk/StockAdjustments.php =================================================================== --- trunk/StockAdjustments.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/StockAdjustments.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -24,8 +24,8 @@ $NewAdjustment = false; if (isset($_GET['StockID'])){ - $StockID = trim(strtoupper($_GET['StockID'])); - $_SESSION['Adjustment']->StockID = trim(strtoupper($StockID)); + $StockID = trim(mb_strtoupper($_GET['StockID'])); + $_SESSION['Adjustment']->StockID = trim(mb_strtoupper($StockID)); $result = DB_query("SELECT description, controlled, serialised, decimalplaces FROM stockmaster WHERE stockid='" . $_SESSION['Adjustment']->StockID . "'",$db); $myrow = DB_fetch_array($result); $_SESSION['Adjustment']->ItemDescription = $myrow['description']; @@ -40,8 +40,8 @@ } elseif (isset($_POST['StockID'])){ if(isset($_POST['StockID']) and $_POST['StockID'] != $_SESSION['Adjustment']->StockID){ $NewAdjustment = true; - $_SESSION['Adjustment']->StockID = trim(strtoupper($_POST['StockID'])); - $StockID = trim(strtoupper($_POST['StockID'])); + $_SESSION['Adjustment']->StockID = trim(mb_strtoupper($_POST['StockID'])); + $StockID = trim(mb_strtoupper($_POST['StockID'])); } $_SESSION['Adjustment']->tag = $_POST['tag']; $_SESSION['Adjustment']->Narrative = $_POST['Narrative']; Modified: trunk/StockCategories.php =================================================================== --- trunk/StockCategories.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/StockCategories.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -13,9 +13,9 @@ _('Inventory Adjustment') . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_GET['SelectedCategory'])){ - $SelectedCategory = strtoupper($_GET['SelectedCategory']); + $SelectedCategory = mb_strtoupper($_GET['SelectedCategory']); } else if (isset($_POST['SelectedCategory'])){ - $SelectedCategory = strtoupper($_POST['SelectedCategory']); + $SelectedCategory = mb_strtoupper($_POST['SelectedCategory']); } if (isset($_GET['DeleteProperty'])){ @@ -38,7 +38,7 @@ //first off validate inputs sensible - $_POST['CategoryID'] = strtoupper($_POST['CategoryID']); + $_POST['CategoryID'] = mb_strtoupper($_POST['CategoryID']); if (strlen($_POST['CategoryID']) > 6) { $InputError = 1; Property changes on: trunk/StockCheck.php ___________________________________________________________________ Deleted: svn:executable - * Modified: trunk/StockCostUpdate.php =================================================================== --- trunk/StockCostUpdate.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/StockCostUpdate.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -12,9 +12,9 @@ include('includes/SQL_CommonFunctions.inc'); if (isset($_GET['StockID'])){ - $StockID = trim(strtoupper($_GET['StockID'])); + $StockID = trim(mb_strtoupper($_GET['StockID'])); } elseif (isset($_POST['StockID'])){ - $StockID =trim(strtoupper($_POST['StockID'])); + $StockID =trim(mb_strtoupper($_POST['StockID'])); } echo '<a href="' . $rootpath . '/SelectProduct.php?' . SID . '">' . _('Back to Items') . '</a><br />'; Modified: trunk/StockLocMovements.php =================================================================== --- trunk/StockLocMovements.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/StockLocMovements.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -119,8 +119,8 @@ <td class=number>%s</td> <td class=number>%s</td> </tr>', - strtoupper($myrow['stockid']), - strtoupper($myrow['stockid']), + mb_strtoupper($myrow['stockid']), + mb_strtoupper($myrow['stockid']), $myrow['typename'], $myrow['transno'], $DisplayTranDate, Modified: trunk/StockLocStatus.php =================================================================== --- trunk/StockLocStatus.php 2011-07-04 10:19:56 UTC (rev 5547) +++ trunk/StockLocStatus.php 2011-07-04 10:56:58 UTC (rev 5548) @@ -10,9 +10,9 @@ include('includes/header.inc'); if (isset($_GET['StockID'])){ - $StockID = trim(strtoupper($_GET['StockID'])); + $StockID = trim(mb_strtoupper($_GET['StockID'])); } elseif (isset($_POST['StockID'])){ - $StockID = trim(strtoupper($_POST['StockID'])); + $StockID = trim(mb_strtoupper($_POST['StockID'])); } @@ -258,13 +258,13 @@ <td class=number>%s</td> <td class=number><a target="_blank" href="SelectProduct.php?StockID=%s">%s</a></td> <td class=number>%s</td></tr>', - strtoupper($myrow['stockid']), - strtoupper($myrow['stockid']), + mb_strtoupper($myrow['stockid']), + mb_strtoupper($myrow['stockid']), $myrow['description'], number_format($myrow['quantity'],$myrow['decimalplaces']), number_format($myrow['reorderlevel'],$myr... [truncated message content] |
From: <tim...@us...> - 2011-07-04 11:00:24
|
Revision: 5549 http://weberp.svn.sourceforge.net/weberp/?rev=5549&view=rev Author: tim_schofield Date: 2011-07-04 11:00:14 +0000 (Mon, 04 Jul 2011) Log Message: ----------- substr to mb_substr Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/ContractBOM.php trunk/Contracts.php trunk/CounterSales.php trunk/CustomerBranches.php trunk/Customers.php trunk/DailySalesInquiry.php trunk/EDIProcessOrders.php trunk/FixedAssetItems.php trunk/FixedAssetTransfer.php trunk/FormDesigner.php trunk/GetStockImage.php trunk/Numbers/Words/lang.bg.php trunk/Numbers/Words/lang.cs.php trunk/Numbers/Words/lang.de.php trunk/Numbers/Words/lang.dk.php trunk/Numbers/Words/lang.en_100.php trunk/Numbers/Words/lang.en_GB.php trunk/Numbers/Words/lang.en_US.php trunk/Numbers/Words/lang.es.php trunk/Numbers/Words/lang.es_AR.php trunk/Numbers/Words/lang.et.php trunk/Numbers/Words/lang.fr.php trunk/Numbers/Words/lang.fr_BE.php trunk/Numbers/Words/lang.he.php trunk/Numbers/Words/lang.hu_HU.php trunk/Numbers/Words/lang.id.php trunk/Numbers/Words/lang.it_IT.php trunk/Numbers/Words/lang.lt.php trunk/Numbers/Words/lang.nl.php trunk/Numbers/Words/lang.pl.php trunk/Numbers/Words/lang.pt_BR.php trunk/Numbers/Words/lang.ru.php trunk/Numbers/Words/lang.sv.php trunk/Numbers/Words.php trunk/OffersReceived.php trunk/PDFPrintLabel.php trunk/PO_AuthoriseMyOrders.php trunk/PO_Items.php trunk/PageSecurity.php trunk/SalesCategories.php trunk/SelectCreditItems.php trunk/SelectOrderItems.php trunk/SpecialOrder.php trunk/Stocks.php trunk/SupplierCredit.php trunk/SupplierInvoice.php trunk/SupplierTenderCreate.php trunk/SupplierTenders.php trunk/Suppliers.php trunk/UpgradeDatabase.php trunk/WorkOrderReceive.php trunk/Z_ImportChartOfAccounts.php trunk/Z_MakeNewCompany.php trunk/Z_Upgrade_3.04-3.05.php trunk/Z_Upgrade_3.05-3.06.php trunk/Z_Upgrade_3.07-3.08.php trunk/Z_Upgrade_3.08-3.09.php trunk/Z_Upgrade_3.09-3.10.php trunk/Z_Upgrade_3.10-3.11.php trunk/Z_Upgrade_3.11-4.00.php trunk/Z_poAddLanguage.php trunk/Z_poEditLangModule.php trunk/Z_poEditLangRemaining.php trunk/api/api_branches.php trunk/api/api_customers.php trunk/api/api_debtortransactions.php trunk/api/api_glaccounts.php trunk/api/api_glgroups.php trunk/api/api_glsections.php trunk/api/api_locations.php trunk/api/api_purchdata.php trunk/api/api_salesareas.php trunk/api/api_salesman.php trunk/api/api_salesorders.php trunk/api/api_salestypes.php trunk/api/api_stock.php trunk/api/api_stockcategories.php trunk/api/api_suppliers.php trunk/api/api_workorders.php trunk/build/tests/includes/SelectMenuOption.php trunk/build/tests/includes/SelectModule.php trunk/build/tests/includes/login.php trunk/build/tests/includes/validators/XhtmlValidator.php trunk/config.distrib.php trunk/doc/Manual/ManualAPIFunctions.php trunk/includes/ConstructSQLForUserDefinedSalesReport.inc trunk/includes/DateFunctions.inc trunk/includes/DefineCartClass.php trunk/includes/EDIVariableSubstitution.inc trunk/includes/EDIconfig.inc trunk/includes/FreightCalculation.inc trunk/includes/LanguageSetup.php trunk/includes/MiscFunctions.php trunk/includes/PDFSalesAnalysis.inc trunk/includes/RFC822.php trunk/includes/UpgradeDB_mysql.inc trunk/includes/class.pdf.php trunk/includes/header.inc trunk/includes/htmlMimeMail.php trunk/includes/mimePart.php trunk/includes/php-gettext/gettext.inc trunk/includes/php-gettext/streams.php trunk/includes/phplot/contrib/color_range.test1.php trunk/includes/phplot/contrib/prune_labels.test.php trunk/includes/phplot/phplot.php trunk/includes/smtp.php trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/config/tcpdf_config.php trunk/includes/tcpdf/config/tcpdf_config_alt.php trunk/includes/tcpdf/tcpdf.php trunk/install/index.php trunk/install/save.php trunk/reportwriter/FormMaker.php trunk/reportwriter/ReportMaker.php trunk/reportwriter/WriteForm.inc trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/RCFunctions.inc trunk/sql/mysql/updates/50.php trunk/xmlrpc/lib/xmlrpc.inc trunk/xmlrpc/lib/xmlrpcs.inc Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/ConfirmDispatch_Invoice.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -594,7 +594,7 @@ $ErrMsg = _('Could not retrieve the quantity left at the location once this order is invoiced (for the purposes of checking that stock will not go negative because)'); $Result = DB_query($SQL,$db,$ErrMsg); $CheckNegRow = DB_fetch_array($Result); - if (($CheckNegRow['mbflag']=='B' OR $CheckNegRow['mbflag']=='M') AND substr($OrderLine->StockID,0,4)!='ASSET'){ + if (($CheckNegRow['mbflag']=='B' OR $CheckNegRow['mbflag']=='M') AND mb_substr($OrderLine->StockID,0,4)!='ASSET'){ if ($CheckNegRow['quantity'] < $OrderLine->QtyDispatched){ prnMsg( _('Invoicing the selected order would result in negative stock. The system parameters are set to prohibit negative stocks from occurring. This invoice cannot be created until the stock on hand is corrected.'),'error',$OrderLine->StockID . ' ' . $CheckNegRow['description'] . ' - ' . _('Negative Stock Prohibited')); $NegativesFound = true; @@ -817,13 +817,13 @@ foreach ($_SESSION['Items']->LineItems as $OrderLine) { /*Test to see if the item being sold is an asset */ - if (substr($OrderLine->StockID,0,6)=='ASSET-'){ + if (mb_substr($OrderLine->StockID,0,6)=='ASSET-'){ $IsAsset = true; $HyphenOccursAt = strpos($OrderLine->StockID,'-',6); if ($HyphenOccursAt == false){ - $AssetNumber = intval(substr($OrderLine->StockID,6)); + $AssetNumber = intval(mb_substr($OrderLine->StockID,6)); } else { - $AssetNumber = intval(substr($OrderLine->StockID,6,strlen($OrderLine->StockID)-$HyphenOccursAt-1)); + $AssetNumber = intval(mb_substr($OrderLine->StockID,6,strlen($OrderLine->StockID)-$HyphenOccursAt-1)); } prnMsg (_('The asset number being disposed of is:') . ' ' . $AssetNumber, 'info'); } else { Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/ContractBOM.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -169,8 +169,8 @@ if (isset($_POST['NewItem'])){ /* NewItem is set from the part selection list as the part code selected */ /* take the form entries and enter the data from the form into the PurchOrder class variable */ foreach ($_POST as $key => $value) { - if (substr($key, 0, 3)=='qty') { - $ItemCode=substr($key, 3, strlen($key)-3); + if (mb_substr($key, 0, 3)=='qty') { + $ItemCode=mb_substr($key, 3, strlen($key)-3); $Quantity=$value; $AlreadyOnThisBOM = 0; Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Contracts.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -111,7 +111,7 @@ $filename = $_SESSION['part_pics_dir'] . '/' . $_SESSION['Contract'.$identifier]->ContractRef . '.jpg'; //But check for the worst - if (mb_strtoupper(substr(trim($_FILES['Drawing']['name']),strlen($_FILES['Drawing']['name'])-3))!='JPG'){ + if (mb_strtoupper(mb_substr(trim($_FILES['Drawing']['name']),strlen($_FILES['Drawing']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['Drawing']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check @@ -685,8 +685,8 @@ * or set because only one customer record returned from a search * so parse the $Select string into debtorno and branch code */ foreach ($_POST as $key => $value) { - if (substr($key, 0, 6)=='Submit') { - $Index=substr($key, 6, 1); + if (mb_substr($key, 0, 6)=='Submit') { + $Index=mb_substr($key, 6, 1); $_POST['SelectedCustomer']=$_POST['SelectedCustomer'.$Index]; $_POST['SelectedBranch']=$_POST['SelectedBranch'.$Index]; } Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/CounterSales.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -37,33 +37,33 @@ $key=str_replace('~', ' ', trim($key)); $sql="SELECT quantity FROM stockserialitems - WHERE stockid='".substr($key,3, strpos($key, 'batch')-3)."' - AND serialno='".trim(substr($key, strpos($key, 'batch')+5))."'"; + WHERE stockid='".mb_substr($key,3, strpos($key, 'batch')-3)."' + AND serialno='".trim(mb_substr($key, strpos($key, 'batch')+5))."'"; $BatchQuantityResult=DB_query($sql, $db); $BatchQuantityRow=DB_fetch_array($BatchQuantityResult); - if (!isset($NewItemArray[substr($key,3, strpos($key, 'batch')-3)])) { + if (!isset($NewItemArray[mb_substr($key,3, strpos($key, 'batch')-3)])) { if ($BatchQuantityRow['quantity']<trim($value)) { - prnMsg( _('Batch number').' '.trim(substr($key, strpos($key, 'batch')+5)).' '. - _('of item number').' '.substr($key,3, strpos($key, 'batch')-3).' '. + prnMsg( _('Batch number').' '.trim(mb_substr($key, strpos($key, 'batch')+5)).' '. + _('of item number').' '.mb_substr($key,3, strpos($key, 'batch')-3).' '. _('has insufficient items remaining in it to complete this sale').$BatchQuantityRow['quantity'].'x'.$value, 'info'); } else { - $NewItemArray[substr($key,3, strpos($key, 'batch')-3)]['Quantity'] = trim($value); - $NewItemArray[substr($key,3, strpos($key, 'batch')-3)]['Batch']['Number'][] = trim(substr($key, strpos($key, 'batch')+5)); - $NewItemArray[substr($key,3, strpos($key, 'batch')-3)]['Batch']['Quantity'][] = trim($value); + $NewItemArray[mb_substr($key,3, strpos($key, 'batch')-3)]['Quantity'] = trim($value); + $NewItemArray[mb_substr($key,3, strpos($key, 'batch')-3)]['Batch']['Number'][] = trim(mb_substr($key, strpos($key, 'batch')+5)); + $NewItemArray[mb_substr($key,3, strpos($key, 'batch')-3)]['Batch']['Quantity'][] = trim($value); } } else { - if ($BatchQuantityRow['quantity']<trim($value)+$NewItemArray[substr($key,3, strpos($key, 'batch')-3)]['Quantity']) { - prnMsg( _('Batch number').' '.trim(substr($key, strpos($key, 'batch')+5)).' '. - _('of item number').' '.substr($key,3, strpos($key, 'batch')-3).' '. + if ($BatchQuantityRow['quantity']<trim($value)+$NewItemArray[mb_substr($key,3, strpos($key, 'batch')-3)]['Quantity']) { + prnMsg( _('Batch number').' '.trim(mb_substr($key, strpos($key, 'batch')+5)).' '. + _('of item number').' '.mb_substr($key,3, strpos($key, 'batch')-3).' '. _('has insufficient items remaining in it to complete this sale'), 'info'); } else { - $NewItemArray[substr($key,3, strpos($key, 'batch')-3)]['Quantity'] += trim($value); - $NewItemArray[substr($key,3, strpos($key, 'batch')-3)]['Batch']['Number'][] = trim(substr($key, strpos($key, 'batch')+5)); - $NewItemArray[substr($key,3, strpos($key, 'batch')-3)]['Batch']['Quantity'][] = trim($value); + $NewItemArray[mb_substr($key,3, strpos($key, 'batch')-3)]['Quantity'] += trim($value); + $NewItemArray[mb_substr($key,3, strpos($key, 'batch')-3)]['Batch']['Number'][] = trim(mb_substr($key, strpos($key, 'batch')+5)); + $NewItemArray[mb_substr($key,3, strpos($key, 'batch')-3)]['Batch']['Quantity'][] = trim($value); } } } elseif (strstr($key,'itm')) { - $NewItemArray[substr($key,3)] = trim($value); + $NewItemArray[mb_substr($key,3)] = trim($value); } } } Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/CustomerBranches.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -455,7 +455,7 @@ $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); echo '<div class="page_help_text">'._('No Branches are defined for').' - '.$myrow[0]. '. ' . _('You must have a minimum of one branch for each Customer. Please add a branch now.') .'</div>'; - $_POST['BranchCode'] = substr($DebtorNo,0,10); + $_POST['BranchCode'] = mb_substr($DebtorNo,0,10); $_POST['BrName'] = $myrow[0]; $_POST['BrAddress1'] = $myrow[1]; $_POST['BrAddress2'] = $myrow[2]; Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Customers.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -279,7 +279,7 @@ $ErrMsg = _('This customer could not be added because'); $result = DB_query($sql,$db,$ErrMsg); - $BranchCode = substr($_POST['DebtorNo'],0,4); + $BranchCode = mb_substr($_POST['DebtorNo'],0,4); echo "<meta http-equiv='Refresh' content='0; url=" . $rootpath ."/CustomerBranches.php?" . SID . "&DebtorNo=" . $_POST['DebtorNo'] . "'>"; Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/DailySalesInquiry.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -68,7 +68,7 @@ } if (strlen($Date_Array[2])>4) { - $Date_Array[2]= substr($Date_Array[2],0,2); + $Date_Array[2]= mb_substr($Date_Array[2],0,2); } $StartDateSQL = date('Y-m-d', mktime(0,0,0, (int)$Date_Array[1],1,(int)$Date_Array[0])); Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/EDIProcessOrders.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -81,9 +81,9 @@ $LineText = StripTrailingComma($LineText); echo "<br />".$LineText; - if ($SegTag != substr($LineText,0,3)){ + if ($SegTag != mb_substr($LineText,0,3)){ $SegCounter=1; - $SegTag = substr($LineText,0,3); + $SegTag = mb_substr($LineText,0,3); } else { $SegCounter++; if ($SegCounter > $Seg[$SegID]['MaxOccur']){ @@ -122,17 +122,17 @@ echo '<br />' . _('The segment tag') . ' ' . $SegTag . ' ' . _('is being processed'); switch ($SegTag){ case 'UNH': - $UNH_elements = explode ('+',substr($LineText,4)); + $UNH_elements = explode ('+',mb_substr($LineText,4)); $Order->Comments .= _('Customer EDI Ref') . ': ' . $UNH_elements[0]; $EmailText .= "\n" . _('EDI Message Ref') . ': ' . $UNH_elements[0]; - if (substr($UNH_elements[1],0,6)!='ORDERS'){ + if (mb_substr($UNH_elements[1],0,6)!='ORDERS'){ $EmailText .= "\n" . _('This message is not an order'); $TryNextFile = True; } break; case 'BGM': - $BGM_elements = explode('+',substr($LineText,4)); + $BGM_elements = explode('+',mb_substr($LineText,4)); $BGM_C002 = explode(':',$BGM_elements[0]); switch ($BGM_C002[0]){ case '220': @@ -242,7 +242,7 @@ break; case 'DTM': /*explode into an arrage all items delimited by the : - only after the + */ - $DTM_C507 = explode(':',substr($LineText,4)); + $DTM_C507 = explode(':',mb_substr($LineText,4)); $LocalFormatDate = ConvertEDIDate($DTM_C507[1],$DTM_C507[2]); switch ($DTM_C507[0]){ @@ -297,7 +297,7 @@ break; case 'PAI': /*explode into an array all items delimited by the : - only after the + */ - $PAI_C534 = explode(':',substr($LineText,4)); + $PAI_C534 = explode(':',mb_substr($LineText,4)); if ($PAI_C534[0]=='1'){ $EmailText .= "\n" . _('Payment will be effected by a direct payment for this order'); } elseif($PAI_C534[0]=='OA'){ @@ -321,7 +321,7 @@ } break; case 'ALI': - $ALI = explode('+',substr($LineText,4)); + $ALI = explode('+',mb_substr($LineText,4)); if (strlen($ALI[0])>1){ $EmailText .= "\n" . _('Goods of origin') . ' ' . $ALI[0]; } @@ -350,7 +350,7 @@ } break; case 'FTX': - $FTX = explode('+',substr($LineText,4)); + $FTX = explode('+',mb_substr($LineText,4)); /*agreed coded text is not catered for ... yet only free form text */ if (strlen($FTX[3])>5){ @@ -360,7 +360,7 @@ } break; case 'RFF': - $RFF = explode(':',substr($LineText,4)); + $RFF = explode(':',mb_substr($LineText,4)); switch ($RFF[0]){ case 'AE': $MsgText = "\n" . _('Authorisation for expense no') . ' ' . $RFF[1]; @@ -407,7 +407,7 @@ $EmailText .= $MsgText; break; case 'NAD': - $NAD = explode('+',substr($LineText,4)); + $NAD = explode('+',mb_substr($LineText,4)); $NAD_C082 = explode(':', $NAD[1]); $NAD_C058 = explode(':', $NAD[2]); /*Not used according to MIG */ $NAD_C080 = explode(':', $NAD[3]); @@ -565,7 +565,7 @@ function StripTrailingComma ($StringToStrip){ if (strrpos($StringToStrip,"'")){ - Return substr($StringToStrip,0,strrpos($StringToStrip,"'")); + Return mb_substr($StringToStrip,0,strrpos($StringToStrip,"'")); } else { Return $StringToStrip; } Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/FixedAssetItems.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -42,7 +42,7 @@ $filename = $_SESSION['part_pics_dir'] . '/ASSET_' . $AssetID . '.jpg'; //But check for the worst - if (mb_strtoupper(substr(trim($_FILES['ItemPicture']['name']),strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ + if (mb_strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['ItemPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check Modified: trunk/FixedAssetTransfer.php =================================================================== --- trunk/FixedAssetTransfer.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/FixedAssetTransfer.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -9,8 +9,8 @@ include('includes/header.inc'); foreach ($_POST as $AssetToMove => $Value) { //Value is not used? - if (substr($AssetToMove,0,4)=='Move') { // the form variable is of the format MoveAssetID so need to strip the move bit off - $AssetID=substr($AssetToMove,4); + if (mb_substr($AssetToMove,0,4)=='Move') { // the form variable is of the format MoveAssetID so need to strip the move bit off + $AssetID=mb_substr($AssetToMove,4); $sql="UPDATE fixedassets SET assetlocation='".$_POST['Location'.$AssetID] ."' WHERE assetid='". $AssetID . "'"; Modified: trunk/FormDesigner.php =================================================================== --- trunk/FormDesigner.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/FormDesigner.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -78,8 +78,8 @@ /*First create a simple xml object from the main file */ $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/'.$_POST['FormName']); $FormDesign['name']=$_POST['formname']; - if (substr($_POST['PaperSize'],-8)=='Portrait') { - $_POST['PaperSize']=substr($_POST['PaperSize'],0,strlen($_POST['PaperSize'])-9); + if (mb_substr($_POST['PaperSize'],-8)=='Portrait') { + $_POST['PaperSize']=mb_substr($_POST['PaperSize'],0,strlen($_POST['PaperSize'])-9); } $FormDesign->PaperSize=$_POST['PaperSize']; $FormDesign->LineHeight=$_POST['LineHeight']; @@ -168,8 +168,8 @@ /* Select the paper size/orientation */ echo '<th width=33%>'._('Paper Size').'<select name="PaperSize">'; foreach ($Papers as $Paper) { - if (substr($Paper,-8)=='Portrait') { - $PaperValue=substr($Paper,0,strlen($Paper)-9); + if (mb_substr($Paper,-8)=='Portrait') { + $PaperValue=mb_substr($Paper,0,strlen($Paper)-9); } else { $PaperValue=$Paper; } Modified: trunk/GetStockImage.php =================================================================== --- trunk/GetStockImage.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/GetStockImage.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -22,26 +22,26 @@ // Color decode function function DecodeBgColor( $colorstr ) { if ( $colorstr[0] == '#' ) { - $colorstr = substr($colorstr,1,strlen($colorstr)); + $colorstr = mb_substr($colorstr,1,strlen($colorstr)); } $red = 0; if(strlen($colorstr) > 1) { - $red = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,strlen($colorstr)); + $red = hexdec(mb_substr($colorstr,0,2)); + $colorstr = mb_substr($colorstr,2,strlen($colorstr)); } $green = 0; if(strlen($colorstr) > 1) { - $green = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,strlen($colorstr)); + $green = hexdec(mb_substr($colorstr,0,2)); + $colorstr = mb_substr($colorstr,2,strlen($colorstr)); } $blue = 0; if(strlen($colorstr) > 1) { - $blue = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,strlen($colorstr)); + $blue = hexdec(mb_substr($colorstr,0,2)); + $colorstr = mb_substr($colorstr,2,strlen($colorstr)); } if(strlen($colorstr) > 1) { - $alpha = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,strlen($colorstr)); + $alpha = hexdec(mb_substr($colorstr,0,2)); + $colorstr = mb_substr($colorstr,2,strlen($colorstr)); } if ( isset($alpha) ) return array('red' => $red, 'green' => $green, 'blue' => $blue, 'alpha' => $alpha ); @@ -120,8 +120,8 @@ if( $i === false ) $type = 'png'; else { - $type = strtolower(substr($stockid,$i+1,strlen($stockid))); - $stockid = substr($stockid,0,$i); + $type = strtolower(mb_substr($stockid,$i+1,strlen($stockid))); + $stockid = mb_substr($stockid,0,$i); if($blanktext && !isset($text)) $text = ''; } Modified: trunk/Numbers/Words/lang.bg.php =================================================================== --- trunk/Numbers/Words/lang.bg.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.bg.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -311,8 +311,8 @@ if (is_string($num)) { $ret = array(); $strlen = strlen($num); - $first = substr($num, 0, $strlen%3); - preg_match_all('/\d{3}/', substr($num, $strlen%3, $strlen), $m); + $first = mb_substr($num, 0, $strlen%3); + preg_match_all('/\d{3}/', mb_substr($num, $strlen%3, $strlen), $m); $ret =& $m[0]; if ($first) array_unshift($ret, $first); return $ret; @@ -446,9 +446,9 @@ if (!$num || preg_match('/^-?0+$/', $num) || !preg_match('/^-?\d+$/', $num)) return $this->_zero; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret_minus = $this->_minus . $this->_sep; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // if the absolute value is greater than 9.99*10^302, return infinity Modified: trunk/Numbers/Words/lang.cs.php =================================================================== --- trunk/Numbers/Words/lang.cs.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.cs.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -169,9 +169,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -185,8 +185,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -198,7 +198,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -210,13 +210,13 @@ switch(strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.de.php =================================================================== --- trunk/Numbers/Words/lang.de.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.de.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -158,9 +158,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -174,8 +174,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -187,7 +187,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -199,13 +199,13 @@ switch(strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.dk.php =================================================================== --- trunk/Numbers/Words/lang.dk.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.dk.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -172,9 +172,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -188,8 +188,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -201,7 +201,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -213,13 +213,13 @@ switch(strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.en_100.php =================================================================== --- trunk/Numbers/Words/lang.en_100.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.en_100.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -146,9 +146,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -162,8 +162,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -176,7 +176,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -188,13 +188,13 @@ switch(strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.en_GB.php =================================================================== --- trunk/Numbers/Words/lang.en_GB.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.en_GB.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -204,9 +204,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -220,8 +220,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -233,7 +233,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -245,13 +245,13 @@ switch(strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.en_US.php =================================================================== --- trunk/Numbers/Words/lang.en_US.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.en_US.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -296,9 +296,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -312,8 +312,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -325,7 +325,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -337,13 +337,13 @@ switch(strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.es.php =================================================================== --- trunk/Numbers/Words/lang.es.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.es.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -129,10 +129,10 @@ $ret = ''; // add a the word for the minus sign if necessary - if (substr($num, 0, 1) == '-') + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } @@ -147,13 +147,13 @@ { // convert the number above the first 6 digits // with it's corresponding $power. - $snum = substr($num, 0, -6); + $snum = mb_substr($num, 0, -6); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $ret .= $this->toWords($snum, $power + 6); } } - $num = substr($num, -6); + $num = mb_substr($num, -6); if ($num == 0) { return $ret; } Modified: trunk/Numbers/Words/lang.es_AR.php =================================================================== --- trunk/Numbers/Words/lang.es_AR.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.es_AR.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -189,10 +189,10 @@ $ret = ''; // add a the word for the minus sign if necessary - if (substr($num, 0, 1) == '-') + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } @@ -212,13 +212,13 @@ { // convert the number above the first 6 digits // with it's corresponding $power. - $snum = substr($num, 0, -6); + $snum = mb_substr($num, 0, -6); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $ret .= $this->toWords($snum, $power + 6); } } - $num = substr($num, -6); + $num = mb_substr($num, -6); if ($num == 0) { return $ret; } Modified: trunk/Numbers/Words/lang.et.php =================================================================== --- trunk/Numbers/Words/lang.et.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.et.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -235,9 +235,9 @@ function toWords($num, $power = 0, $powsuffix = '') { $ret = ''; - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } $num = trim($num); @@ -248,7 +248,7 @@ $curp = $maxp; for ($p = $maxp; $p > 0; --$p) { // power if (isset($this->_exponent[$p])) { - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -260,7 +260,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -272,13 +272,13 @@ switch(strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.fr.php =================================================================== --- trunk/Numbers/Words/lang.fr.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.fr.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -264,8 +264,8 @@ if (is_string($num)) { $ret = array(); $strlen = strlen($num); - $first = substr($num, 0, $strlen%3); - preg_match_all('/\d{3}/', substr($num, $strlen%3, $strlen), $m); + $first = mb_substr($num, 0, $strlen%3); + preg_match_all('/\d{3}/', mb_substr($num, $strlen%3, $strlen), $m); $ret =& $m[0]; if ($first) array_unshift($ret, $first); return $ret; @@ -397,9 +397,9 @@ if (!$num || preg_match('/^-?0+$/', $num) || !preg_match('/^-?\d+$/', $num)) return $this->_zero; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_minus . $this->_sep; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // if the absolute value is greater than 9.99*10^302, return infinity Modified: trunk/Numbers/Words/lang.fr_BE.php =================================================================== --- trunk/Numbers/Words/lang.fr_BE.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.fr_BE.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -268,8 +268,8 @@ if (is_string($num)) { $ret = array(); $strlen = strlen($num); - $first = substr($num, 0, $strlen%3); - preg_match_all('/\d{3}/', substr($num, $strlen%3, $strlen), $m); + $first = mb_substr($num, 0, $strlen%3); + preg_match_all('/\d{3}/', mb_substr($num, $strlen%3, $strlen), $m); $ret =& $m[0]; if ($first) array_unshift($ret, $first); return $ret; @@ -375,9 +375,9 @@ if (!$num || preg_match('/^-?0+$/', $num) || !preg_match('/^-?\d+$/', $num)) return $this->_zero; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_minus . $this->_sep; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // if the absolute value is greater than 9.99*10^302, return infinity Modified: trunk/Numbers/Words/lang.he.php =================================================================== --- trunk/Numbers/Words/lang.he.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.he.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -313,9 +313,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -329,8 +329,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -342,7 +342,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -354,13 +354,13 @@ switch(strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.hu_HU.php =================================================================== --- trunk/Numbers/Words/lang.hu_HU.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.hu_HU.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -204,9 +204,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -220,8 +220,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -233,7 +233,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -245,13 +245,13 @@ switch(strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.id.php =================================================================== --- trunk/Numbers/Words/lang.id.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.id.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -131,9 +131,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -147,8 +147,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -160,7 +160,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -172,16 +172,16 @@ switch(strlen($num)) { case 4: - $th = (int)substr($num,-4,1); + $th = (int)mb_substr($num,-4,1); case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.it_IT.php =================================================================== --- trunk/Numbers/Words/lang.it_IT.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.it_IT.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -125,10 +125,10 @@ $ret = ''; // add a the word for the minus sign if necessary - if (substr($num, 0, 1) == '-') + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } @@ -143,13 +143,13 @@ { // convert the number above the first 6 digits // with it's corresponding $power. - $snum = substr($num, 0, -6); + $snum = mb_substr($num, 0, -6); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $ret .= $this->toWords($snum, $power + 6); } } - $num = substr($num, -6); + $num = mb_substr($num, -6); if ($num == 0) { return $ret; } Modified: trunk/Numbers/Words/lang.lt.php =================================================================== --- trunk/Numbers/Words/lang.lt.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.lt.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -136,9 +136,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -152,8 +152,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -165,7 +165,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -177,13 +177,13 @@ switch(strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.nl.php =================================================================== --- trunk/Numbers/Words/lang.nl.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.nl.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -166,9 +166,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -182,8 +182,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -195,7 +195,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -207,13 +207,13 @@ switch(strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.pl.php =================================================================== --- trunk/Numbers/Words/lang.pl.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.pl.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -225,9 +225,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -241,8 +241,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -254,7 +254,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -266,13 +266,13 @@ switch(strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: @@ -476,18 +476,18 @@ * @since Numbers_Words 0.4 */ function _get_numlevel($num) { - $num = (int)substr($num,-3); + $num = (int)mb_substr($num,-3); $h = $t = $d = $lev = 0; switch(strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.pt_BR.php =================================================================== --- trunk/Numbers/Words/lang.pt_BR.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.pt_BR.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -219,9 +219,9 @@ $num = trim($num); - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces Modified: trunk/Numbers/Words/lang.ru.php =================================================================== --- trunk/Numbers/Words/lang.ru.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.ru.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -463,9 +463,9 @@ $num = trim($num); $sign = ""; - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $sign = $this->_minus . $this->_sep; - $num = substr($num, 1); + $num = mb_substr($num, 1); } while (strlen($num) % 3) $num = '0' . $num; @@ -483,7 +483,7 @@ } else { $groupgender = 1; } - $group = $this->_groupToWords(substr($num,-$power-3,3),$groupgender,$_case); + $group = $this->_groupToWords(mb_substr($num,-$power-3,3),$groupgender,$_case); if (!$power) { $case = $_case; } @@ -547,7 +547,7 @@ $hundreds = (int)$num{0}; if ($hundreds) { $ret = $this->_hundreds[$hundreds]; - if (substr($num,1) != '00') { + if (mb_substr($num,1) != '00') { $ret .= $this->_sep; } $case = 3; Modified: trunk/Numbers/Words/lang.sv.php =================================================================== --- trunk/Numbers/Words/lang.sv.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words/lang.sv.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -157,9 +157,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -173,8 +173,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -186,7 +186,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -198,13 +198,13 @@ switch(strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words.php =================================================================== --- trunk/Numbers/Words.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/Numbers/Words.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -65,10 +65,10 @@ if (!file_exists('Numbers/Words/lang.' . $locale . '.php')){ //try to drop off the .utf8 suffix then recheck if (strpos($locale,'.utf8')){ - $locale = substr($locale, 0,strpos($locale,'.utf8')); + $locale = mb_substr($locale, 0,strpos($locale,'.utf8')); } if (!file_exists('Numbers/Words/lang.' . $locale . '.php')){ - $locale = substr($locale,0,2); + $locale = mb_substr($locale,0,2); } if (!file_exists('Numbers/Words/lang.' . $locale . '.php')){ $locale = 'en_US'; Modified: trunk/OffersReceived.php =================================================================== --- trunk/OffersReceived.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/OffersReceived.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -133,8 +133,8 @@ $rejects=array(); $defers=array(); foreach ($_POST as $key => $value) { - if(substr($key,0,6)=='action') { - $OfferID=substr($key,6); + if(mb_substr($key,0,6)=='action') { + $OfferID=mb_substr($key,6); switch ($value) { case 1: $accepts[]=$OfferID; Modified: trunk/PDFPrintLabel.php =================================================================== --- trunk/PDFPrintLabel.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/PDFPrintLabel.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -48,7 +48,7 @@ $DocumentPaper='LETTER'; $DocumentOrientation='P'; // Correccion para la version trunk :( include('includes/PDFStarter.php'); - if (substr($_SESSION['VersionNumber'],0,1)>=4) { + if (mb_substr($_SESSION['VersionNumber'],0,1)>=4) { $pdf->setPageFormat($formatPage); } $ok = printLabels( @@ -412,7 +412,7 @@ $pdf->newpage(); */ // now, emit the PDF file (if not errors!) - if (substr($_SESSION['VersionNumber'],0,1)>=4) { + if (mb_substr($_SESSION['VersionNumber'],0,1)>=4) { $pdf->OutputD($_SESSION['DatabaseName'] . '_Labels_' . date('Y-m-d') . '.pdf');//UldisN $pdf->__destruct(); //UldisN } else { Modified: trunk/PO_AuthoriseMyOrders.php =================================================================== --- trunk/PO_AuthoriseMyOrders.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/PO_AuthoriseMyOrders.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -17,8 +17,8 @@ if (isset($_POST['updateall'])) { foreach ($_POST as $key => $value) { - if (substr($key,0,6)=='status') { - $orderno=substr($key,6); + if (mb_substr($key,0,6)=='status') { + $orderno=mb_substr($key,6); $status=$_POST['status'.$orderno]; $comment=date($_SESSION['DefaultDateFormat']).' - '._('Authorised by').' '.'<a href="mailto:'. $emailrow['email'].'">'.$_SESSION['UserID'].'</a><br />'.$_POST['comment']; $sql="UPDATE purchorders Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-07-04 10:56:58 UTC (rev 5548) +++ trunk/PO_Items.php 2011-07-04 11:00:14 UTC (rev 5549) @@ -737,8 +737,8 @@ if (isset($_POST['NewItem'])){ /* NewItem is set from the part selection list as the part code selected */ /* take the form entries and enter the data from the form into the PurchOrder class variable */ foreach ($_POST as $key => $value) { - if (substr($key, 0, 3)=='qty') { - $ItemCode=substr($key, 3, strlen($key)-3); + if (mb_substr($key, 0, 3)=='qty') { + $ItemCode=mb_substr($key, 3, strlen($key)-3); $Quantity=$value; $AlreadyOnThisOr... [truncated message content] |
From: <tim...@us...> - 2011-07-04 11:01:54
|
Revision: 5550 http://weberp.svn.sourceforge.net/weberp/?rev=5550&view=rev Author: tim_schofield Date: 2011-07-04 11:01:45 +0000 (Mon, 04 Jul 2011) Log Message: ----------- strpos to mb_strpos Modified Paths: -------------- trunk/AccountSections.php trunk/ConfirmDispatch_Invoice.php trunk/CounterSales.php trunk/Customers.php trunk/DailySalesInquiry.php trunk/DeliveryDetails.php trunk/MRPCreateDemands.php trunk/Numbers/Words.php trunk/PO_PDFPurchOrder.php trunk/PcExpensesTypeTab.php trunk/PcTypeTabs.php trunk/SelectCreditItems.php trunk/SelectOrderItems.php trunk/SuppPriceList.php trunk/Tax.php trunk/UpgradeDatabase.php trunk/Z_MakeNewCompany.php trunk/Z_Upgrade_3.04-3.05.php trunk/Z_Upgrade_3.05-3.06.php trunk/Z_Upgrade_3.07-3.08.php trunk/Z_Upgrade_3.08-3.09.php trunk/Z_Upgrade_3.09-3.10.php trunk/Z_Upgrade_3.10-3.11.php trunk/Z_Upgrade_3.11-4.00.php trunk/Z_poEditLangModule.php trunk/api/api_debtortransactions.php trunk/build/tests/includes/validators/XhtmlValidator.php trunk/doc/Manual/ManualAPIFunctions.php trunk/includes/ConstructSQLForUserDefinedSalesReport.inc trunk/includes/DateFunctions.inc trunk/includes/EDIVariableSubstitution.inc trunk/includes/EDIconfig.inc trunk/includes/RFC822.php trunk/includes/class.pdf.php trunk/includes/phplot/phplot.php trunk/includes/smtp.php trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/tcpdf.php trunk/install/save.php trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/RCFunctions.inc trunk/xmlrpc/lib/xmlrpc.inc trunk/xmlrpc/lib/xmlrpc_wrappers.inc trunk/xmlrpc/lib/xmlrpcs.inc Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/AccountSections.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -88,7 +88,7 @@ $Errors[$i] = 'SectionID'; $i++; } - if (isset($_POST['SectionID']) and strpos($_POST['SectionID'],".")>0) { + if (isset($_POST['SectionID']) and mb_strpos($_POST['SectionID'],".")>0) { $InputError = 1; prnMsg( _('The section number must be an integer'),'error'); $Errors[$i] = 'SectionID'; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/ConfirmDispatch_Invoice.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -819,7 +819,7 @@ /*Test to see if the item being sold is an asset */ if (mb_substr($OrderLine->StockID,0,6)=='ASSET-'){ $IsAsset = true; - $HyphenOccursAt = strpos($OrderLine->StockID,'-',6); + $HyphenOccursAt = mb_strpos($OrderLine->StockID,'-',6); if ($HyphenOccursAt == false){ $AssetNumber = intval(mb_substr($OrderLine->StockID,6)); } else { Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/CounterSales.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -37,29 +37,29 @@ $key=str_replace('~', ' ', trim($key)); $sql="SELECT quantity FROM stockserialitems - WHERE stockid='".mb_substr($key,3, strpos($key, 'batch')-3)."' - AND serialno='".trim(mb_substr($key, strpos($key, 'batch')+5))."'"; + WHERE stockid='".mb_substr($key,3, mb_strpos($key, 'batch')-3)."' + AND serialno='".trim(mb_substr($key, mb_strpos($key, 'batch')+5))."'"; $BatchQuantityResult=DB_query($sql, $db); $BatchQuantityRow=DB_fetch_array($BatchQuantityResult); - if (!isset($NewItemArray[mb_substr($key,3, strpos($key, 'batch')-3)])) { + if (!isset($NewItemArray[mb_substr($key,3, mb_strpos($key, 'batch')-3)])) { if ($BatchQuantityRow['quantity']<trim($value)) { - prnMsg( _('Batch number').' '.trim(mb_substr($key, strpos($key, 'batch')+5)).' '. - _('of item number').' '.mb_substr($key,3, strpos($key, 'batch')-3).' '. + prnMsg( _('Batch number').' '.trim(mb_substr($key, mb_strpos($key, 'batch')+5)).' '. + _('of item number').' '.mb_substr($key,3, mb_strpos($key, 'batch')-3).' '. _('has insufficient items remaining in it to complete this sale').$BatchQuantityRow['quantity'].'x'.$value, 'info'); } else { - $NewItemArray[mb_substr($key,3, strpos($key, 'batch')-3)]['Quantity'] = trim($value); - $NewItemArray[mb_substr($key,3, strpos($key, 'batch')-3)]['Batch']['Number'][] = trim(mb_substr($key, strpos($key, 'batch')+5)); - $NewItemArray[mb_substr($key,3, strpos($key, 'batch')-3)]['Batch']['Quantity'][] = trim($value); + $NewItemArray[mb_substr($key,3, mb_strpos($key, 'batch')-3)]['Quantity'] = trim($value); + $NewItemArray[mb_substr($key,3, mb_strpos($key, 'batch')-3)]['Batch']['Number'][] = trim(mb_substr($key, mb_strpos($key, 'batch')+5)); + $NewItemArray[mb_substr($key,3, mb_strpos($key, 'batch')-3)]['Batch']['Quantity'][] = trim($value); } } else { - if ($BatchQuantityRow['quantity']<trim($value)+$NewItemArray[mb_substr($key,3, strpos($key, 'batch')-3)]['Quantity']) { - prnMsg( _('Batch number').' '.trim(mb_substr($key, strpos($key, 'batch')+5)).' '. - _('of item number').' '.mb_substr($key,3, strpos($key, 'batch')-3).' '. + if ($BatchQuantityRow['quantity']<trim($value)+$NewItemArray[mb_substr($key,3, mb_strpos($key, 'batch')-3)]['Quantity']) { + prnMsg( _('Batch number').' '.trim(mb_substr($key, mb_strpos($key, 'batch')+5)).' '. + _('of item number').' '.mb_substr($key,3, mb_strpos($key, 'batch')-3).' '. _('has insufficient items remaining in it to complete this sale'), 'info'); } else { - $NewItemArray[mb_substr($key,3, strpos($key, 'batch')-3)]['Quantity'] += trim($value); - $NewItemArray[mb_substr($key,3, strpos($key, 'batch')-3)]['Batch']['Number'][] = trim(mb_substr($key, strpos($key, 'batch')+5)); - $NewItemArray[mb_substr($key,3, strpos($key, 'batch')-3)]['Batch']['Quantity'][] = trim($value); + $NewItemArray[mb_substr($key,3, mb_strpos($key, 'batch')-3)]['Quantity'] += trim($value); + $NewItemArray[mb_substr($key,3, mb_strpos($key, 'batch')-3)]['Batch']['Number'][] = trim(mb_substr($key, mb_strpos($key, 'batch')+5)); + $NewItemArray[mb_substr($key,3, mb_strpos($key, 'batch')-3)]['Batch']['Quantity'][] = trim($value); } } } elseif (strstr($key,'itm')) { Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/Customers.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -48,7 +48,7 @@ prnMsg( _('The debtor code cannot be empty'),'error'); $Errors[$i] = 'DebtorNo'; $i++; - } elseif ($_SESSION['AutoDebtorNo']==0 AND (ContainsIllegalCharacters($_POST['DebtorNo']) OR strpos($_POST['DebtorNo'], ' '))) { + } elseif ($_SESSION['AutoDebtorNo']==0 AND (ContainsIllegalCharacters($_POST['DebtorNo']) OR mb_strpos($_POST['DebtorNo'], ' '))) { $InputError = 1; prnMsg( _('The customer code cannot contain any of the illefal characters') ,'error'); $Errors[$i] = 'DebtorNo'; Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/DailySalesInquiry.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -59,11 +59,11 @@ echo '</form></div>'; echo '<br />'; /*Now get and display the sales data returned */ -if (strpos($EndDateSQL,'/')) { +if (mb_strpos($EndDateSQL,'/')) { $Date_Array = explode('/',$EndDateSQL); -} elseif (strpos ($EndDateSQL,'-')) { +} elseif (mb_strpos ($EndDateSQL,'-')) { $Date_Array = explode('-',$EndDateSQL); -} elseif (strpos ($EndDateSQL,'.')) { +} elseif (mb_strpos ($EndDateSQL,'.')) { $Date_Array = explode('.',$EndDateSQL); } Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/DeliveryDetails.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -63,7 +63,7 @@ $InputErrors =1; prnMsg(_('You should enter the street address in the box provided') . '. ' . _('Orders cannot be accepted without a valid street address'),'error'); } -// if (strpos($_POST['BrAdd1'],_('Box'))>0){ +// if (mb_strpos($_POST['BrAdd1'],_('Box'))>0){ // prnMsg(_('You have entered the word') . ' "' . _('Box') . '" ' . _('in the street address') . '. ' . _('Items cannot be delivered to') . ' ' ._('box') . ' ' . _('addresses'),'warn'); // } if (!is_numeric($_POST['FreightCost'])){ Modified: trunk/MRPCreateDemands.php =================================================================== --- trunk/MRPCreateDemands.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/MRPCreateDemands.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -84,11 +84,11 @@ // Create array of dates based on DistDate and adding either weeks or months $FormatedDistdate = FormatDateForSQL($_POST['DistDate']); -if (strpos($FormatedDistdate,"/")) { +if (mb_strpos($FormatedDistdate,"/")) { list($yyyy,$mm,$dd) = explode("/",$FormatedDistdate); -} else if (strpos($FormatedDistdate,"-")) { +} else if (mb_strpos($FormatedDistdate,"-")) { list($yyyy,$mm,$dd) = explode("-",$FormatedDistdate); -} else if (strpos($FormatedDistdate,".")) { +} else if (mb_strpos($FormatedDistdate,".")) { list($yyyy,$mm,$dd) = explode(".",$FormatedDistdate); } Modified: trunk/Numbers/Words.php =================================================================== --- trunk/Numbers/Words.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/Numbers/Words.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -64,8 +64,8 @@ //Phil mods to ensure correct translation used. if (!file_exists('Numbers/Words/lang.' . $locale . '.php')){ //try to drop off the .utf8 suffix then recheck - if (strpos($locale,'.utf8')){ - $locale = mb_substr($locale, 0,strpos($locale,'.utf8')); + if (mb_strpos($locale,'.utf8')){ + $locale = mb_substr($locale, 0,mb_strpos($locale,'.utf8')); } if (!file_exists('Numbers/Words/lang.' . $locale . '.php')){ $locale = mb_substr($locale,0,2); @@ -132,7 +132,7 @@ @$obj =& new $classname; - if (strpos($num, '.') === false) + if (mb_strpos($num, '.') === false) { $ret = trim($obj->toCurrencyWords($int_curr, $num)); } else { Modified: trunk/PO_PDFPurchOrder.php =================================================================== --- trunk/PO_PDFPurchOrder.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/PO_PDFPurchOrder.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -382,7 +382,7 @@ if (DB_num_rows($ContactsResult)>0){ echo '<tr><td>'. _('Email to') .':</td><td><select name="EmailTo">'; while ($ContactDetails = DB_fetch_array($ContactsResult)){ - if (strlen($ContactDetails['email'])>2 AND strpos($ContactDetails['email'],'@')>0){ + if (strlen($ContactDetails['email'])>2 AND mb_strpos($ContactDetails['email'],'@')>0){ if ($_POST['EmailTo']==$ContactDetails['email']){ echo '<option selected value="' . $ContactDetails['email'] . '">' . $ContactDetails['Contact'] . ' - ' . $ContactDetails['email'] . '</option>'; } else { Modified: trunk/PcExpensesTypeTab.php =================================================================== --- trunk/PcExpensesTypeTab.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/PcExpensesTypeTab.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -18,7 +18,7 @@ $SelectedType=''; } -if (!isset($_GET['delete']) and (ContainsIllegalCharacters($SelectedType) OR strpos($SelectedType,' ')>0)){ +if (!isset($_GET['delete']) and (ContainsIllegalCharacters($SelectedType) OR mb_strpos($SelectedType,' ')>0)){ $InputError = 1; prnMsg(_('The petty cash tab type contain any of the following characters " \' - & or a space'),'error'); } Modified: trunk/PcTypeTabs.php =================================================================== --- trunk/PcTypeTabs.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/PcTypeTabs.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -43,7 +43,7 @@ echo prnMsg(_('The tab code must be twenty characters or less long'),'error'); $Errors[$i] = 'TypeTabCode'; $i++; - }elseif (ContainsIllegalCharacters($_POST['TypeTabCode']) OR strpos($_POST['TypeTabCode'],' ')>0) { + }elseif (ContainsIllegalCharacters($_POST['TypeTabCode']) OR mb_strpos($_POST['TypeTabCode'],' ')>0) { $InputError = 1; prnMsg(_('The petty cash tab type code cannot contain any of the illegal characters'),'error'); }elseif (strlen($_POST['TypeTabDescription']) >50) { Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/SelectCreditItems.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -116,8 +116,8 @@ /*will only be true if page called from customer selection form parse the $Select string into customer code and branch code */ - $_SESSION['CreditItems']->Branch = mb_substr($_POST['Select'],strpos($_POST['Select'],' - ')+3); - $_POST['Select'] = mb_substr($_POST['Select'],0,strpos($_POST['Select'],' - ')); + $_SESSION['CreditItems']->Branch = mb_substr($_POST['Select'],mb_strpos($_POST['Select'],' - ')+3); + $_POST['Select'] = mb_substr($_POST['Select'],0,mb_strpos($_POST['Select'],' - ')); /*Now retrieve customer information - name, salestype, currency, terms etc */ Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/SelectOrderItems.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -386,9 +386,9 @@ // record returned from a search so parse the $Select string into customer code and branch code */ if (isset($_POST['Select']) AND $_POST['Select']!='') { - $_SESSION['Items'.$identifier]->Branch = mb_substr($_POST['Select'],strpos($_POST['Select'],' - ')+3); + $_SESSION['Items'.$identifier]->Branch = mb_substr($_POST['Select'],mb_strpos($_POST['Select'],' - ')+3); - $_POST['Select'] = mb_substr($_POST['Select'],0,strpos($_POST['Select'],' - ')); + $_POST['Select'] = mb_substr($_POST['Select'],0,mb_strpos($_POST['Select'],' - ')); // Now check to ensure this account is not on hold */ $sql = "SELECT debtorsmaster.name, Modified: trunk/SuppPriceList.php =================================================================== --- trunk/SuppPriceList.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/SuppPriceList.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -137,11 +137,11 @@ // 4) Height 5) Text 6) Alignment 7) Border 8) Fill - True to use SetFillColor // and False to set to transparent - if (strpos($myrow[3],'-')) { + if (mb_strpos($myrow[3],'-')) { $DateArray=explode('-', $myrow[3]); - } else if (strpos($myrow[3],'/')) { + } else if (mb_strpos($myrow[3],'/')) { $DateArray=explode('/', $myrow[3]); - } else if (strpos($myrow[3],'.')) { + } else if (mb_strpos($myrow[3],'.')) { $DateArray=explode('.', $myrow[3]); } $dateprice=date($_SESSION['DefaultDateFormat'], mktime(0,0,0,$DateArray[1],$DateArray[2],$DateArray[0])); Modified: trunk/Tax.php =================================================================== --- trunk/Tax.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/Tax.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -128,9 +128,9 @@ /*Now do the inputs from SuppTrans */ /*Only have dates in SuppTrans no periods so need to get the starting date */ - if (strpos($PeriodEnd,'/')) { + if (mb_strpos($PeriodEnd,'/')) { $Date_Array = explode('/',$PeriodEnd); - } elseif (strpos($PeriodEnd,'.')) { + } elseif (mb_strpos($PeriodEnd,'.')) { $Date_Array = explode('.',$PeriodEnd); } if ($_SESSION['DefaultDateFormat']=='d/m/Y'){ Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/UpgradeDatabase.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -135,7 +135,7 @@ if (mb_substr($SQLEntries[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLEntries[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLEntries[$i],';')>0 AND ! $InAFunction){ $sql = mb_substr($sql,0,strlen($sql)-1); $result = DB_query($sql, $db, '','', false, false); echo '<tr><td>' . $sql . '</td>'; Modified: trunk/Z_MakeNewCompany.php =================================================================== --- trunk/Z_MakeNewCompany.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/Z_MakeNewCompany.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -119,7 +119,7 @@ if (mb_substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = mb_substr($SQL,0,strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.04-3.05.php =================================================================== --- trunk/Z_Upgrade_3.04-3.05.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/Z_Upgrade_3.04-3.05.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -49,7 +49,7 @@ if (mb_substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = mb_substr($SQL,0,strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.05-3.06.php =================================================================== --- trunk/Z_Upgrade_3.05-3.06.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/Z_Upgrade_3.05-3.06.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -41,7 +41,7 @@ if (mb_substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = mb_substr($SQL,0,strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.07-3.08.php =================================================================== --- trunk/Z_Upgrade_3.07-3.08.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/Z_Upgrade_3.07-3.08.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -41,7 +41,7 @@ if (mb_substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = mb_substr($SQL,0,strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.08-3.09.php =================================================================== --- trunk/Z_Upgrade_3.08-3.09.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/Z_Upgrade_3.08-3.09.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -41,7 +41,7 @@ if (mb_substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = mb_substr($SQL,0,strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.09-3.10.php =================================================================== --- trunk/Z_Upgrade_3.09-3.10.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/Z_Upgrade_3.09-3.10.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -41,7 +41,7 @@ if (mb_substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = mb_substr($SQL,0,strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.10-3.11.php =================================================================== --- trunk/Z_Upgrade_3.10-3.11.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/Z_Upgrade_3.10-3.11.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -51,7 +51,7 @@ if (mb_substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $sql = mb_substr($sql,0,strlen($sql)-1); $result = DB_query($sql, $db, $ErrMsg, $DBMsg, false, false); switch (DB_error_no($db)) { Modified: trunk/Z_Upgrade_3.11-4.00.php =================================================================== --- trunk/Z_Upgrade_3.11-4.00.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/Z_Upgrade_3.11-4.00.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -51,7 +51,7 @@ if (mb_substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $sql = mb_substr($sql,0,strlen($sql)-1); $result = DB_query($sql, $db, $ErrMsg, $DBMsg, false, false); switch (DB_error_no($db)) { Modified: trunk/Z_poEditLangModule.php =================================================================== --- trunk/Z_poEditLangModule.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/Z_poEditLangModule.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -144,7 +144,7 @@ for ($i=1; $i<=$TotalLines; $i++) { - $b = strpos($AlsoIn[$i], $_POST['module']); + $b = mb_strpos($AlsoIn[$i], $_POST['module']); if ($b === False) { /* skip it */ Modified: trunk/api/api_debtortransactions.php =================================================================== --- trunk/api/api_debtortransactions.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/api/api_debtortransactions.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -20,11 +20,11 @@ //for MySQL dates are in the format YYYY-mm-dd - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -53,9 +53,9 @@ $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strpos($TranDate,'/')>0) { + if (mb_strpos($TranDate,'/')>0) { $DateArray = explode('/',$TranDate); - } elseif (strpos($TranDate,'.')>0) { + } elseif (mb_strpos($TranDate,'.')>0) { $DateArray = explode('.',$TranDate); } if ($DateFormat=='d/m/Y') { Modified: trunk/build/tests/includes/validators/XhtmlValidator.php =================================================================== --- trunk/build/tests/includes/validators/XhtmlValidator.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/build/tests/includes/validators/XhtmlValidator.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -1070,7 +1070,7 @@ function removeDoctypeHeader($xhtml) { if (mb_substr($xhtml, 0, 9) == '<!DOCTYPE') { - $replacement = mb_substr($xhtml, 0, strpos($xhtml, '>')); + $replacement = mb_substr($xhtml, 0, mb_strpos($xhtml, '>')); $this->_startLine = count(mb_substr_count($replacement, "\n")); } return (isset($replacement)) ? mb_substr($xhtml, strlen($replacement)) : $xhtml; Modified: trunk/doc/Manual/ManualAPIFunctions.php =================================================================== --- trunk/doc/Manual/ManualAPIFunctions.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/doc/Manual/ManualAPIFunctions.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -26,7 +26,7 @@ $weberppassword = $myrow[0]; $ServerString = $_SERVER['HTTP_HOST'].$rootpath; -$FirstBitOfURL = mb_substr($ServerString,0,strpos($ServerString,'/doc/Manual')); +$FirstBitOfURL = mb_substr($ServerString,0,mb_strpos($ServerString,'/doc/Manual')); $ServerURL = "http://". $FirstBitOfURL ."/api/api_xml-rpc.php"; Modified: trunk/includes/ConstructSQLForUserDefinedSalesReport.inc =================================================================== --- trunk/includes/ConstructSQLForUserDefinedSalesReport.inc 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/includes/ConstructSQLForUserDefinedSalesReport.inc 2011-07-04 11:01:45 UTC (rev 5550) @@ -257,7 +257,7 @@ The first 6 Columns are defined by the group by fields so for eg the first col defined will be col 7 and so on - thats why need to add 6 to the col defined as */ - $length_ColNum = strpos($SQLSelectCls, 'AS col' . ($Cols['colnumerator'] + 8) , 7); + $length_ColNum = mb_strpos($SQLSelectCls, 'AS col' . ($Cols['colnumerator'] + 8) , 7); If ($length_ColNum == 0) { @@ -274,9 +274,9 @@ /*find the comma just before the Select Cls statement for the numerator column */ do { - $strt_ColNum = strpos( $SQLSelectCls, ',', $strt_ColNum + 1) + 1; + $strt_ColNum = mb_strpos( $SQLSelectCls, ',', $strt_ColNum + 1) + 1; - } while (strpos($SQLSelectCls, ',', $strt_ColNum) < $length_ColNum && strpos($SQLSelectCls, ',' , $strt_ColNum)!=0); + } while (mb_strpos($SQLSelectCls, ',', $strt_ColNum) < $length_ColNum && mb_strpos($SQLSelectCls, ',' , $strt_ColNum)!=0); /*The length of the element in the select clause defining the column will be from the comma to the @@ -288,7 +288,7 @@ /*The denominator column is also required if the constant is not used so do the same again for the denominator */ - $length_ColDen = strpos($SQLSelectCls, 'AS col' . (($Cols['coldenominator']) + 8), 7); + $length_ColDen = mb_strpos($SQLSelectCls, 'AS col' . (($Cols['coldenominator']) + 8), 7); If ($length_ColDen == 0){ prnMsg (_('Calculated fields must use columns defined in the report specification') . '. ' . _('The denominator column number entered for this calculation is not defined in the report'),'error',_('Calculation With Undefined Denominator')); Exit; @@ -299,9 +299,9 @@ /*find the comma just before the Select Cls statement for the denominator column */ do { - $strt_ColDen = strpos( $SQLSelectCls, ',', $strt_ColDen +1)+1; + $strt_ColDen = mb_strpos( $SQLSelectCls, ',', $strt_ColDen +1)+1; - } while (strpos($SQLSelectCls, ',', $strt_ColDen) < $length_ColDen && strpos($SQLSelectCls, ',' , $strt_ColDen)!=0); + } while (mb_strpos($SQLSelectCls, ',', $strt_ColDen) < $length_ColDen && mb_strpos($SQLSelectCls, ',' , $strt_ColDen)!=0); $length_ColDen = $length_ColDen - $strt_ColDen - 1; Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/includes/DateFunctions.inc 2011-07-04 11:01:45 UTC (rev 5550) @@ -21,11 +21,11 @@ //echo '<BR>The date entered is ' . $DateEntry; - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (strlen($DateEntry)==6) { $Date_Array[0]= mb_substr($DateEntry,0,2); @@ -83,11 +83,11 @@ function MonthAndYearFromSQLDate($DateEntry) { - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -101,11 +101,11 @@ function DayOfWeekFromSQLDate($DateEntry) { - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -119,11 +119,11 @@ function DayOfMonthFromSQLDate($DateEntry) { - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -154,11 +154,11 @@ //for MySQL dates are in the format YYYY-mm-dd - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } else { prnMsg(_('The date does not appear to be in a valid format. The date being converted from SQL format was:') . ' ' . $DateEntry,'error'); @@ -199,11 +199,11 @@ //for MySQL dates are in the format YYYY-mm-dd //EDI format 102 dates are in the format CCYYMMDD - just need to lose the seperator - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -223,11 +223,11 @@ $DateEntry = trim($DateEntry); - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (strlen($DateEntry)==6) { $Date_Array[0]= mb_substr($DateEntry,0,2); @@ -332,11 +332,11 @@ $DateEntry =trim($DateEntry); - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (strlen($DateEntry)==6) { $Date_Array[0]= mb_substr($DateEntry,0,2); @@ -388,11 +388,11 @@ $DateEntry = trim($DateEntry); - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (strlen($DateEntry)==6) { $Date_Array[0]= mb_substr($DateEntry,0,2); @@ -455,11 +455,11 @@ $DateEntry = trim($DateEntry); - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (strlen($DateEntry)==6) { $Date_Array[0]= mb_substr($DateEntry,0,2); @@ -581,11 +581,11 @@ $TranDate = trim($TranDate); - if (strpos($TranDate,'/')) { + if (mb_strpos($TranDate,'/')) { $Date_Array = explode('/',$TranDate); - } elseif (strpos ($TranDate,'-')) { + } elseif (mb_strpos ($TranDate,'-')) { $Date_Array = explode('-',$TranDate); - } elseif (strpos ($TranDate,'.')) { + } elseif (mb_strpos ($TranDate,'.')) { $Date_Array = explode('.',$TranDate); } @@ -648,11 +648,11 @@ $DateToAddTo = trim($DateToAddTo); - if (strpos($DateToAddTo,'/')) { + if (mb_strpos($DateToAddTo,'/')) { $Date_Array = explode('/',$DateToAddTo); - } elseif (strpos ($DateToAddTo,'-')) { + } elseif (mb_strpos ($DateToAddTo,'-')) { $Date_Array = explode('-',$DateToAddTo); - } elseif (strpos ($DateToAddTo,'.')) { + } elseif (mb_strpos ($DateToAddTo,'.')) { $Date_Array = explode('.',$DateToAddTo); } @@ -723,18 +723,18 @@ $Date1 = trim($Date1); $Date2 = trim($Date2); - if (strpos($Date1,'/')) { + if (mb_strpos($Date1,'/')) { $Date1_array = explode('/',$Date1); - } elseif (strpos ($Date1,'-')) { + } elseif (mb_strpos ($Date1,'-')) { $Date1_array = explode('-',$Date1); - } elseif (strpos ($Date1,'.')) { + } elseif (mb_strpos ($Date1,'.')) { $Date1_array = explode('.',$Date1); } - if (strpos($Date2,'/')) { + if (mb_strpos($Date2,'/')) { $Date2_array = explode('/',$Date2); - } elseif (strpos ($Date2,'-')) { + } elseif (mb_strpos ($Date2,'-')) { $Date2_array = explode('-',$Date2); - } elseif (strpos ($Date2,'.')) { + } elseif (mb_strpos ($Date2,'.')) { $Date2_array = explode('.',$Date2); } @@ -848,11 +848,11 @@ /* Convert the transaction date into a unix time stamp.*/ - if (strpos($TransDate,'/')) { + if (mb_strpos($TransDate,'/')) { $Date_Array = explode('/',$TransDate); - } elseif (strpos ($TransDate,'-')) { + } elseif (mb_strpos ($TransDate,'-')) { $Date_Array = explode('-',$TransDate); - } elseif (strpos ($TransDate,'.')) { + } elseif (mb_strpos ($TransDate,'.')) { $Date_Array = explode('.',$TransDate); } if (($_SESSION['DefaultDateFormat']=='d/m/Y') or ($_SESSION['DefaultDateFormat']=='d.m.Y')){ Modified: trunk/includes/EDIVariableSubstitution.inc =================================================================== --- trunk/includes/EDIVariableSubstitution.inc 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/includes/EDIVariableSubstitution.inc 2011-07-04 11:01:45 UTC (rev 5550) @@ -5,14 +5,14 @@ $PositionPointer = 0; $NewLineText =''; /* now get each occurence of [ in the line */ - while (strpos ($MsgLineText,'[',$PositionPointer)!=False){ + while (mb_strpos ($MsgLineText,'[',$PositionPointer)!=False){ $LastPositionPointer = $PositionPointer; - $PositionPointer = strpos ($MsgLineText,'[',$PositionPointer); + $PositionPointer = mb_strpos ($MsgLineText,'[',$PositionPointer); $NewLineText = $NewLineText . mb_substr($MsgLineText,$LastPositionPointer,$PositionPointer-$LastPositionPointer); $LastPositionPointer = $PositionPointer; - $PositionPointer = strpos ($MsgLineText,']',$PositionPointer); + $PositionPointer = mb_strpos ($MsgLineText,']',$PositionPointer); $VariableName = mb_substr($MsgLineText,$LastPositionPointer+1,$PositionPointer-$LastPositionPointer-1); Modified: trunk/includes/EDIconfig.inc =================================================================== --- trunk/includes/EDIconfig.inc 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/includes/EDIconfig.inc 2011-07-04 11:01:45 UTC (rev 5550) @@ -58,14 +58,14 @@ $PoistionPointer = 0; $NewLineText =''; /* now get each occurence of [ in the line */ - while (strpos ($LineDetails['linetext'],'[',$PoistionPointer)!=False){ + while (mb_strpos ($LineDetails['linetext'],'[',$PoistionPointer)!=False){ $LastPositionPointer = $PoistionPointer; - $PositionPointer = strpos ($LineDetails['linetext'],'[',$PoistionPointer); + $PositionPointer = mb_strpos ($LineDetails['linetext'],'[',$PoistionPointer); $NewLineText = $NewLineText . mb_substr($LineDetails['linetext'],$LastPositionPointer,$PoistionPointer-$LastPositionPointer); $LastPositionPointer = $PoistionPointer; - $PositionPointer = strpos ($LineDetails['linetext'],']',$PoistionPointer); + $PositionPointer = mb_strpos ($LineDetails['linetext'],']',$PoistionPointer); $VariableName = mb_substr($LineDetails['linetext'],$LastPositionPointer,$PoistionPointer-$LastPositionPointer); Modified: trunk/includes/RFC822.php =================================================================== --- trunk/includes/RFC822.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/includes/RFC822.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -211,7 +211,7 @@ // brackets/quotes etc then something's fubar. // First check there's a colon at all: - if (strpos($string, ':') === false) { + if (mb_strpos($string, ':') === false) { $this->error = 'Invalid address: ' . $string; return false; } @@ -579,7 +579,7 @@ $comments[] = $comment; // +1 is for the trailing ) - $_mailbox = mb_substr($_mailbox, strpos($_mailbox, $comment)+strlen($comment)+1); + $_mailbox = mb_substr($_mailbox, mb_strpos($_mailbox, $comment)+strlen($comment)+1); } else { break; } @@ -647,7 +647,7 @@ function _validateRouteAddr($route_addr) { // Check for colon. - if (strpos($route_addr, ':') !== false) { + if (mb_strpos($route_addr, ':') !== false) { $parts = explode(':', $route_addr); $route = $this->_splitCheck($parts, ':'); } else { @@ -784,7 +784,7 @@ $addr_spec = trim($addr_spec); // Split on @ sign if there is one. - if (strpos($addr_spec, '@') !== false) { + if (mb_strpos($addr_spec, '@') !== false) { $parts = explode('@', $addr_spec); $local_part = $this->_splitCheck($parts, '@'); $domain = mb_substr($addr_spec, strlen($local_part . '@')); Modified: trunk/includes/class.pdf.php =================================================================== --- trunk/includes/class.pdf.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/includes/class.pdf.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -280,13 +280,13 @@ $b2='LR'; } else { $b2=''; - if(is_int(strpos($border,'L'))) { + if(is_int(mb_strpos($border,'L'))) { $b2.='L'; } - if(is_int(strpos($border,'R'))) { + if(is_int(mb_strpos($border,'R'))) { $b2.='R'; } - $b=is_int(strpos($border,'T')) ? $b2.'T' : $b2; + $b=is_int(mb_strpos($border,'T')) ? $b2.'T' : $b2; } } $sep=-1; Modified: trunk/includes/phplot/phplot.php =================================================================== --- trunk/includes/phplot/phplot.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/includes/phplot/phplot.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -1850,7 +1850,7 @@ $asked = strtolower(trim($which_opt)); # Look for the supplied value in a comma/space separated list. - if (strpos(", $which_acc,", ", $asked,") !== False) + if (mb_strpos(", $which_acc,", ", $asked,") !== False) return $asked; $this->PrintError("$which_func(): '$which_opt' not in available choices: '$which_acc'."); @@ -1889,7 +1889,7 @@ */ protected function CheckDataType($valid_types) { - if (strpos(", $valid_types,", ", $this->data_type,") !== False) + if (mb_strpos(", $valid_types,", ", $this->data_type,") !== False) return TRUE; $this->PrintError("Data type '$this->data_type' is not valid for '$this->plot_type' plots." Modified: trunk/includes/smtp.php =================================================================== --- trunk/includes/smtp.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/includes/smtp.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -336,7 +336,7 @@ $loops = 0; if(is_resource($this->connection)){ - while((strpos($return, CRLF) === FALSE OR mb_substr($line,3,1) !== ' ') AND $loops < 100){ + while((mb_strpos($return, CRLF) === FALSE OR mb_substr($line,3,1) !== ' ') AND $loops < 100){ $line = fgets($this->connection, 512); $return .= $line; $loops++; Modified: trunk/includes/tcpdf/barcodes.php =================================================================== --- trunk/includes/tcpdf/barcodes.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/includes/tcpdf/barcodes.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -948,7 +948,7 @@ $sum = $startid; $clen = strlen($code); for ($i = 0; $i < $clen; ++$i) { - $sum += (strpos($keys, $code{$i}) * ($i+1)); + $sum += (mb_strpos($keys, $code{$i}) * ($i+1)); } $check = ($sum % 103); // add start, check and stop codes @@ -957,7 +957,7 @@ $k = 0; $len = strlen($code); for ($i = 0; $i < $len; ++$i) { - $ck = strpos($keys, $code{$i}); + $ck = mb_strpos($keys, $code{$i}); if (($i == 0) OR ($i > ($len-4))) { $char_num = ord($code{$i}); $seq = $chr[$char_num]; Modified: trunk/includes/tcpdf/tcpdf.php =================================================================== --- trunk/includes/tcpdf/tcpdf.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/includes/tcpdf/tcpdf.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -3277,23 +3277,23 @@ $tempstyle = mb_strtoupper($style); $style = ''; // underline - if (strpos($tempstyle, 'U') !== false) { + if (mb_strpos($tempstyle, 'U') !== false) { $this->underline = true; } else { $this->underline = false; } // line through (deleted) - if (strpos($tempstyle, 'D') !== false) { + if (mb_strpos($tempstyle, 'D') !== false) { $this->linethrough = true; } else { $this->linethrough = false; } // bold - if (strpos($tempstyle, 'B') !== false) { + if (mb_strpos($tempstyle, 'B') !== false) { $style .= 'B'; } // oblique - if (strpos($tempstyle, 'I') !== false) { + if (mb_strpos($tempstyle, 'I') !== false) { $style .= 'I'; } $bistyle = $style; @@ -3392,7 +3392,7 @@ $styles = array('' => '', 'B' => ',Bold', 'I' => ',Italic', 'BI' => ',BoldItalic'); $sname = $name.$styles[$bistyle]; // artificial bold - if (strpos($bistyle, 'B') !== false) { + if (mb_strpos($bistyle, 'B') !== false) { if (isset($desc['StemV'])) { $desc['StemV'] *= 2; } else { @@ -3400,7 +3400,7 @@ } } // artificial italic - if (strpos($bistyle, 'I') !== false) { + if (mb_strpos($bistyle, 'I') !== false) { if (isset($desc['ItalicAngle'])) { $desc['ItalicAngle'] -= 11; } else { @@ -4022,7 +4022,7 @@ } if (is_string($border)) { $lm = ($this->LineWidth / 2); - if (strpos($border,'L') !== false) { + if (mb_strpos($border,'L') !== false) { if ($this->rtl) { $xk = ($x - $w) * $k; } else { @@ -4030,7 +4030,7 @@ } $s .= sprintf('%.2F %.2F m %.2F %.2F l S ', $xk, (($this->h - $y + $lm) * $k), $xk, (($this->h - ($y + $h + $lm)) * $k)); } - if (strpos($border,'T') !== false) { + if (mb_strpos($border,'T') !== false) { if ($this->rtl) { $xk = ($x - $w + $lm) * $k; $xwk = ($x - $lm) * $k; @@ -4040,7 +4040,7 @@ } $s .= sprintf('%.2F %.2F m %.2F %.2F l S ', $xk, (($this->h - $y) * $k), $xwk, (($this->h - $y) * $k)); } - if (strpos($border,'R') !== false) { + if (mb_strpos($border,'R') !== false) { if ($this->rtl) { $xk = $x * $k; } else { @@ -4048,7 +4048,7 @@ } $s .= sprintf('%.2F %.2F m %.2F %.2F l S ', $xk, (($this->h - $y + $lm) * $k), $xk, (($this->h - ($y + $h + $lm))* $k)); } - if (strpos($border,'B') !== false) { + if (mb_strpos($border,'B') !== false) { if ($this->rtl) { $xk = ($x - $w + $lm) * $k; $xwk = ($x - $lm) * $k; @@ -4459,16 +4459,16 @@ if ($border == 1) { $cborder = 'LTR'; } else { - if (!(false === strpos($border, 'L'))) { + if (!(false === mb_strpos($border, 'L'))) { $cborder .= 'L'; } - if (!(false === strpos($border, 'T'))) { + if (!(false === mb_strpos($border, 'T'))) { $cborder .= 'T'; } - if (!(false === strpos($border, 'R'))) { + if (!(false === mb_strpos($border, 'R'))) { $cborder .= 'R'; } - if ((!$this->opencell) AND (!(false === strpos($border, 'B')))) { + if ((!$this->opencell) AND (!(false === mb_strpos($border, 'B')))) { $cborder .= 'B'; } } @@ -4478,16 +4478,16 @@ if ($border == 1) { $cborder = 'LR'; } else { - if (!(false === strpos($border, 'L'))) { + if (!(false === mb_strpos($border, 'L'))) { $cborder .= 'L'; } - if ((!$this->opencell) AND (!(false === strpos($border, 'T')))) { + if ((!$this->opencell) AND (!(false === mb_strpos($border, 'T')))) { $cborder .= 'T'; } - if (!(false === strpos($border, 'R'))) { + if (!(false === mb_strpos($border, 'R'))) { $cborder .= 'R'; } - if ((!$this->opencell) AND (!(false === strpos($border, 'B')))) { + if ((!$this->opencell) AND (!(false === mb_strpos($border, 'B')))) { $cborder .= 'B'; } } @@ -4497,16 +4497,16 @@ if ($border == 1) { $cborder = 'LRB'; } else { - if (!(false === strpos($border, 'L'))) { + if (!(false === mb_strpos($border, 'L'))) { $cborder .= 'L'; } - if ((!$this->opencell) AND (!(false === strpos($border, 'T')))) { + if ((!$this->opencell) AND (!(false === mb_strpos($border, 'T')))) { $cborder .= 'T'; } - if (!(false === strpos($border, 'R'))) { + if (!(false === mb_strpos($border, 'R'))) { $cborder .= 'R'; } - if (!(false === strpos($border, 'B'))) { + if (!(false === mb_strpos($border, 'B'))) { $cborder .= 'B'; } } @@ -5441,7 +5441,7 @@ } elseif ($ct == 2) { $trns = array(ord(mb_substr($t, 1, 1)), ord(mb_substr($t, 3, 1)), ord(mb_substr($t, 5, 1))); } else { - $pos = strpos($t, chr(0)); + $pos = mb_strpos($t, chr(0)); if ($pos !== false) { $trns = array($pos); } @@ -5743,7 +5743,7 @@ // define the ByteRange $byte_range = array(); $byte_range[0] = 0; - $byte_range[1] = strpos($pdfdoc, $this->byterange_string) + $byterange_string_len + 10; + $byte_range[1] = mb_strpos($pdfdoc, $this->byterange_string) + $byterange_string_len + 10; $byte_range[2] = $byte_range[1] + $this->signature_max_length + 2; $byte_range[3] = strlen($pdfdoc) - $byte_range[2]; $pdfdoc = mb_substr($pdfdoc, 0, $byte_range[1]).mb_substr($pdfdoc, $byte_range[2]); @@ -5772,7 +5772,7 @@ $signature = file_get_contents($tempsign, false, null, $pdfdoc_length); unlink($tempsign); // extract signature - $signature = mb_substr($signature, (strpos($signature, "%%EOF\n\n------") + 13)); + $signature = mb_substr($signature, (mb_strpos($signature, "%%EOF\n\n------") + 13)); $tmparr = explode("\n\n", $signature); $signature = $tmparr[1]; unset($tmparr); @@ -8249,7 +8249,7 @@ $returncolor = false; $color = preg_replace('/[\s]*/', '', $color); // remove extra spaces $color = strtolower($color); - if (($dotpos = strpos($color, '.')) !== false) { + if (($dotpos = mb_strpos($color, '.')) !== false) { // remove class parent (i.e.: color.red) $color = mb_substr($color, ($dotpos + 1)); } @@ -9016,7 +9016,7 @@ * @see SetLineStyle() */ public function Rect($x, $y, $w, $h, $style='', $border_style=array(), $fill_color=array()) { - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { + if (!(false === mb_strpos($style, 'F')) AND isset($fill_color)) { $this->SetFillColorArray($fill_color); } switch ($style) { @@ -9114,7 +9114,7 @@ * @since 2.1.000 (2008-01-08) */ public function Curve($x0, $y0, $x1, $y1, $x2, $y2, $x3, $y3, $style='', $line_style=array(), $fill_color=array()) { - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { + if (!(false === mb_strpos($style, 'F')) AND isset($fill_color)) { $this->SetFillColorArray($fill_color); } switch ($style) { @@ -9171,7 +9171,7 @@ * @since 3.0008 (2008-05-12) */ public function Polycurve($x0, $y0, $segments, $style='', $line_style=array(), $fill_color=array()) { - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { + if (!(false === mb_strpos($style, 'F')) AND isset($fill_color)) { $this->SetFillColorArray($fill_color); } switch ($style) { @@ -9243,7 +9243,7 @@ return; } if ($rx) { - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { + if (!(false === mb_strpos($style, 'F')) AND isset($fill_color)) { $this->SetFillColorArray($fill_color); } switch ($style) { @@ -9404,7 +9404,7 @@ } $nc += 4; } - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { + if (!(false === mb_strpos($style, 'F')) AND isset($fill_color)) { $this->SetFillColorArray($fill_color); } switch ($style) { @@ -9623,7 +9623,7 @@ if ('0000' == $round_corner) { // Not rounded $this->Rect($x, $y, $w, $h, $style, $border_style, $fill_color); } else { // Rounded - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { + if (!(false === mb_strpos($style, 'F')) AND isset($fill_color)) { $this->SetFillColorArray($fill_color); } switch ($style) { @@ -10495,7 +10495,7 @@ if (empty($this->javascript) AND empty($this->js_objects)) { return; } - if (strpos($this->javascript, 'this.addField') > 0) { + if (mb_strpos($this->javascript, 'this.addField') > 0) { if (!$this->ur) { //$this->setUserRights(); } @@ -12542,7 +12542,7 @@ preg_match("/%%Creator:([^\r\n]+)/", $data, $regs); # find Creator if (count($regs) > 1) { $version_str = trim($regs[1]); # e.g. "Adobe Illustrator(R) 8.0" - if (strpos($version_str, 'Adobe Illustrator') !== false) { + if (mb_strpos($version_str, 'Adobe Illustrator') !== false) { $versexp = explode(' ', $version_str); $version = (float)array_pop($versexp); if ($version >= 9) { @@ -12551,7 +12551,7 @@ } } // strip binary bytes in front of PS-header - $start = strpos($data, '%!PS-Adobe'); + $start = mb_strpos($data, '%!PS-Adobe'); if ($start > 0) { $data = mb_substr($data, $start); } @@ -12562,17 +12562,17 @@ } else { $this->Error('No BoundingBox found in EPS file: '.$file); } - $start = strpos($data, '%%EndSetup'); + $start = mb_strpos($data, '%%EndSetup'); if ($start === false) { - $start = strpos($data, '%%EndProlog'); + $start = mb_strpos($data, '%%EndProlog'); } if ($start === false) { - $start = strpos($data, '%%BoundingBox'); + $start = mb_strpos($data, '%%BoundingBox'); } $data = mb_substr($data, $start); - $end = strpos($data, '%%PageTrailer'); + $end = mb_strpos($data, '%%PageTrailer'); if ($end===false) { - $end = strpos($data, 'showpage'); + $end = mb_strpos($data, 'showpage'); } if ($end) { $data = mb_substr($data, 0, $end); @@ -13350,7 +13350,7 @@ $repTable = array("\t" => ' ', "\0" => ' ', "\x0B" => ' ', "\\" => "\\\\"); $html = strtr($html, $repTable); $offset = 0; - while (($offset < strlen($html)) AND ($pos = strpos($html, '</pre>', $offset)) !== false) { + while (($offset < strlen($html)) AND ($pos = mb_strpos($html, '</pre>', $offset)) !== false) { $html_a = mb_substr($html, 0, $offset); $html_b = mb_substr($html, $offset, ($pos - $offset + 6)); while (preg_match("'<xre([^\>]*)>(.*?)\n(.*?)</pre>'si", $html_b)) { @@ -13361,7 +13361,7 @@ $offset = strlen($html_a.$html_b); } $offset = 0; - while (($offset < strlen($html)) AND ($pos = strpos($html, '</textarea>', $offset)) !== false) { + while (($offset < strlen($html)) AND ($pos = mb_strpos($html, '</textarea>', $offset)) !== false) { $html_a = mb_substr($html, 0, $offset); $html_b = mb_substr($html, $offset, ($pos - $offset + 11)); while (preg_match("'<textarea([^\>]*)>(.*?)\n(.*?)</textarea>'si", $html_b)) { @@ -13375,7 +13375,7 @@ $html = preg_replace("'([\s]*)<option'si", "<option", $html); $html = preg_replace("'</option>([\s]*)'si", "</option>", $html); $offset = 0; - while (($offset < strlen($html)) AND ($pos = strpos($html, '</option>', $offset)) !== false) { + while (($offset < strlen($html)) AND ($pos = mb_strpos($html, '</option>', $offset)) !== false) { $html_a = mb_substr($html, 0, $offset); $html_b = mb_substr($html, $offset, ($pos - $offset + 9)); while (preg_match("'<option([^\>]*)>(.*?)</option>'si", $html_b)) { @@ -14300,7 +14300,7 @@ } } elseif (($plalign == 'R') AND (!$this->rtl)) { // right alignment on LTR document - if (intval($this->revstrpos($pmid, ')]')) == (intval($this->revstrpos($pmid, ' )]')) + 1)) { + if (intval($this->revmb_strpos($pmid, ')]')) == (intval($this->revmb_strpos($pmid, ' )]')) + 1)) { // remove last space (if any) $linew -= $one_space_width; $mdiff = abs($tw - $linew); @@ -14308,11 +14308,11 @@ $t_x = $mdiff; } elseif (($plalign == 'L') AND ($this->rtl)) { // left alignment on RTL document - if ((intval($this->revstrpos($pmid, '[( ')) == intval($this->revstrpos($pmid, '[('))) OR (intval($this->revstrpos($pmid, '[('.chr(0).chr(32))) == intval($this->revstrpos($pmid, '[(')))) { + if ((intval($this->revmb_strpos($pmid, '[( ')) == intval($this->revmb_strpos($pmid, '[('))) OR (intval($this->revmb_strpos($pmid, '[('.chr(0).chr(32))) == intval($this->revmb_strpos($pmid, '[(')))) { // remove first space (if any) $linew -= $one_space_width; } - if (intval(strpos($pmid, '[(')) == (intval($this->revstrpos($pmid, '[(')))) { + if (intval(mb_strpos($pmid, '[(')) == (intval($this->revmb_strpos($pmid, '[(')))) { // remove last space (if any) $linew -= $one_space_width; if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) { @@ -14378,12 +14378,12 @@ global $spacew; while (preg_match('/([0-9\.\+\-]*)[\s](Td|cm|m|l|c|re)[\s]/x', $pmid, $strpiece, PREG_OFFSET_CAPTURE, $offset) == 1) { // check if we are inside a string section '[( ... )]' - $stroffset = strpos($pmid, '[(', $offset); + $stroffset = mb_strpos($pmid, '[(', $offset); if (($stroffset !== false) AND ($stroffset <= $strpiece[2][1])) { // set offset to the end of string section - $offset = strpos($pmid, ')]', $stroffset); + $offset = mb_strpos($pmid, ')]', $stroffset); while (($offset !== false) AND ($pmid{($offset - 1)} == '\\')) { - $offset = strpos($pmid, ')]', ($offset + 1)); + $offset = mb_strpos($pmid, ')]', ($offset + 1)); } if ($offset === false) { $this->Error('HTML Justification: malformed PDF code.'); @@ -14396,13 +14396,13 @@ $spacew = ($spacewidth * $ns); } $offset = $strpiece[2][1] + strlen($strpiece[2][0]); - $epsposbeg = strpos($pmid, 'q'.$this->epsmarker, $offset); - $epsposend = strpos($pmid, $this->epsmarker.'Q', $offset) + strlen($this->epsmarker.'Q'); + $epsposbeg = mb_strpos($pmid, 'q'.$this->epsmarker, $offset); + $epsposend = mb_strpos($pmid, $this->epsmarker.'Q', $offset) + strlen($this->epsmarker.'Q'); if ((($epsposbeg > 0) AND ($epsposend > 0) AND ($offset > $epsposbeg) AND ($offset < $epsposend)) OR (($epsposbeg === false) AND ($epsposend > 0) AND ($offset < $epsposend))) { // shift EPS images $trx = sprintf('1 0 0 1 %.3F 0 cm', $spacew); - $epsposbeg = strpos($pmid, 'q'.$this->epsmarker, ($prev_epsposbeg - 6)); + $epsposbeg = mb_strpos($pmid, 'q'.$this->epsmarker, ($prev_epsposbeg - 6)); $pmid_b = mb_substr($pmid, 0, $epsposbeg); $pmid_m = mb_substr($pmid, $epsposbeg, ($epsposend - $epsposbeg)); $pmid_e = mb_substr($pmid, $epsposend); @@ -14971,7 +14971,7 @@ } } elseif (($plalign == 'R') AND (!$this->rtl)) { // right alignment on LTR document - if (intval($this->revstrpos($pmid, ')]')) == (intval($this->revstrpos($pmid, ' )]')) + 1)) { + if (intval($this->revmb_strpos($pmid, ')]')) == (intval($this->revmb_strpos($pmid, ' )]')) + 1)) { // remove last space (if any) $linew -= $one_space_width; $mdiff = abs($tw - $linew); @@ -14979,11 +14979,11 @@ $t_x = $mdiff; } elseif (($plalign == 'L') AND ($this->rtl)) { // left alignment on RTL document - if ((intval($this->revstrpos($pmid, '[( ')) == intval($this->revstrpos($pmid, '[('))) OR (intval($this->revstrpos($pmid, '[('.chr(0).chr(32))) == intval($this->revstrpos($pmid, '[(')))) { + if ((intval($this->revmb_strpos($pmid, '[( ')) == intval($this->revmb_strpos($pmid, '[('))) OR (intval($this->revmb_strpos($pmid, '[('.chr(0).chr(32))) == intval($this->revmb_strpos($pmid, '[(')))) { // remove first space (if any) $linew -= $one_space_width; } - if (intval(strpos($pmid, '[(')) == (intval($this->revstrpos($pmid, '[(')))) { + if (intval(mb_strpos($pmid, '[(')) == (intval($this->revmb_strpos($pmid, '[(')))) { // remove last space (if any) $linew -= $one_space_width; if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) { @@ -15574,7 +15574,7 @@ $options = explode ("\r", $tag['attribute']['opt']); $values = array(); foreach ($options as $val) { - if (strpos($val, "\t") !== false) { + if (mb_strpos($val, "\t") !== false) { $opts = explode("\t", $val); $values[] = $opts; $w = max($w, $this->GetStringWidth($opts[1])); @@ -17276,10 +17276,10 @@ * @access public * @since 4.8.038 (2010-03-13) */ - public function revstrpos($haystack, $needle, $offset = 0) { + public function revmb_strpos($haystack, $needle, $offset = 0) { $length = strlen($haystack); $offset = ($offset > 0)?($length - $offset):abs($offset); - $pos = strpos(strrev($haystack), strrev($needle), $offset); + $pos = mb_strpos(strrev($haystack), strrev($needle), $offset); return ($pos === false)?false:($length - $pos - strlen($needle)); } Modified: trunk/install/save.php =================================================================== --- trunk/install/save.php 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/install/save.php 2011-07-04 11:01:45 UTC (rev 5550) @@ -306,7 +306,7 @@ if (mb_substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ // Database created above with correct name. if (strncasecmp($SQL, ' CREATE DATABASE ', 17) AND strncasecmp($SQL, ' USE ', 5)){ Modified: trunk/reportwriter/WriteReport.inc =================================================================== --- trunk/reportwriter/WriteReport.inc 2011-07-04 11:00:14 UTC (rev 5549) +++ trunk/reportwriter/WriteReport.inc 2011-07-04 11:01:45 UTC (rev 5550) @@ -544,7 +544,7 @@ $CSVOutput = ''; // Write the column headings foreach ($Heading as $mycolumn) { // check for embedded commas and enclose in quotes - if (strpos($mycolumn,',')===false) $CSVOutput .= $mycolumn.','; else $CSVOutput .= '"'.$mycolumn.'",'; + if (mb_strpos($mycolumn,',')===false) $CSVOutput .= $mycolumn.','; else $CSVOutput .= '"'.$mycolumn.'",'; } $CSVOutput = mb_substr($CSVOutput,0,-1).chr(10); // Strip the last comma off and add line feed // Now write each data line and totals @@ -561,7 +561,7 @@ default: $CSVLine = ''; foreach ($myrow as $mycolumn) { // check for embedded commas and enclose in quotes - if (strpos($mycolumn,',')===false) $CSVLine .= $mycolumn.','; else $CSVLine .= '"'.$mycolumn.'",'; + if (mb_strpos($mycolumn,',')===false) $CSVLine .= $mycolumn.','; else $CSVLine .= '"'.$mycolumn.'",'; } $CSVLine = mb_substr($CSVLine,0,-1); // Strip the last comma off } @@ -607,8 +607,8 @@ $ContainsDodgyCharacters = false; //assume all dodgy characters are repl... [truncated message content] |
From: <tim...@us...> - 2011-07-04 16:25:08
|
Revision: 5551 http://weberp.svn.sourceforge.net/weberp/?rev=5551&view=rev Author: tim_schofield Date: 2011-07-04 16:25:02 +0000 (Mon, 04 Jul 2011) Log Message: ----------- Change the layout of the code Modified Paths: -------------- trunk/AddCustomerContacts.php trunk/AuditTrail.php Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2011-07-04 11:01:45 UTC (rev 5550) +++ trunk/AddCustomerContacts.php 2011-07-04 16:25:02 UTC (rev 5551) @@ -17,8 +17,8 @@ } elseif (isset($_GET['DebtorNo'])){ $DebtorNo = $_GET['DebtorNo']; } -echo "<a href='" . $rootpath . '/Customers.php?' . SID .'&DebtorNo='.$DebtorNo."'>" . _('Back to Customers') . '</a><br />'; -$SQLname="SELECT name from debtorsmaster where debtorno='".$DebtorNo."'"; +echo '<a href="' . $rootpath . '/Customers.php?DebtorNo='.$DebtorNo.'">' . _('Back to Customers') . '</a><br />'; +$SQLname="SELECT name FROM debtorsmaster WHERE debtorno='".$DebtorNo."'"; $Result = DB_query($SQLname,$db); $row = DB_fetch_array($Result); if (!isset($_GET['Id'])) { @@ -38,13 +38,13 @@ //first off validate inputs sensible if (isset($_POST['Con_ID']) and !is_long((integer)$_POST['Con_ID'])) { $InputError = 1; - prnMsg( _('The Contact must be an integer.'), 'error'); + prnMsg( _('The Contact ID must be an integer.'), 'error'); } elseif (strlen($_POST['conName']) >40) { $InputError = 1; - prnMsg( _("The contact's name must be forty characters or less long"), 'error'); + prnMsg( _('The contact name must be forty characters or less long'), 'error'); } elseif( trim($_POST['conName']) == '' ) { $InputError = 1; - prnMsg( _("The contact's name may not be empty"), 'error'); + prnMsg( _('The contact name may not be empty'), 'error'); } if (isset($Id) and ($Id and $InputError !=1)) { @@ -134,10 +134,10 @@ $myrow[3], $myrow[4], $myrow[5], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $myrow[0], $myrow[1], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $myrow[0], $myrow[1]); @@ -146,14 +146,14 @@ echo '</table>'; } if (isset($Id)) { ?> - <div class="centre"><a href="<?php echo $_SERVER['PHP_SELF'] . '?' . SID .'&DebtorNo='.$DebtorNo;?>"><?=_('Review all contacts for this Customer')?></a></div> + <div class="centre"><a href="<?php echo $_SERVER['PHP_SELF'] . 'DebtorNo='.$DebtorNo;?>"><?=_('Review all contacts for this Customer')?></a></div> <?php } ?> <br /> <?php if (!isset($_GET['delete'])) { - echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '&DebtorNo='.$DebtorNo.'">'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . 'DebtorNo='.$DebtorNo.'">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($Id)) { Modified: trunk/AuditTrail.php =================================================================== --- trunk/AuditTrail.php 2011-07-04 11:01:45 UTC (rev 5550) +++ trunk/AuditTrail.php 2011-07-04 16:25:02 UTC (rev 5551) @@ -30,7 +30,7 @@ echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<table class=selection>'; +echo '<table class="selection">'; echo '<tr><td>'. _('From Date') . ' ' . $_SESSION['DefaultDateFormat'] .'</td> <td><input tabindex="1" type=text class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="FromDate" size="11" maxlength="10" value="' .$_POST['FromDate'].'"></td></tr>'; @@ -43,15 +43,16 @@ echo '<option value="ALL">' . _('ALL') . '</option>'; while ($users = DB_fetch_row($UserResult)) { if (isset($_POST['SelectedUser']) and $users[0]==$_POST['SelectedUser']) { - echo '<option selected value=' . $users[0] . '>' . $users[0] . '</option>'; + echo '<option selected value="' . $users[0] . '">' . $users[0] . '</option>'; } else { - echo '<option value=' . $users[0] . '>' . $users[0] . '</option>'; + echo '<option value="' . $users[0] . '">' . $users[0] . '</option>'; } } echo '</select></td></tr>'; // Show table selections -echo '<tr><td>'. _('Table '). '</td><td><select tabindex="4" name="SelectedTable">'; +echo '<tr><td>'. _('Table '). '</td> + <td><select tabindex="4" name="SelectedTable">'; echo '<option value="ALL">' . _('ALL') . '</option>'; while ($tables = DB_fetch_row($TableResult)) { if (isset($_POST['SelectedTable']) and $tables[0]==$_POST['SelectedTable']) { @@ -63,7 +64,7 @@ echo '</select></td></tr>'; echo '</table><br />'; -echo '<div class=centre><input tabindex="5" type=submit name=View value="' . _('View') . '"></div>'; +echo '<div class="centre"><input tabindex="5" type="submit" name="View" value="' . _('View') . '"></div>'; echo '</form>'; // View the audit trail This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-04 16:25:48
|
Revision: 5554 http://weberp.svn.sourceforge.net/weberp/?rev=5554&view=rev Author: tim_schofield Date: 2011-07-04 16:25:41 +0000 (Mon, 04 Jul 2011) Log Message: ----------- Change the layout of the code Modified Paths: -------------- trunk/AddCustomerContacts.php trunk/PcExpensesTypeTab.php Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2011-07-04 16:25:29 UTC (rev 5553) +++ trunk/AddCustomerContacts.php 2011-07-04 16:25:41 UTC (rev 5554) @@ -146,7 +146,7 @@ echo '</table>'; } if (isset($Id)) { ?> - <div class="centre"><a href="<?php echo $_SERVER['PHP_SELF'] . 'DebtorNo='.$DebtorNo;?>"><?=_('Review all contacts for this Customer')?></a></div> + <div class="centre"><a href="<?php echo $_SERVER['PHP_SELF'] . '?DebtorNo='.$DebtorNo;?>"><?=_('Review all contacts for this Customer')?></a></div> <?php } ?> <br /> Modified: trunk/PcExpensesTypeTab.php =================================================================== --- trunk/PcExpensesTypeTab.php 2011-07-04 16:25:29 UTC (rev 5553) +++ trunk/PcExpensesTypeTab.php 2011-07-04 16:25:41 UTC (rev 5554) @@ -1,7 +1,5 @@ <?php -/* $Revision: 1.0 $ */ -//$PageSecurity = 15; include('includes/session.inc'); $title = _('Maintenance Of Petty Cash Expenses For a Type Tab'); @@ -23,33 +21,30 @@ prnMsg(_('The petty cash tab type contain any of the following characters " \' - & or a space'),'error'); } -if (isset($_POST['SelectedTabs'])){ - $SelectedTabs = mb_strtoupper($_POST['SelectedTabs']); -} elseif (isset($_GET['SelectedTabs'])){ - $SelectedTabs = mb_strtoupper($_GET['SelectedTabs']); +if (isset($_POST['SelectedTab'])){ + $SelectedTab = mb_strtoupper($_POST['SelectedTab']); +} elseif (isset($_GET['SelectedTab'])){ + $SelectedTab = mb_strtoupper($_GET['SelectedTab']); } if (isset($_POST['Cancel'])) { - unset($SelectedTabs); + unset($SelectedTab); unset($SelectedType); } -if (isset($Errors)) { - unset($Errors); -} - $Errors = array(); $InputError=0; $i=0; if (isset($_POST['process'])) { - if ($_POST['SelectedTabs']=='') { + if ($_POST['SelectedTab'] == '') { $InputError=1; echo prnMsg(_('You have not selected a tab to maintain the expenses on'),'error'); echo '<br />'; $Errors[$i] = 'TabName'; $i++; - unset($SelectedTabs); + unset($SelectedTab); + unset($_POST['SelectedTab']); } } @@ -68,7 +63,7 @@ $checkSql = "SELECT count(*) FROM pctabexpenses - WHERE typetabcode= '" . $_POST['SelectedTabs'] . "' + WHERE typetabcode= '" . $_POST['SelectedTab'] . "' AND codeexpense = '" . $_POST['SelectedExpense'] . "'"; $checkresult = DB_query($checkSql,$db); @@ -76,23 +71,19 @@ if ( $checkrow[0] >0) { $InputError = 1; - prnMsg( _('The Expense ') . $_POST['codeexpense'] . _(' already exist in this Type of Tab.'),'error'); + prnMsg( _('The Expense') . ' ' . $_POST['codeexpense'] . ' ' ._('already exists in this Type of Tab'),'error'); } else { - // Add new record on submit + $sql = "INSERT INTO pctabexpenses (typetabcode, + codeexpense) + VALUES ('" . $_POST['SelectedTab'] . "', + '" . $_POST['SelectedExpense'] . "')"; - $sql = "INSERT INTO pctabexpenses - (typetabcode, - codeexpense) - valueS ('" . $_POST['SelectedTabs'] . "', - '" . $_POST['SelectedExpense'] . "')"; - - $msg = _('Expense code:') . ' ' . $_POST["SelectedExpense"].' '._('for Type of Tab:') .' '. $_POST["SelectedTabs"] . ' ' . _('has been created'); + $msg = _('Expense code:') . ' ' . $_POST['SelectedExpense'].' '._('for Type of Tab:') .' '. $_POST['SelectedTab'] . ' ' . _('has been created'); $checkSql = "SELECT count(typetabcode) - FROM pctypetabs"; + FROM pctypetabs"; $result = DB_query($checkSql, $db); $row = DB_fetch_row($result); - } } @@ -100,42 +91,42 @@ //run the SQL from either of the above possibilites $result = DB_query($sql,$db); prnMsg($msg,'success'); - unset($_POST['SelectedExpense']); } } elseif ( isset($_GET['delete']) ) { - $sql="DELETE FROM pctabexpenses - WHERE typetabcode='".$SelectedTabs."' - AND codeexpense='".$SelectedType."'"; - $ErrMsg = _('The Tab Type record could not be deleted because'); - $result = DB_query($sql,$db,$ErrMsg); - prnMsg(_('Expense code').' '. $SelectedType .' '. _('for type of tab').' '. $SelectedTabs .' '. _('has been deleted') ,'success'); - unset ($SelectedType); - unset($_GET['delete']); + $sql="DELETE FROM pctabexpenses + WHERE typetabcode='".$SelectedTab."' + AND codeexpense='".$SelectedType."'"; + $ErrMsg = _('The Tab Type record could not be deleted because'); + $result = DB_query($sql,$db,$ErrMsg); + prnMsg(_('Expense code').' '. $SelectedType .' '. _('for type of tab').' '. $SelectedTab .' '. _('has been deleted') ,'success'); + unset ($SelectedType); + unset($_GET['delete']); } -if (!isset($SelectedTabs)){ +if (!isset($SelectedTab)){ /* It could still be the second time the page has been run and a record has been selected for modification - SelectedType will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters then none of the above are true and the list of sales types will be displayed with links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ - echo '<form method="post" action=' . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection>'; //Main table + echo '<table class="selection">'; //Main table - echo '<tr><td>' . _('Select Type of Tab') . ':</td><td><select name="SelectedTabs">'; + echo '<tr><td>' . _('Select Type of Tab') . ':</td><td><select name="SelectedTab">'; DB_free_result($result); - $SQL = "SELECT typetabcode,typetabdescription - FROM pctypetabs"; + $SQL = "SELECT typetabcode, + typetabdescription + FROM pctypetabs"; $result = DB_query($SQL,$db); echo '<option value=""></option>'; while ($myrow = DB_fetch_array($result)) { - if (isset($SelectedTabs) and $myrow['typetabcode']==$SelectedTabs) { + if (isset($SelectedTab) and $myrow['typetabcode']==$SelectedTab) { echo '<option selected value="' . $myrow['typetabcode'] . '">' . $myrow['typetabcode'] . ' - ' . $myrow['typetabdescription'] . '</option>'; } else { echo '<option value="' . $myrow['typetabcode'] . '">' . $myrow['typetabcode'] . ' - ' . $myrow['typetabdescription'] . '</option>'; @@ -159,13 +150,13 @@ $sql = "SELECT pctabexpenses.codeexpense, pcexpenses.description FROM pctabexpenses,pcexpenses WHERE pctabexpenses.codeexpense=pcexpenses.codeexpense - AND pctabexpenses.typetabcode='".$SelectedTabs."' + AND pctabexpenses.typetabcode='".$SelectedTab."' ORDER BY pctabexpenses.codeexpense ASC"; $result = DB_query($sql,$db); echo '<br /><table class=selection>'; - echo '<tr><th colspan="3"><font size="2" color="navy">' . _('Expense Codes for Type of Tab ') . ' ' .$SelectedTabs. '</font></th></tr>'; + echo '<tr><th colspan="3"><font size="2" color="navy">' . _('Expense Codes for Type of Tab ') . ' ' .$SelectedTab. '</font></th></tr>'; echo '<tr> <th>' . _('Expense Code') . '</th> <th>' . _('Description') . '</th> @@ -184,7 +175,7 @@ printf('<td>%s</td> <td>%s</td> - <td><a href="%s?SelectedType=%s&delete=yes&SelectedTabs=' . $SelectedTabs . '" onclick="return confirm("' . + <td><a href="%s?SelectedType=%s&delete=yes&SelectedTab=' . $SelectedTab . '" onclick="return confirm("' . _('Are you sure you wish to delete this code and the expense it may have set up?') . '");">' . _('Delete') . '</td> </tr>', $myrow[0], @@ -228,14 +219,13 @@ echo '</select></td></tr>'; - echo '<input type=hidden name="SelectedTabs" value="' . $SelectedTabs . '">'; + echo '<input type=hidden name="SelectedTab" value="' . $SelectedTab . '">'; echo '</td></tr></table>'; // close main table echo '<br /><div class="centre"><input type=submit name=submit value="' . _('Accept') . '"><input type=submit name=Cancel value="' . _('Cancel') . '"></div>'; echo '</form>'; - } // end if user wish to delete } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-05 11:57:31
|
Revision: 5562 http://weberp.svn.sourceforge.net/weberp/?rev=5562&view=rev Author: tim_schofield Date: 2011-07-05 11:57:20 +0000 (Tue, 05 Jul 2011) Log Message: ----------- strlen to mb_strlen Modified Paths: -------------- trunk/AccountGroups.php trunk/AccountSections.php trunk/AddCustomerContacts.php trunk/AddCustomerNotes.php trunk/AddCustomerTypeNotes.php trunk/AgedDebtors.php trunk/AgedSuppliers.php trunk/Areas.php trunk/BOMIndented.php trunk/BOMInquiry.php trunk/BOMListing.php trunk/BOMs.php trunk/BankAccounts.php trunk/CompanyPreferences.php trunk/ConfirmDispatch_Invoice.php trunk/ContractBOM.php trunk/Contracts.php trunk/CounterSales.php trunk/CreditStatus.php trunk/Currencies.php trunk/CustEDISetup.php trunk/CustLoginSetup.php trunk/CustomerBranches.php trunk/CustomerReceipt.php trunk/CustomerTypes.php trunk/Customers.php trunk/DailySalesInquiry.php trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/EDIProcessOrders.php trunk/EmailConfirmation.php trunk/Factors.php trunk/FixedAssetCategories.php trunk/FixedAssetItems.php trunk/FixedAssetLocations.php trunk/FormDesigner.php trunk/FreightCosts.php trunk/GLAccountReport.php trunk/GLAccounts.php trunk/GLTransInquiry.php trunk/GetStockImage.php trunk/GoodsReceived.php trunk/InventoryPlanning.php trunk/InventoryValuation.php trunk/MRPDemandTypes.php trunk/MRPDemands.php trunk/MRPReport.php trunk/Manufacturers.php trunk/Numbers/Words/lang.bg.php trunk/Numbers/Words/lang.cs.php trunk/Numbers/Words/lang.de.php trunk/Numbers/Words/lang.dk.php trunk/Numbers/Words/lang.en_100.php trunk/Numbers/Words/lang.en_GB.php trunk/Numbers/Words/lang.en_US.php trunk/Numbers/Words/lang.es.php trunk/Numbers/Words/lang.es_AR.php trunk/Numbers/Words/lang.et.php trunk/Numbers/Words/lang.fr.php trunk/Numbers/Words/lang.fr_BE.php trunk/Numbers/Words/lang.he.php trunk/Numbers/Words/lang.hu_HU.php trunk/Numbers/Words/lang.id.php trunk/Numbers/Words/lang.it_IT.php trunk/Numbers/Words/lang.lt.php trunk/Numbers/Words/lang.nl.php trunk/Numbers/Words/lang.pl.php trunk/Numbers/Words/lang.pt_BR.php trunk/Numbers/Words/lang.ru.php trunk/Numbers/Words/lang.sv.php trunk/Numbers/Words.php trunk/OutstandingGRNs.php trunk/PDFDeliveryDifferences.php trunk/PDFPriceList.php trunk/PDFPrintLabel.php trunk/PDFQuotation.php trunk/PDFQuotationPortrait.php trunk/PDFRemittanceAdvice.php trunk/PDFStockCheckComparison.php trunk/PDFStockLocTransfer.php trunk/PDFTopItems.php trunk/POReport.php trunk/PO_Header.php trunk/PO_Items.php trunk/PO_PDFPurchOrder.php trunk/PageSecurity.php trunk/PaymentTerms.php trunk/PcExpenses.php trunk/PcTabs.php trunk/PcTypeTabs.php trunk/Prices.php trunk/Prices_Customer.php trunk/PrintCheque.php trunk/PrintCustStatements.php trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php trunk/PurchData.php trunk/ReorderLevel.php trunk/SalesAnalReptCols.php trunk/SalesAnalRepts.php trunk/SalesCategories.php trunk/SalesInquiry.php trunk/SalesPeople.php trunk/SalesTypes.php trunk/SelectCompletedOrder.php trunk/SelectCreditItems.php trunk/SelectCustomer.php trunk/SelectGLAccount.php trunk/SelectOrderItems.php trunk/SelectSalesOrder.php trunk/SelectSupplier.php trunk/Shipments.php trunk/Shippers.php trunk/SpecialOrder.php trunk/StockAdjustments.php trunk/StockCategories.php trunk/StockCheck.php trunk/StockCounts.php trunk/StockSerialItemResearch.php trunk/StockTransfers.php trunk/Stocks.php trunk/SuppLoginSetup.php trunk/SuppPaymentRun.php trunk/SupplierBalsAtPeriodEnd.php trunk/SupplierContacts.php trunk/SupplierCredit.php trunk/SupplierInvoice.php trunk/SupplierTenderCreate.php trunk/SupplierTenders.php trunk/SupplierTypes.php trunk/Suppliers.php trunk/SystemParameters.php trunk/TaxGroups.php trunk/UpgradeDatabase.php trunk/WOSerialNos.php trunk/WWW_Access.php trunk/WWW_Users.php trunk/WorkCentres.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/WorkOrderReceive.php trunk/Z_CreateCompanyTemplateFile.php trunk/Z_DataExport.php trunk/Z_ImportChartOfAccounts.php trunk/Z_ImportFixedAssets.php trunk/Z_ImportStocks.php trunk/Z_MakeNewCompany.php trunk/Z_Upgrade_3.04-3.05.php trunk/Z_Upgrade_3.05-3.06.php trunk/Z_Upgrade_3.07-3.08.php trunk/Z_Upgrade_3.08-3.09.php trunk/Z_Upgrade_3.09-3.10.php trunk/Z_Upgrade_3.10-3.11.php trunk/Z_Upgrade_3.11-4.00.php trunk/Z_poAddLanguage.php trunk/Z_poEditLangModule.php trunk/Z_poEditLangRemaining.php trunk/api/api_branches.php trunk/api/api_customers.php trunk/api/api_debtortransactions.php trunk/api/api_glaccounts.php trunk/api/api_glsections.php trunk/api/api_locations.php trunk/api/api_login.php trunk/api/api_purchdata.php trunk/api/api_salesorders.php trunk/api/api_session.inc trunk/api/api_stock.php trunk/api/api_stockcategories.php trunk/api/api_suppliers.php trunk/api/api_workorders.php trunk/build/check_closing_tags.sh trunk/build/tests/includes/validators/XhtmlValidator.php trunk/includes/Add_SerialItems.php trunk/includes/Add_SerialItemsOut.php trunk/includes/DateFunctions.inc trunk/includes/MiscFunctions.php trunk/includes/PDFOrderPageHeader.inc trunk/includes/PDFOrderPageHeader_generic.inc trunk/includes/PDFPickingListHeader.inc trunk/includes/PDFSalesOrder_generic.inc trunk/includes/PO_PDFOrderPageHeader.inc trunk/includes/RFC822.php trunk/includes/UpgradeDB_mysql.inc trunk/includes/class.pdf.php trunk/includes/mimePart.php trunk/includes/php-gettext/gettext.inc trunk/includes/php-gettext/streams.php trunk/includes/phplot/phplot.php trunk/includes/smtp.php trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/config/tcpdf_config.php trunk/includes/tcpdf/config/tcpdf_config_alt.php trunk/includes/tcpdf/tcpdf.php trunk/install/save.php trunk/install/timezone.php trunk/reportwriter/WriteForm.inc trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/RCFunctions.inc trunk/sql/mysql/updates/50.php trunk/xmlrpc/lib/xmlrpc.inc trunk/xmlrpc/lib/xmlrpc_wrappers.inc trunk/xmlrpc/lib/xmlrpcs.inc Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/AccountGroups.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -72,7 +72,7 @@ $Errors[$i] = 'GroupName'; $i++; } - if (strlen($_POST['GroupName'])==0){ + if (mb_strlen($_POST['GroupName'])==0){ $InputError = 1; prnMsg( _('The account group name must be at least one character long'),'error'); $Errors[$i] = 'GroupName'; Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/AccountSections.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -76,7 +76,7 @@ $Errors[$i] = 'SectionName'; $i++; } - if (strlen($_POST['SectionName'])==0) { + if (mb_strlen($_POST['SectionName'])==0) { $InputError = 1; prnMsg( _('The account section name must contain at least one character') ,'error'); $Errors[$i] = 'SectionName'; Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/AddCustomerContacts.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -39,7 +39,7 @@ if (isset($_POST['Con_ID']) and !is_long((integer)$_POST['Con_ID'])) { $InputError = 1; prnMsg( _('The Contact ID must be an integer.'), 'error'); - } elseif (strlen($_POST['conName']) >40) { + } elseif (mb_strlen($_POST['conName']) >40) { $InputError = 1; prnMsg( _('The contact name must be forty characters or less long'), 'error'); } elseif( trim($_POST['conName']) == '' ) { Modified: trunk/AddCustomerNotes.php =================================================================== --- trunk/AddCustomerNotes.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/AddCustomerNotes.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -29,7 +29,7 @@ if (!is_long((integer)$_POST['priority'])) { $InputError = 1; prnMsg( _('The contact priority must be an integer.'), 'error'); - } elseif (strlen($_POST['note']) >200) { + } elseif (mb_strlen($_POST['note']) >200) { $InputError = 1; prnMsg( _("The contact's notes must be two hundred characters or less long"), 'error'); } elseif( trim($_POST['note']) == '' ) { Modified: trunk/AddCustomerTypeNotes.php =================================================================== --- trunk/AddCustomerTypeNotes.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/AddCustomerTypeNotes.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -29,7 +29,7 @@ if (!is_long((integer)$_POST['priority'])) { $InputError = 1; prnMsg( _('The Contact priority must be an integer.'), 'error'); - } elseif (strlen($_POST['note']) >200) { + } elseif (mb_strlen($_POST['note']) >200) { $InputError = 1; prnMsg( _("The contact's notes must be two hundred characters or less long"), 'error'); } elseif( trim($_POST['note']) == '' ) { Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/AgedDebtors.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -9,9 +9,9 @@ if (isset($_POST['PrintPDF']) and isset($_POST['FromCriteria']) - and strlen($_POST['FromCriteria'])>=1 + and mb_strlen($_POST['FromCriteria'])>=1 and isset($_POST['ToCriteria']) - and strlen($_POST['ToCriteria'])>=1) { + and mb_strlen($_POST['ToCriteria'])>=1) { include('includes/PDFStarter.php'); $pdf->addInfo('Title',_('Aged Customer Balance Listing')); @@ -428,7 +428,7 @@ /* Javier: This actually would produce the output $buf = $pdf->output(); - $len = strlen($buf); + $len = mb_strlen($buf); */ // if ($len < 1000) { Modified: trunk/AgedSuppliers.php =================================================================== --- trunk/AgedSuppliers.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/AgedSuppliers.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -9,9 +9,9 @@ If (isset($_POST['PrintPDF']) AND isset($_POST['FromCriteria']) - AND strlen($_POST['FromCriteria'])>=1 + AND mb_strlen($_POST['FromCriteria'])>=1 AND isset($_POST['ToCriteria']) - AND strlen($_POST['ToCriteria'])>=1){ + AND mb_strlen($_POST['ToCriteria'])>=1){ include('includes/PDFStarter.php'); @@ -252,7 +252,7 @@ $pdf->line($Page_Width-$Right_Margin, $YPos ,220, $YPos); /* UldisN : this doesn't work for TCPDF $buf = $pdf->output(); - $len = strlen($buf); + $len = mb_strlen($buf); header('Content-type: application/pdf'); header("Content-Length: $len"); header('Content-Disposition: inline; filename=AgedSuppliers.pdf'); Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/Areas.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -36,7 +36,7 @@ $result = DB_query($sql, $db); $myrow = DB_fetch_row($result); // mod to handle 3 char area codes - if (strlen($_POST['AreaCode']) > 3) { + if (mb_strlen($_POST['AreaCode']) > 3) { $InputError = 1; prnMsg(_('The area code must be three characters or less long'),'error'); $Errors[$i] = 'AreaCode'; @@ -46,7 +46,7 @@ prnMsg(_('The area code entered already exists'),'error'); $Errors[$i] = 'AreaCode'; $i++; - } elseif (strlen($_POST['AreaDescription']) >25) { + } elseif (mb_strlen($_POST['AreaDescription']) >25) { $InputError = 1; prnMsg(_('The area description must be twenty five characters or less long'),'error'); $Errors[$i] = 'AreaDescription'; Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/BOMIndented.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -229,7 +229,7 @@ } /* UldisN $pdfcode = $pdf->output(); - $len = strlen($pdfcode); + $len = mb_strlen($pdfcode); if ($len<=20){ */ Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/BOMInquiry.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -38,7 +38,7 @@ if ($_POST['Keywords']=='' AND $_POST['StockCode']=='') { prnMsg( _('At least one stock description keyword or an extract of a stock code must be entered for the search'), 'info' ); } else { - if (strlen($_POST['Keywords'])>0) { + if (mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -58,7 +58,7 @@ stockmaster.mbflag ORDER BY stockmaster.stockid"; - } elseif (strlen($_POST['StockCode'])>0){ + } elseif (mb_strlen($_POST['StockCode'])>0){ $sql = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units, Modified: trunk/BOMListing.php =================================================================== --- trunk/BOMListing.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/BOMListing.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -10,9 +10,9 @@ If (isset($_POST['PrintPDF']) AND isset($_POST['FromCriteria']) - AND strlen($_POST['FromCriteria'])>=1 + AND mb_strlen($_POST['FromCriteria'])>=1 AND isset($_POST['ToCriteria']) - AND strlen($_POST['ToCriteria'])>=1){ + AND mb_strlen($_POST['ToCriteria'])>=1){ include('includes/PDFStarter.php'); $pdf->addInfo('Title',_('Bill Of Material Listing')); Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/BOMs.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -739,7 +739,7 @@ if ($_POST['Keywords']=='' AND $_POST['StockCode']=='') { prnMsg( _('At least one stock description keyword or an extract of a stock code must be entered for the search'), 'info' ); } else { - if (strlen($_POST['Keywords'])>0) { + if (mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -759,7 +759,7 @@ stockmaster.mbflag ORDER BY stockmaster.stockid"; - } elseif (strlen($_POST['StockCode'])>0){ + } elseif (mb_strlen($_POST['StockCode'])>0){ $sql = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units, Modified: trunk/BankAccounts.php =================================================================== --- trunk/BankAccounts.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/BankAccounts.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -47,7 +47,7 @@ $Errors[$i] = 'AccountCode'; $i++; } - if (strlen($_POST['BankAccountName']) >50) { + if (mb_strlen($_POST['BankAccountName']) >50) { $InputError = 1; prnMsg(_('The bank account name must be fifty characters or less long'),'error'); $Errors[$i] = 'AccountName'; @@ -65,13 +65,13 @@ $Errors[$i] = 'AccountNumber'; $i++; } - if (strlen($_POST['BankAccountNumber']) >50) { + if (mb_strlen($_POST['BankAccountNumber']) >50) { $InputError = 1; prnMsg(_('The bank account number must be fifty characters or less long'),'error'); $Errors[$i] = 'AccountNumber'; $i++; } - if (strlen($_POST['BankAddress']) >50) { + if (mb_strlen($_POST['BankAddress']) >50) { $InputError = 1; prnMsg(_('The bank address must be fifty characters or less long'),'error'); $Errors[$i] = 'BankAddress'; Modified: trunk/CompanyPreferences.php =================================================================== --- trunk/CompanyPreferences.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/CompanyPreferences.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -29,67 +29,67 @@ //first off validate inputs sensible - if (strlen($_POST['CoyName']) > 40 OR strlen($_POST['CoyName'])==0) { + if (mb_strlen($_POST['CoyName']) > 40 OR mb_strlen($_POST['CoyName'])==0) { $InputError = 1; prnMsg(_('The company name must be entered and be fifty characters or less long'), 'error'); $Errors[$i] = 'CoyName'; $i++; } - if (strlen($_POST['RegOffice1']) >40) { + if (mb_strlen($_POST['RegOffice1']) >40) { $InputError = 1; prnMsg(_('The Line 1 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'RegOffice1'; $i++; } - if (strlen($_POST['RegOffice2']) >40) { + if (mb_strlen($_POST['RegOffice2']) >40) { $InputError = 1; prnMsg(_('The Line 2 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'RegOffice2'; $i++; } - if (strlen($_POST['RegOffice3']) >40) { + if (mb_strlen($_POST['RegOffice3']) >40) { $InputError = 1; prnMsg(_('The Line 3 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'RegOffice3'; $i++; } - if (strlen($_POST['RegOffice4']) >40) { + if (mb_strlen($_POST['RegOffice4']) >40) { $InputError = 1; prnMsg(_('The Line 4 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'RegOffice4'; $i++; } - if (strlen($_POST['RegOffice5']) >20) { + if (mb_strlen($_POST['RegOffice5']) >20) { $InputError = 1; prnMsg(_('The Line 5 of the address must be twenty characters or less long'),'error'); $Errors[$i] = 'RegOffice5'; $i++; } - if (strlen($_POST['RegOffice6']) >15) { + if (mb_strlen($_POST['RegOffice6']) >15) { $InputError = 1; prnMsg(_('The Line 6 of the address must be fifteen characters or less long'),'error'); $Errors[$i] = 'RegOffice6'; $i++; } - if (strlen($_POST['Telephone']) >25) { + if (mb_strlen($_POST['Telephone']) >25) { $InputError = 1; prnMsg(_('The telephone number must be 25 characters or less long'),'error'); $Errors[$i] = 'Telephone'; $i++; } - if (strlen($_POST['Fax']) >25) { + if (mb_strlen($_POST['Fax']) >25) { $InputError = 1; prnMsg(_('The fax number must be 25 characters or less long'),'error'); $Errors[$i] = 'Fax'; $i++; } - if (strlen($_POST['Email']) >55) { + if (mb_strlen($_POST['Email']) >55) { $InputError = 1; prnMsg(_('The email address must be 55 characters or less long'),'error'); $Errors[$i] = 'Email'; $i++; } - if (strlen($_POST['Email'])>0 and !IsEmailAddress($_POST['Email'])) { + if (mb_strlen($_POST['Email'])>0 and !IsEmailAddress($_POST['Email'])) { $InputError = 1; prnMsg(_('The email address is not correctly formed'),'error'); $Errors[$i] = 'Email'; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/ConfirmDispatch_Invoice.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -405,7 +405,7 @@ } } echo '</tr>'; - if (strlen($LnItm->Narrative)>1){ + if (mb_strlen($LnItm->Narrative)>1){ $narrative=str_replace('\r\n','<br />', $LnItm->Narrative); echo $RowStarter . '<td colspan=12>' . stripslashes($narrative) . '</td></tr>'; } @@ -823,7 +823,7 @@ if ($HyphenOccursAt == false){ $AssetNumber = intval(mb_substr($OrderLine->StockID,6)); } else { - $AssetNumber = intval(mb_substr($OrderLine->StockID,6,strlen($OrderLine->StockID)-$HyphenOccursAt-1)); + $AssetNumber = intval(mb_substr($OrderLine->StockID,6,mb_strlen($OrderLine->StockID)-$HyphenOccursAt-1)); } prnMsg (_('The asset number being disposed of is:') . ' ' . $AssetNumber, 'info'); } else { Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/ContractBOM.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -170,7 +170,7 @@ /* take the form entries and enter the data from the form into the PurchOrder class variable */ foreach ($_POST as $key => $value) { if (mb_substr($key, 0, 3)=='qty') { - $ItemCode=mb_substr($key, 3, strlen($key)-3); + $ItemCode=mb_substr($key, 3, mb_strlen($key)-3); $Quantity=$value; $AlreadyOnThisBOM = 0; Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/Contracts.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -76,7 +76,7 @@ /*User hit the button to enter line items - then meta refresh to Contract_Items.php*/ $InputError = false; - if(strlen($_SESSION['Contract'.$identifier]->ContractRef)<2){ + if(mb_strlen($_SESSION['Contract'.$identifier]->ContractRef)<2){ prnMsg(_('The contract reference must be entered (and be longer than 2 characters) before the requirements of the contract can be setup'),'warn'); $InputError = true; } @@ -111,7 +111,7 @@ $filename = $_SESSION['part_pics_dir'] . '/' . $_SESSION['Contract'.$identifier]->ContractRef . '.jpg'; //But check for the worst - if (mb_strtoupper(mb_substr(trim($_FILES['Drawing']['name']),strlen($_FILES['Drawing']['name'])-3))!='JPG'){ + if (mb_strtoupper(mb_substr(trim($_FILES['Drawing']['name']),mb_strlen($_FILES['Drawing']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['Drawing']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check @@ -225,7 +225,7 @@ //First update the session['Contract'.$identifier] variable with all inputs from the form $InputError = False; //assume no errors on input then test for errors - if (strlen($_POST['ContractRef'])<2){ + if (mb_strlen($_POST['ContractRef'])<2){ prnMsg(_('The contract reference is expected to be more than 2 characters long. Please alter the contract reference before proceeding.'),'error'); $InputError = true; } @@ -240,7 +240,7 @@ prnMsg(_('The contract reference cannot be the same as a previously created stock item. Please modify the contract reference before continuing'),'error'); $InputError=true; } - if (strlen($_POST['ContractDescription'])<10){ + if (mb_strlen($_POST['ContractDescription'])<10){ prnMsg(_('The contract description is expected to be more than 10 characters long. Please alter the contract description in full before proceeding.'),'error'); $InputError = true; } @@ -612,7 +612,7 @@ if (($_POST['CustKeywords']=='') AND ($_POST['CustCode']=='') AND ($_POST['CustPhone']=='')) { prnMsg(_('At least one Customer Branch Name keyword OR an extract of a Customer Branch Code or Branch Phone Number must be entered for the search'), 'warn'); } else { - if (strlen($_POST['CustKeywords'])>0) { + if (mb_strlen($_POST['CustKeywords'])>0) { //insert wildcard characters in spaces $_POST['CustKeywords'] = mb_strtoupper(trim($_POST['CustKeywords'])); $SearchString = '%' . str_replace(' ', '%', $_POST['CustKeywords']) . '%'; @@ -631,7 +631,7 @@ AND custbranch.disabletrans=0 ORDER BY custbranch.debtorno, custbranch.branchcode"; - } elseif (strlen($_POST['CustCode'])>0){ + } elseif (mb_strlen($_POST['CustCode'])>0){ $_POST['CustCode'] = mb_strtoupper(trim($_POST['CustCode'])); @@ -649,7 +649,7 @@ AND custbranch.disabletrans=0 ORDER BY custbranch.debtorno"; - } elseif (strlen($_POST['CustPhone'])>0){ + } elseif (mb_strlen($_POST['CustPhone'])>0){ $SQL = "SELECT custbranch.brname, custbranch.contactname, custbranch.phoneno, Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/CounterSales.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -256,7 +256,7 @@ } else if ($_POST['Keywords']=='' AND $_POST['StockCode']=='') { $msg='<div class="page_help_text">' . _('Stock Category has been used in search') . '.</div>'; } - if (isset($_POST['Keywords']) AND strlen($_POST['Keywords'])>0) { + if (isset($_POST['Keywords']) AND mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -287,7 +287,7 @@ ORDER BY stockmaster.stockid"; } - } else if (strlen($_POST['StockCode'])>0){ + } else if (mb_strlen($_POST['StockCode'])>0){ $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); $SearchString = '%' . $_POST['StockCode'] . '%'; Modified: trunk/CreditStatus.php =================================================================== --- trunk/CreditStatus.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/CreditStatus.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -47,11 +47,11 @@ $Errors[$i] = 'ReasonCode'; $i++; } - if (strlen($_POST['ReasonDescription']) > 30) { + if (mb_strlen($_POST['ReasonDescription']) > 30) { $InputError = 1; prnMsg(_('The credit status description must be thirty characters or less long'),'error'); } - if (strlen($_POST['ReasonDescription']) == 0) { + if (mb_strlen($_POST['ReasonDescription']) == 0) { $InputError = 1; prnMsg(_('The credit status description must be entered'),'error'); $Errors[$i] = 'ReasonDescription'; Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/Currencies.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -50,7 +50,7 @@ $Errors[$i] = 'Abbreviation'; $i++; } - if (strlen($_POST['Abbreviation']) > 3) { + if (mb_strlen($_POST['Abbreviation']) > 3) { $InputError = 1; prnMsg(_('The currency abbreviation must be 3 characters or less long and for automated currency updates to work correctly be one of the ISO4217 currency codes'),'error'); $Errors[$i] = 'Abbreviation'; @@ -62,19 +62,19 @@ $Errors[$i] = 'ExchangeRate'; $i++; } - if (strlen($_POST['CurrencyName']) > 20) { + if (mb_strlen($_POST['CurrencyName']) > 20) { $InputError = 1; prnMsg(_('The currency name must be 20 characters or less long'),'error'); $Errors[$i] = 'CurrencyName'; $i++; } - if (strlen($_POST['Country']) > 50) { + if (mb_strlen($_POST['Country']) > 50) { $InputError = 1; prnMsg(_('The currency country must be 50 characters or less long'),'error'); $Errors[$i] = 'Country'; $i++; } - if (strlen($_POST['HundredsName']) > 15) { + if (mb_strlen($_POST['HundredsName']) > 15) { $InputError = 1; prnMsg(_('The hundredths name must be 15 characters or less long'),'error'); $Errors[$i] = 'HundredsName'; Modified: trunk/CustEDISetup.php =================================================================== --- trunk/CustEDISetup.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/CustEDISetup.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -31,13 +31,13 @@ $InputError = 1; prnMsg(_('The customers EDI reference code cannot contain any of the illegal characters') ,'warn'); } - if (strlen($_POST['EDIReference'])<4 AND ($_POST['EDIInvoices']==1 OR $_POST['EDIOrders']==1)){ + if (mb_strlen($_POST['EDIReference'])<4 AND ($_POST['EDIInvoices']==1 OR $_POST['EDIOrders']==1)){ $InputError = 1; prnMsg(_('The customers EDI reference code must be set when EDI Invoices or EDI orders are activated'),'warn'); $Errors[$i] = 'EDIReference'; $i++; } - if (strlen($_POST['EDIAddress'])<4 AND $_POST['EDIInvoices']==1){ + if (mb_strlen($_POST['EDIAddress'])<4 AND $_POST['EDIInvoices']==1){ $InputError = 1; prnMsg(_('The customers EDI email address or FTP server address must be entered if EDI Invoices are to be sent'),'warn'); $Errors[$i] = 'EDIAddress'; Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/CustLoginSetup.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -67,13 +67,13 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (strlen($_POST['UserID'])<3){ + if (mb_strlen($_POST['UserID'])<3){ $InputError = 1; prnMsg(_('The user ID entered must be at least 4 characters long'),'error'); } elseif (ContainsIllegalCharacters($_POST['UserID'])) { $InputError = 1; prnMsg(_('User names cannot contain any of the illegal characters') ,'error'); - } elseif (strlen($_POST['Password'])<5){ + } elseif (mb_strlen($_POST['Password'])<5){ if (!$SelectedUser){ $InputError = 1; prnMsg(_('The password entered must be at least 5 characters long'),'error'); @@ -81,7 +81,7 @@ } elseif (strstr($_POST['Password'],$_POST['UserID'])!= False){ $InputError = 1; prnMsg(_('The password cannot contain the user id'),'error'); - } elseif ((strlen($_POST['Cust'])>0) AND (strlen($_POST['BranchCode'])==0)) { + } elseif ((mb_strlen($_POST['Cust'])>0) AND (mb_strlen($_POST['BranchCode'])==0)) { $InputError = 1; prnMsg(_('If you enter a Customer Code you must also enter a Branch Code valid for this Customer'),'error'); } @@ -93,7 +93,7 @@ } */ - if ((strlen($_POST['BranchCode'])>0) AND ($InputError !=1)) { + if ((mb_strlen($_POST['BranchCode'])>0) AND ($InputError !=1)) { // check that the entered branch is valid for the customer code $sql = "SELECT custbranch.debtorno FROM custbranch Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/CustomerBranches.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -58,7 +58,7 @@ $Errors[$i] = 'BranchCode'; $i++; } - if (strlen($_POST['BranchCode'])==0) { + if (mb_strlen($_POST['BranchCode'])==0) { $InputError = 1; prnMsg(_('The Branch code must be at least one character long'),'error'); $Errors[$i] = 'BranchCode'; Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/CustomerReceipt.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -545,7 +545,7 @@ if ($_POST['Keywords']=="" AND $_POST['CustCode']=="" AND $_POST['CustInvNo']=="") { $msg=_('At least one Customer Name keyword OR an extract of a Customer Code must be entered for the search'); } else { - if (strlen($_POST['Keywords'])>0) { + if (mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -555,13 +555,13 @@ WHERE debtorsmaster.name " . LIKE . " '". $SearchString . "' AND debtorsmaster.currcode= '" . $_SESSION['ReceiptBatch']->Currency . "'"; - } elseif (strlen($_POST['CustCode'])>0){ + } elseif (mb_strlen($_POST['CustCode'])>0){ $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name FROM debtorsmaster WHERE debtorsmaster.debtorno " . LIKE . " '%" . $_POST['CustCode'] . "%' AND debtorsmaster.currcode= '" . $_SESSION['ReceiptBatch']->Currency . "'"; - } elseif (strlen($_POST['CustInvNo'])>0){ + } elseif (mb_strlen($_POST['CustInvNo'])>0){ $SQL = "SELECT debtortrans.debtorno, debtorsmaster.name FROM debtorsmaster LEFT JOIN debtortrans Modified: trunk/CustomerTypes.php =================================================================== --- trunk/CustomerTypes.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/CustomerTypes.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -34,14 +34,14 @@ //first off validate inputs sensible $i=1; - if (strlen($_POST['typename']) >100) { + if (mb_strlen($_POST['typename']) >100) { $InputError = 1; prnMsg(_('The customer type name description must be 100 characters or less long'),'error'); $Errors[$i] = 'CustomerType'; $i++; } - if (strlen($_POST['typename'])==0) { + if (mb_strlen($_POST['typename'])==0) { $InputError = 1; echo '<br />'; prnMsg(_('The customer type name description must contain at least one character'),'error'); Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/Customers.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -38,12 +38,12 @@ prnMsg( _('The customer number already exists in the database'),'error'); $Errors[$i] = 'DebtorNo'; $i++; - } elseif (strlen($_POST['CustName']) > 40 OR strlen($_POST['CustName'])==0) { + } elseif (mb_strlen($_POST['CustName']) > 40 OR mb_strlen($_POST['CustName'])==0) { $InputError = 1; prnMsg( _('The customer name must be entered and be forty characters or less long'),'error'); $Errors[$i] = 'CustName'; $i++; - } elseif ($_SESSION['AutoDebtorNo']==0 AND strlen($_POST['DebtorNo']) ==0) { + } elseif ($_SESSION['AutoDebtorNo']==0 AND mb_strlen($_POST['DebtorNo']) ==0) { $InputError = 1; prnMsg( _('The debtor code cannot be empty'),'error'); $Errors[$i] = 'DebtorNo'; @@ -53,56 +53,56 @@ prnMsg( _('The customer code cannot contain any of the illefal characters') ,'error'); $Errors[$i] = 'DebtorNo'; $i++; - } elseif (strlen($_POST['Address1']) >40) { + } elseif (mb_strlen($_POST['Address1']) >40) { $InputError = 1; prnMsg( _('The Line 1 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'Address1'; $i++; - } elseif (strlen($_POST['Address2']) >40) { + } elseif (mb_strlen($_POST['Address2']) >40) { $InputError = 1; prnMsg( _('The Line 2 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'Address2'; $i++; - } elseif (strlen($_POST['Address3']) >40) { + } elseif (mb_strlen($_POST['Address3']) >40) { $InputError = 1; prnMsg( _('The Line 3 of the address must be forty characters or less long'),'error'); $Errors[$i] = 'Address3'; $i++; - } elseif (strlen($_POST['Address4']) >50) { + } elseif (mb_strlen($_POST['Address4']) >50) { $InputError = 1; prnMsg( _('The Line 4 of the address must be fifty characters or less long'),'error'); $Errors[$i] = 'Address4'; $i++; - } elseif (strlen($_POST['Address5']) >20) { + } elseif (mb_strlen($_POST['Address5']) >20) { $InputError = 1; prnMsg( _('The Line 5 of the address must be twenty characters or less long'),'error'); $Errors[$i] = 'Address5'; $i++; - } elseif (strlen($_POST['Address6']) >15) { + } elseif (mb_strlen($_POST['Address6']) >15) { $InputError = 1; prnMsg( _('The Line 6 of the address must be fifteen characters or less long'),'error'); $Errors[$i] = 'Address6'; $i++; } - elseif (strlen($_POST['Phone']) >25) { + elseif (mb_strlen($_POST['Phone']) >25) { $InputError = 1; prnMsg(_('The telephone number must be 25 characters or less long'),'error'); $Errors[$i] = 'Telephone'; $i++; } - elseif (strlen($_POST['Fax']) >25) { + elseif (mb_strlen($_POST['Fax']) >25) { $InputError = 1; prnMsg(_('The fax number must be 25 characters or less long'),'error'); $Errors[$i] = 'Fax'; $i++; } - elseif (strlen($_POST['Email']) >55) { + elseif (mb_strlen($_POST['Email']) >55) { $InputError = 1; prnMsg(_('The email address must be 55 characters or less long'),'error'); $Errors[$i] = 'Email'; $i++; } - elseif (strlen($_POST['Email'])>0 and !IsEmailAddress($_POST['Email'])) { + elseif (mb_strlen($_POST['Email'])>0 and !IsEmailAddress($_POST['Email'])) { $InputError = 1; prnMsg(_('The email address is not correctly formed'),'error'); $Errors[$i] = 'Email'; Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/DailySalesInquiry.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -67,7 +67,7 @@ $Date_Array = explode('.',$EndDateSQL); } -if (strlen($Date_Array[2])>4) { +if (mb_strlen($Date_Array[2])>4) { $Date_Array[2]= mb_substr($Date_Array[2],0,2); } Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/DebtorsAtPeriodEnd.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -8,9 +8,9 @@ if (isset($_POST['PrintPDF']) AND isset($_POST['FromCriteria']) - AND strlen($_POST['FromCriteria'])>=1 + AND mb_strlen($_POST['FromCriteria'])>=1 AND isset($_POST['ToCriteria']) - AND strlen($_POST['ToCriteria'])>=1){ + AND mb_strlen($_POST['ToCriteria'])>=1){ include('includes/PDFStarter.php'); $pdf->addInfo('Title',_('Customer Balance Listing')); @@ -117,7 +117,7 @@ $LeftOvers = $pdf->addTextWrap(220,$YPos,60,$FontSize,$DisplayTotBalance,'right'); /* UldisN $buf = $pdf->output(); - $len = strlen($buf); + $len = mb_strlen($buf); header('Content-type: application/pdf'); header("Content-Length: ".$len); Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/DeliveryDetails.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -55,11 +55,11 @@ or isset($_POST['MakeRecurringOrder'])) { $InputErrors =0; - if (strlen($_POST['DeliverTo'])<=1){ + if (mb_strlen($_POST['DeliverTo'])<=1){ $InputErrors =1; prnMsg(_('You must enter the person or company to whom delivery should be made'),'error'); } - if (strlen($_POST['BrAdd1'])<=1){ + if (mb_strlen($_POST['BrAdd1'])<=1){ $InputErrors =1; prnMsg(_('You should enter the street address in the box provided') . '. ' . _('Orders cannot be accepted without a valid street address'),'error'); } @@ -79,13 +79,13 @@ prnMsg(_('You must select the type of packlist to print'),'error'); } -/* If (strlen($_POST['BrAdd3'])==0 OR !isset($_POST['BrAdd3'])){ +/* If (mb_strlen($_POST['BrAdd3'])==0 OR !isset($_POST['BrAdd3'])){ $InputErrors =1; echo "<br />A region or city must be entered.<br />"; } Maybe appropriate in some installations but not here - If (strlen($_POST['BrAdd2'])<=1){ + If (mb_strlen($_POST['BrAdd2'])<=1){ $InputErrors =1; echo "<br />You should enter the suburb in the box provided. Orders cannot be accepted without a valid suburb being entered.<br />"; } @@ -762,7 +762,7 @@ } -if (isset($_SESSION['Items'.$identifier]->SpecialInstructions) and strlen($_SESSION['Items'.$identifier]->SpecialInstructions)>0) { +if (isset($_SESSION['Items'.$identifier]->SpecialInstructions) and mb_strlen($_SESSION['Items'.$identifier]->SpecialInstructions)>0) { prnMsg($_SESSION['Items'.$identifier]->SpecialInstructions,'info'); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Delivery') . '" alt="" />' . ' ' . _('Delivery Details') . '</p>'; Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/EDIProcessOrders.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -322,10 +322,10 @@ break; case 'ALI': $ALI = explode('+',mb_substr($LineText,4)); - if (strlen($ALI[0])>1){ + if (mb_strlen($ALI[0])>1){ $EmailText .= "\n" . _('Goods of origin') . ' ' . $ALI[0]; } - if (strlen($ALI[1])>1){ + if (mb_strlen($ALI[1])>1){ $EmailText .= "\n" . _('Duty regime code') . ' ' . $ALI[1]; } switch ($ALI[2]){ @@ -353,7 +353,7 @@ $FTX = explode('+',mb_substr($LineText,4)); /*agreed coded text is not catered for ... yet only free form text */ - if (strlen($FTX[3])>5){ + if (mb_strlen($FTX[3])>5){ $FTX_C108=explode(':',$FTX[3]); $Order->Comments .= $FTX_C108[0] . " " . $FTX_C108[1] . ' ' . $FTX_C108[2] . ' ' . $FTX_C108[3] . ' ' . $FTX_C108[4]; $EmailText .= "\n" . $FTX_C108[0] . ' ' . $FTX_C108[1] . ' ' . $FTX_C108[2] . ' ' . $FTX_C108[3] . ' ' . $FTX_C108[4] . ' '; @@ -428,7 +428,7 @@ } break; } - if (strlen($NAD_C080[0])>0){ + if (mb_strlen($NAD_C080[0])>0){ $Order->CustomerName = $NAD_C080[0]; } break; @@ -445,10 +445,10 @@ /*Delivery Party - get the address and name etc */ /*Snag here - how do I figure out what branch to charge */ - if (strlen($NAD_C080[0])>0){ + if (mb_strlen($NAD_C080[0])>0){ $Order->DeliverTo = $NAD_C080[0]; } - if (strlen($NAD_C059[0])>0){ + if (mb_strlen($NAD_C059[0])>0){ $Order->DelAdd1 = $NAD_C059[0]; $Order->DelAdd2 = $NAD_C059[1]; $Order->DelAdd3 = $NAD_C059[2]; @@ -514,7 +514,7 @@ } /*end case Seg Tag*/ } /*end while get next line of message */ /*Thats the end of the message or had to abort */ - if (strlen($EmailText)>10){ + if (mb_strlen($EmailText)>10){ /*Now send the email off to the appropriate person */ $mail = new htmlMimeMail(); $mail->setText($EmailText); Modified: trunk/EmailConfirmation.php =================================================================== --- trunk/EmailConfirmation.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/EmailConfirmation.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -135,7 +135,7 @@ $myrow['deliverto'] . "</td></tr>"; $MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . $myrow['deladd1'] . "</td></tr>"; -If(strlen(trim($myrow['deladd2']))) +If(mb_strlen(trim($myrow['deladd2']))) { $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd2'] . "</td></tr>"; $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/Factors.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -33,7 +33,7 @@ if (isset($_POST['submit']) or isset($_POST['update']) or isset($_POST['delete'])) { - if (strlen($_POST['FactorName']) > 40 or strlen($_POST['FactorName']) == 0 or $_POST['FactorName'] == '') { + if (mb_strlen($_POST['FactorName']) > 40 or mb_strlen($_POST['FactorName']) == 0 or $_POST['FactorName'] == '') { $InputError = 1; prnMsg(_('The factoring company name must be entered and be forty characters or less long'),'error'); } Modified: trunk/FixedAssetCategories.php =================================================================== --- trunk/FixedAssetCategories.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/FixedAssetCategories.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -29,13 +29,13 @@ $_POST['CategoryID'] = mb_strtoupper($_POST['CategoryID']); - if (strlen($_POST['CategoryID']) > 6) { + if (mb_strlen($_POST['CategoryID']) > 6) { $InputError = 1; prnMsg(_('The Fixed Asset Category code must be six characters or less long'),'error'); - } elseif (strlen($_POST['CategoryID'])==0) { + } elseif (mb_strlen($_POST['CategoryID'])==0) { $InputError = 1; prnMsg(_('The Fixed Asset Category code must be at least 1 character but less than six characters long'),'error'); - } elseif (strlen($_POST['CategoryDescription']) >20) { + } elseif (mb_strlen($_POST['CategoryDescription']) >20) { $InputError = 1; prnMsg(_('The Fixed Asset Category description must be twenty characters or less long'),'error'); } Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/FixedAssetItems.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -42,7 +42,7 @@ $filename = $_SESSION['part_pics_dir'] . '/ASSET_' . $AssetID . '.jpg'; //But check for the worst - if (mb_strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ + if (mb_strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['ItemPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check @@ -84,20 +84,20 @@ $i=1; - if (!isset($_POST['Description']) or strlen($_POST['Description']) > 50 OR strlen($_POST['Description'])==0) { + if (!isset($_POST['Description']) or mb_strlen($_POST['Description']) > 50 OR mb_strlen($_POST['Description'])==0) { $InputError = 1; prnMsg (_('The asset description must be entered and be fifty characters or less long. It cannot be a zero length string either, a description is required'),'error'); $Errors[$i] = 'Description'; $i++; } - if (strlen($_POST['LongDescription'])==0) { + if (mb_strlen($_POST['LongDescription'])==0) { $InputError = 1; prnMsg (_('The asset long description cannot be a zero length string, a long description is required'),'error'); $Errors[$i] = 'LongDescription'; $i++; } - if (strlen($_POST['BarCode']) >20) { + if (mb_strlen($_POST['BarCode']) >20) { $InputError = 1; prnMsg(_('The barcode must be 20 characters or less long'),'error'); $Errors[$i] = 'BarCode'; @@ -296,7 +296,7 @@ prnMsg( _('Validation failed, no updates or deletes took place'), 'error'); } -} elseif (isset($_POST['delete']) AND strlen($_POST['delete']) >1 ) { +} elseif (isset($_POST['delete']) AND mb_strlen($_POST['delete']) >1 ) { //the button to delete a selected record was clicked instead of the submit button $CancelDelete = 0; Modified: trunk/FixedAssetLocations.php =================================================================== --- trunk/FixedAssetLocations.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/FixedAssetLocations.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -10,11 +10,11 @@ if (isset($_POST['submit']) and !isset($_POST['delete'])) { $InputError=0; - if (!isset($_POST['LocationID']) or strlen($_POST['LocationID'])<1) { + if (!isset($_POST['LocationID']) or mb_strlen($_POST['LocationID'])<1) { prnMsg(_('You must enter at least one character in the location ID'),'error'); $InputError=1; } - if (!isset($_POST['LocationDescription']) or strlen($_POST['LocationDescription'])<1) { + if (!isset($_POST['LocationDescription']) or mb_strlen($_POST['LocationDescription'])<1) { prnMsg(_('You must enter at least one character in the location description'),'error'); $InputError=1; } @@ -44,7 +44,7 @@ if (isset($_POST['update']) and !isset($_POST['delete'])) { $InputError=0; - if (!isset($_POST['LocationDescription']) or strlen($_POST['LocationDescription'])<1) { + if (!isset($_POST['LocationDescription']) or mb_strlen($_POST['LocationDescription'])<1) { prnMsg(_('You must enter at least one character in the location description'),'error'); $InputError=1; } Modified: trunk/FormDesigner.php =================================================================== --- trunk/FormDesigner.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/FormDesigner.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -79,7 +79,7 @@ $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/'.$_POST['FormName']); $FormDesign['name']=$_POST['formname']; if (mb_substr($_POST['PaperSize'],-8)=='Portrait') { - $_POST['PaperSize']=mb_substr($_POST['PaperSize'],0,strlen($_POST['PaperSize'])-9); + $_POST['PaperSize']=mb_substr($_POST['PaperSize'],0,mb_strlen($_POST['PaperSize'])-9); } $FormDesign->PaperSize=$_POST['PaperSize']; $FormDesign->LineHeight=$_POST['LineHeight']; @@ -169,7 +169,7 @@ echo '<th width=33%>'._('Paper Size').'<select name="PaperSize">'; foreach ($Papers as $Paper) { if (mb_substr($Paper,-8)=='Portrait') { - $PaperValue=mb_substr($Paper,0,strlen($Paper)-9); + $PaperValue=mb_substr($Paper,0,mb_strlen($Paper)-9); } else { $PaperValue=$Paper; } Modified: trunk/FreightCosts.php =================================================================== --- trunk/FreightCosts.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/FreightCosts.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -76,7 +76,7 @@ $InputError = 0; //first off validate inputs sensible - if (strlen($_POST['Destination'])<2){ + if (mb_strlen($_POST['Destination'])<2){ $InputError=1; prnMsg(_('The entry for the destination must be at least two characters long') . '. ' . _('These entries are matched against the town names entered for customer delivery addresses'),'warn'); } Modified: trunk/GLAccountReport.php =================================================================== --- trunk/GLAccountReport.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/GLAccountReport.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -220,7 +220,7 @@ /* $pdfcode = $pdf->output(); - $len = strlen($pdfcode); + $len = mb_strlen($pdfcode); if ($len<=20){ $title = _('Print GL Accounts Report Error'); Modified: trunk/GLAccounts.php =================================================================== --- trunk/GLAccounts.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/GLAccounts.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -29,7 +29,7 @@ if (!is_long((integer)$_POST['AccountCode'])) { $InputError = 1; prnMsg(_('The account code must be an integer'),'warn'); - } elseif (strlen($_POST['AccountName']) >50) { + } elseif (mb_strlen($_POST['AccountName']) >50) { $InputError = 1; prnMsg( _('The account name must be fifty characters or less long'),'warn'); } Modified: trunk/GLTransInquiry.php =================================================================== --- trunk/GLTransInquiry.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/GLTransInquiry.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -120,7 +120,7 @@ } else { $URL = $rootpath . '/GLAccountInquiry.php?' . SID . '&Account=' . $TransRow['account']; - if( strlen($TransRow['narrative'])==0 ) { + if( mb_strlen($TransRow['narrative'])==0 ) { $TransRow['narrative'] = ' '; } if ( $TransRow['posted']==0 ) { Modified: trunk/GetStockImage.php =================================================================== --- trunk/GetStockImage.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/GetStockImage.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -22,26 +22,26 @@ // Color decode function function DecodeBgColor( $colorstr ) { if ( $colorstr[0] == '#' ) { - $colorstr = mb_substr($colorstr,1,strlen($colorstr)); + $colorstr = mb_substr($colorstr,1,mb_strlen($colorstr)); } $red = 0; - if(strlen($colorstr) > 1) { + if(mb_strlen($colorstr) > 1) { $red = hexdec(mb_substr($colorstr,0,2)); - $colorstr = mb_substr($colorstr,2,strlen($colorstr)); + $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); } $green = 0; - if(strlen($colorstr) > 1) { + if(mb_strlen($colorstr) > 1) { $green = hexdec(mb_substr($colorstr,0,2)); - $colorstr = mb_substr($colorstr,2,strlen($colorstr)); + $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); } $blue = 0; - if(strlen($colorstr) > 1) { + if(mb_strlen($colorstr) > 1) { $blue = hexdec(mb_substr($colorstr,0,2)); - $colorstr = mb_substr($colorstr,2,strlen($colorstr)); + $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); } - if(strlen($colorstr) > 1) { + if(mb_strlen($colorstr) > 1) { $alpha = hexdec(mb_substr($colorstr,0,2)); - $colorstr = mb_substr($colorstr,2,strlen($colorstr)); + $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); } if ( isset($alpha) ) return array('red' => $red, 'green' => $green, 'blue' => $blue, 'alpha' => $alpha ); @@ -120,7 +120,7 @@ if( $i === false ) $type = 'png'; else { - $type = strtolower(mb_substr($stockid,$i+1,strlen($stockid))); + $type = strtolower(mb_substr($stockid,$i+1,mb_strlen($stockid))); $stockid = mb_substr($stockid,0,$i); if($blanktext && !isset($text)) $text = ''; @@ -224,12 +224,12 @@ if(!isset($text)) $text = $stockid; - if(strlen($text) > 0 ) { + if(mb_strlen($text) > 0 ) { $fw = imagefontwidth($fontsize); $fh = imagefontheight($fontsize); $fy = (imagesy($im) - ($fh)) / 2; $fyh = $fy + $fh - 1; - $textwidth = $fw * strlen($text); + $textwidth = $fw * mb_strlen($text); $px = (imagesx($im) - $textwidth) / 2; if (!$notextbg) imagefilledrectangle($im,$px,$fy,imagesx($im)-($px+1),$fyh, $ixtextbgcolor ); @@ -323,12 +323,12 @@ // 0,0,0,0); if(!isset($text)) $text = $stockid; - if(strlen($text) > 0 ) { + if(mb_strlen($text) > 0 ) { $fw = imagefontwidth($fontsize); $fh = imagefontheight($fontsize); $fy = imagesy($im) - ($fh); $fyh = imagesy($im) - 1; - $textwidth = $fw * strlen($text); + $textwidth = $fw * mb_strlen($text); $px = (imagesx($im) - $textwidth) / 2; if (!$notextbg) imagefilledrectangle($im,$px,$fy,imagesx($im)-($px+1),$fyh, $ixtextbgcolor ); Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/GoodsReceived.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -140,7 +140,7 @@ $SupplierUOMResult=DB_query($SupplierUomSQL, $db); if (DB_num_rows($SupplierUOMResult)>0) { $SupplierUOMRow=DB_fetch_array($SupplierUOMResult); - if (strlen($SupplierUOMRow['unitname'])>0) { + if (mb_strlen($SupplierUOMRow['unitname'])>0) { $Uom=$SupplierUOMRow['unitname']; } else { $Uom=$LnItm->Units; Modified: trunk/InventoryPlanning.php =================================================================== --- trunk/InventoryPlanning.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/InventoryPlanning.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -7,9 +7,9 @@ if (isset($_POST['PrintPDF']) and isset($_POST['FromCriteria']) - and strlen($_POST['FromCriteria'])>=1 + and mb_strlen($_POST['FromCriteria'])>=1 and isset($_POST['ToCriteria']) - and strlen($_POST['ToCriteria'])>=1) { + and mb_strlen($_POST['ToCriteria'])>=1) { include ('includes/class.pdf.php'); Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/InventoryValuation.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -6,9 +6,9 @@ if (isset($_POST['PrintPDF']) AND isset($_POST['FromCriteria']) - AND strlen($_POST['FromCriteria'])>=1 + AND mb_strlen($_POST['FromCriteria'])>=1 AND isset($_POST['ToCriteria']) - AND strlen($_POST['ToCriteria'])>=1){ + AND mb_strlen($_POST['ToCriteria'])>=1){ include('includes/PDFStarter.php'); Modified: trunk/MRPDemandTypes.php =================================================================== --- trunk/MRPDemandTypes.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/MRPDemandTypes.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -32,11 +32,11 @@ prnMsg(_('The Demand Type is reserved for the system'),'error'); } - if (strlen($_POST['MRPDemandType']) < 1) { + if (mb_strlen($_POST['MRPDemandType']) < 1) { $InputError = 1; prnMsg(_('The Demand Type code must be at least 1 character long'),'error'); } - if (strlen($_POST['Description'])<3) { + if (mb_strlen($_POST['Description'])<3) { $InputError = 1; prnMsg(_('The Demand Type description must be at least 3 characters long'),'error'); } Modified: trunk/MRPDemands.php =================================================================== --- trunk/MRPDemands.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/MRPDemands.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -56,7 +56,7 @@ if ($_POST['Keywords']=='' AND $_POST['StockCode']=='') { $msg=_('At least one stock description keyword or an extract of a stock code must be entered for the search'); } else { - if (strlen($_POST['Keywords'])>0) { + if (mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -66,7 +66,7 @@ WHERE stockmaster.description " . LIKE . " '" . $SearchString ."' ORDER BY stockmaster.stockid"; - } elseif (strlen($_POST['StockCode'])>0){ + } elseif (mb_strlen($_POST['StockCode'])>0){ $sql = "SELECT stockmaster.stockid, stockmaster.description FROM stockmaster Modified: trunk/MRPReport.php =================================================================== --- trunk/MRPReport.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/MRPReport.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -422,7 +422,7 @@ // Details for Demand/Supply Sections $i = 0; - while ((isset($Supplies[$i]) and strlen($Supplies[$i]['part'])) > 1 or (isset($Requirements[$i]) and strlen($Requirements[$i]['part']) > 1)){ + while ((isset($Supplies[$i]) and mb_strlen($Supplies[$i]['part'])) > 1 or (isset($Requirements[$i]) and mb_strlen($Requirements[$i]['part']) > 1)){ $YPos -=$line_height; $FontSize=7; @@ -436,7 +436,7 @@ // 1) X position 2) Y position 3) Width // 4) Height 5) Text To Display 6) Alignment 7) Border 8) Fill - True to use SetFillColor // and False to set for transparent - if (isset($Requirements[$i]['part']) and strlen($Requirements[$i]['part']) > 1) { + if (isset($Requirements[$i]['part']) and mb_strlen($Requirements[$i]['part']) > 1) { $FormatedReqDueDate = ConvertSQLDate($Requirements[$i]['daterequired']); $pdf->addTextWrap($Left_Margin,$YPos,55,$FontSize,$Requirements[$i]['mrpdemandtype'],''); $pdf->addTextWrap(80,$YPos,90,$FontSize,$Requirements[$i]['whererequired'],''); @@ -445,7 +445,7 @@ $myrow['decimalplaces']),'right'); $pdf->addTextWrap(240,$YPos,50,$FontSize,$FormatedReqDueDate,'right'); } - if (strlen($Supplies[$i]['part']) > 1) { + if (mb_strlen($Supplies[$i]['part']) > 1) { $suptype = $Supplies[$i]['ordertype']; // If ordertype is not QOH,PO,or WO, it is an MRP generated planned order and the // ordertype is actually the demandtype that caused the planned order Modified: trunk/Manufacturers.php =================================================================== --- trunk/Manufacturers.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/Manufacturers.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -33,7 +33,7 @@ if (isset($_POST['submit']) or isset($_POST['update']) or isset($_POST['delete'])) { - if (strlen($_POST['ManufacturerName']) > 40 or strlen($_POST['ManufacturerName']) == 0 or $_POST['ManufacturerName'] == '') { + if (mb_strlen($_POST['ManufacturerName']) > 40 or mb_strlen($_POST['ManufacturerName']) == 0 or $_POST['ManufacturerName'] == '') { $InputError = 1; prnMsg(_('The manufacturing company name must be entered and be forty characters or less long'),'error'); } Modified: trunk/Numbers/Words/lang.bg.php =================================================================== --- trunk/Numbers/Words/lang.bg.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/Numbers/Words/lang.bg.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -310,9 +310,9 @@ { if (is_string($num)) { $ret = array(); - $strlen = strlen($num); - $first = mb_substr($num, 0, $strlen%3); - preg_match_all('/\d{3}/', mb_substr($num, $strlen%3, $strlen), $m); + $mb_strlen = mb_strlen($num); + $first = mb_substr($num, 0, $mb_strlen%3); + preg_match_all('/\d{3}/', mb_substr($num, $mb_strlen%3, $mb_strlen), $m); $ret =& $m[0]; if ($first) array_unshift($ret, $first); return $ret; @@ -452,7 +452,7 @@ } // if the absolute value is greater than 9.99*10^302, return infinity - if (strlen($num)>306) { + if (mb_strlen($num)>306) { return $ret_minus . $this->_infinity; } Modified: trunk/Numbers/Words/lang.cs.php =================================================================== --- trunk/Numbers/Words/lang.cs.php 2011-07-05 11:51:36 UTC (rev 5561) +++ trunk/Numbers/Words/lang.cs.php 2011-07-05 11:57:20 UTC (rev 5562) @@ -178,8 +178,8 @@ $num = trim($num); $num = preg_replace('/^0+/','',$num); - if (strlen($num) > 3) { - $maxp = strlen($num)-1; + if (mb_strlen($num) > 3) { + $maxp = mb_strlen($num)-1; $curp = $maxp; for ($p = $maxp; $p > 0; --$p) { // power @@ -208,7 +208,7 @@ $h = $t = $d = 0; - switch(strlen($num)) { + switch(mb_strlen($num)) { case 3: $h = (int)mb_substr(... [truncated message content] |
From: <tim...@us...> - 2011-07-10 12:31:35
|
Revision: 5578 http://weberp.svn.sourceforge.net/weberp/?rev=5578&view=rev Author: tim_schofield Date: 2011-07-10 12:31:28 +0000 (Sun, 10 Jul 2011) Log Message: ----------- New field for purchasing uom decimal places Modified Paths: -------------- trunk/includes/session.inc Added Paths: ----------- trunk/sql/mysql/updates/89.php Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-07-10 12:17:48 UTC (rev 5577) +++ trunk/includes/session.inc 2011-07-10 12:31:28 UTC (rev 5578) @@ -13,7 +13,7 @@ header('Location:' . $rootpath . '/install/index.php'); } include($PathPrefix . 'config.php'); -$DBVersion=88; +$DBVersion=89; if (isset($SessionSavePath)){ session_save_path($SessionSavePath); } Added: trunk/sql/mysql/updates/89.php =================================================================== --- trunk/sql/mysql/updates/89.php (rev 0) +++ trunk/sql/mysql/updates/89.php 2011-07-10 12:31:28 UTC (rev 5578) @@ -0,0 +1,7 @@ +<?php + +AddColumn('uomdecimalplaces', 'purchdata', 'tinyint( 4 )', 'NOT NULL', '0', 'conversionfactor', $db); + +UpdateDBNo(89, $db); + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |