From: <dai...@us...> - 2011-04-07 10:24:02
|
Revision: 4541 http://web-erp.svn.sourceforge.net/web-erp/?rev=4541&view=rev Author: daintree Date: 2011-04-07 10:23:55 +0000 (Thu, 07 Apr 2011) Log Message: ----------- various Modified Paths: -------------- trunk/Tax.php trunk/TaxAuthorities.php trunk/TaxGroups.php trunk/TopItems.php Modified: trunk/Tax.php =================================================================== --- trunk/Tax.php 2011-04-06 10:01:30 UTC (rev 4540) +++ trunk/Tax.php 2011-04-07 10:23:55 UTC (rev 4541) @@ -2,7 +2,6 @@ /* $Id$*/ -//$PageSecurity = 2; include('includes/session.inc'); if (isset($_POST['TaxAuthority']) AND @@ -12,15 +11,15 @@ include('includes/PDFStarter.php'); - $sql = 'SELECT lastdate_in_period - FROM periods - WHERE periodno=' . $_POST['ToPeriod']; + $sql = "SELECT lastdate_in_period + FROM periods + WHERE periodno='" . $_POST['ToPeriod'] . "'"; $ErrMsg = _('Could not determine the last date of the period selected') . '. ' . _('The sql returned the following error'); $PeriodEndResult = DB_query($sql,$db,$ErrMsg); $PeriodEndRow = DB_fetch_row($PeriodEndResult); $PeriodEnd = ConvertSQLDate($PeriodEndRow[0]); - $result = DB_query('SELECT description FROM taxauthorities WHERE taxid=' . $_POST['TaxAuthority'],$db); + $result = DB_query("SELECT description FROM taxauthorities WHERE taxid='" . $_POST['TaxAuthority'] . "'",$db); $TaxAuthDescription = DB_fetch_row($result); $TaxAuthorityName = $TaxAuthDescription[0]; @@ -61,22 +60,14 @@ $title = _('Taxation Reporting Error'); include('includes/header.inc'); prnMsg(_('The accounts receivable transaction details could not be retrieved 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">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>$SQL"; + echo '<br />' . $SQL; } include('includes/footer.inc'); exit; } -// if (DB_num_rows($DebtorTransResult)==0){ -// $title = _('Taxation Reporting Error'); -// include('includes/header.inc'); -// prnMsg (_('There are no tax entries to list'),'info'); -// echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; -// include('includes/footer.inc'); -// exit; -// } -// + if ($_POST['DetailOrSummary']=='Detail'){ include ('includes/PDFTaxPageHeader.inc'); $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,120,$FontSize+2, _('Tax On Sales'),'left'); @@ -174,9 +165,9 @@ $title = _('Taxation Reporting Error'); include('includes/header.inc'); echo _('The accounts payable transaction details could not be retrieved because') . ' ' . DB_error_msg($db); - echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('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; @@ -283,7 +274,7 @@ $title = _('Taxation Reporting Error'); include('includes/header.inc'); prnMsg (_('There are no tax entries to list'),'info'); - echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; + echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; include('includes/footer.inc'); exit; } else { @@ -298,60 +289,61 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Supplier Types') . '" alt="" />' . $title. '</p>'; - echo '<form action=' . $_SERVER['PHP_SELF'] . " method='POST'><table class=selection>"; + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST"> + <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Tax Authority To Report On:') . ':</font></td> - <td><select name=TaxAuthority>'; + <td><select name="TaxAuthority">'; - $result = DB_query('SELECT taxid, description FROM taxauthorities',$db); + $result = DB_query("SELECT taxid, description FROM taxauthorities",$db); while ($myrow = DB_fetch_array($result)){ - echo '<option Value=' . $myrow['taxid'] . '>' . $myrow['description']; + echo '<option Value=' . $myrow['taxid'] . '>' . $myrow['description'] . '</option>'; } echo '</select></td></tr>'; echo '<tr><td>' . _('Return Covering') . ':</font></td> - <td><select name=NoOfPeriods> - <option Value=1>' . _('One Month') . - '<option selected Value=2>' ._('Two Months') . - '<option VALUE=3>' . _('Quarter') . - '<option VALUE=6>' . _('Six Months') . + <td><select name="NoOfPeriods"> + <option value=1>' . _('One Month') . '</option>' . + '<option selected value=2>' ._('Two Months') . '</option>' . + '<option value=3>' . _('Quarter') . '</option>' . + '<option value=6>' . _('Six Months') . '</option>' . '</select></td></tr>'; - echo '<tr><td>' . _('Return To') . ":</td> - <td><select Name='ToPeriod'>"; + echo '<tr><td>' . _('Return To') . ':</td> + <td><select name="ToPeriod">'; $DefaultPeriod = GetPeriod(Date($_SESSION['DefaultDateFormat'],Mktime(0,0,0,Date('m'),0,Date('Y'))),$db); - $sql = 'SELECT periodno, + $sql = "SELECT periodno, lastdate_in_period - FROM periods'; + FROM periods"; $ErrMsg = _('Could not retrieve the period data because'); $Periods = DB_query($sql,$db,$ErrMsg); while ($myrow = DB_fetch_array($Periods,$db)){ if ($myrow['periodno']==$DefaultPeriod){ - echo '<option selected VALUE=' . $myrow['periodno'] . '>' . ConvertSQLDate($myrow['lastdate_in_period']); + echo '<option selected VALUE=' . $myrow['periodno'] . '>' . ConvertSQLDate($myrow['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>'; } } echo '</select></td></tr>'; - echo '<tr><td>' . _('Detail Or Summary Only') . ":</font></td> - <td><select name='DetailOrSummary'> - <option Value='Detail'>" . _('Detail and Summary') . - "<option selected Value='Summary'>" . _('Summary Only') . - "</select></td></tr>"; + echo '<tr><td>' . _('Detail Or Summary Only') . ':</font></td> + <td><select name="DetailOrSummary"> + <option Value="Detail">' . _('Detail and Summary') . '</option> + <option selected value="Summary">' . _('Summary Only') . '</option> + </select></td></tr>'; - echo "</table> - <br /><div class='centre'><input type=Submit Name='PrintPDF' Value='" . _('Print PDF') . "'> + echo '</table> + <br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '"> </div> - </form>"; + </form>'; include('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/TaxAuthorities.php =================================================================== --- trunk/TaxAuthorities.php 2011-04-06 10:01:30 UTC (rev 4540) +++ trunk/TaxAuthorities.php 2011-04-07 10:23:55 UTC (rev 4541) @@ -2,7 +2,6 @@ /* $Id$*/ -//$PageSecurity=15; include('includes/session.inc'); $title = _('Tax Authorities'); include('includes/header.inc'); @@ -126,7 +125,7 @@ /* It could still be the second time the page has been run and a record has been selected for modification - SelectedTaxAuthID 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 tax authorities 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*/ - $sql = 'SELECT taxid, + $sql = "SELECT taxid, description, taxglcode, purchtaxglaccount, @@ -134,23 +133,23 @@ bankacc, bankacctype, bankswift - FROM taxauthorities'; + FROM taxauthorities"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The defined tax authorities could not be retrieved because'); $DbgMsg = _('The following SQL to retrieve the tax authorities was used'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); echo '<table class=selection>'; - echo "<tr> - <th>" . _('ID') . "</th> - <th>" . _('Description') . "</th> - <th>" . _('Input Tax') . '<br>' . _('GL Account') . "</th> - <th>" . _('Output Tax') . '<br>' . _('GL Account') . "</th> - <th>" . _('Bank') . "</th> - <th>" . _('Bank Account') . "</th> - <th>" . _('Bank Act Type') . "</th> - <th>" . _('Bank Swift') . "</th> - </tr></font>"; + echo '<tr> + <th>' . _('ID') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Input Tax') . '<br>' . _('GL Account') . '</th> + <th>' . _('Output Tax') . '<br>' . _('GL Account') . '</th> + <th>' . _('Bank') . '</th> + <th>' . _('Bank Account') . '</th> + <th>' . _('Bank Act Type') . '</th> + <th>' . _('Bank Swift') . '</th> + </tr></font>'; $k=0; while ($myrow = DB_fetch_row($result)) { @@ -182,11 +181,11 @@ $myrow[5], $myrow[6], $myrow[7], - $_SERVER['PHP_SELF'] . '?' . SID, + $_SERVER['PHP_SELF'] . '?', $myrow[0], - $_SERVER['PHP_SELF'] . '?' . SID, + $_SERVER['PHP_SELF'] . '?', $myrow[0], - $rootpath . '/TaxAuthorityRates.php?' . SID, + $rootpath . '/TaxAuthorityRates.php?', $myrow[0]); } @@ -200,11 +199,11 @@ if (isset($SelectedTaxAuthID)) { - echo "<div class='centre'><a href='" . $_SERVER['PHP_SELF'] . '?' . SID ."'>" . _('Review all defined tax authority records') . '</a></div>'; + echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] .'">' . _('Review all defined tax authority records') . '</a></div>'; } -echo "<p><form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID .'>'; +echo '<p><form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedTaxAuthID)) { @@ -237,13 +236,13 @@ } //end of if $SelectedTaxAuthID only do the else when a new record is being entered -$SQL = 'SELECT accountcode, +$SQL = "SELECT accountcode, accountname FROM chartmaster, accountgroups WHERE chartmaster.group_=accountgroups.groupname AND accountgroups.pandl=0 - ORDER BY accountcode'; + ORDER BY accountcode"; $result = DB_query($SQL,$db); if (!isset($_POST['Description'])) { @@ -255,7 +254,7 @@ echo '<tr><td>' . _('Input tax GL Account') . ':</td> - <td><select name=PurchTaxGLCode>'; + <td><select name="PurchTaxGLCode">'; while ($myrow = DB_fetch_array($result)) { if (isset($_POST['PurchTaxGLCode']) and $myrow['accountcode']==$_POST['PurchTaxGLCode']) { @@ -263,7 +262,7 @@ } else { echo '<option VALUE='; } - echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')'; + echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } //end while loop @@ -272,7 +271,7 @@ DB_data_seek($result,0); echo '<tr><td>' . _('Output tax GL Account') . ':</td> - <td><select name=TaxGLCode>'; + <td><select name="TaxGLCode">'; while ($myrow = DB_fetch_array($result)) { @@ -281,7 +280,7 @@ } else { echo "<option VALUE='"; } - echo $myrow['accountcode'] . "'>" . $myrow['accountname'] . ' ('.$myrow['accountcode'].')'; + echo $myrow['accountcode'] . "'>" . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } //end while loop Modified: trunk/TaxGroups.php =================================================================== --- trunk/TaxGroups.php 2011-04-06 10:01:30 UTC (rev 4540) +++ trunk/TaxGroups.php 2011-04-07 10:23:55 UTC (rev 4541) @@ -1,6 +1,5 @@ <?php /* $Id$*/ -//PageSecurity=15; include('includes/session.inc'); @@ -125,14 +124,14 @@ $myrow = DB_fetch_row($result); if ($myrow[0]>0) { prnMsg( _('Cannot delete this tax group because some customer branches are setup using it'),'warn'); - echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('customer branches referring to this tax group'); + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('customer branches referring to this tax group'); } else { $sql= "SELECT COUNT(*) FROM suppliers WHERE taxgroupid='" . $_GET['SelectedGroup'] . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); if ($myrow[0]>0) { prnMsg( _('Cannot delete this tax group because some suppliers are setup using it'),'warn'); - echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('suppliers referring to this tax group'); + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('suppliers referring to this tax group'); } else { $sql="DELETE FROM taxgrouptaxes WHERE taxgroupid='" . $_GET['SelectedGroup'] . "'"; @@ -161,8 +160,8 @@ echo '</div>'; } else { echo '<table class=selection>'; - echo "<tr><th>" . _('Group No') . "</th> - <th>" . _('Tax Group') . "</th></tr>"; + echo '<tr><th>' . _('Group No') . '</th> + <th>' . _('Tax Group') . '</th></tr>'; $k=0; //row colour counter while ($myrow = DB_fetch_array($result)) { @@ -181,9 +180,9 @@ </tr>", $myrow['taxgroupid'], $myrow['taxgroupdescription'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $myrow['taxgroupid'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $myrow['taxgroupid'], urlencode($myrow['taxgroupdescription'])); @@ -194,7 +193,7 @@ if (isset($SelectedGroup)) { - echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] ."?" . SID . '">' . _('Review Existing Groups') . '</a></div>'; + echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Review Existing Groups') . '</a></div>'; } if (isset($SelectedGroup)) { @@ -213,7 +212,7 @@ $_POST['GroupName'] = $myrow['taxgroupdescription']; } } -echo '<br>'; +echo '<br />'; echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . "?" . SID . ">"; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if( isset($_POST['SelectedGroup'])) { @@ -230,7 +229,7 @@ if (isset($SelectedGroup)) { - echo '</table><br>'; + echo '</table><br />'; $sql = 'SELECT taxid, description as taxname @@ -299,31 +298,31 @@ } echo '</table>'; - echo '<br><div class="centre"><input type="submit" name="UpdateOrder" value="' . _('Update Order') . '"></div>'; + echo '<br /><div class="centre"><input type="submit" name="UpdateOrder" value="' . _('Update Order') . '"></div>'; } echo '</form>'; if (DB_num_rows($Result)>0 ) { - echo '<br>'; - echo '<table class=selection><tr>'; - echo "<th colspan=4>"._('Assigned Taxes')."</th>"; - echo '<th></th>'; - echo "<th colspan=2>"._('Available Taxes')."</th>"; - echo '</tr>'; + echo '<br />'; + echo '<table class=selection> + <tr> + <th colspan=4>'._('Assigned Taxes') . '</th> + <th></th> + <th colspan=2>' . _('Available Taxes') . '</th> + </tr>'; + echo '<tr> + <th>' . _('Tax Auth ID') . '</th> + <th>' . _('Tax Authority Name') . '</th> + <th>' . _('Calculation Order') . '</th> + <th>' . _('Tax on Prior Tax(es)') . '</th> + <th></th> + <th>' . _('Tax Auth ID') . '</th> + <th>' . _('Tax Authority Name') . '</th> + </tr>'; - echo '<tr>'; - echo "<th>" . _('Tax Auth ID') . '</th>'; - echo "<th>" . _('Tax Authority Name') . '</th>'; - echo "<th>" . _('Calculation Order') . '</th>'; - echo "<th>" . _('Tax on Prior Tax(es)') . '</th>'; - echo '<th></th>'; - echo "<th>" . _('Tax Auth ID') . '</th>'; - echo "<th>" . _('Tax Authority Name') . '</th>'; - echo '</tr>'; - } else { - echo '<br><div class="centre">' . _('There are no tax authorities defined to allocate to this tax group').'</div>'; + echo '<br /><div class="centre">' . _('There are no tax authorities defined to allocate to this tax group').'</div>'; } $k=0; //row colour counter @@ -357,7 +356,7 @@ $AvailRow['taxname'], $TaxAuthRow[$TaxAuthUsedPointer]['calculationorder'], $TaxOnTax, - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $SelectedGroup, $AvailRow['taxid'] ); @@ -373,7 +372,7 @@ <td><a href=\"%s&SelectedGroup=%s&add=1&TaxAuthority=%s\">" . _('Add') . "</a></td>", $AvailRow['taxid'], $AvailRow['taxname'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $SelectedGroup, $AvailRow['taxid'] ); Modified: trunk/TopItems.php =================================================================== --- trunk/TopItems.php 2011-04-06 10:01:30 UTC (rev 4540) +++ trunk/TopItems.php 2011-04-07 10:23:55 UTC (rev 4541) @@ -1,6 +1,7 @@ <?php -/* $Revision: 1.3 $ */ -//$PageSecurity = 2; Now from db + +/* $Id$*/ + /* Session started in session.inc for password checking and authorisation level check config.php is in turn included in session.inc*/ include ('includes/session.inc'); @@ -15,24 +16,26 @@ echo '<table cellpadding=3 colspan=4 class=selection>'; //to view store location echo '<tr><td width="150">' . _('Select Location') . ' </td><td>:</td><td><select name=Location>'; - $sql = 'SELECT loccode, + $sql = "SELECT loccode, locationname - FROM `locations`'; + FROM `locations`"; $result = DB_query($sql, $db); echo '<option value="All">' . _('All') . '</option>'; while ($myrow = DB_fetch_array($result)) { - echo "<option VALUE='" . $myrow['loccode'] . "'>" . $myrow['loccode'] . " - " . $myrow['locationname'] . '</option>'; + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['loccode'] . ' - ' . $myrow['locationname'] . '</option>'; } echo '</select></td></tr>'; //to view list of customer - echo '<tr><td width="150">' . _('Select Customer Type') . ' </td><td>:</td><td><select name=Customers>'; - $sql = 'SELECT typename, + echo '<tr><td width="150">' . _('Select Customer Type') . '</td> + <td>:</td> + <td><select name="Customers">'; + $sql = "SELECT typename, typeid - FROM debtortype'; + FROM debtortype"; $result = DB_query($sql, $db); - echo "<option value='All'>" . _('All') . '</option>'; + echo '<option value="All">' . _('All') . '</option>'; while ($myrow = DB_fetch_array($result)) { - echo "<option VALUE='" . $myrow['typeid'] . "'>" . $myrow['typename'] . '</option>'; + echo '<option value="' . $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } echo '</select></td> </tr>'; @@ -40,18 +43,18 @@ echo '<tr> <td width="150">' . _('Select Order By ') . ' </td> <td>:</td> <td><select name="Sequence">'; - echo ' <option value="TotalInvoiced">' . _('Total Pieces') . ''; - echo ' <option value="ValueSales">' . _('Value of Sales') . ''; + echo ' <option value="TotalInvoiced">' . _('Total Pieces') . '</option>'; + echo ' <option value="ValueSales">' . _('Value of Sales') . '</option>'; echo ' </select></td> </tr>'; //View number of days echo '<tr><td>' . _('Number Of Days') . ' </td><td>:</td> - <td><input class="number" tabindex="3" type="Text" name=NumberOfDays size="8" maxlength="8" value=0></td> + <td><input class="number" tabindex="3" type="Text" name="NumberOfDays" size="8" maxlength="8" value=0></td> </tr>'; //view number of NumberOfTopItems items echo '<tr> <td>' . _('Number Of Top Items') . ' </td><td>:</td> - <td><input class="number" tabindex="4" type="Text" name=NumberOfTopItems size="8" maxlength="8" value=1></td> + <td><input class="number" tabindex="4" type="Text" name="NumberOfTopItems" size="8" maxlength="8" value=1></td> </tr> <tr> <td></td> @@ -82,7 +85,7 @@ AND debtorsmaster.currcode = currencies.currabrev AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "' GROUP BY salesorderdetails.stkcode - ORDER BY " . $_POST['Sequence'] . " DESC + ORDER BY '" . $_POST['Sequence'] . "' DESC LIMIT " . $_POST['NumberOfTopItems'] . ""; } else { //the situation if only location type selected "All" if ($_POST['Location'] == 'All') { @@ -103,11 +106,11 @@ AND debtorsmaster.typeid = '" . $_POST['Customers'] . "' AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "' GROUP BY salesorderdetails.stkcode - ORDER BY " . $_POST['Sequence'] . " DESC + ORDER BY '" . $_POST['Sequence'] . "' DESC LIMIT " . $_POST[NumberOfTopItems] . ""; } else { //the situation if the customer type selected "All" - if ($_POST['Customers'] == "All") { + if ($_POST['Customers'] == 'All') { $SQL = "SELECT salesorderdetails.stkcode, SUM(salesorderdetails.qtyinvoiced) TotalInvoiced, SUM(salesorderdetails.qtyinvoiced * salesorderdetails.unitprice ) AS ValueSales, @@ -145,7 +148,7 @@ AND debtorsmaster.typeid = '" . $_POST['Customers'] . "' AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "' GROUP BY salesorderdetails.stkcode - ORDER BY " . $_POST['Sequence'] . " DESC + ORDER BY '" . $_POST['Sequence'] . "' DESC LIMIT " . $_POST['NumberOfTopItems'] . ""; } } @@ -163,13 +166,11 @@ <th>' . _('Value Sales') . '</th> <th>' . _('On Hand') . '</th>'; echo $TableHeader; - echo ' - <input type="hidden" value=' . $_POST['Location'] . ' name="Location" /> + echo '<input type="hidden" value=' . $_POST['Location'] . ' name="Location" /> <input type="hidden" value=' . $_POST['Sequence'] . ' name="Sequence" /> <input type="hidden" value=' . $_POST['NumberOfDays'] . ' name="NumberOfDays" /> <input type="hidden" value=' . $_POST['Customers'] . ' name="Customers" /> - <input type="hidden" value=' . $_POST['NumberOfTopItems'] . ' name="NumberOfTopItems" /> - '; + <input type="hidden" value=' . $_POST['NumberOfTopItems'] . ' name="NumberOfTopItems" />'; $k = 0; //row colour counter $i = 1; while ($myrow = DB_fetch_array($result)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-04-07 10:24:02
|
Revision: 4541 http://web-erp.svn.sourceforge.net/web-erp/?rev=4541&view=rev Author: daintree Date: 2011-04-07 10:23:55 +0000 (Thu, 07 Apr 2011) Log Message: ----------- various Modified Paths: -------------- trunk/Tax.php trunk/TaxAuthorities.php trunk/TaxGroups.php trunk/TopItems.php Modified: trunk/Tax.php =================================================================== --- trunk/Tax.php 2011-04-06 10:01:30 UTC (rev 4540) +++ trunk/Tax.php 2011-04-07 10:23:55 UTC (rev 4541) @@ -2,7 +2,6 @@ /* $Id$*/ -//$PageSecurity = 2; include('includes/session.inc'); if (isset($_POST['TaxAuthority']) AND @@ -12,15 +11,15 @@ include('includes/PDFStarter.php'); - $sql = 'SELECT lastdate_in_period - FROM periods - WHERE periodno=' . $_POST['ToPeriod']; + $sql = "SELECT lastdate_in_period + FROM periods + WHERE periodno='" . $_POST['ToPeriod'] . "'"; $ErrMsg = _('Could not determine the last date of the period selected') . '. ' . _('The sql returned the following error'); $PeriodEndResult = DB_query($sql,$db,$ErrMsg); $PeriodEndRow = DB_fetch_row($PeriodEndResult); $PeriodEnd = ConvertSQLDate($PeriodEndRow[0]); - $result = DB_query('SELECT description FROM taxauthorities WHERE taxid=' . $_POST['TaxAuthority'],$db); + $result = DB_query("SELECT description FROM taxauthorities WHERE taxid='" . $_POST['TaxAuthority'] . "'",$db); $TaxAuthDescription = DB_fetch_row($result); $TaxAuthorityName = $TaxAuthDescription[0]; @@ -61,22 +60,14 @@ $title = _('Taxation Reporting Error'); include('includes/header.inc'); prnMsg(_('The accounts receivable transaction details could not be retrieved 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">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>$SQL"; + echo '<br />' . $SQL; } include('includes/footer.inc'); exit; } -// if (DB_num_rows($DebtorTransResult)==0){ -// $title = _('Taxation Reporting Error'); -// include('includes/header.inc'); -// prnMsg (_('There are no tax entries to list'),'info'); -// echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; -// include('includes/footer.inc'); -// exit; -// } -// + if ($_POST['DetailOrSummary']=='Detail'){ include ('includes/PDFTaxPageHeader.inc'); $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,120,$FontSize+2, _('Tax On Sales'),'left'); @@ -174,9 +165,9 @@ $title = _('Taxation Reporting Error'); include('includes/header.inc'); echo _('The accounts payable transaction details could not be retrieved because') . ' ' . DB_error_msg($db); - echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('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; @@ -283,7 +274,7 @@ $title = _('Taxation Reporting Error'); include('includes/header.inc'); prnMsg (_('There are no tax entries to list'),'info'); - echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; + echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; include('includes/footer.inc'); exit; } else { @@ -298,60 +289,61 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Supplier Types') . '" alt="" />' . $title. '</p>'; - echo '<form action=' . $_SERVER['PHP_SELF'] . " method='POST'><table class=selection>"; + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST"> + <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Tax Authority To Report On:') . ':</font></td> - <td><select name=TaxAuthority>'; + <td><select name="TaxAuthority">'; - $result = DB_query('SELECT taxid, description FROM taxauthorities',$db); + $result = DB_query("SELECT taxid, description FROM taxauthorities",$db); while ($myrow = DB_fetch_array($result)){ - echo '<option Value=' . $myrow['taxid'] . '>' . $myrow['description']; + echo '<option Value=' . $myrow['taxid'] . '>' . $myrow['description'] . '</option>'; } echo '</select></td></tr>'; echo '<tr><td>' . _('Return Covering') . ':</font></td> - <td><select name=NoOfPeriods> - <option Value=1>' . _('One Month') . - '<option selected Value=2>' ._('Two Months') . - '<option VALUE=3>' . _('Quarter') . - '<option VALUE=6>' . _('Six Months') . + <td><select name="NoOfPeriods"> + <option value=1>' . _('One Month') . '</option>' . + '<option selected value=2>' ._('Two Months') . '</option>' . + '<option value=3>' . _('Quarter') . '</option>' . + '<option value=6>' . _('Six Months') . '</option>' . '</select></td></tr>'; - echo '<tr><td>' . _('Return To') . ":</td> - <td><select Name='ToPeriod'>"; + echo '<tr><td>' . _('Return To') . ':</td> + <td><select name="ToPeriod">'; $DefaultPeriod = GetPeriod(Date($_SESSION['DefaultDateFormat'],Mktime(0,0,0,Date('m'),0,Date('Y'))),$db); - $sql = 'SELECT periodno, + $sql = "SELECT periodno, lastdate_in_period - FROM periods'; + FROM periods"; $ErrMsg = _('Could not retrieve the period data because'); $Periods = DB_query($sql,$db,$ErrMsg); while ($myrow = DB_fetch_array($Periods,$db)){ if ($myrow['periodno']==$DefaultPeriod){ - echo '<option selected VALUE=' . $myrow['periodno'] . '>' . ConvertSQLDate($myrow['lastdate_in_period']); + echo '<option selected VALUE=' . $myrow['periodno'] . '>' . ConvertSQLDate($myrow['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>'; } } echo '</select></td></tr>'; - echo '<tr><td>' . _('Detail Or Summary Only') . ":</font></td> - <td><select name='DetailOrSummary'> - <option Value='Detail'>" . _('Detail and Summary') . - "<option selected Value='Summary'>" . _('Summary Only') . - "</select></td></tr>"; + echo '<tr><td>' . _('Detail Or Summary Only') . ':</font></td> + <td><select name="DetailOrSummary"> + <option Value="Detail">' . _('Detail and Summary') . '</option> + <option selected value="Summary">' . _('Summary Only') . '</option> + </select></td></tr>'; - echo "</table> - <br /><div class='centre'><input type=Submit Name='PrintPDF' Value='" . _('Print PDF') . "'> + echo '</table> + <br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '"> </div> - </form>"; + </form>'; include('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/TaxAuthorities.php =================================================================== --- trunk/TaxAuthorities.php 2011-04-06 10:01:30 UTC (rev 4540) +++ trunk/TaxAuthorities.php 2011-04-07 10:23:55 UTC (rev 4541) @@ -2,7 +2,6 @@ /* $Id$*/ -//$PageSecurity=15; include('includes/session.inc'); $title = _('Tax Authorities'); include('includes/header.inc'); @@ -126,7 +125,7 @@ /* It could still be the second time the page has been run and a record has been selected for modification - SelectedTaxAuthID 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 tax authorities 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*/ - $sql = 'SELECT taxid, + $sql = "SELECT taxid, description, taxglcode, purchtaxglaccount, @@ -134,23 +133,23 @@ bankacc, bankacctype, bankswift - FROM taxauthorities'; + FROM taxauthorities"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The defined tax authorities could not be retrieved because'); $DbgMsg = _('The following SQL to retrieve the tax authorities was used'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); echo '<table class=selection>'; - echo "<tr> - <th>" . _('ID') . "</th> - <th>" . _('Description') . "</th> - <th>" . _('Input Tax') . '<br>' . _('GL Account') . "</th> - <th>" . _('Output Tax') . '<br>' . _('GL Account') . "</th> - <th>" . _('Bank') . "</th> - <th>" . _('Bank Account') . "</th> - <th>" . _('Bank Act Type') . "</th> - <th>" . _('Bank Swift') . "</th> - </tr></font>"; + echo '<tr> + <th>' . _('ID') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Input Tax') . '<br>' . _('GL Account') . '</th> + <th>' . _('Output Tax') . '<br>' . _('GL Account') . '</th> + <th>' . _('Bank') . '</th> + <th>' . _('Bank Account') . '</th> + <th>' . _('Bank Act Type') . '</th> + <th>' . _('Bank Swift') . '</th> + </tr></font>'; $k=0; while ($myrow = DB_fetch_row($result)) { @@ -182,11 +181,11 @@ $myrow[5], $myrow[6], $myrow[7], - $_SERVER['PHP_SELF'] . '?' . SID, + $_SERVER['PHP_SELF'] . '?', $myrow[0], - $_SERVER['PHP_SELF'] . '?' . SID, + $_SERVER['PHP_SELF'] . '?', $myrow[0], - $rootpath . '/TaxAuthorityRates.php?' . SID, + $rootpath . '/TaxAuthorityRates.php?', $myrow[0]); } @@ -200,11 +199,11 @@ if (isset($SelectedTaxAuthID)) { - echo "<div class='centre'><a href='" . $_SERVER['PHP_SELF'] . '?' . SID ."'>" . _('Review all defined tax authority records') . '</a></div>'; + echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] .'">' . _('Review all defined tax authority records') . '</a></div>'; } -echo "<p><form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID .'>'; +echo '<p><form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedTaxAuthID)) { @@ -237,13 +236,13 @@ } //end of if $SelectedTaxAuthID only do the else when a new record is being entered -$SQL = 'SELECT accountcode, +$SQL = "SELECT accountcode, accountname FROM chartmaster, accountgroups WHERE chartmaster.group_=accountgroups.groupname AND accountgroups.pandl=0 - ORDER BY accountcode'; + ORDER BY accountcode"; $result = DB_query($SQL,$db); if (!isset($_POST['Description'])) { @@ -255,7 +254,7 @@ echo '<tr><td>' . _('Input tax GL Account') . ':</td> - <td><select name=PurchTaxGLCode>'; + <td><select name="PurchTaxGLCode">'; while ($myrow = DB_fetch_array($result)) { if (isset($_POST['PurchTaxGLCode']) and $myrow['accountcode']==$_POST['PurchTaxGLCode']) { @@ -263,7 +262,7 @@ } else { echo '<option VALUE='; } - echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')'; + echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } //end while loop @@ -272,7 +271,7 @@ DB_data_seek($result,0); echo '<tr><td>' . _('Output tax GL Account') . ':</td> - <td><select name=TaxGLCode>'; + <td><select name="TaxGLCode">'; while ($myrow = DB_fetch_array($result)) { @@ -281,7 +280,7 @@ } else { echo "<option VALUE='"; } - echo $myrow['accountcode'] . "'>" . $myrow['accountname'] . ' ('.$myrow['accountcode'].')'; + echo $myrow['accountcode'] . "'>" . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } //end while loop Modified: trunk/TaxGroups.php =================================================================== --- trunk/TaxGroups.php 2011-04-06 10:01:30 UTC (rev 4540) +++ trunk/TaxGroups.php 2011-04-07 10:23:55 UTC (rev 4541) @@ -1,6 +1,5 @@ <?php /* $Id$*/ -//PageSecurity=15; include('includes/session.inc'); @@ -125,14 +124,14 @@ $myrow = DB_fetch_row($result); if ($myrow[0]>0) { prnMsg( _('Cannot delete this tax group because some customer branches are setup using it'),'warn'); - echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('customer branches referring to this tax group'); + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('customer branches referring to this tax group'); } else { $sql= "SELECT COUNT(*) FROM suppliers WHERE taxgroupid='" . $_GET['SelectedGroup'] . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); if ($myrow[0]>0) { prnMsg( _('Cannot delete this tax group because some suppliers are setup using it'),'warn'); - echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('suppliers referring to this tax group'); + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('suppliers referring to this tax group'); } else { $sql="DELETE FROM taxgrouptaxes WHERE taxgroupid='" . $_GET['SelectedGroup'] . "'"; @@ -161,8 +160,8 @@ echo '</div>'; } else { echo '<table class=selection>'; - echo "<tr><th>" . _('Group No') . "</th> - <th>" . _('Tax Group') . "</th></tr>"; + echo '<tr><th>' . _('Group No') . '</th> + <th>' . _('Tax Group') . '</th></tr>'; $k=0; //row colour counter while ($myrow = DB_fetch_array($result)) { @@ -181,9 +180,9 @@ </tr>", $myrow['taxgroupid'], $myrow['taxgroupdescription'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $myrow['taxgroupid'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $myrow['taxgroupid'], urlencode($myrow['taxgroupdescription'])); @@ -194,7 +193,7 @@ if (isset($SelectedGroup)) { - echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] ."?" . SID . '">' . _('Review Existing Groups') . '</a></div>'; + echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Review Existing Groups') . '</a></div>'; } if (isset($SelectedGroup)) { @@ -213,7 +212,7 @@ $_POST['GroupName'] = $myrow['taxgroupdescription']; } } -echo '<br>'; +echo '<br />'; echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . "?" . SID . ">"; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if( isset($_POST['SelectedGroup'])) { @@ -230,7 +229,7 @@ if (isset($SelectedGroup)) { - echo '</table><br>'; + echo '</table><br />'; $sql = 'SELECT taxid, description as taxname @@ -299,31 +298,31 @@ } echo '</table>'; - echo '<br><div class="centre"><input type="submit" name="UpdateOrder" value="' . _('Update Order') . '"></div>'; + echo '<br /><div class="centre"><input type="submit" name="UpdateOrder" value="' . _('Update Order') . '"></div>'; } echo '</form>'; if (DB_num_rows($Result)>0 ) { - echo '<br>'; - echo '<table class=selection><tr>'; - echo "<th colspan=4>"._('Assigned Taxes')."</th>"; - echo '<th></th>'; - echo "<th colspan=2>"._('Available Taxes')."</th>"; - echo '</tr>'; + echo '<br />'; + echo '<table class=selection> + <tr> + <th colspan=4>'._('Assigned Taxes') . '</th> + <th></th> + <th colspan=2>' . _('Available Taxes') . '</th> + </tr>'; + echo '<tr> + <th>' . _('Tax Auth ID') . '</th> + <th>' . _('Tax Authority Name') . '</th> + <th>' . _('Calculation Order') . '</th> + <th>' . _('Tax on Prior Tax(es)') . '</th> + <th></th> + <th>' . _('Tax Auth ID') . '</th> + <th>' . _('Tax Authority Name') . '</th> + </tr>'; - echo '<tr>'; - echo "<th>" . _('Tax Auth ID') . '</th>'; - echo "<th>" . _('Tax Authority Name') . '</th>'; - echo "<th>" . _('Calculation Order') . '</th>'; - echo "<th>" . _('Tax on Prior Tax(es)') . '</th>'; - echo '<th></th>'; - echo "<th>" . _('Tax Auth ID') . '</th>'; - echo "<th>" . _('Tax Authority Name') . '</th>'; - echo '</tr>'; - } else { - echo '<br><div class="centre">' . _('There are no tax authorities defined to allocate to this tax group').'</div>'; + echo '<br /><div class="centre">' . _('There are no tax authorities defined to allocate to this tax group').'</div>'; } $k=0; //row colour counter @@ -357,7 +356,7 @@ $AvailRow['taxname'], $TaxAuthRow[$TaxAuthUsedPointer]['calculationorder'], $TaxOnTax, - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $SelectedGroup, $AvailRow['taxid'] ); @@ -373,7 +372,7 @@ <td><a href=\"%s&SelectedGroup=%s&add=1&TaxAuthority=%s\">" . _('Add') . "</a></td>", $AvailRow['taxid'], $AvailRow['taxname'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $SelectedGroup, $AvailRow['taxid'] ); Modified: trunk/TopItems.php =================================================================== --- trunk/TopItems.php 2011-04-06 10:01:30 UTC (rev 4540) +++ trunk/TopItems.php 2011-04-07 10:23:55 UTC (rev 4541) @@ -1,6 +1,7 @@ <?php -/* $Revision: 1.3 $ */ -//$PageSecurity = 2; Now from db + +/* $Id$*/ + /* Session started in session.inc for password checking and authorisation level check config.php is in turn included in session.inc*/ include ('includes/session.inc'); @@ -15,24 +16,26 @@ echo '<table cellpadding=3 colspan=4 class=selection>'; //to view store location echo '<tr><td width="150">' . _('Select Location') . ' </td><td>:</td><td><select name=Location>'; - $sql = 'SELECT loccode, + $sql = "SELECT loccode, locationname - FROM `locations`'; + FROM `locations`"; $result = DB_query($sql, $db); echo '<option value="All">' . _('All') . '</option>'; while ($myrow = DB_fetch_array($result)) { - echo "<option VALUE='" . $myrow['loccode'] . "'>" . $myrow['loccode'] . " - " . $myrow['locationname'] . '</option>'; + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['loccode'] . ' - ' . $myrow['locationname'] . '</option>'; } echo '</select></td></tr>'; //to view list of customer - echo '<tr><td width="150">' . _('Select Customer Type') . ' </td><td>:</td><td><select name=Customers>'; - $sql = 'SELECT typename, + echo '<tr><td width="150">' . _('Select Customer Type') . '</td> + <td>:</td> + <td><select name="Customers">'; + $sql = "SELECT typename, typeid - FROM debtortype'; + FROM debtortype"; $result = DB_query($sql, $db); - echo "<option value='All'>" . _('All') . '</option>'; + echo '<option value="All">' . _('All') . '</option>'; while ($myrow = DB_fetch_array($result)) { - echo "<option VALUE='" . $myrow['typeid'] . "'>" . $myrow['typename'] . '</option>'; + echo '<option value="' . $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } echo '</select></td> </tr>'; @@ -40,18 +43,18 @@ echo '<tr> <td width="150">' . _('Select Order By ') . ' </td> <td>:</td> <td><select name="Sequence">'; - echo ' <option value="TotalInvoiced">' . _('Total Pieces') . ''; - echo ' <option value="ValueSales">' . _('Value of Sales') . ''; + echo ' <option value="TotalInvoiced">' . _('Total Pieces') . '</option>'; + echo ' <option value="ValueSales">' . _('Value of Sales') . '</option>'; echo ' </select></td> </tr>'; //View number of days echo '<tr><td>' . _('Number Of Days') . ' </td><td>:</td> - <td><input class="number" tabindex="3" type="Text" name=NumberOfDays size="8" maxlength="8" value=0></td> + <td><input class="number" tabindex="3" type="Text" name="NumberOfDays" size="8" maxlength="8" value=0></td> </tr>'; //view number of NumberOfTopItems items echo '<tr> <td>' . _('Number Of Top Items') . ' </td><td>:</td> - <td><input class="number" tabindex="4" type="Text" name=NumberOfTopItems size="8" maxlength="8" value=1></td> + <td><input class="number" tabindex="4" type="Text" name="NumberOfTopItems" size="8" maxlength="8" value=1></td> </tr> <tr> <td></td> @@ -82,7 +85,7 @@ AND debtorsmaster.currcode = currencies.currabrev AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "' GROUP BY salesorderdetails.stkcode - ORDER BY " . $_POST['Sequence'] . " DESC + ORDER BY '" . $_POST['Sequence'] . "' DESC LIMIT " . $_POST['NumberOfTopItems'] . ""; } else { //the situation if only location type selected "All" if ($_POST['Location'] == 'All') { @@ -103,11 +106,11 @@ AND debtorsmaster.typeid = '" . $_POST['Customers'] . "' AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "' GROUP BY salesorderdetails.stkcode - ORDER BY " . $_POST['Sequence'] . " DESC + ORDER BY '" . $_POST['Sequence'] . "' DESC LIMIT " . $_POST[NumberOfTopItems] . ""; } else { //the situation if the customer type selected "All" - if ($_POST['Customers'] == "All") { + if ($_POST['Customers'] == 'All') { $SQL = "SELECT salesorderdetails.stkcode, SUM(salesorderdetails.qtyinvoiced) TotalInvoiced, SUM(salesorderdetails.qtyinvoiced * salesorderdetails.unitprice ) AS ValueSales, @@ -145,7 +148,7 @@ AND debtorsmaster.typeid = '" . $_POST['Customers'] . "' AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "' GROUP BY salesorderdetails.stkcode - ORDER BY " . $_POST['Sequence'] . " DESC + ORDER BY '" . $_POST['Sequence'] . "' DESC LIMIT " . $_POST['NumberOfTopItems'] . ""; } } @@ -163,13 +166,11 @@ <th>' . _('Value Sales') . '</th> <th>' . _('On Hand') . '</th>'; echo $TableHeader; - echo ' - <input type="hidden" value=' . $_POST['Location'] . ' name="Location" /> + echo '<input type="hidden" value=' . $_POST['Location'] . ' name="Location" /> <input type="hidden" value=' . $_POST['Sequence'] . ' name="Sequence" /> <input type="hidden" value=' . $_POST['NumberOfDays'] . ' name="NumberOfDays" /> <input type="hidden" value=' . $_POST['Customers'] . ' name="Customers" /> - <input type="hidden" value=' . $_POST['NumberOfTopItems'] . ' name="NumberOfTopItems" /> - '; + <input type="hidden" value=' . $_POST['NumberOfTopItems'] . ' name="NumberOfTopItems" />'; $k = 0; //row colour counter $i = 1; while ($myrow = DB_fetch_array($result)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-04-08 23:37:09
|
Revision: 4542 http://web-erp.svn.sourceforge.net/web-erp/?rev=4542&view=rev Author: daintree Date: 2011-04-08 23:37:01 +0000 (Fri, 08 Apr 2011) Log Message: ----------- SQL xhtml quoting Modified Paths: -------------- trunk/ReverseGRN.php trunk/WWW_Access.php trunk/WWW_Users.php trunk/WorkCentres.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/WorkOrderReceive.php trunk/Z_CheckAllocationsFrom.php trunk/Z_CheckAllocs.php trunk/Z_CheckDebtorsControl.php trunk/Z_CheckGLTransBalance.php trunk/Z_CreateChartDetails.php Modified: trunk/ReverseGRN.php =================================================================== --- trunk/ReverseGRN.php 2011-04-07 10:23:55 UTC (rev 4541) +++ trunk/ReverseGRN.php 2011-04-08 23:37:01 UTC (rev 4542) @@ -18,7 +18,7 @@ $_POST['SupplierID']=$_SESSION['SupplierID']; } if (!isset($_POST['SupplierID']) OR $_POST['SupplierID']==""){ - echo '<br>' . _('This page is expected to be called after a supplier has been selected'); + echo '<br />' . _('This page is expected to be called after a supplier has been selected'); echo "<meta http-equiv='Refresh' content='0; url=" . $rootpath . '/SelectSupplier.php?' . SID . "'>"; exit; } elseif (!isset($_POST['SuppName']) or $_POST['SuppName']=="") { @@ -61,7 +61,7 @@ $QtyToReverse = $GRN['qtyrecd'] - $GRN['quantityinv']; if ($QtyToReverse ==0){ - echo '<br><br>' . _('The GRN') . ' ' . $_GET['GRNNo'] . ' ' . _('has already been reversed or fully invoiced by the supplier - it cannot be reversed - stock quantities must be corrected by stock adjustments - the stock is paid for'); + echo '<br /><br />' . _('The GRN') . ' ' . $_GET['GRNNo'] . ' ' . _('has already been reversed or fully invoiced by the supplier - it cannot be reversed - stock quantities must be corrected by stock adjustments - the stock is paid for'); include ('includes/footer.inc'); exit; } @@ -73,7 +73,7 @@ $SQL = "SELECT stockmaster.controlled FROM stockmaster WHERE stockid ='" . $GRN['itemcode'] . "'"; - $CheckControlledResult = DB_query($SQL,$db,'<br>' . _('Could not determine if the item was controlled or not because') . ' '); + $CheckControlledResult = DB_query($SQL,$db,'<br />' . _('Could not determine if the item was controlled or not because') . ' '); $ControlledRow = DB_fetch_row($CheckControlledResult); if ($ControlledRow[0]==1) { /*Then its a controlled item */ $Controlled = true; @@ -132,7 +132,7 @@ /*Now the purchorder header status in case it was completed - now incomplete - just printed */ $SQL = "UPDATE purchorders SET status = 'Printed', - stat_comment = CONCAT('" . Date($_SESSION['DefaultDateFormat']) . ' ' . _('GRN Reversed for') . ' ' . $GRN['itemdescription'] . ' ' . _('by') . ' ' . $_SESSION['UsersRealName'] . "<br>', stat_comment ) + stat_comment = CONCAT('" . Date($_SESSION['DefaultDateFormat']) . ' ' . _('GRN Reversed for') . ' ' . $GRN['itemdescription'] . ' ' . _('by') . ' ' . $_SESSION['UsersRealName'] . "<br />', stat_comment ) WHERE orderno = '" . $GRN['orderno'] . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The purchase order statusand status comment could not be changed because'); @@ -146,7 +146,7 @@ $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GRN record could not be deleted because'); $DbgMsg = _('The following SQL to delete the GRN record was used'); - $result = DB_query('DELETE FROM grns WHERE grnno="' . $_GET['GRNNo'] . '"',$db,$ErrMsg,$DbgMsg,true); + $result = DB_query("DELETE FROM grns WHERE grnno='" . $_GET['GRNNo'] . "'",$db,$ErrMsg,$DbgMsg,true); } else { $SQL = "UPDATE grns SET qtyrecd = qtyrecd - $QtyToReverse @@ -159,26 +159,26 @@ /*If the GRN being reversed is an asset - reverse the fixedassettrans record */ if ($GRN['assetid']!='0'){ $SQL = "INSERT INTO fixedassettrans (assetid, - transtype, - transno, - transdate, - periodno, - inputdate, - cost) - VALUES ('" . $GRN['assetid'] . "', - 25, - '" . $_GET['GRNNo'] . "', - '" . $GRN['deliverydate'] . "', - '" . $PeriodNo . "', - '" . Date('Y-m-d') . "', - '" . -$GRN['stdcostunit'] * $QtyToReverse . "')"; + transtype, + transno, + transdate, + periodno, + inputdate, + cost) + VALUES ('" . $GRN['assetid'] . "', + 25, + '" . $_GET['GRNNo'] . "', + '" . $GRN['deliverydate'] . "', + '" . $PeriodNo . "', + '" . Date('Y-m-d') . "', + '" . -$GRN['stdcostunit'] * $QtyToReverse . "')"; $ErrMsg = _('CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE The fixed asset transaction could not be inserted because'); $DbgMsg = _('The following SQL to insert the fixed asset transaction record was used'); $Result = DB_query($SQL,$db,$ErrMsg, $DbgMsg, true); /*now reverse the cost put to fixedassets */ $SQL = "UPDATE fixedassets SET cost = cost - " . ($GRN['stdcostunit'] * $QtyToReverse) . " - WHERE assetid = '" . $GRN['assetid'] . "'"; + WHERE assetid = '" . $GRN['assetid'] . "'"; $ErrMsg = _('CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE. The fixed asset cost addition could not be reversed:'); $DbgMsg = _('The following SQL was used to attempt the reduce the cost of the asset was:'); $Result = DB_query($SQL,$db,$ErrMsg, $DbgMsg, true); @@ -186,9 +186,9 @@ } //end of if it is an asset $SQL = "SELECT stockmaster.controlled - FROM stockmaster - WHERE stockmaster.stockid = '" . $GRN['itemcode'] . "'"; - $Result = DB_query($SQL, $db, _('Could not determine if the item exists because'),'<br>' . _('The SQL that failed was') . ' ',true); + FROM stockmaster + WHERE stockmaster.stockid = '" . $GRN['itemcode'] . "'"; + $Result = DB_query($SQL, $db, _('Could not determine if the item exists because'),'<br />' . _('The SQL that failed was') . ' ',true); if (DB_num_rows($Result)==1){ /* if the GRN is in fact a stock item being reversed */ @@ -222,28 +222,28 @@ /* If its a stock item .... Insert stock movements - with unit cost */ - $SQL = "INSERT INTO stockmoves ( stockid, - type, - transno, - loccode, - trandate, - prd, - reference, - qty, - standardcost, - newqoh) - VALUES ( - '" . $GRN['itemcode'] . "', - 25, - '" . $_GET['GRNNo'] . "', - '" . $GRN['intostocklocation'] . "', - '" . $GRN['deliverydate'] . "', - '" . $PeriodNo . "', - '" . _('Reversal') . ' - ' . $_POST['SupplierID'] . ' - ' . $GRN['orderno'] . "', - '" . -$QtyToReverse . "', - '" . $GRN['stdcostunit'] . "', - '" . ($QtyOnHandPrior - $QtyToReverse) . "' - )"; + $SQL = "INSERT INTO stockmoves ( stockid, + type, + transno, + loccode, + trandate, + prd, + reference, + qty, + standardcost, + newqoh) + VALUES ( + '" . $GRN['itemcode'] . "', + 25, + '" . $_GET['GRNNo'] . "', + '" . $GRN['intostocklocation'] . "', + '" . $GRN['deliverydate'] . "', + '" . $PeriodNo . "', + '" . _('Reversal') . ' - ' . $_POST['SupplierID'] . ' - ' . $GRN['orderno'] . "', + '" . -$QtyToReverse . "', + '" . $GRN['stdcostunit'] . "', + '" . ($QtyOnHandPrior - $QtyToReverse) . "' + )"; $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'); @@ -305,21 +305,21 @@ /*now the GRN suspense entry*/ $SQL = "INSERT INTO gltrans ( type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES ( - 25, - '" . $_GET['GRNNo'] . "', - '" . $GRN['deliverydate'] . "', - '" . $PeriodNo . "', - '" . $_SESSION['CompanyRecord']['grnact'] . "', '" - . _('GRN Reversal PO') . ': ' . $GRN['orderno'] . " " . $_POST['SupplierID'] . " - " . $GRN['itemcode'] . "-" . $GRN['itemdescription'] . " x " . $QtyToReverse . " @ " . number_format($GRN['stdcostunit'],2) . "', - '" . $GRN['stdcostunit'] * $QtyToReverse . "' - )"; + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES ( + 25, + '" . $_GET['GRNNo'] . "', + '" . $GRN['deliverydate'] . "', + '" . $PeriodNo . "', + '" . $_SESSION['CompanyRecord']['grnact'] . "', '" + . _('GRN Reversal PO') . ': ' . $GRN['orderno'] . " " . $_POST['SupplierID'] . " - " . $GRN['itemcode'] . "-" . $GRN['itemdescription'] . " x " . $QtyToReverse . " @ " . number_format($GRN['stdcostunit'],2) . "', + '" . $GRN['stdcostunit'] * $QtyToReverse . "' + )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GRN suspense side of the GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GRN Suspense GLTrans record was used'); @@ -329,7 +329,7 @@ $Result = DB_Txn_Commit($db); - echo '<br>' . _('GRN number') . ' ' . $_GET['GRNNo'] . ' ' . _('for') . ' ' . $QtyToReverse . ' x ' . $GRN['itemcode'] . ' - ' . $GRN['itemdescription'] . ' ' . _('has been reversed') . '<br>'; + echo '<br />' . _('GRN number') . ' ' . $_GET['GRNNo'] . ' ' . _('for') . ' ' . $QtyToReverse . ' x ' . $GRN['itemcode'] . ' - ' . $GRN['itemdescription'] . ' ' . _('has been reversed') . '<br />'; unset($_GET['GRNNo']); // to ensure it cant be done again!! echo '<a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '">' . _('Select another GRN to Reverse') . '</a>'; /*end of Process Goods Received Reversal entry */ @@ -367,7 +367,7 @@ $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); if (DB_num_rows($result) ==0){ - prnMsg(_('There are no outstanding goods received yet to be invoiced for') . ' ' . $_POST['SuppName'] . '.<br>' . _('To reverse a GRN that has been invoiced first it must be credited'),'warn'); + prnMsg(_('There are no outstanding goods received yet to be invoiced for') . ' ' . $_POST['SuppName'] . '.<br />' . _('To reverse a GRN that has been invoiced first it must be credited'),'warn'); } else { //there are GRNs to show echo '<br /><table cellpadding=2 colspan=7 class=selection>'; @@ -375,10 +375,10 @@ <th>' . _('GRN') . ' #</th> <th>' . _('Item Code') . '</th> <th>' . _('Description') . '</th> - <th>' . _('Date') . '<br>' . _('Received') . '</th> - <th>' . _('Quantity') . '<br>' . _('Received') . '</th> - <th>' . _('Quantity') . '<br>' . _('Invoiced') . '</th> - <th>' . _('Quantity To') . '<br>' . _('Reverse') . '</th> + <th>' . _('Date') . '<br />' . _('Received') . '</th> + <th>' . _('Quantity') . '<br />' . _('Received') . '</th> + <th>' . _('Quantity') . '<br />' . _('Invoiced') . '</th> + <th>' . _('Quantity To') . '<br />' . _('Reverse') . '</th> </tr>'; echo $TableHeader; Modified: trunk/WWW_Access.php =================================================================== --- trunk/WWW_Access.php 2011-04-07 10:23:55 UTC (rev 4541) +++ trunk/WWW_Access.php 2011-04-08 23:37:01 UTC (rev 4542) @@ -2,8 +2,6 @@ /* $Id$*/ -//$PageSecurity=15; - include('includes/session.inc'); $title = _('Access Permission Maintenance'); @@ -41,7 +39,7 @@ $ErrMsg = _('The update of the security role description failed because'); $ResMsg = _('The Security role description was updated.'); } else { // Add Security Heading - $sql = "INSERT INTO securityroles (secrolename) VALUES ('".$_POST['SecRoleName']."')"; + $sql = "INSERT INTO securityroles (secrolename) valueS ('".$_POST['SecRoleName']."')"; $ErrMsg = _('The update of the security role failed because'); $ResMsg = _('The Security role was created.'); } @@ -52,7 +50,7 @@ if( isset($_GET['add']) ) { // updating Security Groups add a page token $sql = "INSERT INTO securitygroups ( secroleid, tokenid - ) VALUES ( + ) valueS ( '".$SelectedRole."', '".$PageTokenId."' )"; @@ -70,7 +68,7 @@ unset($_GET['PageToken']); } // Need to exec the query - if (isset($sql) && $InputError != 1 ) { + if (isset($sql) AND $InputError != 1 ) { $result = DB_query($sql,$db,$ErrMsg); if( $result ) { prnMsg( $ResMsg,'success'); @@ -84,7 +82,7 @@ $myrow = DB_fetch_row($result); if ($myrow[0]>0) { prnMsg( _('Cannot delete this role because user accounts are setup using it'),'warn'); - echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('user accounts that have this security role setting') . '</font>'; + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('user accounts that have this security role setting') . '</font>'; } else { $sql="DELETE FROM securitygroups WHERE secroleid='" . $_GET['SelectedRole'] . "'"; $result = DB_query($sql,$db); @@ -108,7 +106,7 @@ $result = DB_query($sql,$db); echo '<table class=selection>'; - echo "<tr><th>" . _('Role') . "</th></tr>"; + echo '<tr><th>' . _('Role') . '</th></tr>'; $k=0; //row colour counter @@ -128,9 +126,9 @@ <td><a href=\"%s&SelectedRole=%s&delete=1&SecRoleName=%s\">" . _('Delete') . "</a></td> </tr>", $myrow['secrolename'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $myrow['secroleid'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $myrow['secroleid'], urlencode($myrow['secrolename'])); @@ -140,7 +138,7 @@ if (isset($SelectedRole)) { - echo "<br /><div class='centre'><a href='" . $_SERVER['PHP_SELF'] ."?" . SID . "'>" . _('Review Existing Roles') . '</a></div>'; + echo '<br /><div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Review Existing Roles') . '</a></div>'; } if (isset($SelectedRole)) { @@ -159,24 +157,24 @@ $_POST['SecRoleName'] = $myrow['secrolename']; } } -echo '<br>'; -echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . "?" . SID . ">"; +echo '<br />'; +echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if( isset($_POST['SelectedRole'])) { - echo "<input type=hidden name='SelectedRole' VALUE='" . $_POST['SelectedRole'] . "'>"; + echo '<input type="hidden" name="SelectedRole" value="' . $_POST['SelectedRole'] . '">'; } -echo '<table class=selection>'; +echo '<table class="selection">'; if (!isset($_POST['SecRoleName'])) { $_POST['SecRoleName']=''; } echo '<tr><td>' . _('Role') . ":</td> - <td><input type='text' name='SecRoleName' size=40 maxlength=40 VALUE='" . $_POST['SecRoleName'] . "'></tr>"; + <td><input type='text' name='SecRoleName' size=40 maxlength=40 value='" . $_POST['SecRoleName'] . "'></tr>"; echo "</table><br /> <div class='centre'><input type='Submit' name='submit' value='" . _('Enter Role') . "'></div></form>"; if (isset($SelectedRole)) { - $sql = 'SELECT tokenid, tokenname - FROM securitytokens'; + $sql = "SELECT tokenid, tokenname + FROM securitytokens"; $sqlUsed = "SELECT tokenid FROM securitygroups WHERE secroleid='". $SelectedRole . "'"; @@ -194,8 +192,8 @@ echo '<br /><table class=selection><tr>'; if (DB_num_rows($Result)>0 ) { - echo "<th colspan=3><div class='centre'>"._('Assigned Security Tokens')."</div></th>"; - echo "<th colspan=3><div class='centre'>"._('Available Security Tokens')."</div></th>"; + echo '<th colspan="3"><div class="centre">'._('Assigned Security Tokens').'</div></th>'; + echo '<th colspan=3><div class="centre">'._('Available Security Tokens').'</div></th>'; } echo '</tr>'; @@ -215,7 +213,7 @@ <td><a href=\"%s&SelectedRole=%s&remove=1&PageToken=%s\">" . _('Remove') . "</a></td><td> </td><td> </td><td> </td>", $AvailRow['tokenid'], $AvailRow['tokenname'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $SelectedRole, $AvailRow['tokenid'] ); @@ -228,7 +226,7 @@ <td><a href=\"%s&SelectedRole=%s&add=1&PageToken=%s\">" . _('Add') . "</a></td>", $AvailRow['tokenid'], $AvailRow['tokenname'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $SelectedRole, $AvailRow['tokenid'] ); Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2011-04-07 10:23:55 UTC (rev 4541) +++ trunk/WWW_Users.php 2011-04-08 23:37:01 UTC (rev 4542) @@ -2,8 +2,6 @@ /* $Id$*/ -//$PageSecurity=15; - if (isset($_POST['UserID']) AND isset($_POST['ID'])){ if ($_POST['UserID'] == $_POST['ID']) { $_POST['Language'] = $_POST['UserLanguage']; @@ -33,9 +31,9 @@ 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 -$sql = 'SELECT secroleid, +$sql = "SELECT secroleid, secrolename - FROM securityroles ORDER BY secroleid'; + FROM securityroles ORDER BY secroleid"; $Sec_Result = DB_query($sql, $db); $SecurityRoles = array(); // Now load it into an a ray using Key/Value pairs @@ -106,7 +104,7 @@ $i=0; $ModulesAllowed = ''; while ($i < count($ModuleList)){ - $FormVbl = "Module_" . $i; + $FormVbl = 'Module_' . $i; $ModulesAllowed .= $_POST[($FormVbl)] . ','; $i++; } @@ -219,7 +217,7 @@ prnMsg(_('The demonstration user called demo cannot be deleted'),'error'); } else { */ - $sql='SELECT userid FROM audittrail where userid="'. $SelectedUser .'"'; + $sql="SELECT userid FROM audittrail where userid='" . $SelectedUser ."'"; $result=DB_query($sql, $db); if (DB_num_rows($result)!=0) { prnMsg(_('Cannot delete user as entries already exist in the audit trail'), 'warn'); @@ -239,7 +237,7 @@ /* If its the first time the page has been displayed with no parameters then none of the above are true and the list of Users 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*/ - $sql = 'SELECT + $sql = "SELECT userid, realname, phone, @@ -253,24 +251,24 @@ pagesize, theme, language - FROM www_users'; + FROM www_users"; $result = DB_query($sql,$db); echo '<table class=selection>'; - echo "<tr><th>" . _('User Login') . "</th> - <th>" . _('Full Name') . "</th> - <th>" . _('Telephone') . "</th> - <th>" . _('Email') . "</th> - <th>" . _('Customer Code') . "</th> - <th>" . _('Branch Code') . "</th> - <th>" . _('Supplier Code') . "</th> - <th>" . _('Salesperson') . "</th> - <th>" . _('Last Visit') . "</th> - <th>" . _('Security Role') ."</th> - <th>" . _('Report Size') ."</th> - <th>" . _('Theme') ."</th> - <th>" . _('Language') ."</th> - </tr>"; + echo '<tr><th>' . _('User Login') . '</th> + <th>' . _('Full Name') . '</th> + <th>' . _('Telephone') . '</th> + <th>' . _('Email') . '</th> + <th>' . _('Customer Code') . '</th> + <th>' . _('Branch Code') . '</th> + <th>' . _('Supplier Code') . '</th> + <th>' . _('Salesperson') . '</th> + <th>' . _('Last Visit') . '</th> + <th>' . _('Security Role') .'</th> + <th>' . _('Report Size') .'</th> + <th>' . _('Theme') .'</th> + <th>' . _('Language') .'</th> + </tr>'; $k=0; //row colour counter @@ -320,21 +318,21 @@ $myrow[10], $myrow[11], $myrow[12], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $myrow[0], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $myrow[0]); } //END WHILE LIST LOOP - echo '</table><br>'; + echo '</table><br />'; } //end of ifs and buts! if (isset($SelectedUser)) { - echo "<div class='centre'><a href='" . $_SERVER['PHP_SELF'] ."?" . SID . "'>" . _('Review Existing Users') . '</a></div><br>'; + echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Review Existing Users') . '</a></div><br />'; } -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'] . '" />'; if (isset($SelectedUser)) { @@ -380,16 +378,19 @@ $_POST['Blocked'] = $myrow['blocked']; $_POST['PDFLanguage'] = $myrow['pdflanguage']; - echo "<input type='hidden' name='SelectedUser' value='" . $SelectedUser . "'>"; - echo "<input type='hidden' name='UserID' value='" . $_POST['UserID'] . "'>"; - echo "<input type='hidden' name='ModulesAllowed' value='" . $_POST['ModulesAllowed'] . "'>"; + echo '<input type="hidden" name="SelectedUser" value="' . $SelectedUser . '">'; + echo '<input type="hidden" name="UserID" value="' . $_POST['UserID'] . '">'; + echo '<input type="hidden" name="ModulesAllowed" value="' . $_POST['ModulesAllowed'] . '">'; echo '<table class=selection> <tr><td>' . _('User code') . ':</td><td>'; echo $_POST['UserID'] . '</td></tr>'; } else { //end of if $SelectedUser only do the else when a new record is being entered - echo '<table class=selection><tr><td>' . _('User Login') . ":</td><td><input type='text' name='UserID' size=22 maxlength=20 ></td></tr>"; + echo '<table class=selection> + <tr> + <td>' . _('User Login') . ':</td> + <td><input type="text" name="UserID" size="22" maxlength="20"></td></tr>'; /*set the default modules to show to all this had trapped a few people previously*/ @@ -418,21 +419,21 @@ if (!isset($_POST['Email'])) { $_POST['Email']=''; } -echo '<tr><td>' . _('Password') . ":</td> - <td><input type='password' name='Password' size=22 maxlength=20 value='" . $_POST['Password'] . "'></tr>"; -echo '<tr><td>' . _('Full Name') . ":</td> - <td><input type='text' name='RealName' value='" . $_POST['RealName'] . "' size=36 maxlength=35></td></tr>"; -echo '<tr><td>' . _('Telephone No') . ":</td> - <td><input type='text' name='Phone' value='" . $_POST['Phone'] . "' size=32 maxlength=30></td></tr>"; -echo '<tr><td>' . _('Email Address') .":</td> - <td><input type='text' name='Email' value='" . $_POST['Email'] ."' size=32 maxlength=55></td></tr>"; -echo '<tr><td>' . _('Security Role') . ":</td><td><select name='Access'>"; +echo '<tr><td>' . _('Password') . ':</td> + <td><input type="password" name="Password" size="22" maxlength="20" value="' . $_POST['Password'] . '"></tr>'; +echo '<tr><td>' . _('Full Name') . ':</td> + <td><input type="text" name="RealName" value="' . $_POST['RealName'] . '" size="36" maxlength="35"></td></tr>'; +echo '<tr><td>' . _('Telephone No') . ':</td> + <td><input type="text" name="Phone" value="' . $_POST['Phone'] . '" size="32" maxlength="30"></td></tr>'; +echo '<tr><td>' . _('Email Address') .':</td> + <td><input type="text" name="Email" value="' . $_POST['Email'] .'" size="32" maxlength="55"></td></tr>'; +echo '<tr><td>' . _('Security Role') . ':</td><td><select name="Access">'; foreach ($SecurityRoles as $SecKey => $SecVal) { if (isset($_POST['Access']) and $SecKey == $_POST['Access']){ - echo "<option selected value=" . $SecKey . ">" . $SecVal; + echo '<option selected value="' . $SecKey . '">' . $SecVal .'</option>'; } else { - echo "<option value=" . $SecKey . ">" . $SecVal; + echo '<option value="' . $SecKey . '">' . $SecVal .'</option>'; } } echo '</select></td></tr>'; @@ -441,17 +442,17 @@ echo '<tr><td>' . _('Default Location') . ':</td> <td><select name="DefaultLocation">'; -$sql = 'SELECT loccode, locationname FROM locations'; +$sql = "SELECT loccode, locationname FROM locations"; $result = DB_query($sql,$db); while ($myrow=DB_fetch_array($result)){ if (isset($_POST['DefaultLocation']) and $myrow['loccode'] == $_POST['DefaultLocation']){ - 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>'; } @@ -479,7 +480,7 @@ echo '<tr><td>' . _('Restrict to Sales Person') . ':</td> <td><select name="Salesman">'; -$sql = 'SELECT salesmancode, salesmanname FROM salesman'; +$sql = "SELECT salesmancode, salesmanname FROM salesman"; $result = DB_query($sql,$db); if ((isset($_POST['Salesman']) and $_POST['Salesman']=='') OR !isset($_POST['Salesman'])){ echo '<option selected value="">' . _('Not a salesperson only login') . '</option>'; @@ -499,69 +500,69 @@ echo '</select></td></tr>'; -echo '<tr><td>' . _('Reports Page Size') .":</td> - <td><select name='PageSize'>"; +echo '<tr><td>' . _('Reports Page Size') .':</td> + <td><select name="PageSize">'; if(isset($_POST['PageSize']) and $_POST['PageSize']=='A4'){ - echo "<option selected value='A4'>" . _('A4'); + echo '<option selected value="A4">' . _('A4') .'</option>'; } else { - echo "<option value='A4'>A4"; + echo '<option value="A4">' . _('A4') . '</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='A3'){ - echo "<option selected Value='A3'>" . _('A3'); + echo '<option selected value="A3">' . _('A3') .'</option>'; } else { - echo "<option value='A3'>A3"; + echo '<option value="A3">' . _('A3') .'</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='A3_landscape'){ - echo "<option selected Value='A3_landscape'>" . _('A3') . ' ' . _('landscape'); + echo '<option selected value="A3_landscape">' . _('A3') . ' ' . _('landscape') .'</option>'; } else { - echo "<option value='A3_landscape'>" . _('A3') . ' ' . _('landscape'); + echo '<option value="A3_landscape">' . _('A3') . ' ' . _('landscape') .'</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='letter'){ - echo "<option selected Value='letter'>" . _('Letter'); + echo '<option selected value="letter">' . _('Letter') .'</option>'; } else { - echo "<option value='letter'>" . _('Letter'); + echo '<option value="letter">' . _('Letter') .'</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='letter_landscape'){ - echo "<option selected Value='letter_landscape'>" . _('Letter') . ' ' . _('landscape'); + echo '<option selected value="letter_landscape">' . _('Letter') . ' ' . _('landscape') .'</option>'; } else { - echo "<option value='letter_landscape'>" . _('Letter') . ' ' . _('landscape'); + echo '<option value="letter_landscape">' . _('Letter') . ' ' . _('landscape') .'</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='legal'){ - echo "<option selected value='legal'>" . _('Legal'); + echo '<option selected value="legal">' . _('Legal') .'</option>'; } else { - echo "<option Value='legal'>" . _('Legal'); + echo '<option value="legal">' . _('Legal') .'</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='legal_landscape'){ - echo "<option selected value='legal_landscape'>" . _('Legal') . ' ' . _('landscape'); + echo '<option selected value="legal_landscape">' . _('Legal') . ' ' . _('landscape') .'</option>'; } else { - echo "<option value='legal_landscape'>" . _('Legal') . ' ' . _('landscape'); + echo '<option value="legal_landscape">' . _('Legal') . ' ' . _('landscape') .'</option>'; } echo '</select></td></tr>'; echo '<tr> - <td>' . _('Theme') . ":</td> - <td><select name='Theme'>"; + <td>' . _('Theme') . ':</td> + <td><select name="Theme">'; $ThemeDirectory = dir('css/'); while (false != ($ThemeName = $ThemeDirectory->read())){ - if (is_dir("css/$ThemeName") AND $ThemeName != '.' AND $ThemeName != '..' AND $ThemeName != '.svn'){ + if (is_dir('css/' . $ThemeName) AND $ThemeName != '.' AND $ThemeName != '..' AND $ThemeName != '.svn'){ if (isset($_POST['Theme']) and $_POST['Theme'] == $ThemeName){ - echo "<option selected value='$ThemeName'>$ThemeName"; + echo '<option selected value="' . $ThemeName . '">' . $ThemeName .'</option>'; } else if (!isset($_POST['Theme']) and ($_SESSION['DefaultTheme']==$ThemeName)) { - echo "<option selected value='$ThemeName'>$ThemeName"; + echo '<option selected value="' . $ThemeName . '">' . $ThemeName .'</option>'; } else { - echo "<option value='$ThemeName'>$ThemeName"; + echo '<option value="' . $ThemeName . '">' . $ThemeName .'</option>'; } } } @@ -570,8 +571,8 @@ echo '<tr> - <td>' . _('Language') . ":</td> - <td><select name='UserLanguage'>"; + <td>' . _('Language') . ':</td> + <td><select name="UserLanguage">'; $LangDirHandle = dir('locale/'); @@ -581,11 +582,11 @@ if (is_dir('locale/' . $LanguageEntry) AND $LanguageEntry != '..' AND $LanguageEntry != 'CVS' AND $LanguageEntry!='.'){ if (isset($_POST['UserLanguage']) and $_POST['UserLanguage'] == $LanguageEntry){ - echo "<option selected value='$LanguageEntry'>$LanguageEntry"; + echo '<option selected value="' . $LanguageEntry . '">' . $LanguageEntry .'</option>'; } elseif (!isset($_POST['UserLanguage']) and $LanguageEntry == $DefaultLanguage) { - echo "<option selected value='$LanguageEntry'>$LanguageEntry"; + echo '<option selected value="' . $LanguageEntry . '">' . $LanguageEntry .'</option>'; } else { - echo "<option value='$LanguageEntry'>$LanguageEntry"; + echo '<option value="' . $LanguageEntry . '">' . $LanguageEntry .'</option>'; } } } @@ -599,7 +600,7 @@ $i=0; foreach($ModuleList as $ModuleName){ - echo '<tr><td>' . _('Display') . ' ' . $ModuleName . ' ' . _('options') . ": </td><td><select name='Module_" .... [truncated message content] |
From: <dai...@us...> - 2011-04-08 23:37:09
|
Revision: 4542 http://web-erp.svn.sourceforge.net/web-erp/?rev=4542&view=rev Author: daintree Date: 2011-04-08 23:37:01 +0000 (Fri, 08 Apr 2011) Log Message: ----------- SQL xhtml quoting Modified Paths: -------------- trunk/ReverseGRN.php trunk/WWW_Access.php trunk/WWW_Users.php trunk/WorkCentres.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/WorkOrderReceive.php trunk/Z_CheckAllocationsFrom.php trunk/Z_CheckAllocs.php trunk/Z_CheckDebtorsControl.php trunk/Z_CheckGLTransBalance.php trunk/Z_CreateChartDetails.php Modified: trunk/ReverseGRN.php =================================================================== --- trunk/ReverseGRN.php 2011-04-07 10:23:55 UTC (rev 4541) +++ trunk/ReverseGRN.php 2011-04-08 23:37:01 UTC (rev 4542) @@ -18,7 +18,7 @@ $_POST['SupplierID']=$_SESSION['SupplierID']; } if (!isset($_POST['SupplierID']) OR $_POST['SupplierID']==""){ - echo '<br>' . _('This page is expected to be called after a supplier has been selected'); + echo '<br />' . _('This page is expected to be called after a supplier has been selected'); echo "<meta http-equiv='Refresh' content='0; url=" . $rootpath . '/SelectSupplier.php?' . SID . "'>"; exit; } elseif (!isset($_POST['SuppName']) or $_POST['SuppName']=="") { @@ -61,7 +61,7 @@ $QtyToReverse = $GRN['qtyrecd'] - $GRN['quantityinv']; if ($QtyToReverse ==0){ - echo '<br><br>' . _('The GRN') . ' ' . $_GET['GRNNo'] . ' ' . _('has already been reversed or fully invoiced by the supplier - it cannot be reversed - stock quantities must be corrected by stock adjustments - the stock is paid for'); + echo '<br /><br />' . _('The GRN') . ' ' . $_GET['GRNNo'] . ' ' . _('has already been reversed or fully invoiced by the supplier - it cannot be reversed - stock quantities must be corrected by stock adjustments - the stock is paid for'); include ('includes/footer.inc'); exit; } @@ -73,7 +73,7 @@ $SQL = "SELECT stockmaster.controlled FROM stockmaster WHERE stockid ='" . $GRN['itemcode'] . "'"; - $CheckControlledResult = DB_query($SQL,$db,'<br>' . _('Could not determine if the item was controlled or not because') . ' '); + $CheckControlledResult = DB_query($SQL,$db,'<br />' . _('Could not determine if the item was controlled or not because') . ' '); $ControlledRow = DB_fetch_row($CheckControlledResult); if ($ControlledRow[0]==1) { /*Then its a controlled item */ $Controlled = true; @@ -132,7 +132,7 @@ /*Now the purchorder header status in case it was completed - now incomplete - just printed */ $SQL = "UPDATE purchorders SET status = 'Printed', - stat_comment = CONCAT('" . Date($_SESSION['DefaultDateFormat']) . ' ' . _('GRN Reversed for') . ' ' . $GRN['itemdescription'] . ' ' . _('by') . ' ' . $_SESSION['UsersRealName'] . "<br>', stat_comment ) + stat_comment = CONCAT('" . Date($_SESSION['DefaultDateFormat']) . ' ' . _('GRN Reversed for') . ' ' . $GRN['itemdescription'] . ' ' . _('by') . ' ' . $_SESSION['UsersRealName'] . "<br />', stat_comment ) WHERE orderno = '" . $GRN['orderno'] . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The purchase order statusand status comment could not be changed because'); @@ -146,7 +146,7 @@ $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GRN record could not be deleted because'); $DbgMsg = _('The following SQL to delete the GRN record was used'); - $result = DB_query('DELETE FROM grns WHERE grnno="' . $_GET['GRNNo'] . '"',$db,$ErrMsg,$DbgMsg,true); + $result = DB_query("DELETE FROM grns WHERE grnno='" . $_GET['GRNNo'] . "'",$db,$ErrMsg,$DbgMsg,true); } else { $SQL = "UPDATE grns SET qtyrecd = qtyrecd - $QtyToReverse @@ -159,26 +159,26 @@ /*If the GRN being reversed is an asset - reverse the fixedassettrans record */ if ($GRN['assetid']!='0'){ $SQL = "INSERT INTO fixedassettrans (assetid, - transtype, - transno, - transdate, - periodno, - inputdate, - cost) - VALUES ('" . $GRN['assetid'] . "', - 25, - '" . $_GET['GRNNo'] . "', - '" . $GRN['deliverydate'] . "', - '" . $PeriodNo . "', - '" . Date('Y-m-d') . "', - '" . -$GRN['stdcostunit'] * $QtyToReverse . "')"; + transtype, + transno, + transdate, + periodno, + inputdate, + cost) + VALUES ('" . $GRN['assetid'] . "', + 25, + '" . $_GET['GRNNo'] . "', + '" . $GRN['deliverydate'] . "', + '" . $PeriodNo . "', + '" . Date('Y-m-d') . "', + '" . -$GRN['stdcostunit'] * $QtyToReverse . "')"; $ErrMsg = _('CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE The fixed asset transaction could not be inserted because'); $DbgMsg = _('The following SQL to insert the fixed asset transaction record was used'); $Result = DB_query($SQL,$db,$ErrMsg, $DbgMsg, true); /*now reverse the cost put to fixedassets */ $SQL = "UPDATE fixedassets SET cost = cost - " . ($GRN['stdcostunit'] * $QtyToReverse) . " - WHERE assetid = '" . $GRN['assetid'] . "'"; + WHERE assetid = '" . $GRN['assetid'] . "'"; $ErrMsg = _('CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE. The fixed asset cost addition could not be reversed:'); $DbgMsg = _('The following SQL was used to attempt the reduce the cost of the asset was:'); $Result = DB_query($SQL,$db,$ErrMsg, $DbgMsg, true); @@ -186,9 +186,9 @@ } //end of if it is an asset $SQL = "SELECT stockmaster.controlled - FROM stockmaster - WHERE stockmaster.stockid = '" . $GRN['itemcode'] . "'"; - $Result = DB_query($SQL, $db, _('Could not determine if the item exists because'),'<br>' . _('The SQL that failed was') . ' ',true); + FROM stockmaster + WHERE stockmaster.stockid = '" . $GRN['itemcode'] . "'"; + $Result = DB_query($SQL, $db, _('Could not determine if the item exists because'),'<br />' . _('The SQL that failed was') . ' ',true); if (DB_num_rows($Result)==1){ /* if the GRN is in fact a stock item being reversed */ @@ -222,28 +222,28 @@ /* If its a stock item .... Insert stock movements - with unit cost */ - $SQL = "INSERT INTO stockmoves ( stockid, - type, - transno, - loccode, - trandate, - prd, - reference, - qty, - standardcost, - newqoh) - VALUES ( - '" . $GRN['itemcode'] . "', - 25, - '" . $_GET['GRNNo'] . "', - '" . $GRN['intostocklocation'] . "', - '" . $GRN['deliverydate'] . "', - '" . $PeriodNo . "', - '" . _('Reversal') . ' - ' . $_POST['SupplierID'] . ' - ' . $GRN['orderno'] . "', - '" . -$QtyToReverse . "', - '" . $GRN['stdcostunit'] . "', - '" . ($QtyOnHandPrior - $QtyToReverse) . "' - )"; + $SQL = "INSERT INTO stockmoves ( stockid, + type, + transno, + loccode, + trandate, + prd, + reference, + qty, + standardcost, + newqoh) + VALUES ( + '" . $GRN['itemcode'] . "', + 25, + '" . $_GET['GRNNo'] . "', + '" . $GRN['intostocklocation'] . "', + '" . $GRN['deliverydate'] . "', + '" . $PeriodNo . "', + '" . _('Reversal') . ' - ' . $_POST['SupplierID'] . ' - ' . $GRN['orderno'] . "', + '" . -$QtyToReverse . "', + '" . $GRN['stdcostunit'] . "', + '" . ($QtyOnHandPrior - $QtyToReverse) . "' + )"; $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'); @@ -305,21 +305,21 @@ /*now the GRN suspense entry*/ $SQL = "INSERT INTO gltrans ( type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES ( - 25, - '" . $_GET['GRNNo'] . "', - '" . $GRN['deliverydate'] . "', - '" . $PeriodNo . "', - '" . $_SESSION['CompanyRecord']['grnact'] . "', '" - . _('GRN Reversal PO') . ': ' . $GRN['orderno'] . " " . $_POST['SupplierID'] . " - " . $GRN['itemcode'] . "-" . $GRN['itemdescription'] . " x " . $QtyToReverse . " @ " . number_format($GRN['stdcostunit'],2) . "', - '" . $GRN['stdcostunit'] * $QtyToReverse . "' - )"; + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES ( + 25, + '" . $_GET['GRNNo'] . "', + '" . $GRN['deliverydate'] . "', + '" . $PeriodNo . "', + '" . $_SESSION['CompanyRecord']['grnact'] . "', '" + . _('GRN Reversal PO') . ': ' . $GRN['orderno'] . " " . $_POST['SupplierID'] . " - " . $GRN['itemcode'] . "-" . $GRN['itemdescription'] . " x " . $QtyToReverse . " @ " . number_format($GRN['stdcostunit'],2) . "', + '" . $GRN['stdcostunit'] * $QtyToReverse . "' + )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GRN suspense side of the GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GRN Suspense GLTrans record was used'); @@ -329,7 +329,7 @@ $Result = DB_Txn_Commit($db); - echo '<br>' . _('GRN number') . ' ' . $_GET['GRNNo'] . ' ' . _('for') . ' ' . $QtyToReverse . ' x ' . $GRN['itemcode'] . ' - ' . $GRN['itemdescription'] . ' ' . _('has been reversed') . '<br>'; + echo '<br />' . _('GRN number') . ' ' . $_GET['GRNNo'] . ' ' . _('for') . ' ' . $QtyToReverse . ' x ' . $GRN['itemcode'] . ' - ' . $GRN['itemdescription'] . ' ' . _('has been reversed') . '<br />'; unset($_GET['GRNNo']); // to ensure it cant be done again!! echo '<a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '">' . _('Select another GRN to Reverse') . '</a>'; /*end of Process Goods Received Reversal entry */ @@ -367,7 +367,7 @@ $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); if (DB_num_rows($result) ==0){ - prnMsg(_('There are no outstanding goods received yet to be invoiced for') . ' ' . $_POST['SuppName'] . '.<br>' . _('To reverse a GRN that has been invoiced first it must be credited'),'warn'); + prnMsg(_('There are no outstanding goods received yet to be invoiced for') . ' ' . $_POST['SuppName'] . '.<br />' . _('To reverse a GRN that has been invoiced first it must be credited'),'warn'); } else { //there are GRNs to show echo '<br /><table cellpadding=2 colspan=7 class=selection>'; @@ -375,10 +375,10 @@ <th>' . _('GRN') . ' #</th> <th>' . _('Item Code') . '</th> <th>' . _('Description') . '</th> - <th>' . _('Date') . '<br>' . _('Received') . '</th> - <th>' . _('Quantity') . '<br>' . _('Received') . '</th> - <th>' . _('Quantity') . '<br>' . _('Invoiced') . '</th> - <th>' . _('Quantity To') . '<br>' . _('Reverse') . '</th> + <th>' . _('Date') . '<br />' . _('Received') . '</th> + <th>' . _('Quantity') . '<br />' . _('Received') . '</th> + <th>' . _('Quantity') . '<br />' . _('Invoiced') . '</th> + <th>' . _('Quantity To') . '<br />' . _('Reverse') . '</th> </tr>'; echo $TableHeader; Modified: trunk/WWW_Access.php =================================================================== --- trunk/WWW_Access.php 2011-04-07 10:23:55 UTC (rev 4541) +++ trunk/WWW_Access.php 2011-04-08 23:37:01 UTC (rev 4542) @@ -2,8 +2,6 @@ /* $Id$*/ -//$PageSecurity=15; - include('includes/session.inc'); $title = _('Access Permission Maintenance'); @@ -41,7 +39,7 @@ $ErrMsg = _('The update of the security role description failed because'); $ResMsg = _('The Security role description was updated.'); } else { // Add Security Heading - $sql = "INSERT INTO securityroles (secrolename) VALUES ('".$_POST['SecRoleName']."')"; + $sql = "INSERT INTO securityroles (secrolename) valueS ('".$_POST['SecRoleName']."')"; $ErrMsg = _('The update of the security role failed because'); $ResMsg = _('The Security role was created.'); } @@ -52,7 +50,7 @@ if( isset($_GET['add']) ) { // updating Security Groups add a page token $sql = "INSERT INTO securitygroups ( secroleid, tokenid - ) VALUES ( + ) valueS ( '".$SelectedRole."', '".$PageTokenId."' )"; @@ -70,7 +68,7 @@ unset($_GET['PageToken']); } // Need to exec the query - if (isset($sql) && $InputError != 1 ) { + if (isset($sql) AND $InputError != 1 ) { $result = DB_query($sql,$db,$ErrMsg); if( $result ) { prnMsg( $ResMsg,'success'); @@ -84,7 +82,7 @@ $myrow = DB_fetch_row($result); if ($myrow[0]>0) { prnMsg( _('Cannot delete this role because user accounts are setup using it'),'warn'); - echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('user accounts that have this security role setting') . '</font>'; + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('user accounts that have this security role setting') . '</font>'; } else { $sql="DELETE FROM securitygroups WHERE secroleid='" . $_GET['SelectedRole'] . "'"; $result = DB_query($sql,$db); @@ -108,7 +106,7 @@ $result = DB_query($sql,$db); echo '<table class=selection>'; - echo "<tr><th>" . _('Role') . "</th></tr>"; + echo '<tr><th>' . _('Role') . '</th></tr>'; $k=0; //row colour counter @@ -128,9 +126,9 @@ <td><a href=\"%s&SelectedRole=%s&delete=1&SecRoleName=%s\">" . _('Delete') . "</a></td> </tr>", $myrow['secrolename'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $myrow['secroleid'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $myrow['secroleid'], urlencode($myrow['secrolename'])); @@ -140,7 +138,7 @@ if (isset($SelectedRole)) { - echo "<br /><div class='centre'><a href='" . $_SERVER['PHP_SELF'] ."?" . SID . "'>" . _('Review Existing Roles') . '</a></div>'; + echo '<br /><div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Review Existing Roles') . '</a></div>'; } if (isset($SelectedRole)) { @@ -159,24 +157,24 @@ $_POST['SecRoleName'] = $myrow['secrolename']; } } -echo '<br>'; -echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . "?" . SID . ">"; +echo '<br />'; +echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if( isset($_POST['SelectedRole'])) { - echo "<input type=hidden name='SelectedRole' VALUE='" . $_POST['SelectedRole'] . "'>"; + echo '<input type="hidden" name="SelectedRole" value="' . $_POST['SelectedRole'] . '">'; } -echo '<table class=selection>'; +echo '<table class="selection">'; if (!isset($_POST['SecRoleName'])) { $_POST['SecRoleName']=''; } echo '<tr><td>' . _('Role') . ":</td> - <td><input type='text' name='SecRoleName' size=40 maxlength=40 VALUE='" . $_POST['SecRoleName'] . "'></tr>"; + <td><input type='text' name='SecRoleName' size=40 maxlength=40 value='" . $_POST['SecRoleName'] . "'></tr>"; echo "</table><br /> <div class='centre'><input type='Submit' name='submit' value='" . _('Enter Role') . "'></div></form>"; if (isset($SelectedRole)) { - $sql = 'SELECT tokenid, tokenname - FROM securitytokens'; + $sql = "SELECT tokenid, tokenname + FROM securitytokens"; $sqlUsed = "SELECT tokenid FROM securitygroups WHERE secroleid='". $SelectedRole . "'"; @@ -194,8 +192,8 @@ echo '<br /><table class=selection><tr>'; if (DB_num_rows($Result)>0 ) { - echo "<th colspan=3><div class='centre'>"._('Assigned Security Tokens')."</div></th>"; - echo "<th colspan=3><div class='centre'>"._('Available Security Tokens')."</div></th>"; + echo '<th colspan="3"><div class="centre">'._('Assigned Security Tokens').'</div></th>'; + echo '<th colspan=3><div class="centre">'._('Available Security Tokens').'</div></th>'; } echo '</tr>'; @@ -215,7 +213,7 @@ <td><a href=\"%s&SelectedRole=%s&remove=1&PageToken=%s\">" . _('Remove') . "</a></td><td> </td><td> </td><td> </td>", $AvailRow['tokenid'], $AvailRow['tokenname'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $SelectedRole, $AvailRow['tokenid'] ); @@ -228,7 +226,7 @@ <td><a href=\"%s&SelectedRole=%s&add=1&PageToken=%s\">" . _('Add') . "</a></td>", $AvailRow['tokenid'], $AvailRow['tokenname'], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $SelectedRole, $AvailRow['tokenid'] ); Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2011-04-07 10:23:55 UTC (rev 4541) +++ trunk/WWW_Users.php 2011-04-08 23:37:01 UTC (rev 4542) @@ -2,8 +2,6 @@ /* $Id$*/ -//$PageSecurity=15; - if (isset($_POST['UserID']) AND isset($_POST['ID'])){ if ($_POST['UserID'] == $_POST['ID']) { $_POST['Language'] = $_POST['UserLanguage']; @@ -33,9 +31,9 @@ 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 -$sql = 'SELECT secroleid, +$sql = "SELECT secroleid, secrolename - FROM securityroles ORDER BY secroleid'; + FROM securityroles ORDER BY secroleid"; $Sec_Result = DB_query($sql, $db); $SecurityRoles = array(); // Now load it into an a ray using Key/Value pairs @@ -106,7 +104,7 @@ $i=0; $ModulesAllowed = ''; while ($i < count($ModuleList)){ - $FormVbl = "Module_" . $i; + $FormVbl = 'Module_' . $i; $ModulesAllowed .= $_POST[($FormVbl)] . ','; $i++; } @@ -219,7 +217,7 @@ prnMsg(_('The demonstration user called demo cannot be deleted'),'error'); } else { */ - $sql='SELECT userid FROM audittrail where userid="'. $SelectedUser .'"'; + $sql="SELECT userid FROM audittrail where userid='" . $SelectedUser ."'"; $result=DB_query($sql, $db); if (DB_num_rows($result)!=0) { prnMsg(_('Cannot delete user as entries already exist in the audit trail'), 'warn'); @@ -239,7 +237,7 @@ /* If its the first time the page has been displayed with no parameters then none of the above are true and the list of Users 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*/ - $sql = 'SELECT + $sql = "SELECT userid, realname, phone, @@ -253,24 +251,24 @@ pagesize, theme, language - FROM www_users'; + FROM www_users"; $result = DB_query($sql,$db); echo '<table class=selection>'; - echo "<tr><th>" . _('User Login') . "</th> - <th>" . _('Full Name') . "</th> - <th>" . _('Telephone') . "</th> - <th>" . _('Email') . "</th> - <th>" . _('Customer Code') . "</th> - <th>" . _('Branch Code') . "</th> - <th>" . _('Supplier Code') . "</th> - <th>" . _('Salesperson') . "</th> - <th>" . _('Last Visit') . "</th> - <th>" . _('Security Role') ."</th> - <th>" . _('Report Size') ."</th> - <th>" . _('Theme') ."</th> - <th>" . _('Language') ."</th> - </tr>"; + echo '<tr><th>' . _('User Login') . '</th> + <th>' . _('Full Name') . '</th> + <th>' . _('Telephone') . '</th> + <th>' . _('Email') . '</th> + <th>' . _('Customer Code') . '</th> + <th>' . _('Branch Code') . '</th> + <th>' . _('Supplier Code') . '</th> + <th>' . _('Salesperson') . '</th> + <th>' . _('Last Visit') . '</th> + <th>' . _('Security Role') .'</th> + <th>' . _('Report Size') .'</th> + <th>' . _('Theme') .'</th> + <th>' . _('Language') .'</th> + </tr>'; $k=0; //row colour counter @@ -320,21 +318,21 @@ $myrow[10], $myrow[11], $myrow[12], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $myrow[0], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . '?', $myrow[0]); } //END WHILE LIST LOOP - echo '</table><br>'; + echo '</table><br />'; } //end of ifs and buts! if (isset($SelectedUser)) { - echo "<div class='centre'><a href='" . $_SERVER['PHP_SELF'] ."?" . SID . "'>" . _('Review Existing Users') . '</a></div><br>'; + echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Review Existing Users') . '</a></div><br />'; } -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'] . '" />'; if (isset($SelectedUser)) { @@ -380,16 +378,19 @@ $_POST['Blocked'] = $myrow['blocked']; $_POST['PDFLanguage'] = $myrow['pdflanguage']; - echo "<input type='hidden' name='SelectedUser' value='" . $SelectedUser . "'>"; - echo "<input type='hidden' name='UserID' value='" . $_POST['UserID'] . "'>"; - echo "<input type='hidden' name='ModulesAllowed' value='" . $_POST['ModulesAllowed'] . "'>"; + echo '<input type="hidden" name="SelectedUser" value="' . $SelectedUser . '">'; + echo '<input type="hidden" name="UserID" value="' . $_POST['UserID'] . '">'; + echo '<input type="hidden" name="ModulesAllowed" value="' . $_POST['ModulesAllowed'] . '">'; echo '<table class=selection> <tr><td>' . _('User code') . ':</td><td>'; echo $_POST['UserID'] . '</td></tr>'; } else { //end of if $SelectedUser only do the else when a new record is being entered - echo '<table class=selection><tr><td>' . _('User Login') . ":</td><td><input type='text' name='UserID' size=22 maxlength=20 ></td></tr>"; + echo '<table class=selection> + <tr> + <td>' . _('User Login') . ':</td> + <td><input type="text" name="UserID" size="22" maxlength="20"></td></tr>'; /*set the default modules to show to all this had trapped a few people previously*/ @@ -418,21 +419,21 @@ if (!isset($_POST['Email'])) { $_POST['Email']=''; } -echo '<tr><td>' . _('Password') . ":</td> - <td><input type='password' name='Password' size=22 maxlength=20 value='" . $_POST['Password'] . "'></tr>"; -echo '<tr><td>' . _('Full Name') . ":</td> - <td><input type='text' name='RealName' value='" . $_POST['RealName'] . "' size=36 maxlength=35></td></tr>"; -echo '<tr><td>' . _('Telephone No') . ":</td> - <td><input type='text' name='Phone' value='" . $_POST['Phone'] . "' size=32 maxlength=30></td></tr>"; -echo '<tr><td>' . _('Email Address') .":</td> - <td><input type='text' name='Email' value='" . $_POST['Email'] ."' size=32 maxlength=55></td></tr>"; -echo '<tr><td>' . _('Security Role') . ":</td><td><select name='Access'>"; +echo '<tr><td>' . _('Password') . ':</td> + <td><input type="password" name="Password" size="22" maxlength="20" value="' . $_POST['Password'] . '"></tr>'; +echo '<tr><td>' . _('Full Name') . ':</td> + <td><input type="text" name="RealName" value="' . $_POST['RealName'] . '" size="36" maxlength="35"></td></tr>'; +echo '<tr><td>' . _('Telephone No') . ':</td> + <td><input type="text" name="Phone" value="' . $_POST['Phone'] . '" size="32" maxlength="30"></td></tr>'; +echo '<tr><td>' . _('Email Address') .':</td> + <td><input type="text" name="Email" value="' . $_POST['Email'] .'" size="32" maxlength="55"></td></tr>'; +echo '<tr><td>' . _('Security Role') . ':</td><td><select name="Access">'; foreach ($SecurityRoles as $SecKey => $SecVal) { if (isset($_POST['Access']) and $SecKey == $_POST['Access']){ - echo "<option selected value=" . $SecKey . ">" . $SecVal; + echo '<option selected value="' . $SecKey . '">' . $SecVal .'</option>'; } else { - echo "<option value=" . $SecKey . ">" . $SecVal; + echo '<option value="' . $SecKey . '">' . $SecVal .'</option>'; } } echo '</select></td></tr>'; @@ -441,17 +442,17 @@ echo '<tr><td>' . _('Default Location') . ':</td> <td><select name="DefaultLocation">'; -$sql = 'SELECT loccode, locationname FROM locations'; +$sql = "SELECT loccode, locationname FROM locations"; $result = DB_query($sql,$db); while ($myrow=DB_fetch_array($result)){ if (isset($_POST['DefaultLocation']) and $myrow['loccode'] == $_POST['DefaultLocation']){ - 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>'; } @@ -479,7 +480,7 @@ echo '<tr><td>' . _('Restrict to Sales Person') . ':</td> <td><select name="Salesman">'; -$sql = 'SELECT salesmancode, salesmanname FROM salesman'; +$sql = "SELECT salesmancode, salesmanname FROM salesman"; $result = DB_query($sql,$db); if ((isset($_POST['Salesman']) and $_POST['Salesman']=='') OR !isset($_POST['Salesman'])){ echo '<option selected value="">' . _('Not a salesperson only login') . '</option>'; @@ -499,69 +500,69 @@ echo '</select></td></tr>'; -echo '<tr><td>' . _('Reports Page Size') .":</td> - <td><select name='PageSize'>"; +echo '<tr><td>' . _('Reports Page Size') .':</td> + <td><select name="PageSize">'; if(isset($_POST['PageSize']) and $_POST['PageSize']=='A4'){ - echo "<option selected value='A4'>" . _('A4'); + echo '<option selected value="A4">' . _('A4') .'</option>'; } else { - echo "<option value='A4'>A4"; + echo '<option value="A4">' . _('A4') . '</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='A3'){ - echo "<option selected Value='A3'>" . _('A3'); + echo '<option selected value="A3">' . _('A3') .'</option>'; } else { - echo "<option value='A3'>A3"; + echo '<option value="A3">' . _('A3') .'</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='A3_landscape'){ - echo "<option selected Value='A3_landscape'>" . _('A3') . ' ' . _('landscape'); + echo '<option selected value="A3_landscape">' . _('A3') . ' ' . _('landscape') .'</option>'; } else { - echo "<option value='A3_landscape'>" . _('A3') . ' ' . _('landscape'); + echo '<option value="A3_landscape">' . _('A3') . ' ' . _('landscape') .'</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='letter'){ - echo "<option selected Value='letter'>" . _('Letter'); + echo '<option selected value="letter">' . _('Letter') .'</option>'; } else { - echo "<option value='letter'>" . _('Letter'); + echo '<option value="letter">' . _('Letter') .'</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='letter_landscape'){ - echo "<option selected Value='letter_landscape'>" . _('Letter') . ' ' . _('landscape'); + echo '<option selected value="letter_landscape">' . _('Letter') . ' ' . _('landscape') .'</option>'; } else { - echo "<option value='letter_landscape'>" . _('Letter') . ' ' . _('landscape'); + echo '<option value="letter_landscape">' . _('Letter') . ' ' . _('landscape') .'</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='legal'){ - echo "<option selected value='legal'>" . _('Legal'); + echo '<option selected value="legal">' . _('Legal') .'</option>'; } else { - echo "<option Value='legal'>" . _('Legal'); + echo '<option value="legal">' . _('Legal') .'</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='legal_landscape'){ - echo "<option selected value='legal_landscape'>" . _('Legal') . ' ' . _('landscape'); + echo '<option selected value="legal_landscape">' . _('Legal') . ' ' . _('landscape') .'</option>'; } else { - echo "<option value='legal_landscape'>" . _('Legal') . ' ' . _('landscape'); + echo '<option value="legal_landscape">' . _('Legal') . ' ' . _('landscape') .'</option>'; } echo '</select></td></tr>'; echo '<tr> - <td>' . _('Theme') . ":</td> - <td><select name='Theme'>"; + <td>' . _('Theme') . ':</td> + <td><select name="Theme">'; $ThemeDirectory = dir('css/'); while (false != ($ThemeName = $ThemeDirectory->read())){ - if (is_dir("css/$ThemeName") AND $ThemeName != '.' AND $ThemeName != '..' AND $ThemeName != '.svn'){ + if (is_dir('css/' . $ThemeName) AND $ThemeName != '.' AND $ThemeName != '..' AND $ThemeName != '.svn'){ if (isset($_POST['Theme']) and $_POST['Theme'] == $ThemeName){ - echo "<option selected value='$ThemeName'>$ThemeName"; + echo '<option selected value="' . $ThemeName . '">' . $ThemeName .'</option>'; } else if (!isset($_POST['Theme']) and ($_SESSION['DefaultTheme']==$ThemeName)) { - echo "<option selected value='$ThemeName'>$ThemeName"; + echo '<option selected value="' . $ThemeName . '">' . $ThemeName .'</option>'; } else { - echo "<option value='$ThemeName'>$ThemeName"; + echo '<option value="' . $ThemeName . '">' . $ThemeName .'</option>'; } } } @@ -570,8 +571,8 @@ echo '<tr> - <td>' . _('Language') . ":</td> - <td><select name='UserLanguage'>"; + <td>' . _('Language') . ':</td> + <td><select name="UserLanguage">'; $LangDirHandle = dir('locale/'); @@ -581,11 +582,11 @@ if (is_dir('locale/' . $LanguageEntry) AND $LanguageEntry != '..' AND $LanguageEntry != 'CVS' AND $LanguageEntry!='.'){ if (isset($_POST['UserLanguage']) and $_POST['UserLanguage'] == $LanguageEntry){ - echo "<option selected value='$LanguageEntry'>$LanguageEntry"; + echo '<option selected value="' . $LanguageEntry . '">' . $LanguageEntry .'</option>'; } elseif (!isset($_POST['UserLanguage']) and $LanguageEntry == $DefaultLanguage) { - echo "<option selected value='$LanguageEntry'>$LanguageEntry"; + echo '<option selected value="' . $LanguageEntry . '">' . $LanguageEntry .'</option>'; } else { - echo "<option value='$LanguageEntry'>$LanguageEntry"; + echo '<option value="' . $LanguageEntry . '">' . $LanguageEntry .'</option>'; } } } @@ -599,7 +600,7 @@ $i=0; foreach($ModuleList as $ModuleName){ - echo '<tr><td>' . _('Display') . ' ' . $ModuleName . ' ' . _('options') . ": </td><td><select name='Module_" .... [truncated message content] |
From: <dai...@us...> - 2011-04-09 06:12:14
|
Revision: 4543 http://web-erp.svn.sourceforge.net/web-erp/?rev=4543&view=rev Author: daintree Date: 2011-04-09 06:12:05 +0000 (Sat, 09 Apr 2011) Log Message: ----------- SQL and xhtml quoting Modified Paths: -------------- trunk/ShipmentCosting.php trunk/Z_CreateCompanyTemplateFile.php trunk/Z_CurrencyDebtorsBalances.php trunk/Z_CurrencySuppliersBalances.php trunk/Z_DataExport.php trunk/Z_DeleteCreditNote.php trunk/Z_DeleteInvoice.php trunk/Z_ImportFixedAssets.php trunk/Z_ImportGLAccountGroups.php trunk/Z_ImportGLAccountSections.php trunk/Z_ImportPartCodes.php trunk/Z_MakeStockLocns.php trunk/Z_PriceChanges.php trunk/Z_ReApplyCostToSA.php trunk/Z_RePostGLFromPeriod.php trunk/Z_ReverseSuppPaymentRun.php trunk/Z_SalesIntegrityCheck.php trunk/Z_UpdateChartDetailsBFwd.php trunk/api/api_debtortransactions.php trunk/api/api_glgroups.php trunk/api/api_glsections.php trunk/api/api_locations.php trunk/api/api_login.php trunk/api/api_purchdata.php trunk/api/api_salestypes.php trunk/api/api_stockcategories.php trunk/includes/SQL_CommonFunctions.inc Modified: trunk/ShipmentCosting.php =================================================================== --- trunk/ShipmentCosting.php 2011-04-08 23:37:01 UTC (rev 4542) +++ trunk/ShipmentCosting.php 2011-04-09 06:12:05 UTC (rev 4543) @@ -321,8 +321,9 @@ if ($TotalQuantityOnHand>0) { $CostIncrement = ($myrow['totqtyinvoiced'] *($ItemShipmentCost - $StdCostUnit) - $WriteOffToVariances) / $TotalQuantityOnHand; - $sql = 'UPDATE stockmaster SET lastcost=materialcost+overheadcost+labourcost, - materialcost=materialcost+' . $CostIncrement . " WHERE stockid='" . $myrow['itemcode'] . "'"; + $sql = "UPDATE stockmaster SET lastcost=materialcost+overheadcost+labourcost, + materialcost=materialcost+" . $CostIncrement . " + WHERE stockid='" . $myrow['itemcode'] . "'"; $Result = DB_query($sql, $db, $ErrMsg, $DbgMsg,'',TRUE); } else { $sql = "UPDATE stockmaster SET lastcost=materialcost+overheadcost+labourcost, @@ -385,7 +386,7 @@ if ($_SESSION['CompanyRecord']['gllink_stock']==1){ $CostUpdateNo = GetNextTransNo(35, $db); - $PeriodNo = GetPeriod(Date("d/m/Y"), $db); + $PeriodNo = GetPeriod(Date('d/m/Y'), $db); $ValueOfChange = $QOH * ($ItemShipmentCost - $StdCostUnit); Modified: trunk/Z_CreateCompanyTemplateFile.php =================================================================== --- trunk/Z_CreateCompanyTemplateFile.php 2011-04-08 23:37:01 UTC (rev 4542) +++ trunk/Z_CreateCompanyTemplateFile.php 2011-04-09 06:12:05 UTC (rev 4543) @@ -1,8 +1,6 @@ <?php /* $Id$*/ -//$PageSecurity =15; - include ('includes/session.inc'); $title = _('Create Database Template File'); include ('includes/header.inc'); @@ -15,20 +13,20 @@ } if ($InputError==false){ - $CurrResult = DB_query( 'SELECT currabrev, - currency, - country, - debtorsact, - creditorsact, - payrollact, - grnact, - exchangediffact, - purchasesexchangediffact, - retainedearnings, - freightact - FROM currencies INNER JOIN companies - ON companies.currencydefault=currencies.currabrev - WHERE coycode=1',$db); + $CurrResult = DB_query( "SELECT currabrev, + currency, + country, + debtorsact, + creditorsact, + payrollact, + grnact, + exchangediffact, + purchasesexchangediffact, + retainedearnings, + freightact + FROM currencies INNER JOIN companies + ON companies.currencydefault=currencies.currabrev + WHERE coycode='1'",$db); $CurrRow = DB_fetch_array($CurrResult); @@ -46,7 +44,7 @@ purchasesexchangediffact=" . $CurrRow['purchasesexchangediffact'] . ", retainedearnings=" . $CurrRow['retainedearnings'] . ", freightact=" . $CurrRow['freightact'] . " - WHERE coycode=1;\n"; + WHERE coycode='1';\n"; /*empty out any existing records in chartmaster, @@ -67,12 +65,12 @@ $SQLScript .= "TRUNCATE TABLE taxcategories;\n"; $SQLScript .= "TRUNCATE TABLE taxprovinces;\n"; - $GroupsResult = DB_query('SELECT groupname, - sectioninaccounts, - pandl, - sequenceintb, - parentgroupname - FROM accountgroups',$db); + $GroupsResult = DB_query("SELECT groupname, + sectioninaccounts, + pandl, + sequenceintb, + parentgroupname + FROM accountgroups",$db); while ($GroupRow = DB_fetch_array($GroupsResult)){ $SQLScript .= "INSERT INTO accountgroups (groupname,sectioninaccounts,pandl, sequenceintb, parentgroupname) @@ -83,13 +81,15 @@ '" . $GroupRow['parentgroupname'] . "');\n"; } - $ChartResult = DB_query('SELECT accountcode, accountname, group_ FROM chartmaster',$db); + $ChartResult = DB_query("SELECT accountcode, accountname, group_ FROM chartmaster",$db); $i=0; while ($ChartRow = DB_fetch_array($ChartResult)){ if ($_POST['IncludeAccount_' .$i]=='on'){ $SQLScript .= "INSERT INTO chartmaster (accountcode,accountname,group_) - VALUES (" . $ChartRow['accountcode'] . ", '" . $ChartRow['accountname'] . "', '" . $ChartRow['group_'] . "');\n"; + VALUES ('" . $ChartRow['accountcode'] . "', + '" . $ChartRow['accountname'] . "', + '" . $ChartRow['group_'] . "');\n"; } $i++; } @@ -98,14 +98,14 @@ /*Tax Authorities table */ $TaxAuthoritiesResult = DB_query("SELECT taxid, - description, - taxglcode, - purchtaxglaccount, - bank, - bankacctype, - bankacc, - bankswift - FROM taxauthorities",$db); + description, + taxglcode, + purchtaxglaccount, + bank, + bankacctype, + bankacc, + bankswift + FROM taxauthorities",$db); while ($TaxAuthoritiesRow = DB_fetch_array($TaxAuthoritiesResult)){ $SQLScript .= "INSERT INTO taxauthorities (taxid, @@ -127,11 +127,11 @@ } /*taxauthrates table */ - $TaxAuthRatesResult = DB_query('SELECT taxauthority, - dispatchtaxprovince, - taxcatid, - taxrate - FROM taxauthrates',$db); + $TaxAuthRatesResult = DB_query("SELECT taxauthority, + dispatchtaxprovince, + taxcatid, + taxrate + FROM taxauthrates",$db); while ($TaxAuthRatesRow = DB_fetch_array($TaxAuthRatesResult)){ $SQLScript .= "INSERT INTO taxauthrates (taxauthority, @@ -145,20 +145,20 @@ } /*taxgroups table */ - $TaxGroupsResult = DB_query('SELECT taxgroupid, - taxgroupdescription - FROM taxgroups',$db); + $TaxGroupsResult = DB_query("SELECT taxgroupid, + taxgroupdescription + FROM taxgroups",$db); while ($TaxGroupsRow = DB_fetch_array($TaxGroupsResult)){ $SQLScript .= "INSERT INTO taxgroups (taxgroupid, taxgroupdescription) - VALUES (" . $TaxGroupsRow['taxgroupid'] . ", + VALUES ('" . $TaxGroupsRow['taxgroupid'] . "', '" . $TaxGroupsRow['taxgroupdescription'] . "');\n"; } /*tax categories table */ - $TaxCategoriesResult = DB_query('SELECT taxcatid, - taxcatname - FROM taxcategories',$db); + $TaxCategoriesResult = DB_query("SELECT taxcatid, + taxcatname + FROM taxcategories",$db); while ($TaxCategoriesRow = DB_fetch_array($TaxCategoriesResult)){ $SQLScript .= "INSERT INTO taxcategories (taxcatid, @@ -167,9 +167,9 @@ '" . $TaxCategoriesRow['taxcatname'] . "');\n"; } /*tax provinces table */ - $TaxProvincesResult = DB_query('SELECT taxprovinceid, - taxprovincename - FROM taxprovinces',$db); + $TaxProvincesResult = DB_query("SELECT taxprovinceid, + taxprovincename + FROM taxprovinces",$db); while ($TaxProvincesRow = DB_fetch_array($TaxProvincesResult)){ $SQLScript .= "INSERT INTO taxprovinces (taxprovinceid, @@ -178,11 +178,11 @@ '" . $TaxProvincesRow['taxprovincename'] . "');\n"; } /*taxgroup taxes table */ - $TaxGroupTaxesResult = DB_query('SELECT taxgroupid, - taxauthid, - calculationorder, - taxontax - FROM taxgrouptaxes',$db); + $TaxGroupTaxesResult = DB_query("SELECT taxgroupid, + taxauthid, + calculationorder, + taxontax + FROM taxgrouptaxes",$db); while ($TaxGroupTaxesRow = DB_fetch_array($TaxGroupTaxesResult)){ $SQLScript .= "INSERT INTO taxgrouptaxes (taxgroupid, @@ -194,7 +194,7 @@ " . $TaxGroupTaxesRow['calculationorder'] . ", " . $TaxGroupTaxesRow['taxontax'] . ");\n"; } - $SQLScript .= 'SET FOREIGN_KEY_CHECKS=1;'; + $SQLScript .= "SET FOREIGN_KEY_CHECKS=1;"; /*Now write $SQLScript to a file */ $FileHandle = fopen("./companies/" . $_SESSION['DatabaseName'] . "/reports/" . $_POST['TemplateName'] .".sql","w"); fwrite ($FileHandle, $SQLScript); @@ -225,10 +225,10 @@ echo '<table>'; /*Show the chart of accounts to be exported for deslection of company specific ones */ -$ChartResult = DB_query('SELECT accountcode, accountname, group_ FROM chartmaster',$db); +$ChartResult = DB_query("SELECT accountcode, accountname, group_ FROM chartmaster",$db); $TableHeadings = '<tr><th>' . _('Account Code') . '</th> - <th>' . _('Account Name') . '</th></tr>'; + <th>' . _('Account Name') . '</th></tr>'; $i = 0; while ($ChartRow = DB_fetch_array($ChartResult)){ echo '<tr><td>' . $ChartRow['accountcode'] . '</td> Modified: trunk/Z_CurrencyDebtorsBalances.php =================================================================== --- trunk/Z_CurrencyDebtorsBalances.php 2011-04-08 23:37:01 UTC (rev 4542) +++ trunk/Z_CurrencyDebtorsBalances.php 2011-04-09 06:12:05 UTC (rev 4543) @@ -1,6 +1,5 @@ <?php /* $Id$*/ -//$PageSecurity=15; include('includes/session.inc'); $title=_('Currency Debtor Balances'); @@ -8,12 +7,12 @@ echo '<font size=4><b>' . _('Debtors Balances By Currency Totals') . '</b></font>'; -$sql = 'SELECT SUM(ovamount+ovgst+ovdiscount+ovfreight-alloc) AS currencybalance, +$sql = "SELECT SUM(ovamount+ovgst+ovdiscount+ovfreight-alloc) AS currencybalance, currcode, SUM((ovamount+ovgst+ovdiscount+ovfreight-alloc)/rate) AS localbalance FROM debtortrans INNER JOIN debtorsmaster ON debtortrans.debtorno=debtorsmaster.debtorno - WHERE (ovamount+ovgst+ovdiscount+ovfreight-alloc)<>0 GROUP BY currcode'; + WHERE (ovamount+ovgst+ovdiscount+ovfreight-alloc)<>0 GROUP BY currcode"; $result = DB_query($sql,$db); Modified: trunk/Z_CurrencySuppliersBalances.php =================================================================== --- trunk/Z_CurrencySuppliersBalances.php 2011-04-08 23:37:01 UTC (rev 4542) +++ trunk/Z_CurrencySuppliersBalances.php 2011-04-09 06:12:05 UTC (rev 4543) @@ -1,6 +1,5 @@ <?php /* $Id$*/ -//$PageSecurity=15; include('includes/session.inc'); $title=_('Currency Debtor Balances'); @@ -8,11 +7,11 @@ echo '<font size=4><b>' . _('Suppliers Balances By Currency Totals') . '</b></font>'; -$sql = 'SELECT SUM(ovamount+ovgst-alloc) AS currencybalance, +$sql = "SELECT SUM(ovamount+ovgst-alloc) AS currencybalance, currcode, SUM((ovamount+ovgst-alloc)/rate) AS localbalance FROM supptrans INNER JOIN suppliers ON supptrans.supplierno=suppliers.supplierid - WHERE (ovamount+ovgst-alloc)<>0 GROUP BY currcode'; + WHERE (ovamount+ovgst-alloc)<>0 GROUP BY currcode"; $result = DB_query($sql,$db); Modified: trunk/Z_DataExport.php =================================================================== --- trunk/Z_DataExport.php 2011-04-08 23:37:01 UTC (rev 4542) +++ trunk/Z_DataExport.php 2011-04-09 06:12:05 UTC (rev 4543) @@ -2,7 +2,6 @@ /* $Id$*/ -//$PageSecurity=15; include('includes/session.inc'); @@ -70,9 +69,9 @@ $title = _('Price List Export Problem ....'); include('includes/header.inc'); prnMsg( _('The Price List 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; @@ -166,9 +165,9 @@ $title = _('Customer List Export Problem ....'); include('includes/header.inc'); prnMsg( _('The Customer List 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">'. _('Back to the menu'). '</a>'; if ($debug==1){ - echo '<br>'. $SQL; + echo '<br />'. $SQL; } include('includes/footer.inc'); exit; @@ -257,9 +256,9 @@ $title = _('Salesman List Export Problem ....'); include('includes/header.inc'); prnMsg( _('The Salesman List 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">'. _('Back to the menu'). '</a>'; if ($debug==1){ - echo '<br>'. $SQL; + echo '<br />'. $SQL; } include('includes/footer.inc'); exit; @@ -306,9 +305,9 @@ $title = _('Security Token List Export Problem ....'); include('includes/header.inc'); prnMsg( _('The Image List 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">'. _('Back to the menu'). '</a>'; if ($debug==1){ - echo '<br>'. $SQL; + echo '<br />'. $SQL; } include('includes/footer.inc'); exit; @@ -345,9 +344,9 @@ $title = _('Security Token List Export Problem ....'); include('includes/header.inc'); prnMsg( _('The Security Token List 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; @@ -381,9 +380,9 @@ $title = _('Security Role List Export Problem ....'); include('includes/header.inc'); prnMsg( _('The Security Role List 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">'. _('Back to the menu'). '</a>'; if ($debug==1){ - echo '<br>'. $SQL; + echo '<br />'. $SQL; } include('includes/footer.inc'); exit; @@ -417,9 +416,9 @@ $title = _('Security Group List Export Problem ....'); include('includes/header.inc'); prnMsg( _('The Security Group List 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; @@ -469,9 +468,9 @@ $title = _('Security User List Export Problem ....'); include('includes/header.inc'); prnMsg( _('The Security User List 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">'. _('Back to the menu'). '</a>'; if ($debug==1){ - echo '<br>'. $SQL; + echo '<br />'. $SQL; } include('includes/footer.inc'); exit; @@ -532,8 +531,8 @@ // SELECT EXPORT FOR PRICE LIST - echo "<br>"; - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . "?" . SID . ">"; + echo '<br />'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table>'; echo '<tr><th colspan=2>' . _('Price List Export') . '</th></tr>'; @@ -554,16 +553,16 @@ echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; } echo '</select></td></tr>'; - echo "</table>"; + echo '</table>'; echo "<div class='centre'><input type='Submit' name='pricelist' value='" . _('Export') . "'></div>"; - echo "</form><br>"; + echo '</form><br />'; // SELECT EXPORT FOR CUSTOMER LIST - echo "<br>"; + echo "<br />"; // Export Stock For Location - 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>'; echo '<tr><th colspan=2>' . _('Customer List Export') . '</th></tr>'; @@ -576,66 +575,66 @@ echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; } echo '</select></td></tr>'; - echo "</table>"; + echo '</table>'; echo "<div class='centre'><input type='Submit' name='custlist' value='" . _('Export') . "'></div>"; - echo "</form><br>"; + echo '</form><br />'; // SELECT EXPORT FOR SALES MAN - echo "<br>"; + echo "<br />"; // Export Stock For Location - 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>'; echo '<tr><th colspan=2>' . _('Salesman List Export') . '</th></tr>'; - echo "</table>"; + echo '</table>'; echo "<div class='centre'><div class='centre'><input type='Submit' name='salesmanlist' value='" . _('Export') . "'></div>"; - echo "</form><br>"; + echo '</form><br />'; // SELECT EXPORT FOR IMAGES - 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>'; echo '<tr><th colspan=2>' . _('Image List Export') . '</th></tr>'; - echo "</table>"; + echo '</table>'; echo "<div class='centre'><input type='Submit' name='imagelist' value='" . _('Export') . "'></div>"; - echo "</form><br>"; + echo '</form><br />'; // SELECT EXPORT SECURITY TOKENS - 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>'; echo '<tr><th colspan=2>' . _('Security Token List Export') . '</th></tr>'; - echo "</table>"; + echo '</table>'; echo "<div class='centre'><input type='Submit' name='sectokenlist' value='" . _('Export') . "'></div>"; - echo "</form><br>"; + echo '</form><br />'; // SELECT EXPORT SECURITY ROLES - 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>'; echo '<tr><th colspan=2>' . _('Security Role List Export') . '</th></tr>'; - echo "</table>"; + echo '</table>'; echo "<div class='centre'><input type='Submit' name='secrolelist' value='" . _('Export') . "'></div>"; - echo "</form><br>"; + echo '</form><br />'; // SELECT EXPORT SECURITY GROUPS - 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>'; echo '<tr><th colspan=2>' . _('Security Group List Export') . '</th></tr>'; - echo "</table>"; + echo '</table>'; echo "<div class='centre'><input type='Submit' name='secgrouplist' value='" . _('Export') . "'></div>"; - echo "</form><br>"; + echo '</form><br />'; // SELECT EXPORT SECURITY USERS - 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>'; echo '<tr><th colspan=2>' . _('Security User List Export') . '</th></tr>'; - echo "</table>"; - echo "<div class='centre'><input type='Submit' name='secuserlist' value='" . _('Export') . "'></div>"; - echo "</form><br>"; + echo '</table>'; + echo '<div class="centre"><input type="Submit" name="secuserlist" value="' . _('Export') . '"></div>'; + echo '</form><br />'; include('includes/footer.inc'); Modified: trunk/Z_DeleteCreditNote.php =================================================================== --- trunk/Z_DeleteCreditNote.php 2011-04-08 23:37:01 UTC (rev 4542) +++ trunk/Z_DeleteCreditNote.php 2011-04-09 06:12:05 UTC (rev 4543) @@ -5,11 +5,12 @@ /* Script to delete a credit note - it expects and credit note number to delete not included on any menu for obvious reasons +STRONGLY RECOMMEND NOT USING THIS - RE INVOICE INSTEAD + must be called directly with path/DeleteCreditnote.php?CreditNoteNo=??????? !! */ -//$PageSecurity=15; include ('includes/session.inc'); $title = _('Delete Credit Note'); @@ -21,7 +22,7 @@ } /*get the order number that was credited */ -$SQL = 'SELECT order_ FROM debtortrans WHERE transno=' . $_GET['CreditNoteNo'] . ' AND type=11'; +$SQL = "SELECT order_ FROM debtortrans WHERE transno='" . $_GET['CreditNoteNo'] . "' AND type='11'"; $Result = DB_query($SQL, $db); $myrow = DB_fetch_row($Result); @@ -29,14 +30,14 @@ /*Now get the stock movements that were credited into an array */ -$SQL = 'SELECT stockid, - loccode, - debtorno, - branchcode, - prd, - qty - FROM stockmoves - WHERE transno =' .$_GET['CreditNoteNo'] . ' AND type=11'; +$SQL = "SELECT stockid, + loccode, + debtorno, + branchcode, + prd, + qty + FROM stockmoves + WHERE transno ='" .$_GET['CreditNoteNo'] . "' AND type='11'"; $Result = DB_query($SQL,$db); $i=0; @@ -72,8 +73,8 @@ /*reverse the update to LocStock */ $SQL = "UPDATE locstock SET locstock.quantity = locstock.quantity + " . $CreditLine['qty'] . " - WHERE locstock.stockid = '" . $CreditLine['stockid'] . "' - AND loccode = '" . $CreditLine['loccode'] . "'"; + WHERE locstock.stockid = '" . $CreditLine['stockid'] . "' + AND loccode = '" . $CreditLine['loccode'] . "'"; $ErrMsg = _('SQL to reverse update to the location stock records failed with the error'); @@ -100,7 +101,7 @@ $ErrMsg = _('SQL to delete the stock movement record failed with the message'); $Result = DB_query($SQL, $db,$ErrMsg,$DbgMsg,true); prnMsg(_('Deleted the credit note stock movements').'info'); -echo '<br><br>'; +echo '<br /><br />'; $result = DB_Txn_Commit($db); prnMsg(_('Credit note number') . ' ' . $_GET['CreditNoteNo'] . ' ' . _('has been completely deleted') . '. ' . _('To ensure the integrity of the general ledger transactions must be reposted from the period the credit note was created'),'info'); Modified: trunk/Z_DeleteInvoice.php =================================================================== --- trunk/Z_DeleteInvoice.php 2011-04-08 23:37:01 UTC (rev 4542) +++ trunk/Z_DeleteInvoice.php 2011-04-09 06:12:05 UTC (rev 4543) @@ -4,9 +4,12 @@ /* Script to delete an invoice expects and invoice number to delete not included on any menu for obvious reasons +* +* STRONGLY RECOMMEND NOT USING THIS -CREDIT THE INVOICE AND RE INVOICE +* * +* This page must be called directly using path/Z_DeleteInvoice.php?InvoiceNo=????? !! */ -//$PageSecurity=15; include ('includes/session.inc'); $title = _('Delete Invoice'); @@ -19,9 +22,10 @@ } /*Get the order number that was invoiced */ -$SQL = 'SELECT order_ - FROM debtortrans - WHERE debtortrans.type = 10 and transno = ' . $_GET['InvoiceNo']; +$SQL = "SELECT order_ + FROM debtortrans + WHERE debtortrans.type = 10 + AND transno = '" . $_GET['InvoiceNo'] . "'"; $Result = DB_query($SQL,$db); $myrow = DB_fetch_row($Result); @@ -40,7 +44,7 @@ // mbflag // We now use fully qualified column names -$SQL = 'SELECT stockmoves.stockid, +$SQL = "SELECT stockmoves.stockid, stockmoves.loccode, stockmoves.debtorno, stockmoves.branchcode, @@ -49,7 +53,7 @@ stockmaster.mbflag FROM stockmoves INNER JOIN stockmaster ON stockmoves.stockid = stockmaster.stockid - WHERE transno =' .$_GET['InvoiceNo'] . ' AND type=10'; + WHERE transno ='" .$_GET['InvoiceNo'] . "' AND type=10"; $Result = DB_query($SQL,$db); @@ -77,9 +81,9 @@ /*Now delete the DebtorTrans */ -$SQL = 'DELETE FROM debtortrans - WHERE transno =' . $_GET['InvoiceNo'] . ' - AND debtortrans.type=10'; +$SQL = "DELETE FROM debtortrans + WHERE transno ='" . $_GET['InvoiceNo'] . "' + AND debtortrans.type=10"; $DbgMsg = _('The SQL that failed was'); $ErrMsg = _('The debtorTrans record could not be deleted') . ' - ' . _('the sql server returned the following error'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); Modified: trunk/Z_ImportFixedAssets.php =================================================================== --- trunk/Z_ImportFixedAssets.php 2011-04-08 23:37:01 UTC (rev 4542) +++ trunk/Z_ImportFixedAssets.php 2011-04-09 06:12:05 UTC (rev 4543) @@ -2,7 +2,6 @@ /* $Id: $*/ /* Script to import fixed assets into a specified period*/ -//$PageSecurity = 15; include('includes/session.inc'); $title = _('Import Fixed Assets'); include('includes/header.inc'); @@ -122,57 +121,57 @@ if (strlen($Description)==0 OR strlen($Description)>50){ prnMsg('The description of the asset is expected to be more than 3 characters long and less than 50 characters long','error'); - echo '<br>' . _('Row:') . $Row . ' - ' . _('Invalid Description:') . ' ' . $Description; + echo '<br />' . _('Row:') . $Row . ' - ' . _('Invalid Description:') . ' ' . $Description; $InputError=true; } if (!is_numeric($DepnRate)){ prnMsg(_('The depreciation rate is expected to be numeric'),'error'); - echo '<br>' . _('Row:') . $Row . ' - ' . _('Invalid Depreciation Rate:') . ' ' . $DepnRate; + echo '<br />' . _('Row:') . $Row . ' - ' . _('Invalid Depreciation Rate:') . ' ' . $DepnRate; $InputError=true; }elseif ($DepnRate<0 OR $DepnRate>100){ prnMsg(_('The depreciation rate is expected to be a number between 0 and 100'),'error'); - echo '<br>' . _('Row:') . $Row . ' - ' ._('Invalid Depreciation Rate:') . ' ' . $DepnRate; + echo '<br />' . _('Row:') . $Row . ' - ' ._('Invalid Depreci... [truncated message content] |
From: <dai...@us...> - 2011-04-09 06:12:13
|
Revision: 4543 http://web-erp.svn.sourceforge.net/web-erp/?rev=4543&view=rev Author: daintree Date: 2011-04-09 06:12:05 +0000 (Sat, 09 Apr 2011) Log Message: ----------- SQL and xhtml quoting Modified Paths: -------------- trunk/ShipmentCosting.php trunk/Z_CreateCompanyTemplateFile.php trunk/Z_CurrencyDebtorsBalances.php trunk/Z_CurrencySuppliersBalances.php trunk/Z_DataExport.php trunk/Z_DeleteCreditNote.php trunk/Z_DeleteInvoice.php trunk/Z_ImportFixedAssets.php trunk/Z_ImportGLAccountGroups.php trunk/Z_ImportGLAccountSections.php trunk/Z_ImportPartCodes.php trunk/Z_MakeStockLocns.php trunk/Z_PriceChanges.php trunk/Z_ReApplyCostToSA.php trunk/Z_RePostGLFromPeriod.php trunk/Z_ReverseSuppPaymentRun.php trunk/Z_SalesIntegrityCheck.php trunk/Z_UpdateChartDetailsBFwd.php trunk/api/api_debtortransactions.php trunk/api/api_glgroups.php trunk/api/api_glsections.php trunk/api/api_locations.php trunk/api/api_login.php trunk/api/api_purchdata.php trunk/api/api_salestypes.php trunk/api/api_stockcategories.php trunk/includes/SQL_CommonFunctions.inc Modified: trunk/ShipmentCosting.php =================================================================== --- trunk/ShipmentCosting.php 2011-04-08 23:37:01 UTC (rev 4542) +++ trunk/ShipmentCosting.php 2011-04-09 06:12:05 UTC (rev 4543) @@ -321,8 +321,9 @@ if ($TotalQuantityOnHand>0) { $CostIncrement = ($myrow['totqtyinvoiced'] *($ItemShipmentCost - $StdCostUnit) - $WriteOffToVariances) / $TotalQuantityOnHand; - $sql = 'UPDATE stockmaster SET lastcost=materialcost+overheadcost+labourcost, - materialcost=materialcost+' . $CostIncrement . " WHERE stockid='" . $myrow['itemcode'] . "'"; + $sql = "UPDATE stockmaster SET lastcost=materialcost+overheadcost+labourcost, + materialcost=materialcost+" . $CostIncrement . " + WHERE stockid='" . $myrow['itemcode'] . "'"; $Result = DB_query($sql, $db, $ErrMsg, $DbgMsg,'',TRUE); } else { $sql = "UPDATE stockmaster SET lastcost=materialcost+overheadcost+labourcost, @@ -385,7 +386,7 @@ if ($_SESSION['CompanyRecord']['gllink_stock']==1){ $CostUpdateNo = GetNextTransNo(35, $db); - $PeriodNo = GetPeriod(Date("d/m/Y"), $db); + $PeriodNo = GetPeriod(Date('d/m/Y'), $db); $ValueOfChange = $QOH * ($ItemShipmentCost - $StdCostUnit); Modified: trunk/Z_CreateCompanyTemplateFile.php =================================================================== --- trunk/Z_CreateCompanyTemplateFile.php 2011-04-08 23:37:01 UTC (rev 4542) +++ trunk/Z_CreateCompanyTemplateFile.php 2011-04-09 06:12:05 UTC (rev 4543) @@ -1,8 +1,6 @@ <?php /* $Id$*/ -//$PageSecurity =15; - include ('includes/session.inc'); $title = _('Create Database Template File'); include ('includes/header.inc'); @@ -15,20 +13,20 @@ } if ($InputError==false){ - $CurrResult = DB_query( 'SELECT currabrev, - currency, - country, - debtorsact, - creditorsact, - payrollact, - grnact, - exchangediffact, - purchasesexchangediffact, - retainedearnings, - freightact - FROM currencies INNER JOIN companies - ON companies.currencydefault=currencies.currabrev - WHERE coycode=1',$db); + $CurrResult = DB_query( "SELECT currabrev, + currency, + country, + debtorsact, + creditorsact, + payrollact, + grnact, + exchangediffact, + purchasesexchangediffact, + retainedearnings, + freightact + FROM currencies INNER JOIN companies + ON companies.currencydefault=currencies.currabrev + WHERE coycode='1'",$db); $CurrRow = DB_fetch_array($CurrResult); @@ -46,7 +44,7 @@ purchasesexchangediffact=" . $CurrRow['purchasesexchangediffact'] . ", retainedearnings=" . $CurrRow['retainedearnings'] . ", freightact=" . $CurrRow['freightact'] . " - WHERE coycode=1;\n"; + WHERE coycode='1';\n"; /*empty out any existing records in chartmaster, @@ -67,12 +65,12 @@ $SQLScript .= "TRUNCATE TABLE taxcategories;\n"; $SQLScript .= "TRUNCATE TABLE taxprovinces;\n"; - $GroupsResult = DB_query('SELECT groupname, - sectioninaccounts, - pandl, - sequenceintb, - parentgroupname - FROM accountgroups',$db); + $GroupsResult = DB_query("SELECT groupname, + sectioninaccounts, + pandl, + sequenceintb, + parentgroupname + FROM accountgroups",$db); while ($GroupRow = DB_fetch_array($GroupsResult)){ $SQLScript .= "INSERT INTO accountgroups (groupname,sectioninaccounts,pandl, sequenceintb, parentgroupname) @@ -83,13 +81,15 @@ '" . $GroupRow['parentgroupname'] . "');\n"; } - $ChartResult = DB_query('SELECT accountcode, accountname, group_ FROM chartmaster',$db); + $ChartResult = DB_query("SELECT accountcode, accountname, group_ FROM chartmaster",$db); $i=0; while ($ChartRow = DB_fetch_array($ChartResult)){ if ($_POST['IncludeAccount_' .$i]=='on'){ $SQLScript .= "INSERT INTO chartmaster (accountcode,accountname,group_) - VALUES (" . $ChartRow['accountcode'] . ", '" . $ChartRow['accountname'] . "', '" . $ChartRow['group_'] . "');\n"; + VALUES ('" . $ChartRow['accountcode'] . "', + '" . $ChartRow['accountname'] . "', + '" . $ChartRow['group_'] . "');\n"; } $i++; } @@ -98,14 +98,14 @@ /*Tax Authorities table */ $TaxAuthoritiesResult = DB_query("SELECT taxid, - description, - taxglcode, - purchtaxglaccount, - bank, - bankacctype, - bankacc, - bankswift - FROM taxauthorities",$db); + description, + taxglcode, + purchtaxglaccount, + bank, + bankacctype, + bankacc, + bankswift + FROM taxauthorities",$db); while ($TaxAuthoritiesRow = DB_fetch_array($TaxAuthoritiesResult)){ $SQLScript .= "INSERT INTO taxauthorities (taxid, @@ -127,11 +127,11 @@ } /*taxauthrates table */ - $TaxAuthRatesResult = DB_query('SELECT taxauthority, - dispatchtaxprovince, - taxcatid, - taxrate - FROM taxauthrates',$db); + $TaxAuthRatesResult = DB_query("SELECT taxauthority, + dispatchtaxprovince, + taxcatid, + taxrate + FROM taxauthrates",$db); while ($TaxAuthRatesRow = DB_fetch_array($TaxAuthRatesResult)){ $SQLScript .= "INSERT INTO taxauthrates (taxauthority, @@ -145,20 +145,20 @@ } /*taxgroups table */ - $TaxGroupsResult = DB_query('SELECT taxgroupid, - taxgroupdescription - FROM taxgroups',$db); + $TaxGroupsResult = DB_query("SELECT taxgroupid, + taxgroupdescription + FROM taxgroups",$db); while ($TaxGroupsRow = DB_fetch_array($TaxGroupsResult)){ $SQLScript .= "INSERT INTO taxgroups (taxgroupid, taxgroupdescription) - VALUES (" . $TaxGroupsRow['taxgroupid'] . ", + VALUES ('" . $TaxGroupsRow['taxgroupid'] . "', '" . $TaxGroupsRow['taxgroupdescription'] . "');\n"; } /*tax categories table */ - $TaxCategoriesResult = DB_query('SELECT taxcatid, - taxcatname - FROM taxcategories',$db); + $TaxCategoriesResult = DB_query("SELECT taxcatid, + taxcatname + FROM taxcategories",$db); while ($TaxCategoriesRow = DB_fetch_array($TaxCategoriesResult)){ $SQLScript .= "INSERT INTO taxcategories (taxcatid, @@ -167,9 +167,9 @@ '" . $TaxCategoriesRow['taxcatname'] . "');\n"; } /*tax provinces table */ - $TaxProvincesResult = DB_query('SELECT taxprovinceid, - taxprovincename - FROM taxprovinces',$db); + $TaxProvincesResult = DB_query("SELECT taxprovinceid, + taxprovincename + FROM taxprovinces",$db); while ($TaxProvincesRow = DB_fetch_array($TaxProvincesResult)){ $SQLScript .= "INSERT INTO taxprovinces (taxprovinceid, @@ -178,11 +178,11 @@ '" . $TaxProvincesRow['taxprovincename'] . "');\n"; } /*taxgroup taxes table */ - $TaxGroupTaxesResult = DB_query('SELECT taxgroupid, - taxauthid, - calculationorder, - taxontax - FROM taxgrouptaxes',$db); + $TaxGroupTaxesResult = DB_query("SELECT taxgroupid, + taxauthid, + calculationorder, + taxontax + FROM taxgrouptaxes",$db); while ($TaxGroupTaxesRow = DB_fetch_array($TaxGroupTaxesResult)){ $SQLScript .= "INSERT INTO taxgrouptaxes (taxgroupid, @@ -194,7 +194,7 @@ " . $TaxGroupTaxesRow['calculationorder'] . ", " . $TaxGroupTaxesRow['taxontax'] . ");\n"; } - $SQLScript .= 'SET FOREIGN_KEY_CHECKS=1;'; + $SQLScript .= "SET FOREIGN_KEY_CHECKS=1;"; /*Now write $SQLScript to a file */ $FileHandle = fopen("./companies/" . $_SESSION['DatabaseName'] . "/reports/" . $_POST['TemplateName'] .".sql","w"); fwrite ($FileHandle, $SQLScript); @@ -225,10 +225,10 @@ echo '<table>'; /*Show the chart of accounts to be exported for deslection of company specific ones */ -$ChartResult = DB_query('SELECT accountcode, accountname, group_ FROM chartmaster',$db); +$ChartResult = DB_query("SELECT accountcode, accountname, group_ FROM chartmaster",$db); $TableHeadings = '<tr><th>' . _('Account Code') . '</th> - <th>' . _('Account Name') . '</th></tr>'; + <th>' . _('Account Name') . '</th></tr>'; $i = 0; while ($ChartRow = DB_fetch_array($ChartResult)){ echo '<tr><td>' . $ChartRow['accountcode'] . '</td> Modified: trunk/Z_CurrencyDebtorsBalances.php =================================================================== --- trunk/Z_CurrencyDebtorsBalances.php 2011-04-08 23:37:01 UTC (rev 4542) +++ trunk/Z_CurrencyDebtorsBalances.php 2011-04-09 06:12:05 UTC (rev 4543) @@ -1,6 +1,5 @@ <?php /* $Id$*/ -//$PageSecurity=15; include('includes/session.inc'); $title=_('Currency Debtor Balances'); @@ -8,12 +7,12 @@ echo '<font size=4><b>' . _('Debtors Balances By Currency Totals') . '</b></font>'; -$sql = 'SELECT SUM(ovamount+ovgst+ovdiscount+ovfreight-alloc) AS currencybalance, +$sql = "SELECT SUM(ovamount+ovgst+ovdiscount+ovfreight-alloc) AS currencybalance, currcode, SUM((ovamount+ovgst+ovdiscount+ovfreight-alloc)/rate) AS localbalance FROM debtortrans INNER JOIN debtorsmaster ON debtortrans.debtorno=debtorsmaster.debtorno - WHERE (ovamount+ovgst+ovdiscount+ovfreight-alloc)<>0 GROUP BY currcode'; + WHERE (ovamount+ovgst+ovdiscount+ovfreight-alloc)<>0 GROUP BY currcode"; $result = DB_query($sql,$db); Modified: trunk/Z_CurrencySuppliersBalances.php =================================================================== --- trunk/Z_CurrencySuppliersBalances.php 2011-04-08 23:37:01 UTC (rev 4542) +++ trunk/Z_CurrencySuppliersBalances.php 2011-04-09 06:12:05 UTC (rev 4543) @@ -1,6 +1,5 @@ <?php /* $Id$*/ -//$PageSecurity=15; include('includes/session.inc'); $title=_('Currency Debtor Balances'); @@ -8,11 +7,11 @@ echo '<font size=4><b>' . _('Suppliers Balances By Currency Totals') . '</b></font>'; -$sql = 'SELECT SUM(ovamount+ovgst-alloc) AS currencybalance, +$sql = "SELECT SUM(ovamount+ovgst-alloc) AS currencybalance, currcode, SUM((ovamount+ovgst-alloc)/rate) AS localbalance FROM supptrans INNER JOIN suppliers ON supptrans.supplierno=suppliers.supplierid - WHERE (ovamount+ovgst-alloc)<>0 GROUP BY currcode'; + WHERE (ovamount+ovgst-alloc)<>0 GROUP BY currcode"; $result = DB_query($sql,$db); Modified: trunk/Z_DataExport.php =================================================================== --- trunk/Z_DataExport.php 2011-04-08 23:37:01 UTC (rev 4542) +++ trunk/Z_DataExport.php 2011-04-09 06:12:05 UTC (rev 4543) @@ -2,7 +2,6 @@ /* $Id$*/ -//$PageSecurity=15; include('includes/session.inc'); @@ -70,9 +69,9 @@ $title = _('Price List Export Problem ....'); include('includes/header.inc'); prnMsg( _('The Price List 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; @@ -166,9 +165,9 @@ $title = _('Customer List Export Problem ....'); include('includes/header.inc'); prnMsg( _('The Customer List 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">'. _('Back to the menu'). '</a>'; if ($debug==1){ - echo '<br>'. $SQL; + echo '<br />'. $SQL; } include('includes/footer.inc'); exit; @@ -257,9 +256,9 @@ $title = _('Salesman List Export Problem ....'); include('includes/header.inc'); prnMsg( _('The Salesman List 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">'. _('Back to the menu'). '</a>'; if ($debug==1){ - echo '<br>'. $SQL; + echo '<br />'. $SQL; } include('includes/footer.inc'); exit; @@ -306,9 +305,9 @@ $title = _('Security Token List Export Problem ....'); include('includes/header.inc'); prnMsg( _('The Image List 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">'. _('Back to the menu'). '</a>'; if ($debug==1){ - echo '<br>'. $SQL; + echo '<br />'. $SQL; } include('includes/footer.inc'); exit; @@ -345,9 +344,9 @@ $title = _('Security Token List Export Problem ....'); include('includes/header.inc'); prnMsg( _('The Security Token List 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; @@ -381,9 +380,9 @@ $title = _('Security Role List Export Problem ....'); include('includes/header.inc'); prnMsg( _('The Security Role List 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">'. _('Back to the menu'). '</a>'; if ($debug==1){ - echo '<br>'. $SQL; + echo '<br />'. $SQL; } include('includes/footer.inc'); exit; @@ -417,9 +416,9 @@ $title = _('Security Group List Export Problem ....'); include('includes/header.inc'); prnMsg( _('The Security Group List 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; @@ -469,9 +468,9 @@ $title = _('Security User List Export Problem ....'); include('includes/header.inc'); prnMsg( _('The Security User List 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">'. _('Back to the menu'). '</a>'; if ($debug==1){ - echo '<br>'. $SQL; + echo '<br />'. $SQL; } include('includes/footer.inc'); exit; @@ -532,8 +531,8 @@ // SELECT EXPORT FOR PRICE LIST - echo "<br>"; - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . "?" . SID . ">"; + echo '<br />'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table>'; echo '<tr><th colspan=2>' . _('Price List Export') . '</th></tr>'; @@ -554,16 +553,16 @@ echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; } echo '</select></td></tr>'; - echo "</table>"; + echo '</table>'; echo "<div class='centre'><input type='Submit' name='pricelist' value='" . _('Export') . "'></div>"; - echo "</form><br>"; + echo '</form><br />'; // SELECT EXPORT FOR CUSTOMER LIST - echo "<br>"; + echo "<br />"; // Export Stock For Location - 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>'; echo '<tr><th colspan=2>' . _('Customer List Export') . '</th></tr>'; @@ -576,66 +575,66 @@ echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; } echo '</select></td></tr>'; - echo "</table>"; + echo '</table>'; echo "<div class='centre'><input type='Submit' name='custlist' value='" . _('Export') . "'></div>"; - echo "</form><br>"; + echo '</form><br />'; // SELECT EXPORT FOR SALES MAN - echo "<br>"; + echo "<br />"; // Export Stock For Location - 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>'; echo '<tr><th colspan=2>' . _('Salesman List Export') . '</th></tr>'; - echo "</table>"; + echo '</table>'; echo "<div class='centre'><div class='centre'><input type='Submit' name='salesmanlist' value='" . _('Export') . "'></div>"; - echo "</form><br>"; + echo '</form><br />'; // SELECT EXPORT FOR IMAGES - 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>'; echo '<tr><th colspan=2>' . _('Image List Export') . '</th></tr>'; - echo "</table>"; + echo '</table>'; echo "<div class='centre'><input type='Submit' name='imagelist' value='" . _('Export') . "'></div>"; - echo "</form><br>"; + echo '</form><br />'; // SELECT EXPORT SECURITY TOKENS - 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>'; echo '<tr><th colspan=2>' . _('Security Token List Export') . '</th></tr>'; - echo "</table>"; + echo '</table>'; echo "<div class='centre'><input type='Submit' name='sectokenlist' value='" . _('Export') . "'></div>"; - echo "</form><br>"; + echo '</form><br />'; // SELECT EXPORT SECURITY ROLES - 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>'; echo '<tr><th colspan=2>' . _('Security Role List Export') . '</th></tr>'; - echo "</table>"; + echo '</table>'; echo "<div class='centre'><input type='Submit' name='secrolelist' value='" . _('Export') . "'></div>"; - echo "</form><br>"; + echo '</form><br />'; // SELECT EXPORT SECURITY GROUPS - 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>'; echo '<tr><th colspan=2>' . _('Security Group List Export') . '</th></tr>'; - echo "</table>"; + echo '</table>'; echo "<div class='centre'><input type='Submit' name='secgrouplist' value='" . _('Export') . "'></div>"; - echo "</form><br>"; + echo '</form><br />'; // SELECT EXPORT SECURITY USERS - 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>'; echo '<tr><th colspan=2>' . _('Security User List Export') . '</th></tr>'; - echo "</table>"; - echo "<div class='centre'><input type='Submit' name='secuserlist' value='" . _('Export') . "'></div>"; - echo "</form><br>"; + echo '</table>'; + echo '<div class="centre"><input type="Submit" name="secuserlist" value="' . _('Export') . '"></div>'; + echo '</form><br />'; include('includes/footer.inc'); Modified: trunk/Z_DeleteCreditNote.php =================================================================== --- trunk/Z_DeleteCreditNote.php 2011-04-08 23:37:01 UTC (rev 4542) +++ trunk/Z_DeleteCreditNote.php 2011-04-09 06:12:05 UTC (rev 4543) @@ -5,11 +5,12 @@ /* Script to delete a credit note - it expects and credit note number to delete not included on any menu for obvious reasons +STRONGLY RECOMMEND NOT USING THIS - RE INVOICE INSTEAD + must be called directly with path/DeleteCreditnote.php?CreditNoteNo=??????? !! */ -//$PageSecurity=15; include ('includes/session.inc'); $title = _('Delete Credit Note'); @@ -21,7 +22,7 @@ } /*get the order number that was credited */ -$SQL = 'SELECT order_ FROM debtortrans WHERE transno=' . $_GET['CreditNoteNo'] . ' AND type=11'; +$SQL = "SELECT order_ FROM debtortrans WHERE transno='" . $_GET['CreditNoteNo'] . "' AND type='11'"; $Result = DB_query($SQL, $db); $myrow = DB_fetch_row($Result); @@ -29,14 +30,14 @@ /*Now get the stock movements that were credited into an array */ -$SQL = 'SELECT stockid, - loccode, - debtorno, - branchcode, - prd, - qty - FROM stockmoves - WHERE transno =' .$_GET['CreditNoteNo'] . ' AND type=11'; +$SQL = "SELECT stockid, + loccode, + debtorno, + branchcode, + prd, + qty + FROM stockmoves + WHERE transno ='" .$_GET['CreditNoteNo'] . "' AND type='11'"; $Result = DB_query($SQL,$db); $i=0; @@ -72,8 +73,8 @@ /*reverse the update to LocStock */ $SQL = "UPDATE locstock SET locstock.quantity = locstock.quantity + " . $CreditLine['qty'] . " - WHERE locstock.stockid = '" . $CreditLine['stockid'] . "' - AND loccode = '" . $CreditLine['loccode'] . "'"; + WHERE locstock.stockid = '" . $CreditLine['stockid'] . "' + AND loccode = '" . $CreditLine['loccode'] . "'"; $ErrMsg = _('SQL to reverse update to the location stock records failed with the error'); @@ -100,7 +101,7 @@ $ErrMsg = _('SQL to delete the stock movement record failed with the message'); $Result = DB_query($SQL, $db,$ErrMsg,$DbgMsg,true); prnMsg(_('Deleted the credit note stock movements').'info'); -echo '<br><br>'; +echo '<br /><br />'; $result = DB_Txn_Commit($db); prnMsg(_('Credit note number') . ' ' . $_GET['CreditNoteNo'] . ' ' . _('has been completely deleted') . '. ' . _('To ensure the integrity of the general ledger transactions must be reposted from the period the credit note was created'),'info'); Modified: trunk/Z_DeleteInvoice.php =================================================================== --- trunk/Z_DeleteInvoice.php 2011-04-08 23:37:01 UTC (rev 4542) +++ trunk/Z_DeleteInvoice.php 2011-04-09 06:12:05 UTC (rev 4543) @@ -4,9 +4,12 @@ /* Script to delete an invoice expects and invoice number to delete not included on any menu for obvious reasons +* +* STRONGLY RECOMMEND NOT USING THIS -CREDIT THE INVOICE AND RE INVOICE +* * +* This page must be called directly using path/Z_DeleteInvoice.php?InvoiceNo=????? !! */ -//$PageSecurity=15; include ('includes/session.inc'); $title = _('Delete Invoice'); @@ -19,9 +22,10 @@ } /*Get the order number that was invoiced */ -$SQL = 'SELECT order_ - FROM debtortrans - WHERE debtortrans.type = 10 and transno = ' . $_GET['InvoiceNo']; +$SQL = "SELECT order_ + FROM debtortrans + WHERE debtortrans.type = 10 + AND transno = '" . $_GET['InvoiceNo'] . "'"; $Result = DB_query($SQL,$db); $myrow = DB_fetch_row($Result); @@ -40,7 +44,7 @@ // mbflag // We now use fully qualified column names -$SQL = 'SELECT stockmoves.stockid, +$SQL = "SELECT stockmoves.stockid, stockmoves.loccode, stockmoves.debtorno, stockmoves.branchcode, @@ -49,7 +53,7 @@ stockmaster.mbflag FROM stockmoves INNER JOIN stockmaster ON stockmoves.stockid = stockmaster.stockid - WHERE transno =' .$_GET['InvoiceNo'] . ' AND type=10'; + WHERE transno ='" .$_GET['InvoiceNo'] . "' AND type=10"; $Result = DB_query($SQL,$db); @@ -77,9 +81,9 @@ /*Now delete the DebtorTrans */ -$SQL = 'DELETE FROM debtortrans - WHERE transno =' . $_GET['InvoiceNo'] . ' - AND debtortrans.type=10'; +$SQL = "DELETE FROM debtortrans + WHERE transno ='" . $_GET['InvoiceNo'] . "' + AND debtortrans.type=10"; $DbgMsg = _('The SQL that failed was'); $ErrMsg = _('The debtorTrans record could not be deleted') . ' - ' . _('the sql server returned the following error'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); Modified: trunk/Z_ImportFixedAssets.php =================================================================== --- trunk/Z_ImportFixedAssets.php 2011-04-08 23:37:01 UTC (rev 4542) +++ trunk/Z_ImportFixedAssets.php 2011-04-09 06:12:05 UTC (rev 4543) @@ -2,7 +2,6 @@ /* $Id: $*/ /* Script to import fixed assets into a specified period*/ -//$PageSecurity = 15; include('includes/session.inc'); $title = _('Import Fixed Assets'); include('includes/header.inc'); @@ -122,57 +121,57 @@ if (strlen($Description)==0 OR strlen($Description)>50){ prnMsg('The description of the asset is expected to be more than 3 characters long and less than 50 characters long','error'); - echo '<br>' . _('Row:') . $Row . ' - ' . _('Invalid Description:') . ' ' . $Description; + echo '<br />' . _('Row:') . $Row . ' - ' . _('Invalid Description:') . ' ' . $Description; $InputError=true; } if (!is_numeric($DepnRate)){ prnMsg(_('The depreciation rate is expected to be numeric'),'error'); - echo '<br>' . _('Row:') . $Row . ' - ' . _('Invalid Depreciation Rate:') . ' ' . $DepnRate; + echo '<br />' . _('Row:') . $Row . ' - ' . _('Invalid Depreciation Rate:') . ' ' . $DepnRate; $InputError=true; }elseif ($DepnRate<0 OR $DepnRate>100){ prnMsg(_('The depreciation rate is expected to be a number between 0 and 100'),'error'); - echo '<br>' . _('Row:') . $Row . ' - ' ._('Invalid Depreciation Rate:') . ' ' . $DepnRate; + echo '<br />' . _('Row:') . $Row . ' - ' ._('Invalid Depreci... [truncated message content] |
From: <dai...@us...> - 2011-04-10 02:05:04
|
Revision: 4544 http://web-erp.svn.sourceforge.net/web-erp/?rev=4544&view=rev Author: daintree Date: 2011-04-10 02:04:57 +0000 (Sun, 10 Apr 2011) Log Message: ----------- Tim changes Modified Paths: -------------- trunk/PaymentMethods.php trunk/Payments.php trunk/Stocks.php trunk/doc/Change.log.html trunk/includes/ConnectDB.inc trunk/index.php trunk/sql/mysql/upgrade3.11.1-4.00.sql Added Paths: ----------- trunk/PDFPeriodStockTransListing.php trunk/includes/PDFPeriodStockTransListingPageHeader.inc Removed Paths: ------------- trunk/PDFStockTransListing.php trunk/includes/PDFStockTransListingPageHeader.inc Added: trunk/PDFPeriodStockTransListing.php =================================================================== --- trunk/PDFPeriodStockTransListing.php (rev 0) +++ trunk/PDFPeriodStockTransListing.php 2011-04-10 02:04:57 UTC (rev 4544) @@ -0,0 +1,203 @@ +<?php +/* $Id: PDFPeriodStockTransListing.php 4307 2010-12-22 16:06:03Z tim_schofield $*/ + + +include('includes/SQL_CommonFunctions.inc'); +include ('includes/session.inc'); + +$InputError=0; +if (isset($_POST['FromDate']) AND !Is_Date($_POST['FromDate'])){ + $msg = _('The date must be specified in the format') . ' ' . $_SESSION['DefaultDateFormat']; + $InputError=1; + unset($_POST['FromDate']); +} + +if (!isset($_POST['FromDate'])){ + + $title = _('Stock Transaction Listing'); + include ('includes/header.inc'); + + echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="">' . ' ' + . _('Stock Transaction Listing').'</img></p></div>'; + + if ($InputError==1){ + prnMsg($msg,'error'); + } + + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class=selection>'; + echo '<tr> + <td>' . _('Enter the date from which the transactions are to be listed') . ':</td> + <td><input type="text" name="FromDate" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + </tr>'; + echo '<tr> + <td>' . _('Enter the date to which the transactions are to be listed') . ':</td> + <td><input type=text name="ToDate" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + </tr>'; + + echo '<tr><td>' . _('Transaction type') . '</td><td>'; + + echo '<select name="TransType">'; + + echo '<option value=10>' . _('Sales Invoice').'</option> + <option value=11>' . _('Sales Credit Note').'</option> + <option value=16>' . _('Location Transfer').'</option> + <option value=17>' . _('Stock Adjustment').'</option> + <option value=25>' . _('Purchase Order Delivery').'</option> + <option value=26>' . _('Work Order Receipt').'</option> + <option value=28>' . _('Work Order Issue').'</option>'; + + echo '</select></td></tr>'; + + $sql = "SELECT loccode, locationname FROM locations"; + $resultStkLocs = DB_query($sql, $db); + + echo '<tr><td>' . _('For Stock Location') . ':</td> + <td><select name="StockLocation">'; + echo '<option VALUE="All">' . _('All') . '</option>'; + while ($myrow=DB_fetch_array($resultStkLocs)){ + if (isset($_POST['StockLocation']) AND $_POST['StockLocation']!='All'){ + if ($myrow['loccode'] == $_POST['StockLocation']){ + echo '<option selected VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } else { + echo '<option VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } + } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ + echo '<option selected VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + $_POST['StockLocation']=$myrow['loccode']; + } else { + echo '<option VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } + } + echo '</select></td></tr>'; + + echo '</table><br><div class="centre"><input type=submit name="Go" value="' . _('Create PDF') . '"></div>'; + + include('includes/footer.inc'); + exit; +} else { + + include('includes/ConnectDB.inc'); +} + + +if ($_POST['StockLocation']=='All') { + $sql= "SELECT stockmoves.type, + stockmoves.stockid, + stockmaster.description, + stockmaster.decimalplaces, + stockmoves.transno, + stockmoves.trandate, + stockmoves.qty, + stockmoves.reference, + stockmoves.narrative, + locations.locationname + FROM stockmoves + LEFT JOIN stockmaster + ON stockmoves.stockid=stockmaster.stockid + LEFT JOIN locations + ON stockmoves.loccode=locations.loccode + WHERE type='" . $_POST['TransType'] . "' + AND date_format(trandate, '%Y-%m-%d')>='".FormatDateForSQL($_POST['FromDate'])."' + AND date_format(trandate, '%Y-%m-%d')<='".FormatDateForSQL($_POST['ToDate'])."'"; +} else { + $sql= "SELECT stockmoves.type, + stockmoves.stockid, + stockmaster.description, + stockmaster.decimalplaces, + stockmoves.transno, + stockmoves.trandate, + stockmoves.qty, + stockmoves.reference, + stockmoves.narrative, + locations.locationname + FROM stockmoves + LEFT JOIN stockmaster + ON stockmoves.stockid=stockmaster.stockid + LEFT JOIN locations + ON stockmoves.loccode=locations.loccode + WHERE type='" . $_POST['TransType'] . "' + AND date_format(trandate, '%Y-%m-%d')>='".FormatDateForSQL($_POST['FromDate'])."' + AND date_format(trandate, '%Y-%m-%d')<='".FormatDateForSQL($_POST['ToDate'])."' + AND stockmoves.loccode='" . $_POST['StockLocation'] . "'"; +} +$result=DB_query($sql,$db,'','',false,false); + +if (DB_error_no($db)!=0){ + $title = _('Transaction Listing'); + include('includes/header.inc'); + prnMsg(_('An error occurred getting the transactions'),'error'); + include('includes/footer.inc'); + exit; +} elseif (DB_num_rows($result) == 0){ + $title = _('Transaction Listing'); + include('includes/header.inc'); + echo '<br>'; + prnMsg (_('There were no transactions found in the database between the dates') . ' ' . $_POST['FromDate'] . ' ' . _('and') . ' '. $_POST['ToDate'] .'<br />' ._('Please try again selecting a different date'), 'info'); + include('includes/footer.inc'); + exit; +} + +include('includes/PDFStarter.php'); + +/*PDFStarter.php has all the variables for page size and width set up depending on the users default preferences for paper size */ + +$pdf->addInfo('Title',_('Stock Transaction Listing')); +$pdf->addInfo('Subject',_('Stock transaction listing from') . ' ' . $_POST['FromDate'] . ' ' . $_POST['ToDate']); +$line_height=12; +$PageNumber = 1; + + +switch ($_POST['TransType']) { + case 10: + $TransType=_('Customer Invoices'); + break; + case 11: + $TransType=_('Customer Credit Notes'); + break; + case 16: + $TransType=_('Location Transfers'); + break; + case 17: + $TransType=_('Stock Adjustments'); + break; + case 25: + $TransType=_('Purchase Order Deliveries'); + break; + case 26: + $TransType=_('Work Order Receipts'); + break; + case 28: + $TransType=_('Work Order Issues'); + break; +} + +include ('includes/PDFPeriodStockTransListingPageHeader.inc'); + +while ($myrow=DB_fetch_array($result)){ + + $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,160,$FontSize,$myrow['description'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+162,$YPos,80,$FontSize,$myrow['transno'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+242,$YPos,70,$FontSize,ConvertSQLDate($myrow['trandate']), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+312,$YPos,70,$FontSize,number_format($myrow['qty'],$myrow['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+382,$YPos,70,$FontSize,$myrow['locationname'], 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,$myrow['reference'], 'right'); + + $YPos -= ($line_height); + + if ($YPos - (2 *$line_height) < $Bottom_Margin){ + /*Then set up a new page */ + $PageNumber++; + include ('includes/PDFPeriodStockTransListingPageHeader.inc'); + } /*end of new page header */ +} /* end of while there are customer receipts in the batch to print */ + + +$YPos-=$line_height; + +$ReportFileName = $_SESSION['DatabaseName'] . '_StockTransListing_' . date('Y-m-d').'.pdf'; +$pdf->OutputD($ReportFileName); +$pdf->__destruct(); + +?> \ No newline at end of file Deleted: trunk/PDFStockTransListing.php =================================================================== --- trunk/PDFStockTransListing.php 2011-04-09 06:12:05 UTC (rev 4543) +++ trunk/PDFStockTransListing.php 2011-04-10 02:04:57 UTC (rev 4544) @@ -1,145 +0,0 @@ -<?php - -/* $Id$*/ - -/* $Revision: 1.13 $ */ - -//$PageSecurity = 3; -include('includes/SQL_CommonFunctions.inc'); -include ('includes/session.inc'); - -$InputError=0; -if (isset($_POST['Date']) AND !Is_Date($_POST['Date'])){ - $msg = _('The date must be specified in the format') . ' ' . $_SESSION['DefaultDateFormat']; - $InputError=1; - unset($_POST['Date']); -} - -if (!isset($_POST['Date'])){ - - $title = _('Stock Transaction Listing'); - include ('includes/header.inc'); - - echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' - . _('Stock Transaction Listing').'</p></div>'; - - if ($InputError==1){ - prnMsg($msg,'error'); - } - - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection> - <tr> - <td>' . _('Enter the date for which the transactions are to be listed') . ":</td> - <td><input type=text name='Date' maxlength=10 size=10 class=date alt='" . $_SESSION['DefaultDateFormat'] . "' value='" . Date($_SESSION['DefaultDateFormat']) . "'></td> - </tr>"; - - echo '<tr><td>' . _('Transaction type') . '</td><td>'; - - echo "<select name='TransType'>"; - - echo '<option value=10>' . _('Sales Invoice').'</option>'; - echo '<option value=11>' . _('Sales Credit Note').'</option>'; - echo '<option value=16>' . _('Location Transfer').'</option>'; - echo '<option value=17>' . _('Stock Adjustment').'</option>'; - echo '<option value=25>' . _('Purchase Order Delivery').'</option>'; - echo '<option value=26>' . _('Work Order Receipt').'</option>'; - echo '<option value=28>' . _('Work Order Issue').'</option>'; - - echo '</select></td></tr>'; - - echo "</select></td></tr></table><br><div class='centre'><input type=submit name='Go' value='" . _('Create PDF') . "'></div>"; - - - include('includes/footer.inc'); - exit; -} else { - - include('includes/ConnectDB.inc'); -} - -$sql= "SELECT stockmoves.type, - stockmoves.stockid, - stockmaster.description, - stockmaster.decimalplaces, - stockmoves.transno, - stockmoves.trandate, - stockmoves.qty, - stockmoves.reference, - stockmoves.narrative, - locations.locationname - FROM stockmoves - LEFT JOIN stockmaster - ON stockmoves.stockid=stockmaster.stockid - LEFT JOIN locations - ON stockmoves.loccode=locations.loccode - WHERE type='" . $_POST['TransType'] . "' - AND date_format(trandate, '%Y-%m-%d')='".FormatDateForSQL($_POST['Date'])."'"; - -$result=DB_query($sql,$db,'','',false,false); - -if (DB_error_no($db)!=0){ - $title = _('Transaction Listing'); - include('includes/header.inc'); - prnMsg(_('An error occurred getting the transactions'),'error'); - include('includes/footer.inc'); - exit; -} elseif (DB_num_rows($result) == 0){ - $title = _('Transaction Listing'); - include('includes/header.inc'); - echo '<br>'; - prnMsg (_('There were no transactions found in the database for the date') . ' ' . $_POST['Date'] .'. '._('Please try again selecting a different date'), 'info'); - include('includes/footer.inc'); - exit; -} - -include('includes/PDFStarter.php'); - -/*PDFStarter.php has all the variables for page size and width set up depending on the users default preferences for paper size */ - -$pdf->addInfo('Title',_('Stock Transaction Listing')); -$pdf->addInfo('Subject',_('Stock transaction listing from') . ' ' . $_POST['Date'] ); -$line_height=12; -$PageNumber = 1; - -include ('includes/PDFStockTransListingPageHeader.inc'); - -while ($myrow=DB_fetch_array($result)){ - - $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,160,$FontSize,$myrow['description'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+162,$YPos,80,$FontSize,$myrow['transno'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+242,$YPos,70,$FontSize,ConvertSQLDate($myrow['trandate']), 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+312,$YPos,70,$FontSize,number_format($myrow['qty'],$myrow['decimalplaces']), 'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+382,$YPos,70,$FontSize,$myrow['locationname'], 'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,$myrow['reference'], 'right'); - - $YPos -= ($line_height); - - if ($YPos - (2 *$line_height) < $Bottom_Margin){ - /*Then set up a new page */ - $PageNumber++; - include ('includes/PDFStockTransListingPageHeader.inc'); - } /*end of new page header */ -} /* end of while there are customer receipts in the batch to print */ - - -$YPos-=$line_height; - -/* UldisN -$pdfcode = $pdf->output(); -$len = strlen($pdfcode); -header('Content-type: application/pdf'); -header('Content-Length: ' . $len); -header('Content-Disposition: inline; filename=ChequeListing.pdf'); -header('Expires: 0'); -header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); -header('Pragma: public'); - -$pdf->stream(); -*/ -$ReportFileName = $_SESSION['DatabaseName'] . '_StockTransListing_' . date('Y-m-d').'.pdf'; -$pdf->OutputD($ReportFileName);//UldisN -$pdf->__destruct(); //UldisN - -?> \ No newline at end of file Modified: trunk/PaymentMethods.php =================================================================== --- trunk/PaymentMethods.php 2011-04-09 06:12:05 UTC (rev 4543) +++ trunk/PaymentMethods.php 2011-04-10 02:04:57 UTC (rev 4544) @@ -1,9 +1,7 @@ <?php -/* $Revision: 1.9 $ */ + /* $Id$*/ -//$PageSecurity = 15; - include('includes/session.inc'); $title = _('Payment Methods'); @@ -72,8 +70,9 @@ $sql = "UPDATE paymentmethods SET paymentname='" . $_POST['MethodName'] . "', paymenttype = '" . $_POST['ForPayment'] . "', - receipttype = '" . $_POST['ForReceipt'] . "' - WHERE paymentname LIKE '".$OldName."'"; + receipttype = '" . $_POST['ForReceipt'] . "', + usepreprintedstationery = '" . $_POST['UsePrePrintedStationery']. "' + WHERE paymentname " . LIKE . " '".$OldName."'"; /* lets leave well alone existing entries if ($_POST['MethodName'] != $OldMeasureName ) { @@ -103,11 +102,13 @@ $sql = "INSERT INTO paymentmethods ( paymentname, paymenttype, - receipttype) + receipttype, + usepreprintedstationery) VALUES ( '" . $_POST['MethodName'] ."', '" . $_POST['ForPayment'] ."', '" . $_POST['ForReceipt'] ."' + '" . $_POST['UsePrePrintedStationery'] ."' )"; } $msg = _('Record inserted'); @@ -124,6 +125,7 @@ unset ($_POST['MethodName']); unset ($_POST['ForPayment']); unset ($_POST['ForReceipt']); + unset ($_POST['UsePrePrintedStationery']); } elseif (isset($_GET['delete'])) { //the link to delete a selected record was clicked instead of the submit button @@ -143,12 +145,12 @@ $myrow = DB_fetch_row($result); if ($myrow[0]>0) { 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>'; + 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>'; + echo '<br />'; } //end if not used } //end if payment method exist unset ($SelectedPaymentID); @@ -174,19 +176,21 @@ $sql = "SELECT paymentid, paymentname, paymenttype, - receipttype + receipttype, + usepreprintedstationery FROM paymentmethods ORDER BY paymentid"; $ErrMsg = _('Could not get payment methods because'); $result = DB_query($sql,$db,$ErrMsg); - echo "<table class=selection> + echo '<table class=selection> <tr> - <th>" . _('Payment Method') . "</th> - <th>" . _('For Payments') . "</th> - <th>" . _('For Receipts') . "</th> - </tr>"; + <th>' . _('Payment Method') . '</th> + <th>' . _('For Payments') . '</th> + <th>' . _('For Receipts') . '</th> + <th>' . _('Use Pre-printed') .'<br />' . _('Stationery') . '</th> + </tr>'; $k=0; //row colour counter while ($myrow = DB_fetch_array($result)) { @@ -202,8 +206,9 @@ echo '<td>' . $myrow['paymentname'] . '</td>'; echo '<td>' . ($myrow['paymenttype'] ? _('Yes') : _('No')) . '</td>'; echo '<td>' . ($myrow['receipttype'] ? _('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 '<td>' . ($myrow['usepreprintedstationery'] ? _('Yes') : _('No')) . '</td>'; + echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedPaymentID=' . $myrow['paymentid'] . '">' . _('Edit') . '</a></td>'; + echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedPaymentID=' . $myrow['paymentid'] . '&delete=1">' . _('Delete') .'</a></td>'; echo '</tr>'; } //END WHILE LIST LOOP @@ -219,7 +224,7 @@ 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'] . '" />'; if (isset($SelectedPaymentID)) { @@ -228,7 +233,8 @@ $sql = "SELECT paymentid, paymentname, paymenttype, - receipttype + receipttype, + usepreprintedstationery FROM paymentmethods WHERE paymentid='" . $SelectedPaymentID . "'"; @@ -243,37 +249,45 @@ $_POST['MethodName'] = $myrow['paymentname']; $_POST['ForPayment'] = $myrow['paymenttype']; $_POST['ForReceipt'] = $myrow['receipttype']; + $_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 - echo "<table class=selection>"; + $_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> - </tr>"; - echo "<tr> - <td>" . _('Use For Payments') . ':' . "</td> - <td><select name='ForPayment'>"; - echo "<option".($_POST['ForPayment'] ? ' selected' : '') ." VALUE='1'>" . _('Yes'); - echo "<option".($_POST['ForPayment'] ? '' : ' selected') ." VALUE='0'>" . _('No'); - echo "</select></td></tr>"; - echo "<tr> - <td>" . _('Use For Receipts') . ':' . "</td> - <td><select name='ForReceipt'>"; - echo "<option".($_POST['ForReceipt'] ? ' selected' : '') ." VALUE='1'>" . _('Yes'); - echo "<option".($_POST['ForReceipt'] ? '' : ' selected') ." VALUE='0'>" . _('No'); - echo "</select></td></tr>"; + 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> + </tr>'; + echo '<tr> + <td>' . _('Use For Payments') . ':' . '</td> + <td><select name="ForPayment"> + <option' . ($_POST['ForPayment'] ? ' selected' : '') .' value="1">' . _('Yes') . '</option> + <option' . ($_POST['ForPayment'] ? '' : ' selected') .' value="0">' . _('No') . '</select></td> + </tr>'; + echo '<tr> + <td>' . _('Use For Receipts') . ':' . '</td> + <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="UsePrePrintedStationery"> + <option' . ($_POST['UsePrePrintedStationery'] ? ' selected': '' ) .' value="1">' . _('Yes') . '</option> + <option' . ($_POST['UsePrePrintedStationery']==1 ? '' : ' selected' ) .' value="0">' . _('No') . '</option> + </select></td></tr>'; echo '</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/Payments.php =================================================================== --- trunk/Payments.php 2011-04-09 06:12:05 UTC (rev 4543) +++ trunk/Payments.php 2011-04-10 02:04:57 UTC (rev 4544) @@ -246,11 +246,16 @@ $PeriodNo = GetPeriod($_SESSION['PaymentDetail']->DatePaid,$db); + $sql="SELECT usepreprintedstationery + FROM paymentmethods + WHERE paymentname='" . $_SESSION['PaymentDetail']->Paymenttype ."'"; + $result=DB_query($sql, $db); + $myrow=DB_fetch_row($result); // first time through commit if supplier cheque then print it first if ((!isset($_POST['ChequePrinted'])) AND (!isset($_POST['PaymentCancelled'])) - AND ($_SESSION['PaymentDetail']->Paymenttype == 'Cheque')) { + AND ($myrow[0] == 1)) { // it is a supplier payment by cheque and haven't printed yet so print cheque echo '<br /><a href="' . $rootpath . '/PrintCheque.php?' . SID . '&ChequeNum=' . $_POST['ChequeNum'] . '">' . _('Print Cheque using pre-printed stationery') . '</a><br /><br />'; @@ -607,14 +612,14 @@ $_SESSION['PaymentDetail']->Remove_GLItem($_GET['Delete']); } elseif (isset($_POST['Process']) and !$BankAccountEmpty){ //user hit submit a new GL Analysis line into the payment - $ChequeNoSQL='select account from gltrans where chequeno="'.$_POST['cheque'].'"'; + $ChequeNoSQL="SELECT account FROM gltrans WHERE chequeno='" . $_POST['cheque'] ."'"; $ChequeNoResult=DB_query($ChequeNoSQL, $db); if (is_numeric($_POST['GLManualCode'])){ - $SQL = "select accountname - FROM chartmaster - WHERE accountcode='" . $_POST['GLManualCode'] . "'"; + $SQL = "SELECT accountname + FROM chartmaster + WHERE accountcode='" . $_POST['GLManualCode'] . "'"; $Result=DB_query($SQL,$db); Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2011-04-09 06:12:05 UTC (rev 4543) +++ trunk/Stocks.php 2011-04-10 02:04:57 UTC (rev 4544) @@ -22,12 +22,15 @@ $myrow = DB_fetch_row($result); if ($myrow[0]==0) { $New=1; + } else { + $New=0; } } -?> +if (isset($_POST['New'])) { + $New=$_POST['New']; +} -<?php echo '<a href="' . $rootpath . '/SelectProduct.php?' . SID . '">' . _('Back to Items') . '</a><br>' . "\n"; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' @@ -62,7 +65,6 @@ $result = move_uploaded_file($_FILES['ItemPicture']['tmp_name'], $filename); $message = ($result)?_('File url') ."<a href='". $filename ."'>" . $filename . '</a>' : _('Something is wrong with uploading a file'); } - /* EOR Add Image upload for New Item - by Ori */ } if (isset($Errors)) { @@ -202,7 +204,7 @@ if ($_POST['Serialised']==1){ /*Not appropriate to have several dp on serial items */ $_POST['DecimalPlaces']=0; } - if (!isset($_POST['New']) and !isset($New)) { /*so its an existing one */ + if ($New==0) { /*so its an existing one */ /*first check on the changes being made we must disallow: - changes from manufactured or purchased to Service, Assembly or Kitset if there is stock - changes from manufactured, kitset or assembly where a BOM exists @@ -447,6 +449,7 @@ }//THE INSERT OF THE NEW CODE WORKED SO BANG IN THE STOCK LOCATION RECORDS TOO }//END CHECK FOR ALREADY EXISTING ITEM OF THE SAME CODE } + $New=1; } else { echo '<br>'. "\n"; @@ -563,7 +566,7 @@ unset($StockID); //echo "<meta http-equiv='Refresh' content='0; url=" . $rootpath . '/SelectProduct.php?' . SID ."'>"; - + $New=1; } //end if Delete Part } @@ -572,17 +575,20 @@ <tr><td>'. "\n"; // Nested table echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<input type="hidden" name="New" value="'.$New.'">'. "\n"; + if (!isset($StockID) or $StockID=='' or isset($_POST['UpdateCategories'])) { /*If the page was called without $StockID passed to page then assume a new stock item is to be entered show a form with a part Code field other wise the form showing the fields with the existing entries against the part will show for editing with only a hidden StockID field. New is set to flag that the page may have called itself and still be entering a new part, in which case the page needs to know not to go looking up details for an existing part*/ - - $New = true; - echo '<input type="hidden" name="New" value="1">'. "\n"; if (!isset($StockID)) { - echo '<tr><td>'. _('Item Code'). ':</td><td><input ' . (in_array('StockID',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="StockID" size=21 maxlength=20 /></td></tr>'. "\n"; + $StockID=''; + } + if ($New==1) { + echo '<tr><td>'. _('Item Code'). ':</td><td><input ' . (in_array('StockID',$Errors) ? 'class="inputerror"' : '' ) .' type="text" + value="'.$StockID.'" name="StockID" size=21 maxlength=20 /></td></tr>'. "\n"; } else { - echo '<tr><td>'. _('Item Code'). ':</td><td><input ' . (in_array('StockID',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="StockID" size=21 maxlength=20 - value="'.$StockID.'" /></td></tr>'. "\n"; + echo '<tr><td>'. _('Item Code'). ':</td><td>'.$StockID.'</td></tr>'. "\n"; + echo '<input type="hidden" name ="StockID" value="'.$StockID.'" />'; } } elseif (!isset($_POST['UpdateCategories']) and $InputError!=1) { // Must be modifying an existing item and no changes made yet @@ -1016,7 +1022,7 @@ echo '</table><br>'; echo '<input type="hidden" name="PropertyCounter" value=' . $PropertyCounter . '>'; -if (isset($New)) { +if ($New==1) { echo '<input type="Submit" name="submit" value="' . _('Insert New Item') . '">'; echo '<input type="submit" name="UpdateCategories" style="visibility:hidden;width:1px" value="' . _('Categories') . '">'; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-04-09 06:12:05 UTC (rev 4543) +++ trunk/doc/Change.log.html 2011-04-10 02:04:57 UTC (rev 4544) @@ -1,5 +1,10 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p /> +<p> +<p>10/4/11 Tim: PDFPeriodStockTransListing - new report to print off stock transactions of a specified type for a selected period>/p> +<p>10/4/11 Tim: PDFStockTransListing.php option to print off transactions by inventory location</p> +<p>10/4/11 Tim: Stocks.php - more logical use of $New and $_POST['New']</p> +<p>10/4/11 Tim: Payments.php PaymentMethods.php Add new field userpreprintedstationery to payment methods to determine whether to print cheques</p> <p>5/4/11 Tim: includes/LanguageSetup.php - discovered solution to Turkish character set problem!!</p> <p>5/4/11 Phil: couple of is_date functions left over from experiment to see if changing fixed Turkish - now removed from SupplierInvoice.php and PDFOrdersInvoiced.php</p> <p>5/4/11 Phil: SuppCreditGRNs was not showing old GRNs and no way to input an older date</p> Modified: trunk/includes/ConnectDB.inc =================================================================== --- trunk/includes/ConnectDB.inc 2011-04-09 06:12:05 UTC (rev 4543) +++ trunk/includes/ConnectDB.inc 2011-04-10 02:04:57 UTC (rev 4544) @@ -4,7 +4,7 @@ * this value is saved in the $_SESSION['Versionumber'] when includes/GetConfig.php is run * if VersionNumber is < $Version then the DB update script is run */ -$Version='4.03.6'; //must update manually every time there is a DB change +$Version='4.03.7'; //must update manually every time there is a DB change require_once ($PathPrefix .'includes/MiscFunctions.php'); Added: trunk/includes/PDFPeriodStockTransListingPageHeader.inc =================================================================== --- trunk/includes/PDFPeriodStockTransListingPageHeader.inc (rev 0) +++ trunk/includes/PDFPeriodStockTransListingPageHeader.inc 2011-04-10 02:04:57 UTC (rev 4544) @@ -0,0 +1,59 @@ +<?php +/* $Id: PDFPeriodStockTransListingPageHeader.inc 4307 2010-12-22 16:06:03Z tim_schofield $*/ + +if ($PageNumber>1){ + $pdf->newPage(); +} + +$YPos = $Page_Height - $Top_Margin - 50; + +$pdf->addJpegFromFile($_SESSION['LogoFile'],$Left_Margin,$YPos,0,50); + +$FontSize=15; + + +$XPos = $Page_Width/2; +$YPos += 30; +$pdf->addText($XPos, $YPos,$FontSize, $_SESSION['CompanyRecord']['coyname']); +$FontSize=12; +$YPos -=30; +$pdf->addText($XPos, $YPos,$FontSize, $TransType . ' ' ._('dated from') . ' ' . $_POST['FromDate'] . ' ' . _('to') . ' ' . $_POST['ToDate']); + + +$XPos = $Page_Width-$Right_Margin-50; +$YPos -=30; +$pdf->addText($XPos, $YPos+10,$FontSize, _('Page') . ': ' . $PageNumber); + +/*Now print out the... [truncated message content] |
From: <dai...@us...> - 2011-04-10 02:05:05
|
Revision: 4544 http://web-erp.svn.sourceforge.net/web-erp/?rev=4544&view=rev Author: daintree Date: 2011-04-10 02:04:57 +0000 (Sun, 10 Apr 2011) Log Message: ----------- Tim changes Modified Paths: -------------- trunk/PaymentMethods.php trunk/Payments.php trunk/Stocks.php trunk/doc/Change.log.html trunk/includes/ConnectDB.inc trunk/index.php trunk/sql/mysql/upgrade3.11.1-4.00.sql Added Paths: ----------- trunk/PDFPeriodStockTransListing.php trunk/includes/PDFPeriodStockTransListingPageHeader.inc Removed Paths: ------------- trunk/PDFStockTransListing.php trunk/includes/PDFStockTransListingPageHeader.inc Added: trunk/PDFPeriodStockTransListing.php =================================================================== --- trunk/PDFPeriodStockTransListing.php (rev 0) +++ trunk/PDFPeriodStockTransListing.php 2011-04-10 02:04:57 UTC (rev 4544) @@ -0,0 +1,203 @@ +<?php +/* $Id: PDFPeriodStockTransListing.php 4307 2010-12-22 16:06:03Z tim_schofield $*/ + + +include('includes/SQL_CommonFunctions.inc'); +include ('includes/session.inc'); + +$InputError=0; +if (isset($_POST['FromDate']) AND !Is_Date($_POST['FromDate'])){ + $msg = _('The date must be specified in the format') . ' ' . $_SESSION['DefaultDateFormat']; + $InputError=1; + unset($_POST['FromDate']); +} + +if (!isset($_POST['FromDate'])){ + + $title = _('Stock Transaction Listing'); + include ('includes/header.inc'); + + echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="">' . ' ' + . _('Stock Transaction Listing').'</img></p></div>'; + + if ($InputError==1){ + prnMsg($msg,'error'); + } + + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class=selection>'; + echo '<tr> + <td>' . _('Enter the date from which the transactions are to be listed') . ':</td> + <td><input type="text" name="FromDate" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + </tr>'; + echo '<tr> + <td>' . _('Enter the date to which the transactions are to be listed') . ':</td> + <td><input type=text name="ToDate" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + </tr>'; + + echo '<tr><td>' . _('Transaction type') . '</td><td>'; + + echo '<select name="TransType">'; + + echo '<option value=10>' . _('Sales Invoice').'</option> + <option value=11>' . _('Sales Credit Note').'</option> + <option value=16>' . _('Location Transfer').'</option> + <option value=17>' . _('Stock Adjustment').'</option> + <option value=25>' . _('Purchase Order Delivery').'</option> + <option value=26>' . _('Work Order Receipt').'</option> + <option value=28>' . _('Work Order Issue').'</option>'; + + echo '</select></td></tr>'; + + $sql = "SELECT loccode, locationname FROM locations"; + $resultStkLocs = DB_query($sql, $db); + + echo '<tr><td>' . _('For Stock Location') . ':</td> + <td><select name="StockLocation">'; + echo '<option VALUE="All">' . _('All') . '</option>'; + while ($myrow=DB_fetch_array($resultStkLocs)){ + if (isset($_POST['StockLocation']) AND $_POST['StockLocation']!='All'){ + if ($myrow['loccode'] == $_POST['StockLocation']){ + echo '<option selected VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } else { + echo '<option VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } + } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ + echo '<option selected VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + $_POST['StockLocation']=$myrow['loccode']; + } else { + echo '<option VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } + } + echo '</select></td></tr>'; + + echo '</table><br><div class="centre"><input type=submit name="Go" value="' . _('Create PDF') . '"></div>'; + + include('includes/footer.inc'); + exit; +} else { + + include('includes/ConnectDB.inc'); +} + + +if ($_POST['StockLocation']=='All') { + $sql= "SELECT stockmoves.type, + stockmoves.stockid, + stockmaster.description, + stockmaster.decimalplaces, + stockmoves.transno, + stockmoves.trandate, + stockmoves.qty, + stockmoves.reference, + stockmoves.narrative, + locations.locationname + FROM stockmoves + LEFT JOIN stockmaster + ON stockmoves.stockid=stockmaster.stockid + LEFT JOIN locations + ON stockmoves.loccode=locations.loccode + WHERE type='" . $_POST['TransType'] . "' + AND date_format(trandate, '%Y-%m-%d')>='".FormatDateForSQL($_POST['FromDate'])."' + AND date_format(trandate, '%Y-%m-%d')<='".FormatDateForSQL($_POST['ToDate'])."'"; +} else { + $sql= "SELECT stockmoves.type, + stockmoves.stockid, + stockmaster.description, + stockmaster.decimalplaces, + stockmoves.transno, + stockmoves.trandate, + stockmoves.qty, + stockmoves.reference, + stockmoves.narrative, + locations.locationname + FROM stockmoves + LEFT JOIN stockmaster + ON stockmoves.stockid=stockmaster.stockid + LEFT JOIN locations + ON stockmoves.loccode=locations.loccode + WHERE type='" . $_POST['TransType'] . "' + AND date_format(trandate, '%Y-%m-%d')>='".FormatDateForSQL($_POST['FromDate'])."' + AND date_format(trandate, '%Y-%m-%d')<='".FormatDateForSQL($_POST['ToDate'])."' + AND stockmoves.loccode='" . $_POST['StockLocation'] . "'"; +} +$result=DB_query($sql,$db,'','',false,false); + +if (DB_error_no($db)!=0){ + $title = _('Transaction Listing'); + include('includes/header.inc'); + prnMsg(_('An error occurred getting the transactions'),'error'); + include('includes/footer.inc'); + exit; +} elseif (DB_num_rows($result) == 0){ + $title = _('Transaction Listing'); + include('includes/header.inc'); + echo '<br>'; + prnMsg (_('There were no transactions found in the database between the dates') . ' ' . $_POST['FromDate'] . ' ' . _('and') . ' '. $_POST['ToDate'] .'<br />' ._('Please try again selecting a different date'), 'info'); + include('includes/footer.inc'); + exit; +} + +include('includes/PDFStarter.php'); + +/*PDFStarter.php has all the variables for page size and width set up depending on the users default preferences for paper size */ + +$pdf->addInfo('Title',_('Stock Transaction Listing')); +$pdf->addInfo('Subject',_('Stock transaction listing from') . ' ' . $_POST['FromDate'] . ' ' . $_POST['ToDate']); +$line_height=12; +$PageNumber = 1; + + +switch ($_POST['TransType']) { + case 10: + $TransType=_('Customer Invoices'); + break; + case 11: + $TransType=_('Customer Credit Notes'); + break; + case 16: + $TransType=_('Location Transfers'); + break; + case 17: + $TransType=_('Stock Adjustments'); + break; + case 25: + $TransType=_('Purchase Order Deliveries'); + break; + case 26: + $TransType=_('Work Order Receipts'); + break; + case 28: + $TransType=_('Work Order Issues'); + break; +} + +include ('includes/PDFPeriodStockTransListingPageHeader.inc'); + +while ($myrow=DB_fetch_array($result)){ + + $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,160,$FontSize,$myrow['description'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+162,$YPos,80,$FontSize,$myrow['transno'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+242,$YPos,70,$FontSize,ConvertSQLDate($myrow['trandate']), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+312,$YPos,70,$FontSize,number_format($myrow['qty'],$myrow['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+382,$YPos,70,$FontSize,$myrow['locationname'], 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,$myrow['reference'], 'right'); + + $YPos -= ($line_height); + + if ($YPos - (2 *$line_height) < $Bottom_Margin){ + /*Then set up a new page */ + $PageNumber++; + include ('includes/PDFPeriodStockTransListingPageHeader.inc'); + } /*end of new page header */ +} /* end of while there are customer receipts in the batch to print */ + + +$YPos-=$line_height; + +$ReportFileName = $_SESSION['DatabaseName'] . '_StockTransListing_' . date('Y-m-d').'.pdf'; +$pdf->OutputD($ReportFileName); +$pdf->__destruct(); + +?> \ No newline at end of file Deleted: trunk/PDFStockTransListing.php =================================================================== --- trunk/PDFStockTransListing.php 2011-04-09 06:12:05 UTC (rev 4543) +++ trunk/PDFStockTransListing.php 2011-04-10 02:04:57 UTC (rev 4544) @@ -1,145 +0,0 @@ -<?php - -/* $Id$*/ - -/* $Revision: 1.13 $ */ - -//$PageSecurity = 3; -include('includes/SQL_CommonFunctions.inc'); -include ('includes/session.inc'); - -$InputError=0; -if (isset($_POST['Date']) AND !Is_Date($_POST['Date'])){ - $msg = _('The date must be specified in the format') . ' ' . $_SESSION['DefaultDateFormat']; - $InputError=1; - unset($_POST['Date']); -} - -if (!isset($_POST['Date'])){ - - $title = _('Stock Transaction Listing'); - include ('includes/header.inc'); - - echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' - . _('Stock Transaction Listing').'</p></div>'; - - if ($InputError==1){ - prnMsg($msg,'error'); - } - - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection> - <tr> - <td>' . _('Enter the date for which the transactions are to be listed') . ":</td> - <td><input type=text name='Date' maxlength=10 size=10 class=date alt='" . $_SESSION['DefaultDateFormat'] . "' value='" . Date($_SESSION['DefaultDateFormat']) . "'></td> - </tr>"; - - echo '<tr><td>' . _('Transaction type') . '</td><td>'; - - echo "<select name='TransType'>"; - - echo '<option value=10>' . _('Sales Invoice').'</option>'; - echo '<option value=11>' . _('Sales Credit Note').'</option>'; - echo '<option value=16>' . _('Location Transfer').'</option>'; - echo '<option value=17>' . _('Stock Adjustment').'</option>'; - echo '<option value=25>' . _('Purchase Order Delivery').'</option>'; - echo '<option value=26>' . _('Work Order Receipt').'</option>'; - echo '<option value=28>' . _('Work Order Issue').'</option>'; - - echo '</select></td></tr>'; - - echo "</select></td></tr></table><br><div class='centre'><input type=submit name='Go' value='" . _('Create PDF') . "'></div>"; - - - include('includes/footer.inc'); - exit; -} else { - - include('includes/ConnectDB.inc'); -} - -$sql= "SELECT stockmoves.type, - stockmoves.stockid, - stockmaster.description, - stockmaster.decimalplaces, - stockmoves.transno, - stockmoves.trandate, - stockmoves.qty, - stockmoves.reference, - stockmoves.narrative, - locations.locationname - FROM stockmoves - LEFT JOIN stockmaster - ON stockmoves.stockid=stockmaster.stockid - LEFT JOIN locations - ON stockmoves.loccode=locations.loccode - WHERE type='" . $_POST['TransType'] . "' - AND date_format(trandate, '%Y-%m-%d')='".FormatDateForSQL($_POST['Date'])."'"; - -$result=DB_query($sql,$db,'','',false,false); - -if (DB_error_no($db)!=0){ - $title = _('Transaction Listing'); - include('includes/header.inc'); - prnMsg(_('An error occurred getting the transactions'),'error'); - include('includes/footer.inc'); - exit; -} elseif (DB_num_rows($result) == 0){ - $title = _('Transaction Listing'); - include('includes/header.inc'); - echo '<br>'; - prnMsg (_('There were no transactions found in the database for the date') . ' ' . $_POST['Date'] .'. '._('Please try again selecting a different date'), 'info'); - include('includes/footer.inc'); - exit; -} - -include('includes/PDFStarter.php'); - -/*PDFStarter.php has all the variables for page size and width set up depending on the users default preferences for paper size */ - -$pdf->addInfo('Title',_('Stock Transaction Listing')); -$pdf->addInfo('Subject',_('Stock transaction listing from') . ' ' . $_POST['Date'] ); -$line_height=12; -$PageNumber = 1; - -include ('includes/PDFStockTransListingPageHeader.inc'); - -while ($myrow=DB_fetch_array($result)){ - - $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,160,$FontSize,$myrow['description'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+162,$YPos,80,$FontSize,$myrow['transno'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+242,$YPos,70,$FontSize,ConvertSQLDate($myrow['trandate']), 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+312,$YPos,70,$FontSize,number_format($myrow['qty'],$myrow['decimalplaces']), 'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+382,$YPos,70,$FontSize,$myrow['locationname'], 'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,$myrow['reference'], 'right'); - - $YPos -= ($line_height); - - if ($YPos - (2 *$line_height) < $Bottom_Margin){ - /*Then set up a new page */ - $PageNumber++; - include ('includes/PDFStockTransListingPageHeader.inc'); - } /*end of new page header */ -} /* end of while there are customer receipts in the batch to print */ - - -$YPos-=$line_height; - -/* UldisN -$pdfcode = $pdf->output(); -$len = strlen($pdfcode); -header('Content-type: application/pdf'); -header('Content-Length: ' . $len); -header('Content-Disposition: inline; filename=ChequeListing.pdf'); -header('Expires: 0'); -header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); -header('Pragma: public'); - -$pdf->stream(); -*/ -$ReportFileName = $_SESSION['DatabaseName'] . '_StockTransListing_' . date('Y-m-d').'.pdf'; -$pdf->OutputD($ReportFileName);//UldisN -$pdf->__destruct(); //UldisN - -?> \ No newline at end of file Modified: trunk/PaymentMethods.php =================================================================== --- trunk/PaymentMethods.php 2011-04-09 06:12:05 UTC (rev 4543) +++ trunk/PaymentMethods.php 2011-04-10 02:04:57 UTC (rev 4544) @@ -1,9 +1,7 @@ <?php -/* $Revision: 1.9 $ */ + /* $Id$*/ -//$PageSecurity = 15; - include('includes/session.inc'); $title = _('Payment Methods'); @@ -72,8 +70,9 @@ $sql = "UPDATE paymentmethods SET paymentname='" . $_POST['MethodName'] . "', paymenttype = '" . $_POST['ForPayment'] . "', - receipttype = '" . $_POST['ForReceipt'] . "' - WHERE paymentname LIKE '".$OldName."'"; + receipttype = '" . $_POST['ForReceipt'] . "', + usepreprintedstationery = '" . $_POST['UsePrePrintedStationery']. "' + WHERE paymentname " . LIKE . " '".$OldName."'"; /* lets leave well alone existing entries if ($_POST['MethodName'] != $OldMeasureName ) { @@ -103,11 +102,13 @@ $sql = "INSERT INTO paymentmethods ( paymentname, paymenttype, - receipttype) + receipttype, + usepreprintedstationery) VALUES ( '" . $_POST['MethodName'] ."', '" . $_POST['ForPayment'] ."', '" . $_POST['ForReceipt'] ."' + '" . $_POST['UsePrePrintedStationery'] ."' )"; } $msg = _('Record inserted'); @@ -124,6 +125,7 @@ unset ($_POST['MethodName']); unset ($_POST['ForPayment']); unset ($_POST['ForReceipt']); + unset ($_POST['UsePrePrintedStationery']); } elseif (isset($_GET['delete'])) { //the link to delete a selected record was clicked instead of the submit button @@ -143,12 +145,12 @@ $myrow = DB_fetch_row($result); if ($myrow[0]>0) { 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>'; + 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>'; + echo '<br />'; } //end if not used } //end if payment method exist unset ($SelectedPaymentID); @@ -174,19 +176,21 @@ $sql = "SELECT paymentid, paymentname, paymenttype, - receipttype + receipttype, + usepreprintedstationery FROM paymentmethods ORDER BY paymentid"; $ErrMsg = _('Could not get payment methods because'); $result = DB_query($sql,$db,$ErrMsg); - echo "<table class=selection> + echo '<table class=selection> <tr> - <th>" . _('Payment Method') . "</th> - <th>" . _('For Payments') . "</th> - <th>" . _('For Receipts') . "</th> - </tr>"; + <th>' . _('Payment Method') . '</th> + <th>' . _('For Payments') . '</th> + <th>' . _('For Receipts') . '</th> + <th>' . _('Use Pre-printed') .'<br />' . _('Stationery') . '</th> + </tr>'; $k=0; //row colour counter while ($myrow = DB_fetch_array($result)) { @@ -202,8 +206,9 @@ echo '<td>' . $myrow['paymentname'] . '</td>'; echo '<td>' . ($myrow['paymenttype'] ? _('Yes') : _('No')) . '</td>'; echo '<td>' . ($myrow['receipttype'] ? _('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 '<td>' . ($myrow['usepreprintedstationery'] ? _('Yes') : _('No')) . '</td>'; + echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedPaymentID=' . $myrow['paymentid'] . '">' . _('Edit') . '</a></td>'; + echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedPaymentID=' . $myrow['paymentid'] . '&delete=1">' . _('Delete') .'</a></td>'; echo '</tr>'; } //END WHILE LIST LOOP @@ -219,7 +224,7 @@ 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'] . '" />'; if (isset($SelectedPaymentID)) { @@ -228,7 +233,8 @@ $sql = "SELECT paymentid, paymentname, paymenttype, - receipttype + receipttype, + usepreprintedstationery FROM paymentmethods WHERE paymentid='" . $SelectedPaymentID . "'"; @@ -243,37 +249,45 @@ $_POST['MethodName'] = $myrow['paymentname']; $_POST['ForPayment'] = $myrow['paymenttype']; $_POST['ForReceipt'] = $myrow['receipttype']; + $_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 - echo "<table class=selection>"; + $_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> - </tr>"; - echo "<tr> - <td>" . _('Use For Payments') . ':' . "</td> - <td><select name='ForPayment'>"; - echo "<option".($_POST['ForPayment'] ? ' selected' : '') ." VALUE='1'>" . _('Yes'); - echo "<option".($_POST['ForPayment'] ? '' : ' selected') ." VALUE='0'>" . _('No'); - echo "</select></td></tr>"; - echo "<tr> - <td>" . _('Use For Receipts') . ':' . "</td> - <td><select name='ForReceipt'>"; - echo "<option".($_POST['ForReceipt'] ? ' selected' : '') ." VALUE='1'>" . _('Yes'); - echo "<option".($_POST['ForReceipt'] ? '' : ' selected') ." VALUE='0'>" . _('No'); - echo "</select></td></tr>"; + 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> + </tr>'; + echo '<tr> + <td>' . _('Use For Payments') . ':' . '</td> + <td><select name="ForPayment"> + <option' . ($_POST['ForPayment'] ? ' selected' : '') .' value="1">' . _('Yes') . '</option> + <option' . ($_POST['ForPayment'] ? '' : ' selected') .' value="0">' . _('No') . '</select></td> + </tr>'; + echo '<tr> + <td>' . _('Use For Receipts') . ':' . '</td> + <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="UsePrePrintedStationery"> + <option' . ($_POST['UsePrePrintedStationery'] ? ' selected': '' ) .' value="1">' . _('Yes') . '</option> + <option' . ($_POST['UsePrePrintedStationery']==1 ? '' : ' selected' ) .' value="0">' . _('No') . '</option> + </select></td></tr>'; echo '</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/Payments.php =================================================================== --- trunk/Payments.php 2011-04-09 06:12:05 UTC (rev 4543) +++ trunk/Payments.php 2011-04-10 02:04:57 UTC (rev 4544) @@ -246,11 +246,16 @@ $PeriodNo = GetPeriod($_SESSION['PaymentDetail']->DatePaid,$db); + $sql="SELECT usepreprintedstationery + FROM paymentmethods + WHERE paymentname='" . $_SESSION['PaymentDetail']->Paymenttype ."'"; + $result=DB_query($sql, $db); + $myrow=DB_fetch_row($result); // first time through commit if supplier cheque then print it first if ((!isset($_POST['ChequePrinted'])) AND (!isset($_POST['PaymentCancelled'])) - AND ($_SESSION['PaymentDetail']->Paymenttype == 'Cheque')) { + AND ($myrow[0] == 1)) { // it is a supplier payment by cheque and haven't printed yet so print cheque echo '<br /><a href="' . $rootpath . '/PrintCheque.php?' . SID . '&ChequeNum=' . $_POST['ChequeNum'] . '">' . _('Print Cheque using pre-printed stationery') . '</a><br /><br />'; @@ -607,14 +612,14 @@ $_SESSION['PaymentDetail']->Remove_GLItem($_GET['Delete']); } elseif (isset($_POST['Process']) and !$BankAccountEmpty){ //user hit submit a new GL Analysis line into the payment - $ChequeNoSQL='select account from gltrans where chequeno="'.$_POST['cheque'].'"'; + $ChequeNoSQL="SELECT account FROM gltrans WHERE chequeno='" . $_POST['cheque'] ."'"; $ChequeNoResult=DB_query($ChequeNoSQL, $db); if (is_numeric($_POST['GLManualCode'])){ - $SQL = "select accountname - FROM chartmaster - WHERE accountcode='" . $_POST['GLManualCode'] . "'"; + $SQL = "SELECT accountname + FROM chartmaster + WHERE accountcode='" . $_POST['GLManualCode'] . "'"; $Result=DB_query($SQL,$db); Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2011-04-09 06:12:05 UTC (rev 4543) +++ trunk/Stocks.php 2011-04-10 02:04:57 UTC (rev 4544) @@ -22,12 +22,15 @@ $myrow = DB_fetch_row($result); if ($myrow[0]==0) { $New=1; + } else { + $New=0; } } -?> +if (isset($_POST['New'])) { + $New=$_POST['New']; +} -<?php echo '<a href="' . $rootpath . '/SelectProduct.php?' . SID . '">' . _('Back to Items') . '</a><br>' . "\n"; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' @@ -62,7 +65,6 @@ $result = move_uploaded_file($_FILES['ItemPicture']['tmp_name'], $filename); $message = ($result)?_('File url') ."<a href='". $filename ."'>" . $filename . '</a>' : _('Something is wrong with uploading a file'); } - /* EOR Add Image upload for New Item - by Ori */ } if (isset($Errors)) { @@ -202,7 +204,7 @@ if ($_POST['Serialised']==1){ /*Not appropriate to have several dp on serial items */ $_POST['DecimalPlaces']=0; } - if (!isset($_POST['New']) and !isset($New)) { /*so its an existing one */ + if ($New==0) { /*so its an existing one */ /*first check on the changes being made we must disallow: - changes from manufactured or purchased to Service, Assembly or Kitset if there is stock - changes from manufactured, kitset or assembly where a BOM exists @@ -447,6 +449,7 @@ }//THE INSERT OF THE NEW CODE WORKED SO BANG IN THE STOCK LOCATION RECORDS TOO }//END CHECK FOR ALREADY EXISTING ITEM OF THE SAME CODE } + $New=1; } else { echo '<br>'. "\n"; @@ -563,7 +566,7 @@ unset($StockID); //echo "<meta http-equiv='Refresh' content='0; url=" . $rootpath . '/SelectProduct.php?' . SID ."'>"; - + $New=1; } //end if Delete Part } @@ -572,17 +575,20 @@ <tr><td>'. "\n"; // Nested table echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<input type="hidden" name="New" value="'.$New.'">'. "\n"; + if (!isset($StockID) or $StockID=='' or isset($_POST['UpdateCategories'])) { /*If the page was called without $StockID passed to page then assume a new stock item is to be entered show a form with a part Code field other wise the form showing the fields with the existing entries against the part will show for editing with only a hidden StockID field. New is set to flag that the page may have called itself and still be entering a new part, in which case the page needs to know not to go looking up details for an existing part*/ - - $New = true; - echo '<input type="hidden" name="New" value="1">'. "\n"; if (!isset($StockID)) { - echo '<tr><td>'. _('Item Code'). ':</td><td><input ' . (in_array('StockID',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="StockID" size=21 maxlength=20 /></td></tr>'. "\n"; + $StockID=''; + } + if ($New==1) { + echo '<tr><td>'. _('Item Code'). ':</td><td><input ' . (in_array('StockID',$Errors) ? 'class="inputerror"' : '' ) .' type="text" + value="'.$StockID.'" name="StockID" size=21 maxlength=20 /></td></tr>'. "\n"; } else { - echo '<tr><td>'. _('Item Code'). ':</td><td><input ' . (in_array('StockID',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="StockID" size=21 maxlength=20 - value="'.$StockID.'" /></td></tr>'. "\n"; + echo '<tr><td>'. _('Item Code'). ':</td><td>'.$StockID.'</td></tr>'. "\n"; + echo '<input type="hidden" name ="StockID" value="'.$StockID.'" />'; } } elseif (!isset($_POST['UpdateCategories']) and $InputError!=1) { // Must be modifying an existing item and no changes made yet @@ -1016,7 +1022,7 @@ echo '</table><br>'; echo '<input type="hidden" name="PropertyCounter" value=' . $PropertyCounter . '>'; -if (isset($New)) { +if ($New==1) { echo '<input type="Submit" name="submit" value="' . _('Insert New Item') . '">'; echo '<input type="submit" name="UpdateCategories" style="visibility:hidden;width:1px" value="' . _('Categories') . '">'; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-04-09 06:12:05 UTC (rev 4543) +++ trunk/doc/Change.log.html 2011-04-10 02:04:57 UTC (rev 4544) @@ -1,5 +1,10 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p /> +<p> +<p>10/4/11 Tim: PDFPeriodStockTransListing - new report to print off stock transactions of a specified type for a selected period>/p> +<p>10/4/11 Tim: PDFStockTransListing.php option to print off transactions by inventory location</p> +<p>10/4/11 Tim: Stocks.php - more logical use of $New and $_POST['New']</p> +<p>10/4/11 Tim: Payments.php PaymentMethods.php Add new field userpreprintedstationery to payment methods to determine whether to print cheques</p> <p>5/4/11 Tim: includes/LanguageSetup.php - discovered solution to Turkish character set problem!!</p> <p>5/4/11 Phil: couple of is_date functions left over from experiment to see if changing fixed Turkish - now removed from SupplierInvoice.php and PDFOrdersInvoiced.php</p> <p>5/4/11 Phil: SuppCreditGRNs was not showing old GRNs and no way to input an older date</p> Modified: trunk/includes/ConnectDB.inc =================================================================== --- trunk/includes/ConnectDB.inc 2011-04-09 06:12:05 UTC (rev 4543) +++ trunk/includes/ConnectDB.inc 2011-04-10 02:04:57 UTC (rev 4544) @@ -4,7 +4,7 @@ * this value is saved in the $_SESSION['Versionumber'] when includes/GetConfig.php is run * if VersionNumber is < $Version then the DB update script is run */ -$Version='4.03.6'; //must update manually every time there is a DB change +$Version='4.03.7'; //must update manually every time there is a DB change require_once ($PathPrefix .'includes/MiscFunctions.php'); Added: trunk/includes/PDFPeriodStockTransListingPageHeader.inc =================================================================== --- trunk/includes/PDFPeriodStockTransListingPageHeader.inc (rev 0) +++ trunk/includes/PDFPeriodStockTransListingPageHeader.inc 2011-04-10 02:04:57 UTC (rev 4544) @@ -0,0 +1,59 @@ +<?php +/* $Id: PDFPeriodStockTransListingPageHeader.inc 4307 2010-12-22 16:06:03Z tim_schofield $*/ + +if ($PageNumber>1){ + $pdf->newPage(); +} + +$YPos = $Page_Height - $Top_Margin - 50; + +$pdf->addJpegFromFile($_SESSION['LogoFile'],$Left_Margin,$YPos,0,50); + +$FontSize=15; + + +$XPos = $Page_Width/2; +$YPos += 30; +$pdf->addText($XPos, $YPos,$FontSize, $_SESSION['CompanyRecord']['coyname']); +$FontSize=12; +$YPos -=30; +$pdf->addText($XPos, $YPos,$FontSize, $TransType . ' ' ._('dated from') . ' ' . $_POST['FromDate'] . ' ' . _('to') . ' ' . $_POST['ToDate']); + + +$XPos = $Page_Width-$Right_Margin-50; +$YPos -=30; +$pdf->addText($XPos, $YPos+10,$FontSize, _('Page') . ': ' . $PageNumber); + +/*Now print out the... [truncated message content] |
From: <dai...@us...> - 2011-04-10 10:41:28
|
Revision: 4545 http://web-erp.svn.sourceforge.net/web-erp/?rev=4545&view=rev Author: daintree Date: 2011-04-10 10:41:20 +0000 (Sun, 10 Apr 2011) Log Message: ----------- Tim launchpad stuff Modified Paths: -------------- trunk/GLAccountInquiry.php trunk/GLAccounts.php trunk/MRP.php trunk/MRPCalendar.php trunk/MRPShortages.php trunk/PDFPrintLabel.php trunk/PDFStockTransfer.php trunk/SelectProduct.php trunk/StockTransferControlled.php trunk/StockTransfers.php trunk/SupplierInvoice.php trunk/doc/Change.log.html trunk/includes/DefineLabelClass.php trunk/includes/DefineStockTransfers.php trunk/includes/OutputSerialItems.php trunk/index.php trunk/sql/mysql/upgrade3.11.1-4.00.sql Added Paths: ----------- trunk/ReprintGRN.php Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2011-04-10 02:04:57 UTC (rev 4544) +++ trunk/GLAccountInquiry.php 2011-04-10 10:41:20 UTC (rev 4545) @@ -268,7 +268,9 @@ $tagsql="SELECT tagdescription FROM tags WHERE tagref='".$myrow['tag'] . "'"; $tagresult=DB_query($tagsql,$db); $tagrow = DB_fetch_array($tagresult); - + if ($tagrow['tagdescription']=='') { + $tagrow['tagdescription']=_('None'); + } printf("<td>%s</td> <td class=number><a href='%s'>%s</a></td> <td>%s</td> Modified: trunk/GLAccounts.php =================================================================== --- trunk/GLAccounts.php 2011-04-10 02:04:57 UTC (rev 4544) +++ trunk/GLAccounts.php 2011-04-10 10:41:20 UTC (rev 4545) @@ -1,8 +1,6 @@ <?php -/* $Revision: 1.21 $ */ /* $Id$*/ -//$PageSecurity = 10; include('includes/session.inc'); $title = _('Chart of Accounts Maintenance'); @@ -58,19 +56,6 @@ )"; $result = DB_query($sql,$db,$ErrMsg); - /*Add the new chart details records for existing periods first */ -/*Maybe not required since these will be created from GLPostings.inc with correct B/fwd balances - $ErrMsg = _('Could not add the chart details for the new account'); - - $sql = 'INSERT INTO chartdetails (accountcode, period) - SELECT chartmaster.accountcode, periods.periodno - FROM chartmaster - CROSS JOIN periods - WHERE ( chartmaster.accountcode, periods.periodno ) NOT - IN ( SELECT chartdetails.accountcode, chartdetails.period FROM chartdetails )'; - - $result = DB_query($sql,$db,$ErrMsg); -*/ prnMsg(_('The new general ledger account has been added'),'success'); } @@ -218,7 +203,7 @@ if (!isset($_GET['delete'])) { - echo "<form method='post' name='GLAccounts' action='" . $_SERVER['PHP_SELF'] . '?' . SID . "'>"; + echo '<form method="post" name="GLAccounts" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedAccount)) { @@ -233,12 +218,16 @@ $_POST['AccountName'] = $myrow['accountname']; $_POST['Group'] = $myrow['group_']; - echo "<input type=hidden name='SelectedAccount' VALUE=$SelectedAccount>"; - echo "<input type=hidden name='AccountCode' VALUE=" . $_POST['AccountCode'] .">"; - echo "<table class=selection><tr><td>" . _('Account Code') . ":</td><td>" . $_POST['AccountCode'] . "</td></tr>"; + echo '<input type="hidden" name="SelectedAccount" value="' . $SelectedAccount . '">'; + echo '<input type="hidden" name="AccountCode" VALUE="' . $_POST['AccountCode'] .'">'; + echo '<table class=selection> + <tr><td>' . _('Account Code') . ':</td> + <td>' . $_POST['AccountCode'] . '</td></tr>'; } else { echo "<table class=selection>"; - echo "<tr><td>" . _('Account Code') . ":</td><td><input type=TEXT name='AccountCode' size=11 class=number maxlength=10></td></tr>"; + echo '<tr><td>' . _('Account Code') . ':</td> + <td><input type="text" name="AccountCode" size="11" class="number" maxlength="10" /></td> + </tr>'; } if (!isset($_POST['AccountName'])) {$_POST['AccountName']='';} @@ -251,17 +240,17 @@ while ($myrow = DB_fetch_array($result)){ if (isset($_POST['Group']) and $myrow[0]==$_POST['Group']){ - echo "<option selected VALUE='"; + echo '<option selected value="'; } else { - echo "<option VALUE='"; + echo '<option VALUE="'; } - echo $myrow[0] . "'>" . $myrow[0]; + echo $myrow[0] . '">' . $myrow[0] . '</option>'; } if (!isset($_GET['SelectedAccount']) or $_GET['SelectedAccount']=='') { - echo "<script>defaultControl(document.GLAccounts.AccountCode);</script>"; + echo '<script>defaultControl(document.GLAccounts.AccountCode);</script>'; } else { - echo "<script>defaultControl(document.GLAccounts.AccountName);</script>"; + echo '<script>defaultControl(document.GLAccounts.AccountName);</script>'; } echo '</select></td></tr></table>'; @@ -293,12 +282,12 @@ $result = DB_query($sql,$db,$ErrMsg); echo '<br><table class=selection>'; - echo "<tr> - <th>" . _('Account Code') . "</th> - <th>" . _('Account Name') . "</th> - <th>" . _('Account Group') . "</th> - <th>" . _('P/L or B/S') . "</th> - </tr>"; + echo '<tr> + <th>' . _('Account Code') . '</th> + <th>' . _('Account Name') . '</th> + <th>' . _('Account Group') . '</th> + <th>' . _('P/L or B/S') . '</th> + </tr>'; $k=0; //row colour counter @@ -323,9 +312,9 @@ $myrow[1], $myrow[2], $myrow[3], - $_SERVER['PHP_SELF'] . '?' . SID, + $_SERVER['PHP_SELF'] . '?', $myrow[0], - $_SERVER['PHP_SELF'] . '?' . SID, + $_SERVER['PHP_SELF'] . '?', $myrow[0]); } @@ -338,10 +327,10 @@ echo '<p>'; if (isset($SelectedAccount)) { - echo "<div class='centre'><a href='" . $_SERVER['PHP_SELF'] . '?' . SID ."'>" . _('Show All Accounts') . '</a></div>'; + echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Show All Accounts') . '</a></div>'; } -echo '<p>'; +echo '<p />'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/MRP.php =================================================================== --- trunk/MRP.php 2011-04-10 02:04:57 UTC (rev 4544) +++ trunk/MRP.php 2011-04-10 10:41:20 UTC (rev 4545) @@ -1,9 +1,7 @@ <?php -/* $Revision: 1.7 $ */ + /* $Id$*/ -//$PageSecurity=9; - include('includes/session.inc'); $title = _('Run MRP Calculation'); include('includes/header.inc'); @@ -18,21 +16,21 @@ echo '</br>' ._('Start time') . ': ' . date('h:i:s') . '</br>'; echo '</br>' . _('Initialising tables .....') . '</br>'; flush(); - $result = DB_query('DROP TABLE IF EXISTS tempbom',$db); - $result = DB_query('DROP TABLE IF EXISTS passbom',$db); - $result = DB_query('DROP TABLE IF EXISTS passbom2',$db); - $result = DB_query('DROP TABLE IF EXISTS bomlevels',$db); - $result = DB_query('DROP TABLE IF EXISTS levels',$db); + $result = DB_query("DROP TABLE IF EXISTS tempbom",$db); + $result = DB_query("DROP TABLE IF EXISTS passbom",$db); + $result = DB_query("DROP TABLE IF EXISTS passbom2",$db); + $result = DB_query("DROP TABLE IF EXISTS bomlevels",$db); + $result = DB_query("DROP TABLE IF EXISTS levels",$db); - $sql = 'CREATE TEMPORARY TABLE passbom (part char(20), - sortpart text) DEFAULT CHARSET=utf8'; + $sql = "CREATE TEMPORARY TABLE passbom (part char(20), + sortpart text) DEFAULT CHARSET=utf8"; $ErrMsg = _('The SQL to to create passbom failed with the message'); $result = DB_query($sql,$db,$ErrMsg); - $sql = 'CREATE TEMPORARY TABLE tempbom (parent char(20), + $sql = "CREATE TEMPORARY TABLE tempbom (parent char(20), component char(20), sortpart text, - level int) DEFAULT CHARSET=utf8'; + level int) DEFAULT CHARSET=utf8"; $result = DB_query($sql,$db,_('Create of tempbom failed because')); // To create levels, first, find parts in bom that are top level assemblies. // Do this by doing a LEFT JOIN from bom to bom (as bom2), linking @@ -45,10 +43,10 @@ flush(); // This finds the top level $sql = "INSERT INTO passbom (part, sortpart) - SELECT bom.component AS part, - CONCAT(bom.parent,'%',bom.component) AS sortpart - FROM bom LEFT JOIN bom as bom2 ON bom.parent = bom2.component - WHERE bom2.component IS NULL"; + SELECT bom.component AS part, + CONCAT(bom.parent,'%',bom.component) AS sortpart + FROM bom LEFT JOIN bom as bom2 ON bom.parent = bom2.component + WHERE bom2.component IS NULL"; $result = DB_query($sql,$db); $lctr = 2; @@ -76,12 +74,12 @@ FROM bom,passbom WHERE bom.parent = passbom.part"; $result = DB_query($sql,$db); - $result = DB_query('DROP TABLE IF EXISTS passbom2',$db); - $result = DB_query('ALTER TABLE passbom RENAME AS passbom2',$db); - $result = DB_query('DROP TABLE IF EXISTS passbom',$db); + $result = DB_query("DROP TABLE IF EXISTS passbom2",$db); + $result = DB_query("ALTER TABLE passbom RENAME AS passbom2",$db); + $result = DB_query("DROP TABLE IF EXISTS passbom",$db); - $sql = 'CREATE TEMPORARY TABLE passbom (part char(20), - sortpart text) DEFAULT CHARSET=utf8'; + $sql = "CREATE TEMPORARY TABLE passbom (part char(20), + sortpart text) DEFAULT CHARSET=utf8"; $result = DB_query($sql,$db); $sql = "INSERT INTO passbom (part, sortpart) @@ -92,9 +90,9 @@ $result = DB_query($sql,$db); - $sql = 'SELECT COUNT(*) FROM bom + $sql = "SELECT COUNT(*) FROM bom INNER JOIN passbom ON bom.parent = passbom.part - GROUP BY bom.parent'; + GROUP BY bom.parent"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -104,9 +102,9 @@ prnMsg(_('Creating bomlevels table'),'info'); flush(); - $sql = 'CREATE TEMPORARY TABLE bomlevels ( + $sql = "CREATE TEMPORARY TABLE bomlevels ( part char(20), - level int) DEFAULT CHARSET=utf8'; + level int) DEFAULT CHARSET=utf8"; $result = DB_query($sql,$db); // Read tempbom and split sortpart into separate parts. For each separate part, calculate level as @@ -114,7 +112,7 @@ // part in the array for a level 4 sortpart would be created as a level 3 in levels, the fourth // and last part in sortpart would have a level code of zero, meaning it has no components - $sql = 'SELECT * FROM tempbom'; + $sql = "SELECT * FROM tempbom"; $result = DB_query($sql,$db); while ($myrow=DB_fetch_array($result)) { $parts = explode('%',$myrow['sortpart']); @@ -140,7 +138,7 @@ shrinkfactor double NOT NULL default '0', eoq double NOT NULL default '0') DEFAULT CHARSET=utf8"; $result = DB_query($sql,$db); - $sql = 'INSERT INTO levels (part, + $sql = "INSERT INTO levels (part, level, leadtime, pansize, @@ -157,15 +155,15 @@ GROUP BY bomlevels.part, pansize, shrinkfactor, - stockmaster.eoq'; + stockmaster.eoq"; $result = DB_query($sql,$db); - $sql = 'ALTER TABLE levels ADD INDEX part(part)'; + $sql = "ALTER TABLE levels ADD INDEX part(part)"; $result = DB_query($sql,$db); // Create levels records with level of zero for all parts in stockmaster that // are not in bom - $sql = 'INSERT INTO levels (part, + $sql = "INSERT INTO levels (part, level, leadtime, pansize, @@ -179,53 +177,53 @@ stockmaster.eoq FROM stockmaster LEFT JOIN levels ON stockmaster.stockid = levels.part - WHERE levels.part IS NULL'; + WHERE levels.part IS NULL"; $result = DB_query($sql,$db); // Update leadtime in levels from purchdata. Do it twice so can make sure leadtime from preferred // vendor is used - $sql = 'UPDATE levels,purchdata + $sql = "UPDATE levels,purchdata SET levels.leadtime = purchdata.leadtime WHERE levels.part = purchdata.stockid - AND purchdata.leadtime > 0'; + AND purchdata.leadtime > 0"; $result = DB_query($sql,$db); - $sql = 'UPDATE levels,purchdata + $sql = "UPDATE levels,purchdata SET levels.leadtime = purchdata.leadtime WHERE levels.part = purchdata.stockid AND purchdata.preferred = 1 - AND purchdata.leadtime > 0'; + AND purchdata.leadtime > 0"; $result = DB_query($sql,$db); prnMsg(_('Levels table has been created'),'info'); flush(); // Get rid if temporary tables - $sql = 'DROP TABLE IF EXISTS tempbom'; + $sql = "DROP TABLE IF EXISTS tempbom"; //$result = DB_query($sql,$db); - $sql = 'DROP TABLE IF EXISTS passbom'; + $sql = "DROP TABLE IF EXISTS passbom"; //$result = DB_query($sql,$db); - $sql = 'DROP TABLE IF EXISTS passbom2'; + $sql = "DROP TABLE IF EXISTS passbom2"; //$result = DB_query($sql,$db); - $sql = 'DROP TABLE IF EXISTS bomlevels'; + $sql = "DROP TABLE IF EXISTS bomlevels"; //$result = DB_query($sql,$db); // In the following section, create mrprequirements from open sales orders and // mrpdemands prnMsg(_('Creating requirements table'),'info'); flush(); - $result = DB_query('DROP TABLE IF EXISTS mrprequirements',$db); + $result = DB_query("DROP TABLE IF EXISTS mrprequirements",$db); // directdemand is 1 if demand is directly for this part, is 0 if created because have netted // out supply and demands for a top level part and determined there is still a net // requirement left and have to pass that down to the BOM parts using the // CreateLowerLevelRequirement() function. Mostly do this so can distinguish the type // of requirements for the MRPShortageReport so don't show double requirements. - $sql = 'CREATE TABLE mrprequirements ( part char(20), + $sql = "CREATE TABLE mrprequirements ( part char(20), daterequired date, quantity double, mrpdemandtype varchar(6), orderno int(11), directdemand smallint, - whererequired char(20)) DEFAULT CHARSET=utf8'; + whererequired char(20)) DEFAULT CHARSET=utf8"; $result = DB_query($sql,$db,_('Create of mrprequirements failed because')); prnMsg(_('Loading requirements from sales orders'),'info'); Modified: trunk/MRPCalendar.php =================================================================== --- trunk/MRPCalendar.php 2011-04-10 02:04:57 UTC (rev 4544) +++ trunk/MRPCalendar.php 2011-04-10 10:41:20 UTC (rev 4545) @@ -1,12 +1,10 @@ <?php /* $Id$ */ -/* $Revision: 1.6 $ */ + // MRPCalendar.php // Maintains the calendar of valid manufacturing dates for MRP -//$PageSecurity=9; - include('includes/session.inc'); $title = _('MRP Calendar'); include('includes/header.inc'); @@ -75,15 +73,15 @@ return; } - $sql = 'DROP TABLE IF EXISTS mrpcalendar'; + $sql = "DROP TABLE IF EXISTS mrpcalendar"; $result = DB_query($sql,$db); - $sql = 'CREATE TABLE mrpcalendar ( + $sql = "CREATE TABLE mrpcalendar ( calendardate date NOT NULL, daynumber int(6) NOT NULL, - manufacturingflag smallint(6) NOT NULL default "1", + manufacturingflag smallint(6) NOT NULL default '1', INDEX (daynumber), - PRIMARY KEY (calendardate))'; + PRIMARY KEY (calendardate)) DEFAULT CHARSET=utf8"; $ErrMsg = _('The SQL to to create passbom failed with the message'); $result = DB_query($sql,$db,$ErrMsg); @@ -95,9 +93,9 @@ $ExcludeDays = array($_POST['Sunday'],$_POST['Monday'],$_POST['Tuesday'],$_POST['Wednesday'], $_POST['Thursday'],$_POST['Friday'],$_POST['Saturday']); - $caldate = $convertfromdate; + $CalDate = $convertfromdate; for ($i = 0; $i <= $datediff; $i++) { - $dateadd = FormatDateForSQL(DateAdd($caldate,"d",$i)); + $dateadd = FormatDateForSQL(DateAdd($CalDate,"d",$i)); // If the check box for the calendar date's day of week was clicked, set the manufacturing flag to 0 $dayofweek = DayOfWeekFromSQLDate($dateadd); @@ -121,16 +119,16 @@ // Update daynumber. Set it so non-manufacturing days will have the same daynumber as a valid // manufacturing day that precedes it. That way can read the table by the non-manufacturing day, // subtract the leadtime from the daynumber, and find the valid manufacturing day with that daynumber. - $daynumber = 1; - $sql = 'SELECT * FROM mrpcalendar ORDER BY calendardate'; + $DayNumber = 1; + $sql = "SELECT * FROM mrpcalendar ORDER BY calendardate"; $result = DB_query($sql,$db,$ErrMsg); while ($myrow = DB_fetch_array($result)) { if ($myrow['manufacturingflag'] == "1") { - $daynumber++; + $DayNumber++; } - $caldate = $myrow['calendardate']; - $sql = "UPDATE mrpcalendar SET daynumber = '$daynumber' - WHERE calendardate = '$caldate'"; + $CalDate = $myrow['calendardate']; + $sql = "UPDATE mrpcalendar SET daynumber = '" . $DayNumber . "' + WHERE calendardate = '$CalDate'"; $resultupdate = DB_query($sql,$db,$ErrMsg); } prnMsg(_("The MRP Calendar has been created"),'succes'); @@ -145,9 +143,9 @@ // After change the flag, re-calculate the daynumber for all dates. $InputError = 0; - $caldate = FormatDateForSQL($ChangeDate); + $CalDate = FormatDateForSQL($ChangeDate); $sql="SELECT COUNT(*) FROM mrpcalendar - WHERE calendardate='$caldate' + WHERE calendardate='$CalDate' GROUP BY calendardate"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -161,7 +159,7 @@ return; } - $sql="SELECT mrpcalendar.* FROM mrpcalendar WHERE calendardate='$caldate'"; + $sql="SELECT mrpcalendar.* FROM mrpcalendar WHERE calendardate='$CalDate'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); $newmanufacturingflag = 0; @@ -169,7 +167,7 @@ $newmanufacturingflag = 1; } $sql = "UPDATE mrpcalendar SET manufacturingflag = '".$newmanufacturingflag."' - WHERE calendardate = '".$caldate."'"; + WHERE calendardate = '".$CalDate."'"; $ErrMsg = _('Cannot update the MRP Calendar'); $resultupdate = DB_query($sql,$db,$ErrMsg); prnMsg(_("The MRP calendar record for $ChangeDate has been updated"),'success'); @@ -180,16 +178,16 @@ // Update daynumber. Set it so non-manufacturing days will have the same daynumber as a valid // manufacturing day that precedes it. That way can read the table by the non-manufacturing day, // subtract the leadtime from the daynumber, and find the valid manufacturing day with that daynumber. - $daynumber = 1; - $sql = 'SELECT * FROM mrpcalendar ORDER BY calendardate'; + $DayNumber = 1; + $sql = "SELECT * FROM mrpcalendar ORDER BY calendardate"; $result = DB_query($sql,$db,$ErrMsg); while ($myrow = DB_fetch_array($result)) { - if ($myrow['manufacturingflag'] == "1") { - $daynumber++; + if ($myrow['manufacturingflag'] == '1') { + $DayNumber++; } - $caldate = $myrow['calendardate']; - $sql = "UPDATE mrpcalendar SET daynumber = '$daynumber' - WHERE calendardate = '$caldate'"; + $CalDate = $myrow['calendardate']; + $sql = "UPDATE mrpcalendar SET daynumber = '" . $DayNumber . "' + WHERE calendardate = '" . $CalDate . "'"; $resultupdate = DB_query($sql,$db,$ErrMsg); } // End of while @@ -199,24 +197,24 @@ function listall(&$db) //####LISTALL_LISTALL_LISTALL_LISTALL_LISTALL_LISTALL_LISTALL_#### { // List all records in date range - $fromdate = FormatDateForSQL($_POST['FromDate']); - $todate = FormatDateForSQL($_POST['ToDate']); + $FromDate = FormatDateForSQL($_POST['FromDate']); + $ToDate = FormatDateForSQL($_POST['ToDate']); $sql = "SELECT calendardate, daynumber, manufacturingflag, DAYNAME(calendardate) as dayname FROM mrpcalendar - WHERE calendardate >='$fromdate' - AND calendardate <='$todate'"; + WHERE calendardate >='" . $FromDate . "' + AND calendardate <='" . $ToDate . "'"; $ErrMsg = _('The SQL to find the parts selected failed with the message'); $result = DB_query($sql,$db,$ErrMsg); - echo "</br><table class=selection> - <tr BGCOLOR =#800000> - <th>" . _('Date') . "</th> - <th>" . _('Manufacturing Date') . "</th> - </tr></font>"; + echo '</br><table class="selection"> + <tr bgcolor ="#800000"> + <th>' . _('Date') . '</th> + <th>' . _('Manufacturing Date') . '</th> + </tr>'; $ctr = 0; while ($myrow = DB_fetch_array($result)) { $flag = _('Yes'); @@ -251,51 +249,51 @@ $_POST['FromDate']=date($_SESSION['DefaultDateFormat']); $_POST['ToDate']=date($_SESSION['DefaultDateFormat']); } - echo "<form action=" . $_SERVER['PHP_SELF'] . "?" . SID ." method=post></br></br>"; + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post"><br /><br />'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br><table class=selection>'; + echo '<br><table class="selection">'; echo '<tr> - <td>' . _('From Date') . ":</td> - <td><input type='Text' class=date alt='".$_SESSION['DefaultDateFormat'] ."' name='FromDate' size=10 maxlength=10 value=" . $_POST['FromDate'] . '></td></tr> - <tr></tr><td>' . _('To Date') . ":</td> - <td><input type='Text' class=date alt='".$_SESSION['DefaultDateFormat'] ."' name='ToDate' size=10 maxlength=10 value=" . $_POST['ToDate'] . '></td> + <td>' . _('From Date') . ':</td> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] .'" name="FromDate" size="10" maxlength="10" value="' . $_POST['FromDate'] . '"></td></tr> + <tr></tr><td>' . _('To Date') . ':</td> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] .'" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '"></td> </tr> <tr><td></td></tr> <tr><td></td></tr> <tr><td>'._('Exclude The Following Days').'</td></tr> <tr> - <td>' . _('Saturday') . ":</td> - <td><input type='checkbox' name='Saturday' value='Saturday'></td> + <td>' . _('Saturday') . ':</td> + <td><input type="checkbox" name="Saturday" value="Saturday"></td> </tr> <tr> - <td>" . _('Sunday') . ":</td> - <td><input type='checkbox' name='Sunday' value='Sunday'></td> + <td>' . _('Sunday') . ':</td> + <td><input type="checkbox" name="Sunday" value="Sunday"></td> </tr> <tr> - <td>" . _('Monday') . ":</td> - <td><input type='checkbox' name='Monday' value='Monday'></td> + <td>' . _('Monday') . ':</td> + <td><input type="checkbox" name="Monday" value="Monday"></td> </tr> <tr> - <td>" . _('Tuesday') . ":</td> - <td><input type='checkbox' name='Tuesday' value='Tuesday'></td> + <td>' . _('Tuesday') . ':</td> + <td><input type="checkbox" name="Tuesday" value="Tuesday"></td> </tr> <tr> - <td>" . _('Wednesday') . ":</td> - <td><input type='checkbox' name='Wednesday' value='Wednesday'></td> + <td>' . _('Wednesday') . ':</td> + <td><input type="checkbox" name="Wednesday" value="Wednesday"></td> </tr> <tr> - <td>" . _('Thursday') . ":</td> - <td><input type='checkbox' name='Thursday' value='Thursday'></td> + <td>' . _('Thursday') . ':</td> + <td><input type="checkbox" name="Thursday" value="Thursday"></td> </tr> <tr> - <td>" . _('Friday') . ":</td> - <td><input type='checkbox' name='Friday' value='Friday'></td> + <td>' . _('Friday') . ':</td> + <td><input type="checkbox" name="Friday" value="Friday"></td> </tr> </table><br> - <div class=centre><input type='submit' name='submit' value='" . _('Create Calendar') . "'> - <input type='submit' name='listall' value='" . _('List Date Range') . "'></div>"; + <div class=centre><input type="submit" name="submit" value="' . _('Create Calendar') . '"> + <input type="submit" name="listall" value="' . _('List Date Range') . '"></div>'; if (!isset($_POST['ChangeDate'])) { $_POST['ChangeDate']=date($_SESSION['DefaultDateFormat']); @@ -303,15 +301,14 @@ echo '<br><table class=selection>'; echo '<tr> - <td>' . _('Change Date Status') . ":</td> - <td><input type='Text' name='ChangeDate' class=date alt='".$_SESSION['DefaultDateFormat'] . - "' size=12 maxlength=12 value=" . $_POST['ChangeDate'] . '></td> + <td>' . _('Change Date Status') . ':</td> + <td><input type="text" name="ChangeDate" class="date" alt="' . $_SESSION['DefaultDateFormat'] . + '" size="12" maxlength="12" value="' . $_POST['ChangeDate'] . '"></td> <td><input type="submit" name="update" value="' . _('Update') . '"></td></tr></table>'; -echo "</br></br><div class='centre'></div>"; +echo '<br /><br /><div class="centre"></div>'; echo '</form>'; } // End of function display() - include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/MRPShortages.php =================================================================== --- trunk/MRPShortages.php 2011-04-10 02:04:57 UTC (rev 4544) +++ trunk/MRPShortages.php 2011-04-10 10:41:20 UTC (rev 4545) @@ -6,7 +6,7 @@ include('includes/session.inc'); //ANSI SQL??? -$sql='SHOW TABLES WHERE Tables_in_'.$_SESSION['DatabaseName']."='mrprequirements'"; +$sql="SHOW TABLES WHERE Tables_in_" . $_SESSION['DatabaseName'] . "='mrprequirements'"; $result=DB_query($sql,$db); if (DB_num_rows($result)==0) { @@ -32,48 +32,47 @@ // total for either supply or demand. Did this to simplify main sql where used // several subqueries. - $sql = 'CREATE TEMPORARY TABLE demandtotal ( + $sql = "CREATE TEMPORARY TABLE demandtotal ( part char(20), demand double, - KEY `PART` (`part`)) DEFAULT CHARSET=utf8'; + KEY `PART` (`part`)) DEFAULT CHARSET=utf8"; $result = DB_query($sql,$db,_('Create of demandtotal failed because')); - $sql = 'INSERT INTO demandtotal + $sql = "INSERT INTO demandtotal (part, demand) SELECT part, SUM(quantity) as demand FROM mrprequirements - GROUP BY part'; + GROUP BY part"; $result = DB_query($sql,$db); - $sql = 'CREATE TEMPORARY TABLE supplytotal ( + $sql = "CREATE TEMPORARY TABLE supplytotal ( part char(20), supply double, - KEY `PART` (`part`)) DEFAULT CHARSET=utf8'; + KEY `PART` (`part`)) DEFAULT CHARSET=utf8"; $result = DB_query($sql,$db,_('Create of supplytotal failed because')); /* 21/03/2010: Ricard modification to allow items with total supply = 0 be included in the report */ - $sql = 'INSERT INTO supplytotal + $sql = "INSERT INTO supplytotal (part, supply) SELECT stockid, 0 - FROM stockmaster'; + FROM stockmaster"; $result = DB_query($sql,$db); - $sql = 'UPDATE supplytotal + $sql = "UPDATE supplytotal SET supply = (SELECT SUM(mrpsupplies.supplyquantity) FROM mrpsupplies WHERE supplytotal.part = mrpsupplies.part - AND mrpsupplies.supplyquantity > 0)'; + AND mrpsupplies.supplyquantity > 0)"; $result = DB_query($sql,$db); - $sql = 'UPDATE supplytotal SET supply = 0 WHERE supply IS NULL '; + $sql = "UPDATE supplytotal SET supply = 0 WHERE supply IS NULL"; $result = DB_query($sql,$db); -/* End Ricard modification */ // Only include directdemand mrprequirements so don't have demand for top level parts and also // show demand for the lower level parts that the upper level part generates. See MRP.php for Modified: trunk/PDFPrintLabel.php =================================================================== --- trunk/PDFPrintLabel.php 2011-04-10 02:04:57 UTC (rev 4544) +++ trunk/PDFPrintLabel.php 2011-04-10 10:41:20 UTC (rev 4545) @@ -118,15 +118,15 @@ <input type="submit" name="PDFTest" value="'. _('Print labels with borders') .'"></div>'; $iTxt=0; - echo '<script type="text/javascript"> - function setAll(all) { - var x=document.getElementById("form1"); - for (var i=0;i<x.length;i++) { - if (x.elements[i].id==\'item\'); - x.elements[i].checked=all.checked; - } - } - </script>'; + echo "<script type=\"text/javascript\"> + function setAll(all) { + var x=document.getElementById('form1'); + for (var i=0;i<x.length;i++) { + if (x.elements[i].id=='item'); + x.elements[i].checked=all.checked; + } + } + </script>"; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' .$txt[$iTxt++].'</p>'; echo '<form name ="form1" action="'.$_SERVER['PHP_SELF'].'" method="POST" id="form1">'; Modified: trunk/PDFStockTransfer.php =================================================================== --- trunk/PDFStockTransfer.php 2011-04-10 02:04:57 UTC (rev 4544) +++ trunk/PDFStockTransfer.php 2011-04-10 10:41:20 UTC (rev 4545) @@ -74,7 +74,7 @@ //get the next row which will be the quantity received in the receiving location $myNextRow=DB_fetch_array($result); $ToCode=$myNextRow['loccode']; -$To = $myrow['locationname']; +$To = $myNextRow['locationname']; $Quantity=$myNextRow['qty']; $Description=$myNextRow['description']; Added: trunk/ReprintGRN.php =================================================================== --- trunk/ReprintGRN.php (rev 0) +++ trunk/ReprintGRN.php 2011-04-10 10:41:20 UTC (rev 4545) @@ -0,0 +1,100 @@ +<?php +/* $Id: ReprintGrn.php 4486 2011-02-08 09:20:50Z daintree $*/ + +include('includes/session.inc'); +$title=_('Reprint a GRN'); +include('includes/header.inc'); + +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . + $title . '" alt="" />' . ' ' . $title . '</p>'; + +if (!isset($_POST['PONumber'])) { + $_POST['PONumber']=''; +} + +echo '<form action="' . $_SERVER['PHP_SELF'] . '?' . SID . '" method=post>'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<table class="selection">'; +echo '<tr><th colspan="2"><font size="2" color="navy">' . _('Select a purchase order') . '</th></tr>'; +echo '<tr><td>' . _('Enter a Purchase Order Number') . '</td>'; +echo '<td>' . '<input type="text" name="PONumber" class="number" size="7" value="'.$_POST['PONumber'].'" /></td></tr>'; +echo '<tr><td colspan=2 style="text-align: center">' . '<input type="submit" name="Show" value="Show GRNs" /></td></tr>'; + +echo '</table>'; +echo '</form>'; + +if (isset($_POST['Show'])) { + if ($_POST['PONumber']=='') { + echo '<br />'; + prnMsg( _('You must enter a purchase order number in the box above'), 'warn'); + include('includes/footer.inc'); + exit; + } + $sql="SELECT count(orderno) + FROM purchorders + WHERE orderno='" . $_POST['PONumber'] ."'"; + $result=DB_query($sql, $db); + $myrow=DB_fetch_row($result); + if ($myrow[0]==0) { + echo '<br />'; + prnMsg( _('This purchase order does not exist on the system. Please try again.'), 'warn'); + include('includes/footer.inc'); + exit; + } + $sql="SELECT grnbatch, + grnno, + grns.podetailitem, + grns.i... [truncated message content] |
From: <dai...@us...> - 2011-04-10 10:41:28
|
Revision: 4545 http://web-erp.svn.sourceforge.net/web-erp/?rev=4545&view=rev Author: daintree Date: 2011-04-10 10:41:20 +0000 (Sun, 10 Apr 2011) Log Message: ----------- Tim launchpad stuff Modified Paths: -------------- trunk/GLAccountInquiry.php trunk/GLAccounts.php trunk/MRP.php trunk/MRPCalendar.php trunk/MRPShortages.php trunk/PDFPrintLabel.php trunk/PDFStockTransfer.php trunk/SelectProduct.php trunk/StockTransferControlled.php trunk/StockTransfers.php trunk/SupplierInvoice.php trunk/doc/Change.log.html trunk/includes/DefineLabelClass.php trunk/includes/DefineStockTransfers.php trunk/includes/OutputSerialItems.php trunk/index.php trunk/sql/mysql/upgrade3.11.1-4.00.sql Added Paths: ----------- trunk/ReprintGRN.php Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2011-04-10 02:04:57 UTC (rev 4544) +++ trunk/GLAccountInquiry.php 2011-04-10 10:41:20 UTC (rev 4545) @@ -268,7 +268,9 @@ $tagsql="SELECT tagdescription FROM tags WHERE tagref='".$myrow['tag'] . "'"; $tagresult=DB_query($tagsql,$db); $tagrow = DB_fetch_array($tagresult); - + if ($tagrow['tagdescription']=='') { + $tagrow['tagdescription']=_('None'); + } printf("<td>%s</td> <td class=number><a href='%s'>%s</a></td> <td>%s</td> Modified: trunk/GLAccounts.php =================================================================== --- trunk/GLAccounts.php 2011-04-10 02:04:57 UTC (rev 4544) +++ trunk/GLAccounts.php 2011-04-10 10:41:20 UTC (rev 4545) @@ -1,8 +1,6 @@ <?php -/* $Revision: 1.21 $ */ /* $Id$*/ -//$PageSecurity = 10; include('includes/session.inc'); $title = _('Chart of Accounts Maintenance'); @@ -58,19 +56,6 @@ )"; $result = DB_query($sql,$db,$ErrMsg); - /*Add the new chart details records for existing periods first */ -/*Maybe not required since these will be created from GLPostings.inc with correct B/fwd balances - $ErrMsg = _('Could not add the chart details for the new account'); - - $sql = 'INSERT INTO chartdetails (accountcode, period) - SELECT chartmaster.accountcode, periods.periodno - FROM chartmaster - CROSS JOIN periods - WHERE ( chartmaster.accountcode, periods.periodno ) NOT - IN ( SELECT chartdetails.accountcode, chartdetails.period FROM chartdetails )'; - - $result = DB_query($sql,$db,$ErrMsg); -*/ prnMsg(_('The new general ledger account has been added'),'success'); } @@ -218,7 +203,7 @@ if (!isset($_GET['delete'])) { - echo "<form method='post' name='GLAccounts' action='" . $_SERVER['PHP_SELF'] . '?' . SID . "'>"; + echo '<form method="post" name="GLAccounts" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedAccount)) { @@ -233,12 +218,16 @@ $_POST['AccountName'] = $myrow['accountname']; $_POST['Group'] = $myrow['group_']; - echo "<input type=hidden name='SelectedAccount' VALUE=$SelectedAccount>"; - echo "<input type=hidden name='AccountCode' VALUE=" . $_POST['AccountCode'] .">"; - echo "<table class=selection><tr><td>" . _('Account Code') . ":</td><td>" . $_POST['AccountCode'] . "</td></tr>"; + echo '<input type="hidden" name="SelectedAccount" value="' . $SelectedAccount . '">'; + echo '<input type="hidden" name="AccountCode" VALUE="' . $_POST['AccountCode'] .'">'; + echo '<table class=selection> + <tr><td>' . _('Account Code') . ':</td> + <td>' . $_POST['AccountCode'] . '</td></tr>'; } else { echo "<table class=selection>"; - echo "<tr><td>" . _('Account Code') . ":</td><td><input type=TEXT name='AccountCode' size=11 class=number maxlength=10></td></tr>"; + echo '<tr><td>' . _('Account Code') . ':</td> + <td><input type="text" name="AccountCode" size="11" class="number" maxlength="10" /></td> + </tr>'; } if (!isset($_POST['AccountName'])) {$_POST['AccountName']='';} @@ -251,17 +240,17 @@ while ($myrow = DB_fetch_array($result)){ if (isset($_POST['Group']) and $myrow[0]==$_POST['Group']){ - echo "<option selected VALUE='"; + echo '<option selected value="'; } else { - echo "<option VALUE='"; + echo '<option VALUE="'; } - echo $myrow[0] . "'>" . $myrow[0]; + echo $myrow[0] . '">' . $myrow[0] . '</option>'; } if (!isset($_GET['SelectedAccount']) or $_GET['SelectedAccount']=='') { - echo "<script>defaultControl(document.GLAccounts.AccountCode);</script>"; + echo '<script>defaultControl(document.GLAccounts.AccountCode);</script>'; } else { - echo "<script>defaultControl(document.GLAccounts.AccountName);</script>"; + echo '<script>defaultControl(document.GLAccounts.AccountName);</script>'; } echo '</select></td></tr></table>'; @@ -293,12 +282,12 @@ $result = DB_query($sql,$db,$ErrMsg); echo '<br><table class=selection>'; - echo "<tr> - <th>" . _('Account Code') . "</th> - <th>" . _('Account Name') . "</th> - <th>" . _('Account Group') . "</th> - <th>" . _('P/L or B/S') . "</th> - </tr>"; + echo '<tr> + <th>' . _('Account Code') . '</th> + <th>' . _('Account Name') . '</th> + <th>' . _('Account Group') . '</th> + <th>' . _('P/L or B/S') . '</th> + </tr>'; $k=0; //row colour counter @@ -323,9 +312,9 @@ $myrow[1], $myrow[2], $myrow[3], - $_SERVER['PHP_SELF'] . '?' . SID, + $_SERVER['PHP_SELF'] . '?', $myrow[0], - $_SERVER['PHP_SELF'] . '?' . SID, + $_SERVER['PHP_SELF'] . '?', $myrow[0]); } @@ -338,10 +327,10 @@ echo '<p>'; if (isset($SelectedAccount)) { - echo "<div class='centre'><a href='" . $_SERVER['PHP_SELF'] . '?' . SID ."'>" . _('Show All Accounts') . '</a></div>'; + echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Show All Accounts') . '</a></div>'; } -echo '<p>'; +echo '<p />'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/MRP.php =================================================================== --- trunk/MRP.php 2011-04-10 02:04:57 UTC (rev 4544) +++ trunk/MRP.php 2011-04-10 10:41:20 UTC (rev 4545) @@ -1,9 +1,7 @@ <?php -/* $Revision: 1.7 $ */ + /* $Id$*/ -//$PageSecurity=9; - include('includes/session.inc'); $title = _('Run MRP Calculation'); include('includes/header.inc'); @@ -18,21 +16,21 @@ echo '</br>' ._('Start time') . ': ' . date('h:i:s') . '</br>'; echo '</br>' . _('Initialising tables .....') . '</br>'; flush(); - $result = DB_query('DROP TABLE IF EXISTS tempbom',$db); - $result = DB_query('DROP TABLE IF EXISTS passbom',$db); - $result = DB_query('DROP TABLE IF EXISTS passbom2',$db); - $result = DB_query('DROP TABLE IF EXISTS bomlevels',$db); - $result = DB_query('DROP TABLE IF EXISTS levels',$db); + $result = DB_query("DROP TABLE IF EXISTS tempbom",$db); + $result = DB_query("DROP TABLE IF EXISTS passbom",$db); + $result = DB_query("DROP TABLE IF EXISTS passbom2",$db); + $result = DB_query("DROP TABLE IF EXISTS bomlevels",$db); + $result = DB_query("DROP TABLE IF EXISTS levels",$db); - $sql = 'CREATE TEMPORARY TABLE passbom (part char(20), - sortpart text) DEFAULT CHARSET=utf8'; + $sql = "CREATE TEMPORARY TABLE passbom (part char(20), + sortpart text) DEFAULT CHARSET=utf8"; $ErrMsg = _('The SQL to to create passbom failed with the message'); $result = DB_query($sql,$db,$ErrMsg); - $sql = 'CREATE TEMPORARY TABLE tempbom (parent char(20), + $sql = "CREATE TEMPORARY TABLE tempbom (parent char(20), component char(20), sortpart text, - level int) DEFAULT CHARSET=utf8'; + level int) DEFAULT CHARSET=utf8"; $result = DB_query($sql,$db,_('Create of tempbom failed because')); // To create levels, first, find parts in bom that are top level assemblies. // Do this by doing a LEFT JOIN from bom to bom (as bom2), linking @@ -45,10 +43,10 @@ flush(); // This finds the top level $sql = "INSERT INTO passbom (part, sortpart) - SELECT bom.component AS part, - CONCAT(bom.parent,'%',bom.component) AS sortpart - FROM bom LEFT JOIN bom as bom2 ON bom.parent = bom2.component - WHERE bom2.component IS NULL"; + SELECT bom.component AS part, + CONCAT(bom.parent,'%',bom.component) AS sortpart + FROM bom LEFT JOIN bom as bom2 ON bom.parent = bom2.component + WHERE bom2.component IS NULL"; $result = DB_query($sql,$db); $lctr = 2; @@ -76,12 +74,12 @@ FROM bom,passbom WHERE bom.parent = passbom.part"; $result = DB_query($sql,$db); - $result = DB_query('DROP TABLE IF EXISTS passbom2',$db); - $result = DB_query('ALTER TABLE passbom RENAME AS passbom2',$db); - $result = DB_query('DROP TABLE IF EXISTS passbom',$db); + $result = DB_query("DROP TABLE IF EXISTS passbom2",$db); + $result = DB_query("ALTER TABLE passbom RENAME AS passbom2",$db); + $result = DB_query("DROP TABLE IF EXISTS passbom",$db); - $sql = 'CREATE TEMPORARY TABLE passbom (part char(20), - sortpart text) DEFAULT CHARSET=utf8'; + $sql = "CREATE TEMPORARY TABLE passbom (part char(20), + sortpart text) DEFAULT CHARSET=utf8"; $result = DB_query($sql,$db); $sql = "INSERT INTO passbom (part, sortpart) @@ -92,9 +90,9 @@ $result = DB_query($sql,$db); - $sql = 'SELECT COUNT(*) FROM bom + $sql = "SELECT COUNT(*) FROM bom INNER JOIN passbom ON bom.parent = passbom.part - GROUP BY bom.parent'; + GROUP BY bom.parent"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -104,9 +102,9 @@ prnMsg(_('Creating bomlevels table'),'info'); flush(); - $sql = 'CREATE TEMPORARY TABLE bomlevels ( + $sql = "CREATE TEMPORARY TABLE bomlevels ( part char(20), - level int) DEFAULT CHARSET=utf8'; + level int) DEFAULT CHARSET=utf8"; $result = DB_query($sql,$db); // Read tempbom and split sortpart into separate parts. For each separate part, calculate level as @@ -114,7 +112,7 @@ // part in the array for a level 4 sortpart would be created as a level 3 in levels, the fourth // and last part in sortpart would have a level code of zero, meaning it has no components - $sql = 'SELECT * FROM tempbom'; + $sql = "SELECT * FROM tempbom"; $result = DB_query($sql,$db); while ($myrow=DB_fetch_array($result)) { $parts = explode('%',$myrow['sortpart']); @@ -140,7 +138,7 @@ shrinkfactor double NOT NULL default '0', eoq double NOT NULL default '0') DEFAULT CHARSET=utf8"; $result = DB_query($sql,$db); - $sql = 'INSERT INTO levels (part, + $sql = "INSERT INTO levels (part, level, leadtime, pansize, @@ -157,15 +155,15 @@ GROUP BY bomlevels.part, pansize, shrinkfactor, - stockmaster.eoq'; + stockmaster.eoq"; $result = DB_query($sql,$db); - $sql = 'ALTER TABLE levels ADD INDEX part(part)'; + $sql = "ALTER TABLE levels ADD INDEX part(part)"; $result = DB_query($sql,$db); // Create levels records with level of zero for all parts in stockmaster that // are not in bom - $sql = 'INSERT INTO levels (part, + $sql = "INSERT INTO levels (part, level, leadtime, pansize, @@ -179,53 +177,53 @@ stockmaster.eoq FROM stockmaster LEFT JOIN levels ON stockmaster.stockid = levels.part - WHERE levels.part IS NULL'; + WHERE levels.part IS NULL"; $result = DB_query($sql,$db); // Update leadtime in levels from purchdata. Do it twice so can make sure leadtime from preferred // vendor is used - $sql = 'UPDATE levels,purchdata + $sql = "UPDATE levels,purchdata SET levels.leadtime = purchdata.leadtime WHERE levels.part = purchdata.stockid - AND purchdata.leadtime > 0'; + AND purchdata.leadtime > 0"; $result = DB_query($sql,$db); - $sql = 'UPDATE levels,purchdata + $sql = "UPDATE levels,purchdata SET levels.leadtime = purchdata.leadtime WHERE levels.part = purchdata.stockid AND purchdata.preferred = 1 - AND purchdata.leadtime > 0'; + AND purchdata.leadtime > 0"; $result = DB_query($sql,$db); prnMsg(_('Levels table has been created'),'info'); flush(); // Get rid if temporary tables - $sql = 'DROP TABLE IF EXISTS tempbom'; + $sql = "DROP TABLE IF EXISTS tempbom"; //$result = DB_query($sql,$db); - $sql = 'DROP TABLE IF EXISTS passbom'; + $sql = "DROP TABLE IF EXISTS passbom"; //$result = DB_query($sql,$db); - $sql = 'DROP TABLE IF EXISTS passbom2'; + $sql = "DROP TABLE IF EXISTS passbom2"; //$result = DB_query($sql,$db); - $sql = 'DROP TABLE IF EXISTS bomlevels'; + $sql = "DROP TABLE IF EXISTS bomlevels"; //$result = DB_query($sql,$db); // In the following section, create mrprequirements from open sales orders and // mrpdemands prnMsg(_('Creating requirements table'),'info'); flush(); - $result = DB_query('DROP TABLE IF EXISTS mrprequirements',$db); + $result = DB_query("DROP TABLE IF EXISTS mrprequirements",$db); // directdemand is 1 if demand is directly for this part, is 0 if created because have netted // out supply and demands for a top level part and determined there is still a net // requirement left and have to pass that down to the BOM parts using the // CreateLowerLevelRequirement() function. Mostly do this so can distinguish the type // of requirements for the MRPShortageReport so don't show double requirements. - $sql = 'CREATE TABLE mrprequirements ( part char(20), + $sql = "CREATE TABLE mrprequirements ( part char(20), daterequired date, quantity double, mrpdemandtype varchar(6), orderno int(11), directdemand smallint, - whererequired char(20)) DEFAULT CHARSET=utf8'; + whererequired char(20)) DEFAULT CHARSET=utf8"; $result = DB_query($sql,$db,_('Create of mrprequirements failed because')); prnMsg(_('Loading requirements from sales orders'),'info'); Modified: trunk/MRPCalendar.php =================================================================== --- trunk/MRPCalendar.php 2011-04-10 02:04:57 UTC (rev 4544) +++ trunk/MRPCalendar.php 2011-04-10 10:41:20 UTC (rev 4545) @@ -1,12 +1,10 @@ <?php /* $Id$ */ -/* $Revision: 1.6 $ */ + // MRPCalendar.php // Maintains the calendar of valid manufacturing dates for MRP -//$PageSecurity=9; - include('includes/session.inc'); $title = _('MRP Calendar'); include('includes/header.inc'); @@ -75,15 +73,15 @@ return; } - $sql = 'DROP TABLE IF EXISTS mrpcalendar'; + $sql = "DROP TABLE IF EXISTS mrpcalendar"; $result = DB_query($sql,$db); - $sql = 'CREATE TABLE mrpcalendar ( + $sql = "CREATE TABLE mrpcalendar ( calendardate date NOT NULL, daynumber int(6) NOT NULL, - manufacturingflag smallint(6) NOT NULL default "1", + manufacturingflag smallint(6) NOT NULL default '1', INDEX (daynumber), - PRIMARY KEY (calendardate))'; + PRIMARY KEY (calendardate)) DEFAULT CHARSET=utf8"; $ErrMsg = _('The SQL to to create passbom failed with the message'); $result = DB_query($sql,$db,$ErrMsg); @@ -95,9 +93,9 @@ $ExcludeDays = array($_POST['Sunday'],$_POST['Monday'],$_POST['Tuesday'],$_POST['Wednesday'], $_POST['Thursday'],$_POST['Friday'],$_POST['Saturday']); - $caldate = $convertfromdate; + $CalDate = $convertfromdate; for ($i = 0; $i <= $datediff; $i++) { - $dateadd = FormatDateForSQL(DateAdd($caldate,"d",$i)); + $dateadd = FormatDateForSQL(DateAdd($CalDate,"d",$i)); // If the check box for the calendar date's day of week was clicked, set the manufacturing flag to 0 $dayofweek = DayOfWeekFromSQLDate($dateadd); @@ -121,16 +119,16 @@ // Update daynumber. Set it so non-manufacturing days will have the same daynumber as a valid // manufacturing day that precedes it. That way can read the table by the non-manufacturing day, // subtract the leadtime from the daynumber, and find the valid manufacturing day with that daynumber. - $daynumber = 1; - $sql = 'SELECT * FROM mrpcalendar ORDER BY calendardate'; + $DayNumber = 1; + $sql = "SELECT * FROM mrpcalendar ORDER BY calendardate"; $result = DB_query($sql,$db,$ErrMsg); while ($myrow = DB_fetch_array($result)) { if ($myrow['manufacturingflag'] == "1") { - $daynumber++; + $DayNumber++; } - $caldate = $myrow['calendardate']; - $sql = "UPDATE mrpcalendar SET daynumber = '$daynumber' - WHERE calendardate = '$caldate'"; + $CalDate = $myrow['calendardate']; + $sql = "UPDATE mrpcalendar SET daynumber = '" . $DayNumber . "' + WHERE calendardate = '$CalDate'"; $resultupdate = DB_query($sql,$db,$ErrMsg); } prnMsg(_("The MRP Calendar has been created"),'succes'); @@ -145,9 +143,9 @@ // After change the flag, re-calculate the daynumber for all dates. $InputError = 0; - $caldate = FormatDateForSQL($ChangeDate); + $CalDate = FormatDateForSQL($ChangeDate); $sql="SELECT COUNT(*) FROM mrpcalendar - WHERE calendardate='$caldate' + WHERE calendardate='$CalDate' GROUP BY calendardate"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -161,7 +159,7 @@ return; } - $sql="SELECT mrpcalendar.* FROM mrpcalendar WHERE calendardate='$caldate'"; + $sql="SELECT mrpcalendar.* FROM mrpcalendar WHERE calendardate='$CalDate'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); $newmanufacturingflag = 0; @@ -169,7 +167,7 @@ $newmanufacturingflag = 1; } $sql = "UPDATE mrpcalendar SET manufacturingflag = '".$newmanufacturingflag."' - WHERE calendardate = '".$caldate."'"; + WHERE calendardate = '".$CalDate."'"; $ErrMsg = _('Cannot update the MRP Calendar'); $resultupdate = DB_query($sql,$db,$ErrMsg); prnMsg(_("The MRP calendar record for $ChangeDate has been updated"),'success'); @@ -180,16 +178,16 @@ // Update daynumber. Set it so non-manufacturing days will have the same daynumber as a valid // manufacturing day that precedes it. That way can read the table by the non-manufacturing day, // subtract the leadtime from the daynumber, and find the valid manufacturing day with that daynumber. - $daynumber = 1; - $sql = 'SELECT * FROM mrpcalendar ORDER BY calendardate'; + $DayNumber = 1; + $sql = "SELECT * FROM mrpcalendar ORDER BY calendardate"; $result = DB_query($sql,$db,$ErrMsg); while ($myrow = DB_fetch_array($result)) { - if ($myrow['manufacturingflag'] == "1") { - $daynumber++; + if ($myrow['manufacturingflag'] == '1') { + $DayNumber++; } - $caldate = $myrow['calendardate']; - $sql = "UPDATE mrpcalendar SET daynumber = '$daynumber' - WHERE calendardate = '$caldate'"; + $CalDate = $myrow['calendardate']; + $sql = "UPDATE mrpcalendar SET daynumber = '" . $DayNumber . "' + WHERE calendardate = '" . $CalDate . "'"; $resultupdate = DB_query($sql,$db,$ErrMsg); } // End of while @@ -199,24 +197,24 @@ function listall(&$db) //####LISTALL_LISTALL_LISTALL_LISTALL_LISTALL_LISTALL_LISTALL_#### { // List all records in date range - $fromdate = FormatDateForSQL($_POST['FromDate']); - $todate = FormatDateForSQL($_POST['ToDate']); + $FromDate = FormatDateForSQL($_POST['FromDate']); + $ToDate = FormatDateForSQL($_POST['ToDate']); $sql = "SELECT calendardate, daynumber, manufacturingflag, DAYNAME(calendardate) as dayname FROM mrpcalendar - WHERE calendardate >='$fromdate' - AND calendardate <='$todate'"; + WHERE calendardate >='" . $FromDate . "' + AND calendardate <='" . $ToDate . "'"; $ErrMsg = _('The SQL to find the parts selected failed with the message'); $result = DB_query($sql,$db,$ErrMsg); - echo "</br><table class=selection> - <tr BGCOLOR =#800000> - <th>" . _('Date') . "</th> - <th>" . _('Manufacturing Date') . "</th> - </tr></font>"; + echo '</br><table class="selection"> + <tr bgcolor ="#800000"> + <th>' . _('Date') . '</th> + <th>' . _('Manufacturing Date') . '</th> + </tr>'; $ctr = 0; while ($myrow = DB_fetch_array($result)) { $flag = _('Yes'); @@ -251,51 +249,51 @@ $_POST['FromDate']=date($_SESSION['DefaultDateFormat']); $_POST['ToDate']=date($_SESSION['DefaultDateFormat']); } - echo "<form action=" . $_SERVER['PHP_SELF'] . "?" . SID ." method=post></br></br>"; + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post"><br /><br />'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br><table class=selection>'; + echo '<br><table class="selection">'; echo '<tr> - <td>' . _('From Date') . ":</td> - <td><input type='Text' class=date alt='".$_SESSION['DefaultDateFormat'] ."' name='FromDate' size=10 maxlength=10 value=" . $_POST['FromDate'] . '></td></tr> - <tr></tr><td>' . _('To Date') . ":</td> - <td><input type='Text' class=date alt='".$_SESSION['DefaultDateFormat'] ."' name='ToDate' size=10 maxlength=10 value=" . $_POST['ToDate'] . '></td> + <td>' . _('From Date') . ':</td> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] .'" name="FromDate" size="10" maxlength="10" value="' . $_POST['FromDate'] . '"></td></tr> + <tr></tr><td>' . _('To Date') . ':</td> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] .'" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '"></td> </tr> <tr><td></td></tr> <tr><td></td></tr> <tr><td>'._('Exclude The Following Days').'</td></tr> <tr> - <td>' . _('Saturday') . ":</td> - <td><input type='checkbox' name='Saturday' value='Saturday'></td> + <td>' . _('Saturday') . ':</td> + <td><input type="checkbox" name="Saturday" value="Saturday"></td> </tr> <tr> - <td>" . _('Sunday') . ":</td> - <td><input type='checkbox' name='Sunday' value='Sunday'></td> + <td>' . _('Sunday') . ':</td> + <td><input type="checkbox" name="Sunday" value="Sunday"></td> </tr> <tr> - <td>" . _('Monday') . ":</td> - <td><input type='checkbox' name='Monday' value='Monday'></td> + <td>' . _('Monday') . ':</td> + <td><input type="checkbox" name="Monday" value="Monday"></td> </tr> <tr> - <td>" . _('Tuesday') . ":</td> - <td><input type='checkbox' name='Tuesday' value='Tuesday'></td> + <td>' . _('Tuesday') . ':</td> + <td><input type="checkbox" name="Tuesday" value="Tuesday"></td> </tr> <tr> - <td>" . _('Wednesday') . ":</td> - <td><input type='checkbox' name='Wednesday' value='Wednesday'></td> + <td>' . _('Wednesday') . ':</td> + <td><input type="checkbox" name="Wednesday" value="Wednesday"></td> </tr> <tr> - <td>" . _('Thursday') . ":</td> - <td><input type='checkbox' name='Thursday' value='Thursday'></td> + <td>' . _('Thursday') . ':</td> + <td><input type="checkbox" name="Thursday" value="Thursday"></td> </tr> <tr> - <td>" . _('Friday') . ":</td> - <td><input type='checkbox' name='Friday' value='Friday'></td> + <td>' . _('Friday') . ':</td> + <td><input type="checkbox" name="Friday" value="Friday"></td> </tr> </table><br> - <div class=centre><input type='submit' name='submit' value='" . _('Create Calendar') . "'> - <input type='submit' name='listall' value='" . _('List Date Range') . "'></div>"; + <div class=centre><input type="submit" name="submit" value="' . _('Create Calendar') . '"> + <input type="submit" name="listall" value="' . _('List Date Range') . '"></div>'; if (!isset($_POST['ChangeDate'])) { $_POST['ChangeDate']=date($_SESSION['DefaultDateFormat']); @@ -303,15 +301,14 @@ echo '<br><table class=selection>'; echo '<tr> - <td>' . _('Change Date Status') . ":</td> - <td><input type='Text' name='ChangeDate' class=date alt='".$_SESSION['DefaultDateFormat'] . - "' size=12 maxlength=12 value=" . $_POST['ChangeDate'] . '></td> + <td>' . _('Change Date Status') . ':</td> + <td><input type="text" name="ChangeDate" class="date" alt="' . $_SESSION['DefaultDateFormat'] . + '" size="12" maxlength="12" value="' . $_POST['ChangeDate'] . '"></td> <td><input type="submit" name="update" value="' . _('Update') . '"></td></tr></table>'; -echo "</br></br><div class='centre'></div>"; +echo '<br /><br /><div class="centre"></div>'; echo '</form>'; } // End of function display() - include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/MRPShortages.php =================================================================== --- trunk/MRPShortages.php 2011-04-10 02:04:57 UTC (rev 4544) +++ trunk/MRPShortages.php 2011-04-10 10:41:20 UTC (rev 4545) @@ -6,7 +6,7 @@ include('includes/session.inc'); //ANSI SQL??? -$sql='SHOW TABLES WHERE Tables_in_'.$_SESSION['DatabaseName']."='mrprequirements'"; +$sql="SHOW TABLES WHERE Tables_in_" . $_SESSION['DatabaseName'] . "='mrprequirements'"; $result=DB_query($sql,$db); if (DB_num_rows($result)==0) { @@ -32,48 +32,47 @@ // total for either supply or demand. Did this to simplify main sql where used // several subqueries. - $sql = 'CREATE TEMPORARY TABLE demandtotal ( + $sql = "CREATE TEMPORARY TABLE demandtotal ( part char(20), demand double, - KEY `PART` (`part`)) DEFAULT CHARSET=utf8'; + KEY `PART` (`part`)) DEFAULT CHARSET=utf8"; $result = DB_query($sql,$db,_('Create of demandtotal failed because')); - $sql = 'INSERT INTO demandtotal + $sql = "INSERT INTO demandtotal (part, demand) SELECT part, SUM(quantity) as demand FROM mrprequirements - GROUP BY part'; + GROUP BY part"; $result = DB_query($sql,$db); - $sql = 'CREATE TEMPORARY TABLE supplytotal ( + $sql = "CREATE TEMPORARY TABLE supplytotal ( part char(20), supply double, - KEY `PART` (`part`)) DEFAULT CHARSET=utf8'; + KEY `PART` (`part`)) DEFAULT CHARSET=utf8"; $result = DB_query($sql,$db,_('Create of supplytotal failed because')); /* 21/03/2010: Ricard modification to allow items with total supply = 0 be included in the report */ - $sql = 'INSERT INTO supplytotal + $sql = "INSERT INTO supplytotal (part, supply) SELECT stockid, 0 - FROM stockmaster'; + FROM stockmaster"; $result = DB_query($sql,$db); - $sql = 'UPDATE supplytotal + $sql = "UPDATE supplytotal SET supply = (SELECT SUM(mrpsupplies.supplyquantity) FROM mrpsupplies WHERE supplytotal.part = mrpsupplies.part - AND mrpsupplies.supplyquantity > 0)'; + AND mrpsupplies.supplyquantity > 0)"; $result = DB_query($sql,$db); - $sql = 'UPDATE supplytotal SET supply = 0 WHERE supply IS NULL '; + $sql = "UPDATE supplytotal SET supply = 0 WHERE supply IS NULL"; $result = DB_query($sql,$db); -/* End Ricard modification */ // Only include directdemand mrprequirements so don't have demand for top level parts and also // show demand for the lower level parts that the upper level part generates. See MRP.php for Modified: trunk/PDFPrintLabel.php =================================================================== --- trunk/PDFPrintLabel.php 2011-04-10 02:04:57 UTC (rev 4544) +++ trunk/PDFPrintLabel.php 2011-04-10 10:41:20 UTC (rev 4545) @@ -118,15 +118,15 @@ <input type="submit" name="PDFTest" value="'. _('Print labels with borders') .'"></div>'; $iTxt=0; - echo '<script type="text/javascript"> - function setAll(all) { - var x=document.getElementById("form1"); - for (var i=0;i<x.length;i++) { - if (x.elements[i].id==\'item\'); - x.elements[i].checked=all.checked; - } - } - </script>'; + echo "<script type=\"text/javascript\"> + function setAll(all) { + var x=document.getElementById('form1'); + for (var i=0;i<x.length;i++) { + if (x.elements[i].id=='item'); + x.elements[i].checked=all.checked; + } + } + </script>"; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' .$txt[$iTxt++].'</p>'; echo '<form name ="form1" action="'.$_SERVER['PHP_SELF'].'" method="POST" id="form1">'; Modified: trunk/PDFStockTransfer.php =================================================================== --- trunk/PDFStockTransfer.php 2011-04-10 02:04:57 UTC (rev 4544) +++ trunk/PDFStockTransfer.php 2011-04-10 10:41:20 UTC (rev 4545) @@ -74,7 +74,7 @@ //get the next row which will be the quantity received in the receiving location $myNextRow=DB_fetch_array($result); $ToCode=$myNextRow['loccode']; -$To = $myrow['locationname']; +$To = $myNextRow['locationname']; $Quantity=$myNextRow['qty']; $Description=$myNextRow['description']; Added: trunk/ReprintGRN.php =================================================================== --- trunk/ReprintGRN.php (rev 0) +++ trunk/ReprintGRN.php 2011-04-10 10:41:20 UTC (rev 4545) @@ -0,0 +1,100 @@ +<?php +/* $Id: ReprintGrn.php 4486 2011-02-08 09:20:50Z daintree $*/ + +include('includes/session.inc'); +$title=_('Reprint a GRN'); +include('includes/header.inc'); + +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . + $title . '" alt="" />' . ' ' . $title . '</p>'; + +if (!isset($_POST['PONumber'])) { + $_POST['PONumber']=''; +} + +echo '<form action="' . $_SERVER['PHP_SELF'] . '?' . SID . '" method=post>'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<table class="selection">'; +echo '<tr><th colspan="2"><font size="2" color="navy">' . _('Select a purchase order') . '</th></tr>'; +echo '<tr><td>' . _('Enter a Purchase Order Number') . '</td>'; +echo '<td>' . '<input type="text" name="PONumber" class="number" size="7" value="'.$_POST['PONumber'].'" /></td></tr>'; +echo '<tr><td colspan=2 style="text-align: center">' . '<input type="submit" name="Show" value="Show GRNs" /></td></tr>'; + +echo '</table>'; +echo '</form>'; + +if (isset($_POST['Show'])) { + if ($_POST['PONumber']=='') { + echo '<br />'; + prnMsg( _('You must enter a purchase order number in the box above'), 'warn'); + include('includes/footer.inc'); + exit; + } + $sql="SELECT count(orderno) + FROM purchorders + WHERE orderno='" . $_POST['PONumber'] ."'"; + $result=DB_query($sql, $db); + $myrow=DB_fetch_row($result); + if ($myrow[0]==0) { + echo '<br />'; + prnMsg( _('This purchase order does not exist on the system. Please try again.'), 'warn'); + include('includes/footer.inc'); + exit; + } + $sql="SELECT grnbatch, + grnno, + grns.podetailitem, + grns.i... [truncated message content] |
From: <dai...@us...> - 2011-04-11 10:33:41
|
Revision: 4546 http://web-erp.svn.sourceforge.net/web-erp/?rev=4546&view=rev Author: daintree Date: 2011-04-11 10:33:34 +0000 (Mon, 11 Apr 2011) Log Message: ----------- to launchpad 4587-86 Modified Paths: -------------- trunk/AddCustomerContacts.php trunk/AuditTrail.php trunk/GLBudgets.php trunk/PcAuthorizeExpenses.php trunk/PcExpensesTypeTab.php trunk/PcTypeTabs.php trunk/SelectSalesOrder.php trunk/StockLocTransfer.php trunk/TopItems.php trunk/UserSettings.php trunk/WWW_Users.php trunk/api/api_workorders.php trunk/doc/Change.log.html Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2011-04-10 10:41:20 UTC (rev 4545) +++ trunk/AddCustomerContacts.php 2011-04-11 10:33:34 UTC (rev 4546) @@ -1,5 +1,5 @@ <?php -/* $Revision: 1.6 $ */ + /* $Id$*/ include('includes/session.inc'); @@ -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 * from debtorsmaster where debtorno='" .$DebtorNo."'"; +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); 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)) { @@ -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> @@ -153,7 +153,7 @@ <?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)) { @@ -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/AuditTrail.php =================================================================== --- trunk/AuditTrail.php 2011-04-10 10:41:20 UTC (rev 4545) +++ trunk/AuditTrail.php 2011-04-11 10:33:34 UTC (rev 4546) @@ -2,8 +2,6 @@ /* $Id$ */ -//$PageSecurity=15; - include('includes/session.inc'); $title = _('Audit Trail'); @@ -25,12 +23,12 @@ } // Get list of tables -$tableresult = DB_show_tables($db); +$TableResult = DB_show_tables($db); // Get list of users -$userresult = DB_query('SELECT userid FROM www_users',$db); +$UserResult = DB_query("SELECT userid FROM www_users",$db); -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 '<table class=selection>'; @@ -43,29 +41,29 @@ echo '<tr><td>'. _('User ID'). '</td> <td><select tabindex="3" name="SelectedUser">'; echo '<option value=ALL>ALL'; -while ($users = DB_fetch_row($userresult)) { +while ($users = DB_fetch_row($UserResult)) { if (isset($_POST['SelectedUser']) and $users[0]==$_POST['SelectedUser']) { - echo '<option selected value=' . $users[0] . '>' . $users[0]; + echo '<option selected value=' . $users[0] . '>' . $users[0] . '</option>'; } else { - echo '<option value=' . $users[0] . '>' . $users[0]; + 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 '<option value=ALL>ALL'; -while ($tables = DB_fetch_row($tableresult)) { +echo '<option value="ALL">' . _('ALL') . '</option>'; +while ($tables = DB_fetch_row($TableResult)) { if (isset($_POST['SelectedTable']) and $tables[0]==$_POST['SelectedTable']) { - echo '<option selected value=' . $tables[0] . '>' . $tables[0]; + echo '<option selected value=' . $tables[0] . '>' . $tables[0] . '</option>'; } else { - echo '<option value=' . $tables[0] . '>' . $tables[0]; + echo '<option value=' . $tables[0] . '>' . $tables[0] . '</option>'; } } 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 @@ -112,12 +110,12 @@ } function DeleteQueryInfo($SQLString) { - $SQLArray = explode('WHERE', $SQLString); + $SQLArray = explode("WHERE", $SQLString); $_SESSION['SQLString']['table'] = $SQLArray[0]; $SQLString = trim(str_replace($SQLArray[0], '', $SQLString)); - $SQLString = trim(str_replace('DELETE', '', $SQLString)); - $SQLString = trim(str_replace('FROM', '', $SQLString)); - $SQLString = trim(str_replace('WHERE', '', $SQLString)); + $SQLString = trim(str_replace("DELETE", '', $SQLString)); + $SQLString = trim(str_replace("FROM", '', $SQLString)); + $SQLString = trim(str_replace("WHERE", '', $SQLString)); $Assigment = explode('=', $SQLString); $_SESSION['SQLString']['fields'][0] = $Assigment[0]; $_SESSION['SQLString']['values'][0] = $Assigment[1]; @@ -148,16 +146,16 @@ <th>' . _('Field Name') . '</th> <th>' . _('Value') . '</th></tr>'; while ($myrow = DB_fetch_row($result)) { - if (Query_Type($myrow[2]) == 'INSERT') { + if (Query_Type($myrow[2]) == "INSERT") { InsertQueryInfo(str_replace("INSERT INTO",'',$myrow[2])); $RowColour = '#a8ff90'; } - if (Query_Type($myrow[2]) == 'UPDATE') { - UpdateQueryInfo(str_replace('UPDATE','',$myrow[2])); + if (Query_Type($myrow[2]) == "UPDATE") { + UpdateQueryInfo(str_replace("UPDATE",'',$myrow[2])); $RowColour = '#feff90'; } - if (Query_Type($myrow[2]) == 'DELETE') { - DeleteQueryInfo(str_replace('DELETE FROM','',$myrow[2])); + if (Query_Type($myrow[2]) == "DELETE") { + DeleteQueryInfo(str_replace("DELETE FROM",'',$myrow[2])); $RowColour = '#fe90bf'; } Modified: trunk/GLBudgets.php =================================================================== --- trunk/GLBudgets.php 2011-04-10 10:41:20 UTC (rev 4545) +++ trunk/GLBudgets.php 2011-04-11 10:33:34 UTC (rev 4546) @@ -33,10 +33,10 @@ echo '</br><tr><td>'. _('Select GL Account'). ":</td><td><select name='SelectedAccount' onChange='ReloadForm(selectaccount.Select)'>"; -$SQL = 'SELECT accountcode, +$SQL = "SELECT accountcode, accountname FROM chartmaster - ORDER BY accountcode'; + ORDER BY accountcode"; $result=DB_query($SQL,$db); if (DB_num_rows($result)==0){ @@ -215,12 +215,12 @@ echo '<script>defaultControl(document.form.1next);</script>'; echo '</br><div class="centre"><input type="submit" name=update value="' . _('Update') . '"></div></form>'; - $SQL='SELECT MIN(periodno) FROM periods'; + $SQL="SELECT MIN(periodno) FROM periods"; $result=DB_query($SQL,$db); $MyRow=DB_fetch_array($result); $FirstPeriod=$MyRow[0]; - $SQL='SELECT MAX(periodno) FROM periods'; + $SQL="SELECT MAX(periodno) FROM periods"; $result=DB_query($SQL,$db); $MyRow=DB_fetch_array($result); $LastPeriod=$MyRow[0]; Modified: trunk/PcAuthorizeExpenses.php =================================================================== --- trunk/PcAuthorizeExpenses.php 2011-04-10 10:41:20 UTC (rev 4545) +++ trunk/PcAuthorizeExpenses.php 2011-04-11 10:33:34 UTC (rev 4546) @@ -1,7 +1,6 @@ <?php -/* $Revision: 1.0 $ */ -//$PageSecurity = 6; +/* $Id$ */ include('includes/session.inc'); $title = _('Authorization of Petty Cash Expenses'); @@ -41,16 +40,16 @@ } if (isset($_POST['submit']) or isset($_POST['update']) OR isset($SelectedTabs) OR isset ($_POST['GO'])) { - 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'] . '" />'; 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 +76,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 +93,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 +123,7 @@ $typeno = GetNextTransNo($type,$db); //build narrative - $narrative= "PettyCash - ".$myrow['tabcode']." - ".$myrow['codeexpense']." - ".$myrow['notes']." - ".$myrow['receipt'].""; + $narrative= _('PettyCash') . ' - ' . $myrow['tabcode'] . ' - ' . $myrow['codeexpense'] . ' - ' . DB_escape_string($myrow['notes']) . ' - '.$myrow['receipt']; //insert to gltrans DB_Txn_Begin($db); Modified: trunk/PcExpensesTypeTab.php =================================================================== --- trunk/PcExpensesTypeTab.php 2011-04-10 10:41:20 UTC (rev 4545) +++ trunk/PcExpensesTypeTab.php 2011-04-11 10:33:34 UTC (rev 4546) @@ -1,7 +1,6 @@ <?php -/* $Revision: 1.0 $ */ -//$PageSecurity = 15; +/* $Id$ */ include('includes/session.inc'); $title = _('Maintenance Of Petty Cash Expenses For a Type Tab'); @@ -14,6 +13,8 @@ $SelectedType = strtoupper($_POST['SelectedType']); } elseif (isset($_GET['SelectedType'])){ $SelectedType = strtoupper($_GET['SelectedType']); +} else { + $SelectedType=''; } if (ContainsIllegalCharacters($SelectedType) OR strpos($SelectedType,' ')>0){ $InputError = 1; @@ -58,7 +59,7 @@ 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['SelectedTabs'] . ' ' . _('has been created'); $checkSql = "SELECT count(typetabcode) FROM pctypetabs"; $result = DB_query($checkSql, $db); @@ -96,25 +97,26 @@ 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 '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<table class=selection>'; //Main table + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + 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='SelectedTabs'>"; - DB_free_result($result); - $SQL = "SELECT typetabcode,typetabdescription - FROM pctypetabs"; + $SQL = "SELECT typetabcode, + typetabdescription + FROM pctypetabs"; $result = DB_query($SQL,$db); while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectedTabs']) and $myrow['typetabcode']==$_POST['SelectedTabs']) { - echo "<option selected VALUE='"; + echo '<option selected value="'; } else { - echo "<option VALUE='"; + echo '<option VALUE="'; } - echo $myrow['typetabcode'] . "'>" . $myrow['typetabcode'] . ' - ' . $myrow['typetabdescription']; + echo $myrow['typetabcode'] . '">' . $myrow['typetabcode'] . ' - ' . $myrow['typetabdescription'] . '</option>'; } //end while loop @@ -142,11 +144,11 @@ $result = DB_query($sql,$db); - echo '<table class=selection>'; - echo "<tr> - <th>" . _('Expense Code') . "</th> - <th>" . _('Description') . "</th> - </tr>"; + echo '<table class="selection">'; + echo '<tr> + <th>' . _('Expense Code') . '</th> + <th>' . _('Description') . '</th> + </tr>'; $k=0; //row colour counter @@ -176,47 +178,44 @@ if (! isset($_GET['delete'])) { - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br /><table class=selection>'; //Main table - - - - echo '<tr><td>' . _('Select Expense Code') . ":</td><td><select name='SelectedExpense'>"; - - DB_free_result($result); - $SQL = "SELECT codeexpense,description - FROM pcexpenses"; - - $result = DB_query($SQL,$db); - - while ($myrow = DB_fetch_array($result)) { - if (isset($_POST['SelectedExpense']) and $myrow['codeexpense']==$_POST['SelectedExpense']) { - echo "<option selected VALUE='"; - } else { - echo "<option VALUE='"; - } - echo $myrow['codeexpense'] . "'>" . $myrow['codeexpense'] . ' - ' . $myrow['description']; - - } //end while loop - - echo '</select></td></tr>'; - - - echo "<input type=hidden name='SelectedTabs' VALUE=" . $SelectedTabs . ">"; - - echo '</td></tr></table>'; // close main table - - echo '<p><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 - - + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<br /><table class="selection">'; //Main table + + + + echo '<tr><td>' . _('Select Expense Code') . ':</td><td><select name="SelectedExpense">'; + + DB_free_result($result); + $SQL = "SELECT codeexpense, + description + FROM pcexpenses"; + + $result = DB_query($SQL,$db); + + while ($myrow = DB_fetch_array($result)) { + if (isset($_POST['SelectedExpense']) and $myrow['codeexpense']==$_POST['SelectedExpense']) { + echo '<option selected value="'; + } else { + echo '<option value="'; + } + echo $myrow['codeexpense'] . '">' . $myrow['codeexpense'] . ' - ' . $myrow['description'] . '</option>'; + + } //end while loop + + echo '</select></td></tr>'; + + + echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '">'; + + echo '</td></tr></table>'; // close main table + + echo '<p><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 } - - include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/PcTypeTabs.php =================================================================== --- trunk/PcTypeTabs.php 2011-04-10 10:41:20 UTC (rev 4545) +++ trunk/PcTypeTabs.php 2011-04-11 10:33:34 UTC (rev 4546) @@ -1,8 +1,6 @@ <?php /* $Id$ */ -//$PageSecurity = 15; - include('includes/session.inc'); $title = _('Maintenance Of Petty Cash Type of Tabs'); include('includes/header.inc'); @@ -125,7 +123,7 @@ echo '<br>'; echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<p><div class="centre"><input type=submit name=return VALUE="' . _('Return to list of tab types') . '"></div>'; + echo '<p><div class="centre"><input type=submit name=return value="' . _('Return to list of tab types') . '"></div>'; echo '</form>'; include('includes/footer.inc'); exit; @@ -190,7 +188,7 @@ } if (! isset($_GET['delete'])) { - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p><table class=selection>'; //Main table @@ -220,19 +218,19 @@ // This is a new type so the user may volunteer a type code - echo "<table class=selection><tr><td>" . _('Code Of Type Of Tab') . ":</td><td><input type='Text' - " . (in_array('TypeTabCode',$Errors) ? 'class="inputerror"' : '' ) ." name='TypeTabCode'></td></tr>"; + echo '<table class="selection"><tr><td>' . _('Code Of Type Of Tab') . ':</td><td><input type="text" + ' . (in_array('TypeTabCode',$Errors) ? 'class="inputerror"' : '' ) .' name="TypeTabCode"></td></tr>'; } if (!isset($_POST['TypeTabDescription'])) { $_POST['TypeTabDescription']=''; } - echo "<tr><td>" . _('Description Of Type of Tab') . ":</td><td><input type='Text' name='TypeTabDescription' size=50 maxlength=49 value='" . $_POST['TypeTabDescription'] . "'></td></tr>"; + echo '<tr><td>' . _('Description Of Type of Tab') . ':</td><td><input type="text" name="TypeTabDescription" size="50" maxlength="49" value="' . $_POST['TypeTabDescription'] . '"></td></tr>'; echo '</td></tr></table>'; // close main table - echo '<p><div class="centre"><input type=submit name=submit VALUE="' . _('Accept') . '"><input type=submit name=Cancel VALUE="' . _('Cancel') . '"></div>'; + echo '<p><div class="centre"><input type=submit name=submit value="' . _('Accept') . '"><input type=submit name="Cancel" VALUE="' . _('Cancel') . '"></div>'; echo '</form>'; Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2011-04-10 10:41:20 UTC (rev 4545) +++ trunk/SelectSalesOrder.php 2011-04-11 10:33:34 UTC (rev 4546) @@ -417,10 +417,11 @@ if (!isset($_REQUEST['OrderNumber']) or $_REQUEST['OrderNumber']==''){ echo '<table class=selection>'; - echo '<tr><td>' . _('Order number') . ": </td><td><input type=text name='OrderNumber' maxlength=8 size=9></td><td>" . - _('From Stock Location') . ":</td><td><select name='StockLocation'> "; + echo '<tr><td>' . _('Order number') . ': </td> + <td><input type="text" name="OrderNumber" maxlength="8" size="9"></td> + <td>' . _('From Stock Location') . ':</td><td><select name="StockLocation"> '; - $sql = 'SELECT loccode, locationname FROM locations'; + $sql = "SELECT loccode, locationname FROM locations"; $resultStkLocs = DB_query($sql,$db); @@ -459,10 +460,10 @@ _('Add Sales Order') . '</a></td></tr></table>'; } - $SQL='SELECT categoryid, + $SQL="SELECT categoryid, categorydescription FROM stockcategory - ORDER BY categorydescription'; + ORDER BY categorydescription"; $result1 = DB_query($SQL,$db); Modified: trunk/StockLocTransfer.php =================================================================== --- trunk/StockLocTransfer.php 2011-04-10 10:41:20 UTC (rev 4545) +++ trunk/StockLocTransfer.php 2011-04-11 10:33:34 UTC (rev 4546) @@ -1,8 +1,6 @@ <?php /* $Id$*/ -/* contributed by Chris Bice */ -//$PageSecurity = 11; include('includes/session.inc'); $title = _('Inventory Location Transfer Shipment'); include('includes/header.inc'); @@ -17,7 +15,7 @@ $result = DB_query("SELECT * FROM loctransfers WHERE reference='" . $_POST['Trf_ID'] . "'",$db); if (DB_num_rows($result)!=0){ $InputError = true; - $ErrorMessage = _('This transaction has already been entered') . '. ' . _('Please start over now').'<br>'; + $ErrorMessage = _('This transaction has already been entered') . '. ' . _('Please start over now').'<br />'; unset($_POST['submit']); unset($_POST['EnterMoreItems']); for ($i=$_POST['LinesCounter']-10;$i<$_POST['LinesCounter'];$i++){ @@ -33,19 +31,19 @@ $myrow = DB_fetch_row($result); if ($myrow[0]==0){ $InputError = True; - $ErrorMessage .= _('The part code entered of'). ' ' . $_POST['StockID' . $i] . ' '. _('is not set up in the database') . '. ' . _('Only valid parts can be entered for transfers'). '<br>'; + $ErrorMessage .= _('The part code entered of'). ' ' . $_POST['StockID' . $i] . ' '. _('is not set up in the database') . '. ' . _('Only valid parts can be entered for transfers'). '<br />'; $_POST['LinesCounter'] -= 10; } DB_free_result( $result ); if (!is_numeric($_POST['StockQTY' . $i])){ $InputError = True; - $ErrorMessage .= _('The quantity entered of'). ' ' . $_POST['StockQTY' . $i] . ' '. _('for part code'). ' ' . $_POST['StockID' . $i] . ' '. _('is not numeric') . '. ' . _('The quantity entered for transfers is expected to be numeric').'<br>'; + $ErrorMessage .= _('The quantity entered of'). ' ' . $_POST['StockQTY' . $i] . ' '. _('for part code'). ' ' . $_POST['StockID' . $i] . ' '. _('is not numeric') . '. ' . _('The quantity entered for transfers is expected to be numeric').'<br />'; $_POST['LinesCounter'] -= 10; } if ($_POST['StockQTY' . $i] <= 0){ $InputError = True; - $ErrorMessage .= _('The quantity entered for').' '. $_POST['StockID' . $i] . ' ' . _('is less than or equal to 0') . '. ' . _('Please correct this or remove the item').'<br>'; - + $ErrorMessage .= _('The quantity entered for').' '. $_POST['StockID' . $i] . ' ' . _('is less than or equal to 0') . '. ' . _('Please correct this or remove the item').'<br />'; + $_POST['LinesCounter'] -= 10; } // Only if stock exists at this location $result = DB_query("SELECT quantity FROM locstock WHERE stockid='" . $_POST['StockID' . $i] . "' and loccode='".$_POST['FromStockLocation']."'",$db); @@ -61,7 +59,7 @@ }//for all LinesCounter if ($TotalItems == 0){ $InputError = True; - $ErrorMessage .= _('You must enter at least 1 Stock Item to transfer').'<br>'; + $ErrorMessage .= _('You must enter at least 1 Stock Item to transfer').'<br />'; } /*Ship location and Receive location are different */ @@ -122,10 +120,10 @@ } if (isset($InputError) and $InputError==true){ - echo '<br>'; + echo '<br />'; prnMsg($ErrorMessage, 'error'); - echo '<br>'; + echo '<br />'; } @@ -215,8 +213,8 @@ $i++; } - echo '</table><br><div class="centre"> - <input type=hidden name="LinesCounter" value='. $i .'><input type=submit name="EnterMoreItems" value="'. _('Add More Items'). '"><input type=submit name="Submit" value="'. _('Create Transfer Shipment'). '"><br>'; + echo '</table><br /><div class="centre"> + <input type=hidden name="LinesCounter" value='. $i .'><input type=submit name="EnterMoreItems" value="'. _('Add More Items'). '"><input type=submit name="Submit" value="'. _('Create Transfer Shipment'). '"><br />'; echo '<script type="text/javascript">defaultControl(document.forms[0].StockID0);</script>'; echo '</form></div>'; include('includes/footer.inc'); Modified: trunk/TopItems.php =================================================================== --- trunk/TopItems.php 2011-04-10 10:41:20 UTC (rev 4545) +++ trunk/TopItems.php 2011-04-11 10:33:34 UTC (rev 4546) @@ -11,9 +11,9 @@ if (!(isset($_POST['Search']))) { echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Top Sales Order Search') . '" alt="" />' . ' ' . _('Top Sales Order Search') . '</p>'; - echo "<form action=" . $_SERVER['PHP_SELF'] . '?' . SID . ' name="SelectCustomer" method=POST>'; + echo '<form action="' . $_SERVER['PHP_SELF'] . '?name="SelectCustomer" method="POST">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table cellpadding=3 colspan=4 class=selection>'; + echo '<table cellpadding="3" colspan="4" class="selection">'; //to view store location echo '<tr><td width="150">' . _('Select Location') . ' </td><td>:</td><td><select name=Location>'; $sql = "SELECT loccode, @@ -83,7 +83,7 @@ AND salesorderdetails.stkcode = stockmaster.stockid AND salesorders.debtorno = debtorsmaster.debtorno AND debtorsmaster.currcode = currencies.currabrev - AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "' + AND salesorderdetails.actualdispatchdate >= '" . $FromDate . "' GROUP BY salesorderdetails.stkcode ORDER BY '" . $_POST['Sequence'] . "' DESC LIMIT " . $_POST['NumberOfTopItems'] . ""; @@ -104,7 +104,7 @@ AND salesorders.debtorno = debtorsmaster.debtorno AND debtorsmaster.currcode = currencies.currabrev AND debtorsmaster.typeid = '" . $_POST['Customers'] . "' - AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "' + AND salesorderdetails.actualdispatchdate >= '" . $FromDate . "' GROUP BY salesorderdetails.stkcode ORDER BY '" . $_POST['Sequence'] . "' DESC LIMIT " . $_POST[NumberOfTopItems] . ""; @@ -112,44 +112,44 @@ //the situation if the customer type selected "All" if ($_POST['Customers'] == 'All') { $SQL = "SELECT salesorderdetails.stkcode, - SUM(salesorderdetails.qtyinvoiced) TotalInvoiced, - SUM(salesorderdetails.qtyinvoiced * salesorderdetails.unitprice ) AS ValueSales, - stockmaster.description, - stockmaster.units, - currencies.rate, - debtorsmaster.currcode, - stockmaster.decimalplaces - FROM salesorderdetails, salesorders, debtorsmaster,stockmaster, currencies - WHERE salesorderdetails.orderno = salesorders.orderno - AND salesorderdetails.stkcode = stockmaster.stockid - AND salesorders.debtorno = debtorsmaster.debtorno - AND debtorsmaster.currcode = currencies.currabrev - AND salesorders.fromstkloc = '" . $_POST['Location'] . "' - AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "' - GROUP BY salesorderdetails.stkcode - ORDER BY " . $_POST['Sequence'] . " DESC - LIMIT " . $_POST['NumberOfTopItems'] . ""; + SUM(salesorderdetails.qtyinvoiced) TotalInvoiced, + SUM(salesorderdetails.qtyinvoiced * salesorderdetails.unitprice ) AS ValueSales, + stockmaster.description, + stockmaster.units, + currencies.rate, + debtorsmaster.currcode, + stockmaster.decimalplaces + FROM salesorderdetails, salesorders, debtorsmaster,stockmaster, currencies + WHERE salesorderdetails.orderno = salesorders.orderno + AND salesorderdetails.stkcode = stockmaster.stockid + AND salesorders.debtorno = debtorsmaster.debtorno + AND debtorsmaster.currcode = currencies.currabrev + AND salesorders.fromstkloc = '" . $_POST['Location'] . "' + AND salesorderdetails.actualdispatchdate >= '" . $FromDate . "' + GROUP BY salesorderdetails.stkcode + ORDER BY " . $_POST['Sequence'] . " DESC + LIMIT " . $_POST['NumberOfTopItems'] . ""; } else { //the situation if the location and customer type not selected "All" $SQL = "SELECT salesorderdetails.stkcode, - SUM(salesorderdetails.qtyinvoiced) TotalInvoiced, - SUM(salesorderdetails.qtyinvoiced * salesorderdetails.unitprice ) AS ValueSales, - stockmaster.description, - stockmaster.units, - currencies.rate, - debtorsmaster.currcode, - stockmaster.decimalplaces - FROM salesorderdetails, salesorders, debtorsmaster,stockmaster, currencies - WHERE salesorderdetails.orderno = salesorders.orderno - AND salesorderdetails.stkcode = stockmaster.stockid - AND salesorders.debtorno = debtorsmaster.debtorno - AND debtorsmaster.currcode = currencies.currabrev - AND salesorders.fromstkloc = '" . $_POST['Location'] . "' - AND debtorsmaster.typeid = '" . $_POST['Customers'] . "' - AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "' - GROUP BY salesorderdetails... [truncated message content] |
From: <dai...@us...> - 2011-04-11 10:33:41
|
Revision: 4546 http://web-erp.svn.sourceforge.net/web-erp/?rev=4546&view=rev Author: daintree Date: 2011-04-11 10:33:34 +0000 (Mon, 11 Apr 2011) Log Message: ----------- to launchpad 4587-86 Modified Paths: -------------- trunk/AddCustomerContacts.php trunk/AuditTrail.php trunk/GLBudgets.php trunk/PcAuthorizeExpenses.php trunk/PcExpensesTypeTab.php trunk/PcTypeTabs.php trunk/SelectSalesOrder.php trunk/StockLocTransfer.php trunk/TopItems.php trunk/UserSettings.php trunk/WWW_Users.php trunk/api/api_workorders.php trunk/doc/Change.log.html Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2011-04-10 10:41:20 UTC (rev 4545) +++ trunk/AddCustomerContacts.php 2011-04-11 10:33:34 UTC (rev 4546) @@ -1,5 +1,5 @@ <?php -/* $Revision: 1.6 $ */ + /* $Id$*/ include('includes/session.inc'); @@ -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 * from debtorsmaster where debtorno='" .$DebtorNo."'"; +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); 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)) { @@ -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> @@ -153,7 +153,7 @@ <?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)) { @@ -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/AuditTrail.php =================================================================== --- trunk/AuditTrail.php 2011-04-10 10:41:20 UTC (rev 4545) +++ trunk/AuditTrail.php 2011-04-11 10:33:34 UTC (rev 4546) @@ -2,8 +2,6 @@ /* $Id$ */ -//$PageSecurity=15; - include('includes/session.inc'); $title = _('Audit Trail'); @@ -25,12 +23,12 @@ } // Get list of tables -$tableresult = DB_show_tables($db); +$TableResult = DB_show_tables($db); // Get list of users -$userresult = DB_query('SELECT userid FROM www_users',$db); +$UserResult = DB_query("SELECT userid FROM www_users",$db); -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 '<table class=selection>'; @@ -43,29 +41,29 @@ echo '<tr><td>'. _('User ID'). '</td> <td><select tabindex="3" name="SelectedUser">'; echo '<option value=ALL>ALL'; -while ($users = DB_fetch_row($userresult)) { +while ($users = DB_fetch_row($UserResult)) { if (isset($_POST['SelectedUser']) and $users[0]==$_POST['SelectedUser']) { - echo '<option selected value=' . $users[0] . '>' . $users[0]; + echo '<option selected value=' . $users[0] . '>' . $users[0] . '</option>'; } else { - echo '<option value=' . $users[0] . '>' . $users[0]; + 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 '<option value=ALL>ALL'; -while ($tables = DB_fetch_row($tableresult)) { +echo '<option value="ALL">' . _('ALL') . '</option>'; +while ($tables = DB_fetch_row($TableResult)) { if (isset($_POST['SelectedTable']) and $tables[0]==$_POST['SelectedTable']) { - echo '<option selected value=' . $tables[0] . '>' . $tables[0]; + echo '<option selected value=' . $tables[0] . '>' . $tables[0] . '</option>'; } else { - echo '<option value=' . $tables[0] . '>' . $tables[0]; + echo '<option value=' . $tables[0] . '>' . $tables[0] . '</option>'; } } 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 @@ -112,12 +110,12 @@ } function DeleteQueryInfo($SQLString) { - $SQLArray = explode('WHERE', $SQLString); + $SQLArray = explode("WHERE", $SQLString); $_SESSION['SQLString']['table'] = $SQLArray[0]; $SQLString = trim(str_replace($SQLArray[0], '', $SQLString)); - $SQLString = trim(str_replace('DELETE', '', $SQLString)); - $SQLString = trim(str_replace('FROM', '', $SQLString)); - $SQLString = trim(str_replace('WHERE', '', $SQLString)); + $SQLString = trim(str_replace("DELETE", '', $SQLString)); + $SQLString = trim(str_replace("FROM", '', $SQLString)); + $SQLString = trim(str_replace("WHERE", '', $SQLString)); $Assigment = explode('=', $SQLString); $_SESSION['SQLString']['fields'][0] = $Assigment[0]; $_SESSION['SQLString']['values'][0] = $Assigment[1]; @@ -148,16 +146,16 @@ <th>' . _('Field Name') . '</th> <th>' . _('Value') . '</th></tr>'; while ($myrow = DB_fetch_row($result)) { - if (Query_Type($myrow[2]) == 'INSERT') { + if (Query_Type($myrow[2]) == "INSERT") { InsertQueryInfo(str_replace("INSERT INTO",'',$myrow[2])); $RowColour = '#a8ff90'; } - if (Query_Type($myrow[2]) == 'UPDATE') { - UpdateQueryInfo(str_replace('UPDATE','',$myrow[2])); + if (Query_Type($myrow[2]) == "UPDATE") { + UpdateQueryInfo(str_replace("UPDATE",'',$myrow[2])); $RowColour = '#feff90'; } - if (Query_Type($myrow[2]) == 'DELETE') { - DeleteQueryInfo(str_replace('DELETE FROM','',$myrow[2])); + if (Query_Type($myrow[2]) == "DELETE") { + DeleteQueryInfo(str_replace("DELETE FROM",'',$myrow[2])); $RowColour = '#fe90bf'; } Modified: trunk/GLBudgets.php =================================================================== --- trunk/GLBudgets.php 2011-04-10 10:41:20 UTC (rev 4545) +++ trunk/GLBudgets.php 2011-04-11 10:33:34 UTC (rev 4546) @@ -33,10 +33,10 @@ echo '</br><tr><td>'. _('Select GL Account'). ":</td><td><select name='SelectedAccount' onChange='ReloadForm(selectaccount.Select)'>"; -$SQL = 'SELECT accountcode, +$SQL = "SELECT accountcode, accountname FROM chartmaster - ORDER BY accountcode'; + ORDER BY accountcode"; $result=DB_query($SQL,$db); if (DB_num_rows($result)==0){ @@ -215,12 +215,12 @@ echo '<script>defaultControl(document.form.1next);</script>'; echo '</br><div class="centre"><input type="submit" name=update value="' . _('Update') . '"></div></form>'; - $SQL='SELECT MIN(periodno) FROM periods'; + $SQL="SELECT MIN(periodno) FROM periods"; $result=DB_query($SQL,$db); $MyRow=DB_fetch_array($result); $FirstPeriod=$MyRow[0]; - $SQL='SELECT MAX(periodno) FROM periods'; + $SQL="SELECT MAX(periodno) FROM periods"; $result=DB_query($SQL,$db); $MyRow=DB_fetch_array($result); $LastPeriod=$MyRow[0]; Modified: trunk/PcAuthorizeExpenses.php =================================================================== --- trunk/PcAuthorizeExpenses.php 2011-04-10 10:41:20 UTC (rev 4545) +++ trunk/PcAuthorizeExpenses.php 2011-04-11 10:33:34 UTC (rev 4546) @@ -1,7 +1,6 @@ <?php -/* $Revision: 1.0 $ */ -//$PageSecurity = 6; +/* $Id$ */ include('includes/session.inc'); $title = _('Authorization of Petty Cash Expenses'); @@ -41,16 +40,16 @@ } if (isset($_POST['submit']) or isset($_POST['update']) OR isset($SelectedTabs) OR isset ($_POST['GO'])) { - 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'] . '" />'; 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 +76,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 +93,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 +123,7 @@ $typeno = GetNextTransNo($type,$db); //build narrative - $narrative= "PettyCash - ".$myrow['tabcode']." - ".$myrow['codeexpense']." - ".$myrow['notes']." - ".$myrow['receipt'].""; + $narrative= _('PettyCash') . ' - ' . $myrow['tabcode'] . ' - ' . $myrow['codeexpense'] . ' - ' . DB_escape_string($myrow['notes']) . ' - '.$myrow['receipt']; //insert to gltrans DB_Txn_Begin($db); Modified: trunk/PcExpensesTypeTab.php =================================================================== --- trunk/PcExpensesTypeTab.php 2011-04-10 10:41:20 UTC (rev 4545) +++ trunk/PcExpensesTypeTab.php 2011-04-11 10:33:34 UTC (rev 4546) @@ -1,7 +1,6 @@ <?php -/* $Revision: 1.0 $ */ -//$PageSecurity = 15; +/* $Id$ */ include('includes/session.inc'); $title = _('Maintenance Of Petty Cash Expenses For a Type Tab'); @@ -14,6 +13,8 @@ $SelectedType = strtoupper($_POST['SelectedType']); } elseif (isset($_GET['SelectedType'])){ $SelectedType = strtoupper($_GET['SelectedType']); +} else { + $SelectedType=''; } if (ContainsIllegalCharacters($SelectedType) OR strpos($SelectedType,' ')>0){ $InputError = 1; @@ -58,7 +59,7 @@ 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['SelectedTabs'] . ' ' . _('has been created'); $checkSql = "SELECT count(typetabcode) FROM pctypetabs"; $result = DB_query($checkSql, $db); @@ -96,25 +97,26 @@ 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 '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<table class=selection>'; //Main table + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + 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='SelectedTabs'>"; - DB_free_result($result); - $SQL = "SELECT typetabcode,typetabdescription - FROM pctypetabs"; + $SQL = "SELECT typetabcode, + typetabdescription + FROM pctypetabs"; $result = DB_query($SQL,$db); while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectedTabs']) and $myrow['typetabcode']==$_POST['SelectedTabs']) { - echo "<option selected VALUE='"; + echo '<option selected value="'; } else { - echo "<option VALUE='"; + echo '<option VALUE="'; } - echo $myrow['typetabcode'] . "'>" . $myrow['typetabcode'] . ' - ' . $myrow['typetabdescription']; + echo $myrow['typetabcode'] . '">' . $myrow['typetabcode'] . ' - ' . $myrow['typetabdescription'] . '</option>'; } //end while loop @@ -142,11 +144,11 @@ $result = DB_query($sql,$db); - echo '<table class=selection>'; - echo "<tr> - <th>" . _('Expense Code') . "</th> - <th>" . _('Description') . "</th> - </tr>"; + echo '<table class="selection">'; + echo '<tr> + <th>' . _('Expense Code') . '</th> + <th>' . _('Description') . '</th> + </tr>'; $k=0; //row colour counter @@ -176,47 +178,44 @@ if (! isset($_GET['delete'])) { - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br /><table class=selection>'; //Main table - - - - echo '<tr><td>' . _('Select Expense Code') . ":</td><td><select name='SelectedExpense'>"; - - DB_free_result($result); - $SQL = "SELECT codeexpense,description - FROM pcexpenses"; - - $result = DB_query($SQL,$db); - - while ($myrow = DB_fetch_array($result)) { - if (isset($_POST['SelectedExpense']) and $myrow['codeexpense']==$_POST['SelectedExpense']) { - echo "<option selected VALUE='"; - } else { - echo "<option VALUE='"; - } - echo $myrow['codeexpense'] . "'>" . $myrow['codeexpense'] . ' - ' . $myrow['description']; - - } //end while loop - - echo '</select></td></tr>'; - - - echo "<input type=hidden name='SelectedTabs' VALUE=" . $SelectedTabs . ">"; - - echo '</td></tr></table>'; // close main table - - echo '<p><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 - - + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<br /><table class="selection">'; //Main table + + + + echo '<tr><td>' . _('Select Expense Code') . ':</td><td><select name="SelectedExpense">'; + + DB_free_result($result); + $SQL = "SELECT codeexpense, + description + FROM pcexpenses"; + + $result = DB_query($SQL,$db); + + while ($myrow = DB_fetch_array($result)) { + if (isset($_POST['SelectedExpense']) and $myrow['codeexpense']==$_POST['SelectedExpense']) { + echo '<option selected value="'; + } else { + echo '<option value="'; + } + echo $myrow['codeexpense'] . '">' . $myrow['codeexpense'] . ' - ' . $myrow['description'] . '</option>'; + + } //end while loop + + echo '</select></td></tr>'; + + + echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '">'; + + echo '</td></tr></table>'; // close main table + + echo '<p><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 } - - include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/PcTypeTabs.php =================================================================== --- trunk/PcTypeTabs.php 2011-04-10 10:41:20 UTC (rev 4545) +++ trunk/PcTypeTabs.php 2011-04-11 10:33:34 UTC (rev 4546) @@ -1,8 +1,6 @@ <?php /* $Id$ */ -//$PageSecurity = 15; - include('includes/session.inc'); $title = _('Maintenance Of Petty Cash Type of Tabs'); include('includes/header.inc'); @@ -125,7 +123,7 @@ echo '<br>'; echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<p><div class="centre"><input type=submit name=return VALUE="' . _('Return to list of tab types') . '"></div>'; + echo '<p><div class="centre"><input type=submit name=return value="' . _('Return to list of tab types') . '"></div>'; echo '</form>'; include('includes/footer.inc'); exit; @@ -190,7 +188,7 @@ } if (! isset($_GET['delete'])) { - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p><table class=selection>'; //Main table @@ -220,19 +218,19 @@ // This is a new type so the user may volunteer a type code - echo "<table class=selection><tr><td>" . _('Code Of Type Of Tab') . ":</td><td><input type='Text' - " . (in_array('TypeTabCode',$Errors) ? 'class="inputerror"' : '' ) ." name='TypeTabCode'></td></tr>"; + echo '<table class="selection"><tr><td>' . _('Code Of Type Of Tab') . ':</td><td><input type="text" + ' . (in_array('TypeTabCode',$Errors) ? 'class="inputerror"' : '' ) .' name="TypeTabCode"></td></tr>'; } if (!isset($_POST['TypeTabDescription'])) { $_POST['TypeTabDescription']=''; } - echo "<tr><td>" . _('Description Of Type of Tab') . ":</td><td><input type='Text' name='TypeTabDescription' size=50 maxlength=49 value='" . $_POST['TypeTabDescription'] . "'></td></tr>"; + echo '<tr><td>' . _('Description Of Type of Tab') . ':</td><td><input type="text" name="TypeTabDescription" size="50" maxlength="49" value="' . $_POST['TypeTabDescription'] . '"></td></tr>'; echo '</td></tr></table>'; // close main table - echo '<p><div class="centre"><input type=submit name=submit VALUE="' . _('Accept') . '"><input type=submit name=Cancel VALUE="' . _('Cancel') . '"></div>'; + echo '<p><div class="centre"><input type=submit name=submit value="' . _('Accept') . '"><input type=submit name="Cancel" VALUE="' . _('Cancel') . '"></div>'; echo '</form>'; Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2011-04-10 10:41:20 UTC (rev 4545) +++ trunk/SelectSalesOrder.php 2011-04-11 10:33:34 UTC (rev 4546) @@ -417,10 +417,11 @@ if (!isset($_REQUEST['OrderNumber']) or $_REQUEST['OrderNumber']==''){ echo '<table class=selection>'; - echo '<tr><td>' . _('Order number') . ": </td><td><input type=text name='OrderNumber' maxlength=8 size=9></td><td>" . - _('From Stock Location') . ":</td><td><select name='StockLocation'> "; + echo '<tr><td>' . _('Order number') . ': </td> + <td><input type="text" name="OrderNumber" maxlength="8" size="9"></td> + <td>' . _('From Stock Location') . ':</td><td><select name="StockLocation"> '; - $sql = 'SELECT loccode, locationname FROM locations'; + $sql = "SELECT loccode, locationname FROM locations"; $resultStkLocs = DB_query($sql,$db); @@ -459,10 +460,10 @@ _('Add Sales Order') . '</a></td></tr></table>'; } - $SQL='SELECT categoryid, + $SQL="SELECT categoryid, categorydescription FROM stockcategory - ORDER BY categorydescription'; + ORDER BY categorydescription"; $result1 = DB_query($SQL,$db); Modified: trunk/StockLocTransfer.php =================================================================== --- trunk/StockLocTransfer.php 2011-04-10 10:41:20 UTC (rev 4545) +++ trunk/StockLocTransfer.php 2011-04-11 10:33:34 UTC (rev 4546) @@ -1,8 +1,6 @@ <?php /* $Id$*/ -/* contributed by Chris Bice */ -//$PageSecurity = 11; include('includes/session.inc'); $title = _('Inventory Location Transfer Shipment'); include('includes/header.inc'); @@ -17,7 +15,7 @@ $result = DB_query("SELECT * FROM loctransfers WHERE reference='" . $_POST['Trf_ID'] . "'",$db); if (DB_num_rows($result)!=0){ $InputError = true; - $ErrorMessage = _('This transaction has already been entered') . '. ' . _('Please start over now').'<br>'; + $ErrorMessage = _('This transaction has already been entered') . '. ' . _('Please start over now').'<br />'; unset($_POST['submit']); unset($_POST['EnterMoreItems']); for ($i=$_POST['LinesCounter']-10;$i<$_POST['LinesCounter'];$i++){ @@ -33,19 +31,19 @@ $myrow = DB_fetch_row($result); if ($myrow[0]==0){ $InputError = True; - $ErrorMessage .= _('The part code entered of'). ' ' . $_POST['StockID' . $i] . ' '. _('is not set up in the database') . '. ' . _('Only valid parts can be entered for transfers'). '<br>'; + $ErrorMessage .= _('The part code entered of'). ' ' . $_POST['StockID' . $i] . ' '. _('is not set up in the database') . '. ' . _('Only valid parts can be entered for transfers'). '<br />'; $_POST['LinesCounter'] -= 10; } DB_free_result( $result ); if (!is_numeric($_POST['StockQTY' . $i])){ $InputError = True; - $ErrorMessage .= _('The quantity entered of'). ' ' . $_POST['StockQTY' . $i] . ' '. _('for part code'). ' ' . $_POST['StockID' . $i] . ' '. _('is not numeric') . '. ' . _('The quantity entered for transfers is expected to be numeric').'<br>'; + $ErrorMessage .= _('The quantity entered of'). ' ' . $_POST['StockQTY' . $i] . ' '. _('for part code'). ' ' . $_POST['StockID' . $i] . ' '. _('is not numeric') . '. ' . _('The quantity entered for transfers is expected to be numeric').'<br />'; $_POST['LinesCounter'] -= 10; } if ($_POST['StockQTY' . $i] <= 0){ $InputError = True; - $ErrorMessage .= _('The quantity entered for').' '. $_POST['StockID' . $i] . ' ' . _('is less than or equal to 0') . '. ' . _('Please correct this or remove the item').'<br>'; - + $ErrorMessage .= _('The quantity entered for').' '. $_POST['StockID' . $i] . ' ' . _('is less than or equal to 0') . '. ' . _('Please correct this or remove the item').'<br />'; + $_POST['LinesCounter'] -= 10; } // Only if stock exists at this location $result = DB_query("SELECT quantity FROM locstock WHERE stockid='" . $_POST['StockID' . $i] . "' and loccode='".$_POST['FromStockLocation']."'",$db); @@ -61,7 +59,7 @@ }//for all LinesCounter if ($TotalItems == 0){ $InputError = True; - $ErrorMessage .= _('You must enter at least 1 Stock Item to transfer').'<br>'; + $ErrorMessage .= _('You must enter at least 1 Stock Item to transfer').'<br />'; } /*Ship location and Receive location are different */ @@ -122,10 +120,10 @@ } if (isset($InputError) and $InputError==true){ - echo '<br>'; + echo '<br />'; prnMsg($ErrorMessage, 'error'); - echo '<br>'; + echo '<br />'; } @@ -215,8 +213,8 @@ $i++; } - echo '</table><br><div class="centre"> - <input type=hidden name="LinesCounter" value='. $i .'><input type=submit name="EnterMoreItems" value="'. _('Add More Items'). '"><input type=submit name="Submit" value="'. _('Create Transfer Shipment'). '"><br>'; + echo '</table><br /><div class="centre"> + <input type=hidden name="LinesCounter" value='. $i .'><input type=submit name="EnterMoreItems" value="'. _('Add More Items'). '"><input type=submit name="Submit" value="'. _('Create Transfer Shipment'). '"><br />'; echo '<script type="text/javascript">defaultControl(document.forms[0].StockID0);</script>'; echo '</form></div>'; include('includes/footer.inc'); Modified: trunk/TopItems.php =================================================================== --- trunk/TopItems.php 2011-04-10 10:41:20 UTC (rev 4545) +++ trunk/TopItems.php 2011-04-11 10:33:34 UTC (rev 4546) @@ -11,9 +11,9 @@ if (!(isset($_POST['Search']))) { echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Top Sales Order Search') . '" alt="" />' . ' ' . _('Top Sales Order Search') . '</p>'; - echo "<form action=" . $_SERVER['PHP_SELF'] . '?' . SID . ' name="SelectCustomer" method=POST>'; + echo '<form action="' . $_SERVER['PHP_SELF'] . '?name="SelectCustomer" method="POST">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table cellpadding=3 colspan=4 class=selection>'; + echo '<table cellpadding="3" colspan="4" class="selection">'; //to view store location echo '<tr><td width="150">' . _('Select Location') . ' </td><td>:</td><td><select name=Location>'; $sql = "SELECT loccode, @@ -83,7 +83,7 @@ AND salesorderdetails.stkcode = stockmaster.stockid AND salesorders.debtorno = debtorsmaster.debtorno AND debtorsmaster.currcode = currencies.currabrev - AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "' + AND salesorderdetails.actualdispatchdate >= '" . $FromDate . "' GROUP BY salesorderdetails.stkcode ORDER BY '" . $_POST['Sequence'] . "' DESC LIMIT " . $_POST['NumberOfTopItems'] . ""; @@ -104,7 +104,7 @@ AND salesorders.debtorno = debtorsmaster.debtorno AND debtorsmaster.currcode = currencies.currabrev AND debtorsmaster.typeid = '" . $_POST['Customers'] . "' - AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "' + AND salesorderdetails.actualdispatchdate >= '" . $FromDate . "' GROUP BY salesorderdetails.stkcode ORDER BY '" . $_POST['Sequence'] . "' DESC LIMIT " . $_POST[NumberOfTopItems] . ""; @@ -112,44 +112,44 @@ //the situation if the customer type selected "All" if ($_POST['Customers'] == 'All') { $SQL = "SELECT salesorderdetails.stkcode, - SUM(salesorderdetails.qtyinvoiced) TotalInvoiced, - SUM(salesorderdetails.qtyinvoiced * salesorderdetails.unitprice ) AS ValueSales, - stockmaster.description, - stockmaster.units, - currencies.rate, - debtorsmaster.currcode, - stockmaster.decimalplaces - FROM salesorderdetails, salesorders, debtorsmaster,stockmaster, currencies - WHERE salesorderdetails.orderno = salesorders.orderno - AND salesorderdetails.stkcode = stockmaster.stockid - AND salesorders.debtorno = debtorsmaster.debtorno - AND debtorsmaster.currcode = currencies.currabrev - AND salesorders.fromstkloc = '" . $_POST['Location'] . "' - AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "' - GROUP BY salesorderdetails.stkcode - ORDER BY " . $_POST['Sequence'] . " DESC - LIMIT " . $_POST['NumberOfTopItems'] . ""; + SUM(salesorderdetails.qtyinvoiced) TotalInvoiced, + SUM(salesorderdetails.qtyinvoiced * salesorderdetails.unitprice ) AS ValueSales, + stockmaster.description, + stockmaster.units, + currencies.rate, + debtorsmaster.currcode, + stockmaster.decimalplaces + FROM salesorderdetails, salesorders, debtorsmaster,stockmaster, currencies + WHERE salesorderdetails.orderno = salesorders.orderno + AND salesorderdetails.stkcode = stockmaster.stockid + AND salesorders.debtorno = debtorsmaster.debtorno + AND debtorsmaster.currcode = currencies.currabrev + AND salesorders.fromstkloc = '" . $_POST['Location'] . "' + AND salesorderdetails.actualdispatchdate >= '" . $FromDate . "' + GROUP BY salesorderdetails.stkcode + ORDER BY " . $_POST['Sequence'] . " DESC + LIMIT " . $_POST['NumberOfTopItems'] . ""; } else { //the situation if the location and customer type not selected "All" $SQL = "SELECT salesorderdetails.stkcode, - SUM(salesorderdetails.qtyinvoiced) TotalInvoiced, - SUM(salesorderdetails.qtyinvoiced * salesorderdetails.unitprice ) AS ValueSales, - stockmaster.description, - stockmaster.units, - currencies.rate, - debtorsmaster.currcode, - stockmaster.decimalplaces - FROM salesorderdetails, salesorders, debtorsmaster,stockmaster, currencies - WHERE salesorderdetails.orderno = salesorders.orderno - AND salesorderdetails.stkcode = stockmaster.stockid - AND salesorders.debtorno = debtorsmaster.debtorno - AND debtorsmaster.currcode = currencies.currabrev - AND salesorders.fromstkloc = '" . $_POST['Location'] . "' - AND debtorsmaster.typeid = '" . $_POST['Customers'] . "' - AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "' - GROUP BY salesorderdetails... [truncated message content] |
From: <dai...@us...> - 2011-04-12 10:33:53
|
Revision: 4548 http://web-erp.svn.sourceforge.net/web-erp/?rev=4548&view=rev Author: daintree Date: 2011-04-12 10:33:45 +0000 (Tue, 12 Apr 2011) Log Message: ----------- tim launchpad fork Modified Paths: -------------- trunk/DeliveryDetails.php trunk/POReport.php trunk/Stocks.php trunk/TaxProvinces.php trunk/UnitsOfMeasure.php trunk/UpgradeDatabase.php trunk/WOSerialNos.php trunk/WorkOrderIssue.php trunk/Z_Upgrade3.10.php trunk/Z_Upgrade_3.09-3.10.php Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-04-11 10:49:45 UTC (rev 4547) +++ trunk/DeliveryDetails.php 2011-04-12 10:33:45 UTC (rev 4548) @@ -1,7 +1,6 @@ <?php /* $Id$ */ -/* $Revision: 1.76 $ */ /* This is where the delivery details are confirmed/entered/modified and the order committed to the database once the place order/modify order button is hit. @@ -81,13 +80,13 @@ /* If (strlen($_POST['BrAdd3'])==0 OR !isset($_POST['BrAdd3'])){ $InputErrors =1; - echo "<br>A region or city must be entered.<br>"; + echo "<br />A region or city must be entered.<br />"; } Maybe appropriate in some installations but not here If (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>"; + echo "<br />You should enter the suburb in the box provided. Orders cannot be accepted without a valid suburb being entered.<br />"; } */ @@ -111,7 +110,7 @@ elseif (Date1GreaterThanDate2(Date($_SESSION['DefaultDateFormat'],$EarliestDispatch), $_POST['DeliveryDate'])){ $InputErrors =1; - echo '<br><b>' . _('The delivery details cannot be updated because you are attempting to set the date the order is to be dispatched earlier than is possible. No dispatches are made on Saturday and Sunday. Also, the dispatch cut off time is') . $_SESSION['DispatchCutOffTime'] . _(':00 hrs. Orders placed after this time will be dispatched the following working day.'); + echo '<br /><b>' . _('The delivery details cannot be updated because you are attempting to set the date the order is to be dispatched earlier than is possible. No dispatches are made on Saturday and Sunday. Also, the dispatch cut off time is') . $_SESSION['DispatchCutOffTime'] . _(':00 hrs. Orders placed after this time will be dispatched the following working day.'); } */ @@ -153,7 +152,7 @@ prnMsg(_('The branch details for branch code') . ': ' . $_SESSION['Items'.$identifier]->Branch . ' ' . _('against customer code') . ': ' . $_POST['Select'] . ' ' . _('could not be retrieved') . '. ' . _('Check the set up of the customer and branch'),'error'); if ($debug==1){ - echo '<br>' . _('The SQL that failed to get the branch details was') . ':<br>' . $sql; + echo '<br />' . _('The SQL that failed to get the branch details was') . ':<br />' . $sql; } include('includes/footer.inc'); exit; @@ -280,7 +279,7 @@ } If ($_POST['FreightCost'] != $OldFreightCost && $_SESSION['DoFreightCalc']==True){ $OK_to_PROCESS = 0; - prnMsg(_('The freight charge has been updated') . '. ' . _('Please reconfirm that the order and the freight charges are acceptable and then confirm the order again if OK') .' <br> '. _('The new freight cost is') .' ' . $_POST['FreightCost'] . ' ' . _('and the previously calculated freight cost was') .' '. $OldFreightCost,'warn'); + prnMsg(_('The freight charge has been updated') . '. ' . _('Please reconfirm that the order and the freight charges are acceptable and then confirm the order again if OK') .' <br /> '. _('The new freight cost is') .' ' . $_POST['FreightCost'] . ' ' . _('and the previously calculated freight cost was') .' '. $OldFreightCost,'warn'); } else { /*check the customer's payment terms */ @@ -417,7 +416,7 @@ AND $_SESSION['AutoCreateWOs']==1 AND $_SESSION['Items'.$identifier]->Quotation!=1){ //oh yeah its all on! - echo '<br>'; + echo '<br />'; //now get the data required to test to see if we need to make a new WO $QOHResult = DB_query("SELECT SUM(quantity) FROM locstock WHERE stockid='" . $StockItem->StockID . "'",$db); @@ -559,7 +558,7 @@ } /* end inserted line items into sales order details */ $result = DB_Txn_Commit($db); - echo '<br>'; + echo '<br />'; if ($_SESSION['Items'.$identifier]->Quotation==1){ prnMsg(_('Quotation Number') . ' ' . $OrderNo . ' ' . _('has been entered'),'success'); } else { @@ -571,19 +570,44 @@ if ($_POST['Quotation']==0) { /*then its not a quotation its a real order */ - echo '<br><table class=selection><tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td><td>' . ' ' . '<a target="_blank" href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $OrderNo . '">'. _('Print packing slip') . ' (' . _('Preprinted stationery') . ')' .'</a></td></tr>'; - echo '<tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td><td>' . ' ' . '<a target="_blank" href="' . $rootpath . '/PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $OrderNo . '">'. _('Print packing slip') . ' (' . _('Laser') . ')' .'</a></td></tr>'; + echo '<br /><table class=selection> + <tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td> + <td>' . ' ' . '<a target="_blank" href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $OrderNo . '">'. _('Print packing slip') . ' (' . _('Preprinted stationery') . ')' .'</a></td> + </tr>'; + echo '<tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td> + <td>' . ' ' . '<a target="_blank" href="' . $rootpath . '/PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $OrderNo . '">'. _('Print packing slip') . ' (' . _('Laser') . ')' .'</a></td> + </tr>'; - echo '<tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt=""></td><td>' . ' ' . '<a href="' . $rootpath . '/ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $OrderNo .'">'. _('Confirm Dispatch and Produce Invoice') .'</a></td></tr>'; - //Add option to Print Sales Orders or Proforma invoice - echo '<tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/pdf.png" title="' . _('Sales Order') . '" alt=""></td><td>' . ' ' . '<a href="' . $rootpath . '/PrintSalesOrder_generic.php?identifier='.$identifier . '&TransNo=' . $OrderNo .'">'. _('Print Sales Order / Pro-forma Invoice') .'</a></td></tr></table>'; + echo '<tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt=""></td> + <td>' . ' ' . '<a href="' . $rootpath . '/ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $OrderNo .'">'. _('Confirm Dispatch and Produce Invoice') .'</a></td> + </tr>'; + + echo '</table>'; } else { /*link to print the quotation */ - echo '<br><table class=selection><tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td><td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotation.php?' . SID .'identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Landscape)') .'</a></td></tr></table>'; - echo '<br><table class=selection><tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td><td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotationPortrait.php?' . SID .'identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Portrait)') .'</a></td></tr></table>'; + echo '<br /><table class=selection> + <tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td> + <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotation.php?' . SID .'identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Landscape)') .'</a></td> + </tr> + </table>'; + echo '<br /><table class=selection> + <tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td> + <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotationPortrait.php?' . SID .'identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Portrait)') .'</a></td> + </tr> + </table>'; } - echo '<br><table class=selection><tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt=""></td><td>' . ' ' . '<a href="'. $rootpath .'/SelectOrderItems.php?identifier='.$identifier . '&NewOrder=Yes">'. _('Add Another Sales Order') .'</a></td></tr></table>'; + echo '<br /><table class=selection> + <tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt=""></td> + <td>' . ' ' . '<a href="'. $rootpath .'/SelectOrderItems.php?identifier='.$identifier . '&NewOrder=Yes">'. _('Add Another Sales Order') .'</a></td> + </tr> + </table>'; } else { /*its a customer logon so thank them */ prnMsg(_('Thank you for your business'),'success'); @@ -747,7 +771,7 @@ prnMsg(_('Order Number') .' ' . $_SESSION['ExistingOrder'] . ' ' . _('has been updated'),'success'); - echo '<br><table class=selection><tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td><td><a href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'] . '">'. _('Print packing slip - pre-printed stationery') .'</a></td></tr>'; + echo '<br /><table class=selection><tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td><td><a href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'] . '">'. _('Print packing slip - pre-printed stationery') .'</a></td></tr>'; echo '<tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td><td><a target="_blank" href="' . $rootpath . '/PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'] . '">'. _('Print packing slip') . ' (' . _('Laser') . ')' .'</a></td></tr>'; echo '<tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt=""></td><td><a href="' . $rootpath .'/ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $_SESSION['ExistingOrder'] . '">'. _('Confirm Order Delivery Quantities and Produce Invoice') .'</a></td></tr>'; echo '<tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt=""></td><td><a href="' . $rootpath .'/SelectSalesOrder.php?identifier='.$identifier . '">'. _('Select A Different Order') .'</a></td></tr></table>'; @@ -833,7 +857,7 @@ $DisplayVolume = number_format($_SESSION['Items'.$identifier]->totalVolume,2); $DisplayWeight = number_format($_SESSION['Items'.$identifier]->totalWeight,2); - echo '<br><table><tr class="EvenTableRows"> + echo '<br /><table><tr class="EvenTableRows"> <td>'. _('Total Weight') .':</td> <td>'.$DisplayWeight.'</td> <td>'. _('Total Volume') .':</td> @@ -903,7 +927,7 @@ } -echo '<br><table class=selection><tr> +echo '<br /><table class=selection><tr> <td>'. _('Deliver To') .':</td> <td><input type=text size=42 maxlength=40 name="DeliverTo" value="' . $_SESSION['Items'.$identifier]->DeliverTo . '"></td> </tr>'; @@ -1082,13 +1106,13 @@ echo '</table>'; -echo '<br><div class="centre"><input type=submit name="BackToLineDetails" value="' . _('Modify Order Lines') . '"><br>'; +echo '<br /><div class="centre"><input type=submit name="BackToLineDetails" value="' . _('Modify Order Lines') . '"><br />'; 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="ProcessOrder" value="' . _('Place 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/POReport.php =================================================================== --- trunk/POReport.php 2011-04-11 10:49:45 UTC (rev 4547) +++ trunk/POReport.php 2011-04-12 10:33:45 UTC (rev 4548) @@ -40,9 +40,9 @@ $SupplierNameOp = $_POST['SupplierNameOp']; - // Save $_POST['SummaryType'] in $savesummarytype because change $_POST['SummaryType'] when + // Save $_POST['SummaryType'] in $SaveSummaryType because change $_POST['SummaryType'] when // create $sql - $savesummarytype = $_POST['SummaryType']; + $SaveSummaryType = $_POST['SummaryType']; } if (isset($_POST['SupplierName'])){ @@ -60,11 +60,11 @@ if (isset($_POST['submit'])) { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>'; - submit($db,$PartNumber,$PartNumberOp,$SupplierId,$SupplierIdOp,$SupplierName,$SupplierNameOp,$savesummarytype); + submit($db,$PartNumber,$PartNumberOp,$SupplierId,$SupplierIdOp,$SupplierName,$SupplierNameOp,$SaveSummaryType); } else if (isset($_POST['submitcsv'])) { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>'; - submitcsv($db,$PartNumber,$PartNumberOp,$SupplierId,$SupplierIdOp,$SupplierName,$SupplierNameOp,$savesummarytype); + submitcsv($db,$PartNumber,$PartNumberOp,$SupplierId,$SupplierIdOp,$SupplierName,$SupplierNameOp,$SaveSummaryType); } else { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . '</img>' . $title.'</p>'; @@ -73,7 +73,7 @@ //####_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT#### -function submit(&$db,$PartNumber,$PartNumberOp,$SupplierId,$SupplierIdOp,$SupplierName,$SupplierNameOp,$savesummarytype) +function submit(&$db,$PartNumber,$PartNumberOp,$SupplierId,$SupplierIdOp,$SupplierName,$SupplierNameOp,$SaveSummaryType) { //initialize no input errors @@ -94,71 +94,71 @@ } # Add more to WHERE statement, if user entered something for the part number,supplierid, name - $wherepart = ' '; + $WherePart = ' '; if (strlen($PartNumber) > 0 && $PartNumberOp == 'LIKE') { $PartNumber = $PartNumber . '%'; } else { $PartNumberOp = '='; } if (strlen($PartNumber) > 0) { - $wherepart = " AND purchorderdetails.itemcode " . $PartNumberOp . " '" . $PartNumber . "' "; + $WherePart = " AND purchorderdetails.itemcode " . $PartNumberOp . " '" . $PartNumber . "' "; } else { - $wherepart=' '; + $WherePart=' '; } - $wheresupplierid = ' '; + $WhereSupplierID = ' '; if ($SupplierIdOp == 'LIKE') { $SupplierId = $SupplierId . '%'; } else { $SupplierIdOp = '='; } if (strlen($SupplierId) > 0) { - $wheresupplierid = " AND purchorders.supplierno " . $SupplierIdOp . " '" . $SupplierId . "' "; + $WhereSupplierID = " AND purchorders.supplierno " . $SupplierIdOp . " '" . $SupplierId . "' "; } else { - $wheresupplierid=' '; + $WhereSupplierID=' '; } - $wheresuppliername = ' '; + $WhereSupplierName = ' '; if (strlen($SupplierName) > 0 && $SupplierNameOp == 'LIKE') { $SupplierName = $SupplierName . '%'; } else { $SupplierNameOp = '='; } if (strlen($SupplierName) > 0) { - $wheresuppliername = " AND suppliers.suppname " . $SupplierNameOp . " '" . $SupplierName . "' "; + $WhereSupplierName = " AND suppliers.suppname " . $SupplierNameOp . " '" . $SupplierName . "' "; } else { - $wheresuppliername=' '; + $WhereSupplierName=' '; } if (strlen($_POST['OrderNo']) > 0) { - $whereorderno = ' AND purchorderdetails.orderno = ' . " '" . $_POST['OrderNo'] . "' "; + $WhereOrderNo = ' AND purchorderdetails.orderno = ' . " '" . $_POST['OrderNo'] . "' "; } else { - $whereorderno=' '; + $WhereOrderNo=' '; } - $wherelinestatus = ' '; + $WhereLineStatus = ' '; # Had to use IF statement instead of comparing 'linestatus' to $_POST['LineStatus'] #in WHERE clause because the WHERE clause didn't recognize # that had used the IF statement to create a field called linestatus if ($_POST['LineStatus'] != 'All') { if ($_POST['DateType'] == 'Order') { - $wherelinestatus = " AND IF(purchorderdetails.quantityord = purchorderdetails.qtyinvoiced || + $WhereLineStatus = " AND IF(purchorderdetails.quantityord = purchorderdetails.qtyinvoiced || purchorderdetails.completed = 1,'Completed','Open') = '" . $_POST['LineStatus'] . "'"; } else { - $wherelinestatus = " AND IF(grns.qtyrecd - grns.quantityinv <> 0,'Open','Completed') = '" + $WhereLineStatus = " AND IF(grns.qtyrecd - grns.quantityinv <> 0,'Open','Completed') = '" . $_POST['LineStatus'] . "'"; } } - $wherecategory = ' '; + $WhereCategory = ' '; if ($_POST['Category'] != 'All') { - $wherecategory = " AND stockmaster.categoryid = '" . $_POST['Category'] . "'"; + $WhereCategory = " AND stockmaster.categoryid = '" . $_POST['Category'] . "'"; } if ($InputError !=1) { - $fromdate = FormatDateForSQL($_POST['FromDate']); - $todate = FormatDateForSQL($_POST['ToDate']); + $FromDate = FormatDateForSQL($_POST['FromDate']); + $ToDate = FormatDateForSQL($_POST['ToDate']); if ($_POST['ReportType'] == 'Detail') { if ($_POST['DateType'] == 'Order') { $sql = "SELECT purchorderdetails.orderno, @@ -179,14 +179,14 @@ LEFT JOIN purchorders ON purchorders.orderno=purchorderdetails.orderno LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid - WHERE purchorders.orddate >='$fromdate' - AND purchorders.orddate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE purchorders.orddate >='$FromDate' + AND purchorders.orddate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory ORDER BY " . $_POST['SortBy']; } else { // Selects by delivery date from grns @@ -208,14 +208,14 @@ LEFT JOIN purchorders ON purchorders.orderno=purchorderdetails.orderno LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid - WHERE grns.deliverydate >='$fromdate' - AND grns.deliverydate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE grns.deliverydate >='$FromDate' + AND grns.deliverydate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory ORDER BY " . $_POST['SortBy']; } } else { @@ -242,14 +242,14 @@ LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid LEFT JOIN stockcategory ON stockcategory.categoryid = stockmaster.categoryid - WHERE purchorders.orddate >='$fromdate' - AND purchorders.orddate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE purchorders.orddate >='$FromDate' + AND purchorders.orddate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory GROUP BY " . $_POST['SummaryType'] . ',stockmaster.decimalplaces, stockmaster.description @@ -267,14 +267,14 @@ LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid LEFT JOIN stockcategory ON stockcategory.categoryid = stockmaster.categoryid - WHERE purchorders.orddate >='$fromdate' - AND purchorders.orddate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE purchorders.orddate >='$FromDate' + AND purchorders.orddate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory GROUP BY " . $_POST['SummaryType'] . ',purchorders.supplierno, suppliers.suppname @@ -291,14 +291,14 @@ LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid LEFT JOIN stockcategory ON stockcategory.categoryid = stockmaster.categoryid - WHERE purchorders.orddate >='$fromdate' - AND purchorders.orddate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE purchorders.orddate >='$FromDate' + AND purchorders.orddate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory GROUP BY " . $_POST['SummaryType'] . ',purchorders.supplierno, suppliers.suppname @@ -315,14 +315,14 @@ LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid LEFT JOIN stockcategory ON stockcategory.categoryid = stockmaster.categoryid - WHERE purchorders.orddate >='$fromdate' - AND purchorders.orddate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE purchorders.orddate >='$FromDate' + AND purchorders.orddate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory GROUP BY " . $_POST['SummaryType'] . ', monthname ORDER BY ' . $orderby; @@ -338,14 +338,14 @@ LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid LEFT JOIN stockcategory ON stockcategory.categoryid = stockmaster.categoryid - WHERE purchorders.orddate >='$fromdate' - AND purchorders.orddate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE purchorders.orddate >='$FromDate' + AND purchorders.orddate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory GROUP BY " . $_POST['SummaryType'] . ', categorydescription ORDER BY ' . $orderby; @@ -365,14 +365,14 @@ LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid LEFT JOIN stockcategory ON stockcategory.categoryid = stockmaster.categoryid - WHERE grns.deliverydate >='$fromdate' - AND grns.deliverydate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE grns.deliverydate >='$FromDate' + AND grns.deliverydate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory GROUP BY " . $_POST['SummaryType'] . ', stockmaster.description ORDER BY ' . $orderby; @@ -390,14 +390,14 @@ LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid LEFT JOIN stockcategory ON stockcategory.categoryid = stockmaster.categoryid - WHERE grns.deliverydate >='$fromdate' - AND grns.deliverydate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE grns.deliverydate >='$FromDate' + AND grns.deliverydate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory GROUP BY " . $_POST['SummaryType'] . ', purchorders.supplierno, suppliers.suppname @@ -415,14 +415,14 @@ LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid LEFT JOIN stockcategory ON stockcategory.categoryid = stockmaster.categoryid - WHERE grns.deliverydate >='$fromdate' - AND grns.deliverydate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE grns.deliverydate >='$FromDate' + AND grns.deliverydate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory GROUP BY " . $_POST['SummaryType'] . ', purchorders.supplierno, suppliers.suppname @@ -440,14 +440,14 @@ LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid LEFT JOIN stockcategory ON stockcategory.categoryid = stockmaster.categoryid - WHERE grns.deliverydate >='$fromdate' - AND grns.deliverydate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE grns.deliverydate >='$FromDate' + AND grns.deliverydate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory GROUP BY " . $_POST['SummaryType'] . ',monthname ORDER BY ' . $orderby; @@ -464,14 +464,14 @@ LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid LEFT JOIN stockcategory ON stockcategory.categoryid = stockmaster.categoryid - WHERE grns.deliverydate >='$fromdate' - AND grns.deliverydate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE grns.deliverydate >='$FromDate' + AND grns.deliverydate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory GROUP BY " . $_POST['SummaryType'] . ',categorydescription ORDER BY ' . $orderby; @@ -482,35 +482,35 @@ $ErrMsg = _('The SQL to find the parts selected failed with the message'); $result = DB_query($sql,$db,$ErrMsg); $ctr = 0; - $totalqty = 0; - $totalextcost = 0; - $totalextprice = 0; - $totalinvqty = 0; + $TotalQty = 0; + $TotalExtCost = 0; + $TotalExtPrice = 0; + $TotalInvQty = 0; - // Create array for summary type to display in header. Access it with $savesummarytype - $summary_array["orderno"] = _('Order Number'); - $summary_array["itemcode"] = _('Part Number'); - $summary_array["extprice"] = _('Extended Price'); - $summary_array["supplierno"] = _('Customer Number'); - $summary_array["suppname"] = _('Customer Name'); - $summary_array["month"] = _('Month'); - $summary_array["categoryid"] = _('Stock Category'); + // Create array for summary type to display in header. Access it with $SaveSummaryType + $Summary_Array["orderno"] = _('Order Number'); + $Summary_Array["itemcode"] = _('Part Number'); + $Summary_Array["extprice"] = _('Extended Price'); + $Summary_Array["supplierno"] = _('Customer Number'); + $Summary_Array["suppname"] = _('Customer Name'); + $Summary_Array["month"] = _('Month'); + $Summary_Array["categoryid"] = _('Stock Category'); // Create array for sort for detail report to display in header - $detail_array['purchorderdetails.orderno'] = _('Order Number'); - $detail_array['purchorderdetails.itemcode'] = _('Part Number'); - $detail_array['suppliers.supplierid,purchorderdetails.orderno'] = _('Supplier Number'); - $detail_array['suppliers.suppname,suppliers.supplierid,purchorderdetails.orderno'] = _('Supplier Name'); + $Detail_Array['purchorderdetails.orderno'] = _('Order Number'); + $Detail_Array['purchorderdetails.itemcode'] = _('Part Number'); + $Detail_Array['suppliers.supplierid,purchorderdetails.orderno'] = _('Supplier Number'); + $Detail_Array['suppliers.suppname,suppliers.supplierid,purchorderdetails.orderno'] = _('Supplier Name'); // Display Header info echo '<table class=selection>'; if ($_POST['ReportType'] == 'Summary') { - $sortby_display = $summary_array[$savesummarytype]; + $SortBy_Display = $Summary_Array[$SaveSummaryType]; } else { - $sortby_display = $detail_array[$_POST['SortBy']]; + $SortBy_Display = $Detail_A... [truncated message content] |
From: <dai...@us...> - 2011-04-12 10:33:53
|
Revision: 4548 http://web-erp.svn.sourceforge.net/web-erp/?rev=4548&view=rev Author: daintree Date: 2011-04-12 10:33:45 +0000 (Tue, 12 Apr 2011) Log Message: ----------- tim launchpad fork Modified Paths: -------------- trunk/DeliveryDetails.php trunk/POReport.php trunk/Stocks.php trunk/TaxProvinces.php trunk/UnitsOfMeasure.php trunk/UpgradeDatabase.php trunk/WOSerialNos.php trunk/WorkOrderIssue.php trunk/Z_Upgrade3.10.php trunk/Z_Upgrade_3.09-3.10.php Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-04-11 10:49:45 UTC (rev 4547) +++ trunk/DeliveryDetails.php 2011-04-12 10:33:45 UTC (rev 4548) @@ -1,7 +1,6 @@ <?php /* $Id$ */ -/* $Revision: 1.76 $ */ /* This is where the delivery details are confirmed/entered/modified and the order committed to the database once the place order/modify order button is hit. @@ -81,13 +80,13 @@ /* If (strlen($_POST['BrAdd3'])==0 OR !isset($_POST['BrAdd3'])){ $InputErrors =1; - echo "<br>A region or city must be entered.<br>"; + echo "<br />A region or city must be entered.<br />"; } Maybe appropriate in some installations but not here If (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>"; + echo "<br />You should enter the suburb in the box provided. Orders cannot be accepted without a valid suburb being entered.<br />"; } */ @@ -111,7 +110,7 @@ elseif (Date1GreaterThanDate2(Date($_SESSION['DefaultDateFormat'],$EarliestDispatch), $_POST['DeliveryDate'])){ $InputErrors =1; - echo '<br><b>' . _('The delivery details cannot be updated because you are attempting to set the date the order is to be dispatched earlier than is possible. No dispatches are made on Saturday and Sunday. Also, the dispatch cut off time is') . $_SESSION['DispatchCutOffTime'] . _(':00 hrs. Orders placed after this time will be dispatched the following working day.'); + echo '<br /><b>' . _('The delivery details cannot be updated because you are attempting to set the date the order is to be dispatched earlier than is possible. No dispatches are made on Saturday and Sunday. Also, the dispatch cut off time is') . $_SESSION['DispatchCutOffTime'] . _(':00 hrs. Orders placed after this time will be dispatched the following working day.'); } */ @@ -153,7 +152,7 @@ prnMsg(_('The branch details for branch code') . ': ' . $_SESSION['Items'.$identifier]->Branch . ' ' . _('against customer code') . ': ' . $_POST['Select'] . ' ' . _('could not be retrieved') . '. ' . _('Check the set up of the customer and branch'),'error'); if ($debug==1){ - echo '<br>' . _('The SQL that failed to get the branch details was') . ':<br>' . $sql; + echo '<br />' . _('The SQL that failed to get the branch details was') . ':<br />' . $sql; } include('includes/footer.inc'); exit; @@ -280,7 +279,7 @@ } If ($_POST['FreightCost'] != $OldFreightCost && $_SESSION['DoFreightCalc']==True){ $OK_to_PROCESS = 0; - prnMsg(_('The freight charge has been updated') . '. ' . _('Please reconfirm that the order and the freight charges are acceptable and then confirm the order again if OK') .' <br> '. _('The new freight cost is') .' ' . $_POST['FreightCost'] . ' ' . _('and the previously calculated freight cost was') .' '. $OldFreightCost,'warn'); + prnMsg(_('The freight charge has been updated') . '. ' . _('Please reconfirm that the order and the freight charges are acceptable and then confirm the order again if OK') .' <br /> '. _('The new freight cost is') .' ' . $_POST['FreightCost'] . ' ' . _('and the previously calculated freight cost was') .' '. $OldFreightCost,'warn'); } else { /*check the customer's payment terms */ @@ -417,7 +416,7 @@ AND $_SESSION['AutoCreateWOs']==1 AND $_SESSION['Items'.$identifier]->Quotation!=1){ //oh yeah its all on! - echo '<br>'; + echo '<br />'; //now get the data required to test to see if we need to make a new WO $QOHResult = DB_query("SELECT SUM(quantity) FROM locstock WHERE stockid='" . $StockItem->StockID . "'",$db); @@ -559,7 +558,7 @@ } /* end inserted line items into sales order details */ $result = DB_Txn_Commit($db); - echo '<br>'; + echo '<br />'; if ($_SESSION['Items'.$identifier]->Quotation==1){ prnMsg(_('Quotation Number') . ' ' . $OrderNo . ' ' . _('has been entered'),'success'); } else { @@ -571,19 +570,44 @@ if ($_POST['Quotation']==0) { /*then its not a quotation its a real order */ - echo '<br><table class=selection><tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td><td>' . ' ' . '<a target="_blank" href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $OrderNo . '">'. _('Print packing slip') . ' (' . _('Preprinted stationery') . ')' .'</a></td></tr>'; - echo '<tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td><td>' . ' ' . '<a target="_blank" href="' . $rootpath . '/PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $OrderNo . '">'. _('Print packing slip') . ' (' . _('Laser') . ')' .'</a></td></tr>'; + echo '<br /><table class=selection> + <tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td> + <td>' . ' ' . '<a target="_blank" href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $OrderNo . '">'. _('Print packing slip') . ' (' . _('Preprinted stationery') . ')' .'</a></td> + </tr>'; + echo '<tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td> + <td>' . ' ' . '<a target="_blank" href="' . $rootpath . '/PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $OrderNo . '">'. _('Print packing slip') . ' (' . _('Laser') . ')' .'</a></td> + </tr>'; - echo '<tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt=""></td><td>' . ' ' . '<a href="' . $rootpath . '/ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $OrderNo .'">'. _('Confirm Dispatch and Produce Invoice') .'</a></td></tr>'; - //Add option to Print Sales Orders or Proforma invoice - echo '<tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/pdf.png" title="' . _('Sales Order') . '" alt=""></td><td>' . ' ' . '<a href="' . $rootpath . '/PrintSalesOrder_generic.php?identifier='.$identifier . '&TransNo=' . $OrderNo .'">'. _('Print Sales Order / Pro-forma Invoice') .'</a></td></tr></table>'; + echo '<tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt=""></td> + <td>' . ' ' . '<a href="' . $rootpath . '/ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $OrderNo .'">'. _('Confirm Dispatch and Produce Invoice') .'</a></td> + </tr>'; + + echo '</table>'; } else { /*link to print the quotation */ - echo '<br><table class=selection><tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td><td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotation.php?' . SID .'identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Landscape)') .'</a></td></tr></table>'; - echo '<br><table class=selection><tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td><td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotationPortrait.php?' . SID .'identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Portrait)') .'</a></td></tr></table>'; + echo '<br /><table class=selection> + <tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td> + <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotation.php?' . SID .'identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Landscape)') .'</a></td> + </tr> + </table>'; + echo '<br /><table class=selection> + <tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td> + <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotationPortrait.php?' . SID .'identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Portrait)') .'</a></td> + </tr> + </table>'; } - echo '<br><table class=selection><tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt=""></td><td>' . ' ' . '<a href="'. $rootpath .'/SelectOrderItems.php?identifier='.$identifier . '&NewOrder=Yes">'. _('Add Another Sales Order') .'</a></td></tr></table>'; + echo '<br /><table class=selection> + <tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt=""></td> + <td>' . ' ' . '<a href="'. $rootpath .'/SelectOrderItems.php?identifier='.$identifier . '&NewOrder=Yes">'. _('Add Another Sales Order') .'</a></td> + </tr> + </table>'; } else { /*its a customer logon so thank them */ prnMsg(_('Thank you for your business'),'success'); @@ -747,7 +771,7 @@ prnMsg(_('Order Number') .' ' . $_SESSION['ExistingOrder'] . ' ' . _('has been updated'),'success'); - echo '<br><table class=selection><tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td><td><a href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'] . '">'. _('Print packing slip - pre-printed stationery') .'</a></td></tr>'; + echo '<br /><table class=selection><tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td><td><a href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'] . '">'. _('Print packing slip - pre-printed stationery') .'</a></td></tr>'; echo '<tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td><td><a target="_blank" href="' . $rootpath . '/PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'] . '">'. _('Print packing slip') . ' (' . _('Laser') . ')' .'</a></td></tr>'; echo '<tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt=""></td><td><a href="' . $rootpath .'/ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $_SESSION['ExistingOrder'] . '">'. _('Confirm Order Delivery Quantities and Produce Invoice') .'</a></td></tr>'; echo '<tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt=""></td><td><a href="' . $rootpath .'/SelectSalesOrder.php?identifier='.$identifier . '">'. _('Select A Different Order') .'</a></td></tr></table>'; @@ -833,7 +857,7 @@ $DisplayVolume = number_format($_SESSION['Items'.$identifier]->totalVolume,2); $DisplayWeight = number_format($_SESSION['Items'.$identifier]->totalWeight,2); - echo '<br><table><tr class="EvenTableRows"> + echo '<br /><table><tr class="EvenTableRows"> <td>'. _('Total Weight') .':</td> <td>'.$DisplayWeight.'</td> <td>'. _('Total Volume') .':</td> @@ -903,7 +927,7 @@ } -echo '<br><table class=selection><tr> +echo '<br /><table class=selection><tr> <td>'. _('Deliver To') .':</td> <td><input type=text size=42 maxlength=40 name="DeliverTo" value="' . $_SESSION['Items'.$identifier]->DeliverTo . '"></td> </tr>'; @@ -1082,13 +1106,13 @@ echo '</table>'; -echo '<br><div class="centre"><input type=submit name="BackToLineDetails" value="' . _('Modify Order Lines') . '"><br>'; +echo '<br /><div class="centre"><input type=submit name="BackToLineDetails" value="' . _('Modify Order Lines') . '"><br />'; 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="ProcessOrder" value="' . _('Place 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/POReport.php =================================================================== --- trunk/POReport.php 2011-04-11 10:49:45 UTC (rev 4547) +++ trunk/POReport.php 2011-04-12 10:33:45 UTC (rev 4548) @@ -40,9 +40,9 @@ $SupplierNameOp = $_POST['SupplierNameOp']; - // Save $_POST['SummaryType'] in $savesummarytype because change $_POST['SummaryType'] when + // Save $_POST['SummaryType'] in $SaveSummaryType because change $_POST['SummaryType'] when // create $sql - $savesummarytype = $_POST['SummaryType']; + $SaveSummaryType = $_POST['SummaryType']; } if (isset($_POST['SupplierName'])){ @@ -60,11 +60,11 @@ if (isset($_POST['submit'])) { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>'; - submit($db,$PartNumber,$PartNumberOp,$SupplierId,$SupplierIdOp,$SupplierName,$SupplierNameOp,$savesummarytype); + submit($db,$PartNumber,$PartNumberOp,$SupplierId,$SupplierIdOp,$SupplierName,$SupplierNameOp,$SaveSummaryType); } else if (isset($_POST['submitcsv'])) { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>'; - submitcsv($db,$PartNumber,$PartNumberOp,$SupplierId,$SupplierIdOp,$SupplierName,$SupplierNameOp,$savesummarytype); + submitcsv($db,$PartNumber,$PartNumberOp,$SupplierId,$SupplierIdOp,$SupplierName,$SupplierNameOp,$SaveSummaryType); } else { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . '</img>' . $title.'</p>'; @@ -73,7 +73,7 @@ //####_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT#### -function submit(&$db,$PartNumber,$PartNumberOp,$SupplierId,$SupplierIdOp,$SupplierName,$SupplierNameOp,$savesummarytype) +function submit(&$db,$PartNumber,$PartNumberOp,$SupplierId,$SupplierIdOp,$SupplierName,$SupplierNameOp,$SaveSummaryType) { //initialize no input errors @@ -94,71 +94,71 @@ } # Add more to WHERE statement, if user entered something for the part number,supplierid, name - $wherepart = ' '; + $WherePart = ' '; if (strlen($PartNumber) > 0 && $PartNumberOp == 'LIKE') { $PartNumber = $PartNumber . '%'; } else { $PartNumberOp = '='; } if (strlen($PartNumber) > 0) { - $wherepart = " AND purchorderdetails.itemcode " . $PartNumberOp . " '" . $PartNumber . "' "; + $WherePart = " AND purchorderdetails.itemcode " . $PartNumberOp . " '" . $PartNumber . "' "; } else { - $wherepart=' '; + $WherePart=' '; } - $wheresupplierid = ' '; + $WhereSupplierID = ' '; if ($SupplierIdOp == 'LIKE') { $SupplierId = $SupplierId . '%'; } else { $SupplierIdOp = '='; } if (strlen($SupplierId) > 0) { - $wheresupplierid = " AND purchorders.supplierno " . $SupplierIdOp . " '" . $SupplierId . "' "; + $WhereSupplierID = " AND purchorders.supplierno " . $SupplierIdOp . " '" . $SupplierId . "' "; } else { - $wheresupplierid=' '; + $WhereSupplierID=' '; } - $wheresuppliername = ' '; + $WhereSupplierName = ' '; if (strlen($SupplierName) > 0 && $SupplierNameOp == 'LIKE') { $SupplierName = $SupplierName . '%'; } else { $SupplierNameOp = '='; } if (strlen($SupplierName) > 0) { - $wheresuppliername = " AND suppliers.suppname " . $SupplierNameOp . " '" . $SupplierName . "' "; + $WhereSupplierName = " AND suppliers.suppname " . $SupplierNameOp . " '" . $SupplierName . "' "; } else { - $wheresuppliername=' '; + $WhereSupplierName=' '; } if (strlen($_POST['OrderNo']) > 0) { - $whereorderno = ' AND purchorderdetails.orderno = ' . " '" . $_POST['OrderNo'] . "' "; + $WhereOrderNo = ' AND purchorderdetails.orderno = ' . " '" . $_POST['OrderNo'] . "' "; } else { - $whereorderno=' '; + $WhereOrderNo=' '; } - $wherelinestatus = ' '; + $WhereLineStatus = ' '; # Had to use IF statement instead of comparing 'linestatus' to $_POST['LineStatus'] #in WHERE clause because the WHERE clause didn't recognize # that had used the IF statement to create a field called linestatus if ($_POST['LineStatus'] != 'All') { if ($_POST['DateType'] == 'Order') { - $wherelinestatus = " AND IF(purchorderdetails.quantityord = purchorderdetails.qtyinvoiced || + $WhereLineStatus = " AND IF(purchorderdetails.quantityord = purchorderdetails.qtyinvoiced || purchorderdetails.completed = 1,'Completed','Open') = '" . $_POST['LineStatus'] . "'"; } else { - $wherelinestatus = " AND IF(grns.qtyrecd - grns.quantityinv <> 0,'Open','Completed') = '" + $WhereLineStatus = " AND IF(grns.qtyrecd - grns.quantityinv <> 0,'Open','Completed') = '" . $_POST['LineStatus'] . "'"; } } - $wherecategory = ' '; + $WhereCategory = ' '; if ($_POST['Category'] != 'All') { - $wherecategory = " AND stockmaster.categoryid = '" . $_POST['Category'] . "'"; + $WhereCategory = " AND stockmaster.categoryid = '" . $_POST['Category'] . "'"; } if ($InputError !=1) { - $fromdate = FormatDateForSQL($_POST['FromDate']); - $todate = FormatDateForSQL($_POST['ToDate']); + $FromDate = FormatDateForSQL($_POST['FromDate']); + $ToDate = FormatDateForSQL($_POST['ToDate']); if ($_POST['ReportType'] == 'Detail') { if ($_POST['DateType'] == 'Order') { $sql = "SELECT purchorderdetails.orderno, @@ -179,14 +179,14 @@ LEFT JOIN purchorders ON purchorders.orderno=purchorderdetails.orderno LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid - WHERE purchorders.orddate >='$fromdate' - AND purchorders.orddate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE purchorders.orddate >='$FromDate' + AND purchorders.orddate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory ORDER BY " . $_POST['SortBy']; } else { // Selects by delivery date from grns @@ -208,14 +208,14 @@ LEFT JOIN purchorders ON purchorders.orderno=purchorderdetails.orderno LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid - WHERE grns.deliverydate >='$fromdate' - AND grns.deliverydate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE grns.deliverydate >='$FromDate' + AND grns.deliverydate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory ORDER BY " . $_POST['SortBy']; } } else { @@ -242,14 +242,14 @@ LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid LEFT JOIN stockcategory ON stockcategory.categoryid = stockmaster.categoryid - WHERE purchorders.orddate >='$fromdate' - AND purchorders.orddate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE purchorders.orddate >='$FromDate' + AND purchorders.orddate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory GROUP BY " . $_POST['SummaryType'] . ',stockmaster.decimalplaces, stockmaster.description @@ -267,14 +267,14 @@ LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid LEFT JOIN stockcategory ON stockcategory.categoryid = stockmaster.categoryid - WHERE purchorders.orddate >='$fromdate' - AND purchorders.orddate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE purchorders.orddate >='$FromDate' + AND purchorders.orddate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory GROUP BY " . $_POST['SummaryType'] . ',purchorders.supplierno, suppliers.suppname @@ -291,14 +291,14 @@ LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid LEFT JOIN stockcategory ON stockcategory.categoryid = stockmaster.categoryid - WHERE purchorders.orddate >='$fromdate' - AND purchorders.orddate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE purchorders.orddate >='$FromDate' + AND purchorders.orddate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory GROUP BY " . $_POST['SummaryType'] . ',purchorders.supplierno, suppliers.suppname @@ -315,14 +315,14 @@ LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid LEFT JOIN stockcategory ON stockcategory.categoryid = stockmaster.categoryid - WHERE purchorders.orddate >='$fromdate' - AND purchorders.orddate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE purchorders.orddate >='$FromDate' + AND purchorders.orddate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory GROUP BY " . $_POST['SummaryType'] . ', monthname ORDER BY ' . $orderby; @@ -338,14 +338,14 @@ LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid LEFT JOIN stockcategory ON stockcategory.categoryid = stockmaster.categoryid - WHERE purchorders.orddate >='$fromdate' - AND purchorders.orddate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE purchorders.orddate >='$FromDate' + AND purchorders.orddate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory GROUP BY " . $_POST['SummaryType'] . ', categorydescription ORDER BY ' . $orderby; @@ -365,14 +365,14 @@ LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid LEFT JOIN stockcategory ON stockcategory.categoryid = stockmaster.categoryid - WHERE grns.deliverydate >='$fromdate' - AND grns.deliverydate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE grns.deliverydate >='$FromDate' + AND grns.deliverydate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory GROUP BY " . $_POST['SummaryType'] . ', stockmaster.description ORDER BY ' . $orderby; @@ -390,14 +390,14 @@ LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid LEFT JOIN stockcategory ON stockcategory.categoryid = stockmaster.categoryid - WHERE grns.deliverydate >='$fromdate' - AND grns.deliverydate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE grns.deliverydate >='$FromDate' + AND grns.deliverydate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory GROUP BY " . $_POST['SummaryType'] . ', purchorders.supplierno, suppliers.suppname @@ -415,14 +415,14 @@ LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid LEFT JOIN stockcategory ON stockcategory.categoryid = stockmaster.categoryid - WHERE grns.deliverydate >='$fromdate' - AND grns.deliverydate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE grns.deliverydate >='$FromDate' + AND grns.deliverydate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory GROUP BY " . $_POST['SummaryType'] . ', purchorders.supplierno, suppliers.suppname @@ -440,14 +440,14 @@ LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid LEFT JOIN stockcategory ON stockcategory.categoryid = stockmaster.categoryid - WHERE grns.deliverydate >='$fromdate' - AND grns.deliverydate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE grns.deliverydate >='$FromDate' + AND grns.deliverydate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory GROUP BY " . $_POST['SummaryType'] . ',monthname ORDER BY ' . $orderby; @@ -464,14 +464,14 @@ LEFT JOIN suppliers ON purchorders.supplierno = suppliers.supplierid LEFT JOIN stockmaster ON purchorderdetails.itemcode = stockmaster.stockid LEFT JOIN stockcategory ON stockcategory.categoryid = stockmaster.categoryid - WHERE grns.deliverydate >='$fromdate' - AND grns.deliverydate <='$todate' - $wherepart - $wheresupplierid - $wheresuppliername - $whereorderno - $wherelinestatus - $wherecategory + WHERE grns.deliverydate >='$FromDate' + AND grns.deliverydate <='$ToDate' + $WherePart + $WhereSupplierID + $WhereSupplierName + $WhereOrderNo + $WhereLineStatus + $WhereCategory GROUP BY " . $_POST['SummaryType'] . ',categorydescription ORDER BY ' . $orderby; @@ -482,35 +482,35 @@ $ErrMsg = _('The SQL to find the parts selected failed with the message'); $result = DB_query($sql,$db,$ErrMsg); $ctr = 0; - $totalqty = 0; - $totalextcost = 0; - $totalextprice = 0; - $totalinvqty = 0; + $TotalQty = 0; + $TotalExtCost = 0; + $TotalExtPrice = 0; + $TotalInvQty = 0; - // Create array for summary type to display in header. Access it with $savesummarytype - $summary_array["orderno"] = _('Order Number'); - $summary_array["itemcode"] = _('Part Number'); - $summary_array["extprice"] = _('Extended Price'); - $summary_array["supplierno"] = _('Customer Number'); - $summary_array["suppname"] = _('Customer Name'); - $summary_array["month"] = _('Month'); - $summary_array["categoryid"] = _('Stock Category'); + // Create array for summary type to display in header. Access it with $SaveSummaryType + $Summary_Array["orderno"] = _('Order Number'); + $Summary_Array["itemcode"] = _('Part Number'); + $Summary_Array["extprice"] = _('Extended Price'); + $Summary_Array["supplierno"] = _('Customer Number'); + $Summary_Array["suppname"] = _('Customer Name'); + $Summary_Array["month"] = _('Month'); + $Summary_Array["categoryid"] = _('Stock Category'); // Create array for sort for detail report to display in header - $detail_array['purchorderdetails.orderno'] = _('Order Number'); - $detail_array['purchorderdetails.itemcode'] = _('Part Number'); - $detail_array['suppliers.supplierid,purchorderdetails.orderno'] = _('Supplier Number'); - $detail_array['suppliers.suppname,suppliers.supplierid,purchorderdetails.orderno'] = _('Supplier Name'); + $Detail_Array['purchorderdetails.orderno'] = _('Order Number'); + $Detail_Array['purchorderdetails.itemcode'] = _('Part Number'); + $Detail_Array['suppliers.supplierid,purchorderdetails.orderno'] = _('Supplier Number'); + $Detail_Array['suppliers.suppname,suppliers.supplierid,purchorderdetails.orderno'] = _('Supplier Name'); // Display Header info echo '<table class=selection>'; if ($_POST['ReportType'] == 'Summary') { - $sortby_display = $summary_array[$savesummarytype]; + $SortBy_Display = $Summary_Array[$SaveSummaryType]; } else { - $sortby_display = $detail_array[$_POST['SortBy']]; + $SortBy_Display = $Detail_A... [truncated message content] |
From: <dai...@us...> - 2011-04-14 10:28:59
|
Revision: 4550 http://web-erp.svn.sourceforge.net/web-erp/?rev=4550&view=rev Author: daintree Date: 2011-04-14 10:28:52 +0000 (Thu, 14 Apr 2011) Log Message: ----------- variosu Modified Paths: -------------- trunk/CustomerAllocations.php trunk/FixedAssetTransfer.php trunk/GeocodeSetup.php trunk/WorkOrderReceive.php trunk/Z_index.php Removed Paths: ------------- trunk/Z_PriceChanges.php Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php 2011-04-14 09:18:16 UTC (rev 4549) +++ trunk/CustomerAllocations.php 2011-04-14 10:28:52 UTC (rev 4550) @@ -1,5 +1,5 @@ <?php -/* $Revision: 1.30 $ */ + /* $Id$*/ /* @@ -10,7 +10,6 @@ */ include('includes/DefineCustAllocsClass.php'); -//$PageSecurity = 3; include('includes/session.inc'); $title = _('Customer Receipt') . '/' . _('Credit Note Allocations'); include('includes/header.inc'); @@ -70,7 +69,7 @@ if ($TotalAllocated + $_SESSION['Alloc']->TransAmt > 0.008) { prnMsg(_('Allocation could not be processed because the amount allocated is more than the').' ' . - $_SESSION['Alloc']->TransTypeName . ' '._('being allocated') . '<br>' . _('Total allocated').' = ' . + $_SESSION['Alloc']->TransTypeName . ' '._('being allocated') . '<br />' . _('Total allocated').' = ' . $TotalAllocated . ' '._('and the total amount of the') .' ' . $_SESSION['Alloc']->TransTypeName . ' '. _('was').' ' . -$_SESSION['Alloc']->TransAmt,'error'); $InputError=1; @@ -324,22 +323,22 @@ 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 - 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 "<input type=hidden name='AllocTrans' value=" . $_POST['AllocTrans'] . '>'; + echo '<input type=hidden name="AllocTrans" value="' . $_POST['AllocTrans'] . '" />'; // Show trans already allocated and potential new allocations @@ -347,20 +346,20 @@ 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) { - echo '<br>'._('Amount in customer currency').' <b>' . + echo '<br />'._('Amount in customer currency').' <b>' . number_format(-$_SESSION['Alloc']->TransAmt,2) . '</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; @@ -380,37 +379,37 @@ $curTrans = " "; } - echo "<td>" . $AllocnItem->TransType . "</td> - <td>" . $AllocnItem->TypeNo . "</td> - <td class=number>" . $AllocnItem->TransDate . "</td> - <td class=number>" . number_format($AllocnItem->TransAmount,2) . "</td> - <td class=number>" . number_format($YetToAlloc,2) . "</td>"; + echo '<td>' . $AllocnItem->TransType . '</td> + <td>' . $AllocnItem->TypeNo . '</td> + <td class=number>' . $AllocnItem->TransDate . '</td> + <td class=number>' . number_format($AllocnItem->TransAmount,2) . '</td> + <td class=number>' . number_format($YetToAlloc,2) . '</td>'; $j++; if ($AllocnItem->TransAmount < 0) { $balance+=$YetToAlloc; - echo "<td>" . $curTrans ."</td><td class=number>" . number_format($balance,2) . "</td></tr>"; + echo '<td>' . $curTrans .'</td><td class="number">' . number_format($balance,2) . '</td></tr>'; } else { - echo "<input type=hidden name='YetToAlloc" . $Counter . "' value=" . round($YetToAlloc,2) . '></td>'; - echo "<td class=number><input tabindex=".$j." type='checkbox' name='All" . $Counter . "'"; + echo '<input type=hidden name="YetToAlloc' . $Counter . '" value="' . round($YetToAlloc,2) . '"></td>'; + echo '<td class="number"><input tabindex="' . $j .'" type="checkbox" name="All' . $Counter . '"'; if (ABS($AllocnItem->AllocAmt-$YetToAlloc) < 0.01) { - echo ' value=' . True . '>'; + echo ' value=' . True . ' />'; } else { - echo '>'; + echo ' />'; } $balance += $YetToAlloc-$AllocnItem->AllocAmt; $j++; - echo "<input tabindex=".$j." type=text class=number name='Amt" . $Counter ."' maxlength=12 size=13 value=" . round($AllocnItem->AllocAmt,2) . "> - <input type=hidden name='AllocID" . $Counter . "' value=" . $AllocnItem->ID . '></td> - <td class=number>' . number_format($balance,2) . '</td></tr>'; + echo '<input tabindex="'.$j.'" type="text" class="number" name="Amt' . $Counter .'" maxlength=12 size=13 value="' . round($AllocnItem->AllocAmt,2) . '" /> + <input type=hidden name="AllocID' . $Counter . '" value="' . $AllocnItem->ID . '"></td> + <td class="number">' . number_format($balance,2) . '</td></tr>'; } $TotalAllocated = $TotalAllocated + round($AllocnItem->AllocAmt,2); $Counter++; } - echo "<tr> - <td colspan=5 class=number><b>"._('Total Allocated').':</b></td> + echo '<tr> + <td colspan=5 class="number"><b>'._('Total Allocated').':</b></td> <td class=number><b><u>' . number_format($TotalAllocated,2) . '</u></b></td>'; $j++; echo '<td rowspan=2> @@ -421,9 +420,9 @@ <td class=number><b>' . number_format($remaining-$TotalAllocated,2).'</b></td> </tr>'; echo '</table><p>'; - 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>"; + 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>'; } elseif (isset($_GET['DebtorNo'])) { // Page called with customer code @@ -467,14 +466,14 @@ echo '<tr class="OddTableRows">';; $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><a href=' . $_SERVER['PHP_SELF']. '?' . SID . '&AllocTrans=' . $myrow['id'] . '>' . _('Allocate') . '</a></td></tr>'; + 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><a href=' . $_SERVER['PHP_SELF']. '?AllocTrans=' . $myrow['id'] . '>' . _('Allocate') . '</a></td></tr>'; } DB_free_result($result); echo '</table><p>'; @@ -516,7 +515,7 @@ if ( $curDebtor != $myrow['debtorno'] ) { if ( $curTrans > 1 ) { - echo "<tr class='OddTableRows'><td colspan=7 class=number>" . number_format($balance,2) . "</td><td><b>Balance</b></td></tr>"; + echo '<tr class="OddTableRows"><td colspan=7 class="number">' . number_format($balance,2) . '</td><td><b>' . _('Balance') . '</b></td></tr>'; } $balance = 0; @@ -548,20 +547,22 @@ $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>' . $allocate . '</td></tr>'; + 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> + <td>' . $allocate . '</td></tr>'; if ( $curTrans > $trans ) { if (!isset($balance)) { $balance=0; } - echo "<tr class='OddTableRows'><td colspan=7 class=number>" . number_format($balance,2) . "</td><td><b>Balance</b></td></tr>"; + echo '<tr class="OddTableRows"> + <td colspan="7" class="number">' . number_format($balance,2) .'</td> + <td><b>' . _('Balance') . '</b></td></tr>'; } } DB_free_result($result); Modified: trunk/FixedAssetTransfer.php =================================================================== --- trunk/FixedAssetTransfer.php 2011-04-14 09:18:16 UTC (rev 4549) +++ trunk/FixedAssetTransfer.php 2011-04-14 10:28:52 UTC (rev 4550) @@ -1,6 +1,6 @@ <?php -//$PageSecurity = 11; +/* $Id$*/ include('includes/session.inc'); @@ -26,7 +26,7 @@ } else { $sql='SELECT categoryid, categorydescription FROM fixedassetcategories'; $result=DB_query($sql, $db); - 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 '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; @@ -121,11 +121,11 @@ while ($myrow=DB_fetch_array($Result)) { echo '<tr><td>'.$myrow['assetid'].'</td> - <td>'.$myrow['description'].'</td> - <td>'.$myrow['serialno'].'</td> - <td class=number>'.number_format($myrow['cost'],2).'</td> - <td class=number>'.number_format($myrow['accumdepn'],2).'</td> - <td>'.$myrow['locationdescription'].'</td>'; + <td>'.$myrow['description'].'</td> + <td>'.$myrow['serialno'].'</td> + <td class=number>'.number_format($myrow['cost'],2).'</td> + <td class=number>'.number_format($myrow['accumdepn'],2).'</td> + <td>'.$myrow['locationdescription'].'</td>'; echo '<td><select name="Location'.$myrow['assetid'].'" onChange="ReloadForm(Move'.$myrow['assetid'].')">'; echo '<option></option>'; while ($LocationRow=DB_fetch_array($LocationResult)) { @@ -137,11 +137,11 @@ } DB_data_seek($LocationResult,0); echo '</select></td>'; - echo '<input type=hidden name=AssetCat value="' . $_POST['AssetCat'].'"'; - echo '<input type=hidden name=Keywords value="' . $_POST['Keywords'].'"'; - echo '<input type=hidden name=AssetID value="' . $_POST['AssetID'].'"'; - echo '<input type=hidden name=Search value="' . $_POST['Search'].'"'; - echo '<td><input type=submit name="Move'.$myrow['assetid'].'" value=Move></td>'; + echo '<input type="hidden" name="AssetCat" value="' . $_POST['AssetCat'].'"'; + echo '<input type="hidden" name="Keywords" value="' . $_POST['Keywords'].'"'; + echo '<input type="hidden" name="AssetID" value="' . $_POST['AssetID'].'"'; + echo '<input type="hidden" name="Search" value="' . $_POST['Search'].'"'; + echo '<td><input type="submit" name="Move'.$myrow['assetid'].'" value=Move></td>'; echo '</tr>'; } echo '</table></form>'; Modified: trunk/GeocodeSetup.php =================================================================== --- trunk/GeocodeSetup.php 2011-04-14 09:18:16 UTC (rev 4549) +++ trunk/GeocodeSetup.php 2011-04-14 10:28:52 UTC (rev 4550) @@ -1,7 +1,7 @@ <?php /* $Id$*/ -//$PageSecurity = 3; + include('includes/session.inc'); $title = _('Geocode Maintenance'); include('includes/header.inc'); @@ -139,15 +139,16 @@ '<a href="http://www.batchgeocode.com/lookup/" target="_blank">http://www.batchgeocode.com/lookup/</a></b>'; echo '<p>'. _('Set the maps centre point using the Center Longitude and Center Latitude. Set the maps screen size using the height and width in pixels (px)').'</div><br>'; echo '<table border=1>'; - echo "<tr> - <th>". _('Geocode ID') ."</th> - <th>". _('Geocode Key') ."</th> - <th>". _('Center Longitude') ."</th> - <th>". _('Center Latitude') ."</th> - <th>". _('Map height (px)') ."</th> - <th>". _('Map width (px)') ."</th> - <th>". _('Map host') .'</th>'; - + + echo '<tr> + <th>'. _('Geocode ID') .'</th> + <th>'. _('Geocode Key') .'</th> + <th>'. _('Center Longitude') .'</th> + <th>'. _('Center Latitude') .'</th> + <th>'. _('Map height (px)') .'</th> + <th>'. _('Map width (px)') .'</th> + <th>'. _('Map host') .'</th>'; + $k=0; //row colour counter while ($myrow=DB_fetch_row($result)) { @@ -159,15 +160,15 @@ $k=1; } - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> - <td><a href=\"%s?SelectedParam=%s\">" . _('Edit') . "</a></td> - <td><a href=\"%s?SelectedParam=%s&delete=%s\">". _('Delete') .'</a></td> + <td><a href=\'%s?SelectedParam=%s\'>' . _('Edit') . '</a></td> + <td><a href=\'%s?SelectedParam=%s&delete=%s\'>'. _('Delete') .'</a></td> </tr>', $myrow[0], $myrow[1], @@ -193,7 +194,7 @@ if (!isset($_GET['delete'])) { - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedParam) and ($InputError!=1)) { @@ -220,11 +221,12 @@ $_POST['map_width'] = $myrow['map_width']; $_POST['map_host'] = $myrow['map_host']; - echo "<input type=hidden name='SelectedParam' VALUE='" . $SelectedParam . "'>"; - echo "<input type=hidden name='geocodeid' VALUE='" . $_POST['geocodeid'] . "'>"; + echo '<input type="hidden" name="SelectedParam" value="' . $SelectedParam . '" />'; + echo '<input type="hidden" name="geocodeid" value="' . $_POST['geocodeid'] . '" />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Geocode Setup') . '" alt="">'. _('Setup configuration for Geocoding of Customers and Suppliers') .'</p>'; - echo "<table><tr><td>". _('Geocode Code') .':</td><td>'; - echo $_POST['geocodeid'] . '</td></tr>'; + echo '<table> + <tr><td>'. _('Geocode Code') .':</td> + <td>' . $_POST['geocodeid'] . '</td></tr>'; } else { //end of if $SelectedParam only do the else when a new record is being entered if (!isset($_POST['geocodeid'])) { @@ -242,29 +244,28 @@ $_POST['geocode_key'] = ''; } echo '<br><tr> - <td>'. _('Geocode Key') .":</td> - <td><input " . (in_array('geocode_key',$Errors) ? 'class="inputerror"' : '' ) . - " tabindex=2 type='text' name='geocode_key' VALUE='". $_POST['geocode_key'] ."' size=28 maxlength=300> - </td></tr> - <tr><td>". _('Geocode Center Long') . "</td> - <td><input tabindex=3 type='text' name='center_long' VALUE='". $_POST['center_long'] ."' size=28 maxlength=300></td></tr> + <td>'. _('Geocode Key') .':</td> + <td><input ' . (in_array('geocode_key',$Errors) ? 'class="inputerror"' : '' ) . + ' tabindex=2 type="text" name="geocode_key" VALUE="'. $_POST['geocode_key'] .'" size=28 maxlength=300> + </td></tr> + + <tr><td>'. _('Geocode Center Long') . '</td> + <td><input tabindex=3 type="text" name="center_long" VALUE="'. $_POST['center_long'] .'" size=28 maxlength=300></td></tr> -<tr><td>". _('Geocode Center Lat') . "</td> - <td><input tabindex=4 type='text' name='center_lat' VALUE='". $_POST['center_lat'] ."' size=28 maxlength=300></td></tr> + <tr><td>'. _('Geocode Center Lat') . '</td> + <td><input tabindex=4 type="text" name="center_lat" VALUE="'. $_POST['center_lat'] .'" size=28 maxlength=300></td></tr> -<tr><td>". _('Geocode Map Height') . "</td> - <td><input tabindex=5 type='text' name='map_height' VALUE='". $_POST['map_height'] ."' size=28 maxlength=300></td></tr> + <tr><td>'. _('Geocode Map Height') . '</td> + <td><input tabindex=5 type="text" name="map_height" VALUE="'. $_POST['map_height'] .'" size=28 maxlength=300></td></tr> -<tr><td>". _('Geocode Map Width') . "</td> - <td><input tabindex=6 type='text' name='map_width' VALUE='". $_POST['map_width'] ."' size=28 maxlength=300></td></tr> + <tr><td>'. _('Geocode Map Width') . '</td> + <td><input tabindex=6 type="text" name="map_width" VALUE="'. $_POST['map_width'] .'" size=28 maxlength=300></td></tr> -<tr><td>". _('Geocode Host') . "</td> - <td><input tabindex=7 type='text' name='map_host' VALUE='". $_POST['map_host'] ."' size=20 maxlength=300></td></tr> - - - </table> - <div class='centre'><input tabindex=4 type='Submit' name='submit' value='" . _('Enter Information') . "'</div><br><br> - </form>"; + <tr><td>'. _('Geocode Host') . '</td> + <td><input tabindex=7 type="text" name="map_host" VALUE="'. $_POST['map_host'] .'" size=20 maxlength=300></td></tr> + </table> + <div class="centre"><input tabindex=4 type="Submit" name="submit" value="' . _('Enter Information') . '"</div><br><br> + </form>'; echo '<div class="page_help_text">' . _('When ready, click on the link below to run the GeoCode process. This will Geocode all Branches and Suppliers. This may take some time. Errors will be returned to the screen.') . '</p>'; echo '<p>' . _('Suppliers and Customer Branches are geocoded when being entered/updated. You can rerun the geocode process from this screen at any time.') . '</p></div><br>'; Modified: trunk/WorkOrderReceive.php =================================================================== --- trunk/WorkOrderReceive.php 2011-04-14 09:18:16 UTC (rev 4549) +++ trunk/WorkOrderReceive.php 2011-04-14 10:28:52 UTC (rev 4550) @@ -10,7 +10,7 @@ echo '<a href="'. $rootpath . '/WorkOrderCosting.php?WO=' . $_REQUEST['WO'] . '">' . _('Back to Costing'). '</a><br>'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/group_add.png" title="' . - _('Search') . '" alt="" />' . ' ' . $title.'</p'; + _('Search') . '" alt="" />' . ' ' . $title.'</p>'; echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Deleted: trunk/Z_PriceChanges.php =================================================================== --- trunk/Z_PriceChanges.php 2011-04-14 09:18:16 UTC (rev 4549) +++ trunk/Z_PriceChanges.php 2011-04-14 10:28:52 UTC (rev 4550) @@ -1,141 +0,0 @@ -<?php -/* $Id$*/ - -include('includes/session.inc'); -$title=_('Update Pricing'); -include('includes/header.inc'); - - -echo '<br />' . _('This page updates already existing prices for a specified sales type (price list)') . '. ' . _('Choose between updating only customer special prices where the customer is set up under the price list selected, or all prices under the sales type or just specific prices for a customer for the stock category selected'); - -prnMsg (_('This script takes no account of start and end dates of prices and updates all historical prices as well as current prices - better to use new scripts under Inventory -> Maintenance'),'warn'); - -echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">'; -echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - -$SQL = "SELECT sales_type, typeabbrev FROM salestypes"; - -$result = DB_query($SQL,$db); - -echo '<p><table> - <tr> - <td>' . _('Select the Price List to update the costs for') .':</td> - <td><select name="PriceList">'; - -if (!isset($_POST['PriceList'])){ - echo '<option selected value=0>' . _('No Price List Selected') . '</option>'; -} - -while ($PriceLists=DB_fetch_array($result)){ - echo '<option value="' . $PriceLists['typeabbrev'] . '">' . $PriceLists['sales_type'] . '</option>'; -} - -echo '</select></td></tr>'; - -echo '<tr><td>' . _('Category') . ':</td> - <td><select name="StkCat">'; - -$sql = "SELECT categoryid, categorydescription FROM stockcategory"; - -$ErrMsg = _('The stock categories could not be retrieved because'); -$DbgMsg = _('The SQL used to retrieve stock categories and failed was'); -$result = DB_query($sql,$db,$ErrMsg,$DbgMsg); - -while ($myrow=DB_fetch_array($result)){ - if ($myrow['categoryid']==$_POST['StkCat']){ - echo '<option selected value="'. $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; - } else { - echo '<option value="'. $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; - } -} -echo '</select></td></tr>'; - -echo '<tr><td>' . _('Which Prices to update') . ":</td> - <td><select name='WhichPrices'>"; - echo "<option value='Only Non-customer special prices'>" . _('Only Non-customer special prices') . '</option>'; - echo "<option value='Only customer special prices'>" . _('Only customer special prices') . '</option>'; - echo "<option value='Both customer special prices and non-customer special prices'>" . _('Both customer special prices and non-customer special prices') . '</option>'; - echo "<option value='Selected customer special prices only'>" . $_SESSION['CustomerID'] . ' ' . _('customer special prices only') . '</option>'; -echo '</select></td></tr>'; - -if (!isset($_POST['IncreasePercent'])){ - $_POST['IncreasePercent']=0; -} - -echo '<tr><td>' . _('Percentage Increase (positive) or decrease (negative)') . "</td> - <td><input name='IncreasePercent' size=4 maxlength=4 value=" . $_POST['IncreasePercent'] . "></td></tr></table>"; - - -echo "<div class='centre'><p><input type=submit name='UpdatePrices' value='" . _('Update Prices') . '\' onclick="return confirm(\'' . _('Are you sure you wish to update all the prices according to the criteria selected?') . '\');"></div>'; - -echo '</form>'; - -if (isset($_POST['UpdatePrices']) AND isset($_POST['StkCat'])){ - - echo '<br />' . _('So we are using a price list/sales type of') .' : ' . $_POST['PriceList']; - echo '<br />' . _('and a stock category code of') . ' : ' . $_POST['StkCat']; - echo '<br />' . _('and a increase percent of') . ' : ' . $_POST['IncreasePercent']; - - if ($_POST['PriceList']=='0'){ - echo '<br />' . _('The price list/sales type to be updated must be selected first'); - include ('includes/footer.inc'); - exit; - } - - if (ABS($_POST['IncreasePercent']) < 0.5 OR ABS($_POST['IncreasePercent'])>40 OR !is_numeric($_POST['IncreasePercent'])){ - - echo '<br />' . _('The increase or decrease to be applied is expected to be an integer between 1 and 40 it is not necessary to enter the').' '. '%'.' '. _('sign') . ' - ' . _('the amount is assumed to be a percentage'); - include ('includes/footer.inc'); - exit; - } - - echo '<p>' . _('Price list') . ' ' . $_POST['PriceList'] . ' ' . _('prices for') . ' ' . $_POST['WhichPrices'] . ' ' . _('for the stock category') . ' ' . $_POST['StkCat'] . ' ' . _('will been incremented by') . ' ' . $_POST['IncreasePercent'] . ' ' . _('percent'); - - $sql = "SELECT stockid FROM stockmaster WHERE categoryid='" . $_POST['StkCat'] . "'"; - $PartsResult = DB_query($sql,$db); - - $IncrementPercentage = $_POST['IncreasePercent']/100; - - while ($myrow=DB_fetch_array($PartsResult)){ - - if ($_POST['WhichPrices'] == 'Only Non-customer special prices'){ - - $sql = "UPDATE prices SET price=price*(1+" . $IncrementPercentage . ") - WHERE typeabbrev='" . $_POST['PriceList'] . "' - AND stockid='" . $myrow['stockid'] . "' - AND typeabbrev='" . $_POST['PriceList'] . "' - AND debtorno=''"; - - }else if ($_POST['WhichPrices'] == 'Only customer special prices'){ - - $sql = "UPDATE prices SET price=price*(1+" . $IncrementPercentage . ") - WHERE typeabbrev='" . $_POST['PriceList'] . "' - AND stockid='" . $myrow['stockid'] . "' - AND typeabbrev='" . $_POST['PriceList'] . "' - AND debtorno!=''"; - - } else if ($_POST['WhichPrices'] == 'Both customer special prices and non-customer special prices'){ - - $sql = "UPDATE prices SET price=price*(1+" . $IncrementPercentage . ") - WHERE typeabbrev='" . $_POST['PriceList'] . "' - AND stockd='" . $myrow['stockid'] . "' - AND typeabbrev='" . $_POST['PriceList'] . "'"; - - } else if ($_POST['WhichPrices'] == 'Selected customer special prices only'){ - - $sql = "UPDATE prices SET price=price*(1+" . $IncrementPercentage . ") - WHERE typeabbrev='" . $_POST['PriceList'] . "' - AND stockid='" . $myrow['stockid'] . "' - AND typeabbrev='" . $_POST['PriceList'] . "' - AND debtorno='" . $_SESSION['CustomerID'] . "'"; - - } - - $result = DB_query($sql,$db); - $ErrMsg =_('Error updating prices for') . ' ' . $myrow['stockid'] . ' ' . _('because'); - prnMsg(_('Updating prices for') . ' ' . $myrow['stockid'],'info'); - } - -} -include('includes/footer.inc'); -?> \ No newline at end of file Modified: trunk/Z_index.php =================================================================== --- trunk/Z_index.php 2011-04-14 09:18:16 UTC (rev 4549) +++ trunk/Z_index.php 2011-04-14 10:28:52 UTC (rev 4550) @@ -1,6 +1,5 @@ <?php /* $Id$*/ -// $PageSecurity = 15; include('includes/session.inc'); $title = _('Special Fixes and Utilities') . ' - ' . _('Only System Administrator'); @@ -8,38 +7,36 @@ echo '<p>' . _('BE VERY CAREFUL DO NOT RUN THESE LINKS BELOW WITHOUT UNDERSTANDING EXACTLY WHAT THEY DO AND THE IMPLICATIONS'); - echo "<p><a href='$rootpath/Z_ReApplyCostToSA.php?" . SID . "'>". _('Re-apply costs to Sales Analysis') . '</a>'; - echo "<p><a href='$rootpath/EDISendInvoices.php?" . SID . "'>" . _('Send All Unsent EDI Invoices and Credits') .'</a>'; - echo "<p><a href='$rootpath/Z_ChangeCustomerCode.php?" . SID . "'>". _('Change A Customer Code') . '</a>'; - echo "<p><a href='$rootpath/Z_ChangeBranchCode.php?" . SID . "'>" . _('Change A Customer Branch Code') . '</a>'; - echo "<p><a href='$rootpath/Z_ChangeStockCode.php?" . SID . "'>" . _('Change An Inventory Item Code') . '</a>'; - echo "<p><a href='$rootpath/Z_ChangeSupplierCode.php?" . SID . "'>" . _('Change A Supplier Code') . '</a>'; - echo "<p><a href='$rootpath/Z_PriceChanges.php?" . SID . "'>" . _('Bulk Change Customer Pricing') . '</a>'; - echo "<p><a href='$rootpath/Z_BottomUpCosts.php?" . SID . "'>" . _('Update costs for all BOM items, from the bottom up') . '</a>'; + echo '<p><a href="' .$rootpath . '/Z_ReApplyCostToSA.php">'. _('Re-apply costs to Sales Analysis') . '</a>'; + echo '<p><a href="' .$rootpath . '/EDISendInvoices.php">' . _('Send All Unsent EDI Invoices and Credits') .'</a>'; + echo '<p><a href="' .$rootpath . '/Z_ChangeCustomerCode.php">'. _('Change A Customer Code') . '</a>'; + echo '<p><a href="' .$rootpath . '/Z_ChangeBranchCode.php">' . _('Change A Customer Branch Code') . '</a>'; + echo '<p><a href="' .$rootpath . '/Z_ChangeStockCode.php">' . _('Change An Inventory Item Code') . '</a>'; + echo '<p><a href="' .$rootpath . '/Z_ChangeSupplierCode.php">' . _('Change A Supplier Code') . '</a>'; + echo '<p><a href="' .$rootpath . '/Z_BottomUpCosts.php">' . _('Update costs for all BOM items, from the bottom up') . '</a>'; - echo "<p><a href='$rootpath/Z_CurrencyDebtorsBalances.php?" . SID . "'>" . _('Show Local Currency Total Debtor Balances') . '</a>'; - echo "<p><a href='$rootpath/Z_CurrencySuppliersBalances.php?" . SID . "'>" . _('Show Local Currency Total Suppliers Balances') . '</a>'; - echo "<p><a href='$rootpath/Z_CheckGLTransBalance.php?" . SID . "'>" . _('Show General Transactions That Do Not Balance') . '</a>'; - echo "<p><a href='$rootpath/Z_poAdmin.php?" . SID . "'>" . _('Maintain Language Files') . '</a>'; - echo "<p><a href='$rootpath/Z_MakeNewCompany.php?" . SID . "'>" . _('Make New Company') . '</a>'; - echo "<p><a href='$rootpath/Z_DataExport.php?" . SID . "'>" . _('Data Export Options') . '</a>'; - echo "<p><a href='$rootpath/Z_GetStockImage.php?" . SID . "'>" . _('Image Manipulation Utility') . '</a>'; - echo "<p><a href='$rootpath/Z_ImportStocks.php?" . SID . "'>" . _('Import Stock Items from .csv') . '</a>'; - echo "<p><a href='$rootpath/Z_ImportFixedAssets.php?" . SID . "'>" . _('Import Fixed Assets from .csv file') . '</a>'; - echo "<p><a href='$rootpath/Z_CreateCompanyTempla... [truncated message content] |
From: <dai...@us...> - 2011-04-14 10:28:59
|
Revision: 4550 http://web-erp.svn.sourceforge.net/web-erp/?rev=4550&view=rev Author: daintree Date: 2011-04-14 10:28:52 +0000 (Thu, 14 Apr 2011) Log Message: ----------- variosu Modified Paths: -------------- trunk/CustomerAllocations.php trunk/FixedAssetTransfer.php trunk/GeocodeSetup.php trunk/WorkOrderReceive.php trunk/Z_index.php Removed Paths: ------------- trunk/Z_PriceChanges.php Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php 2011-04-14 09:18:16 UTC (rev 4549) +++ trunk/CustomerAllocations.php 2011-04-14 10:28:52 UTC (rev 4550) @@ -1,5 +1,5 @@ <?php -/* $Revision: 1.30 $ */ + /* $Id$*/ /* @@ -10,7 +10,6 @@ */ include('includes/DefineCustAllocsClass.php'); -//$PageSecurity = 3; include('includes/session.inc'); $title = _('Customer Receipt') . '/' . _('Credit Note Allocations'); include('includes/header.inc'); @@ -70,7 +69,7 @@ if ($TotalAllocated + $_SESSION['Alloc']->TransAmt > 0.008) { prnMsg(_('Allocation could not be processed because the amount allocated is more than the').' ' . - $_SESSION['Alloc']->TransTypeName . ' '._('being allocated') . '<br>' . _('Total allocated').' = ' . + $_SESSION['Alloc']->TransTypeName . ' '._('being allocated') . '<br />' . _('Total allocated').' = ' . $TotalAllocated . ' '._('and the total amount of the') .' ' . $_SESSION['Alloc']->TransTypeName . ' '. _('was').' ' . -$_SESSION['Alloc']->TransAmt,'error'); $InputError=1; @@ -324,22 +323,22 @@ 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 - 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 "<input type=hidden name='AllocTrans' value=" . $_POST['AllocTrans'] . '>'; + echo '<input type=hidden name="AllocTrans" value="' . $_POST['AllocTrans'] . '" />'; // Show trans already allocated and potential new allocations @@ -347,20 +346,20 @@ 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) { - echo '<br>'._('Amount in customer currency').' <b>' . + echo '<br />'._('Amount in customer currency').' <b>' . number_format(-$_SESSION['Alloc']->TransAmt,2) . '</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; @@ -380,37 +379,37 @@ $curTrans = " "; } - echo "<td>" . $AllocnItem->TransType . "</td> - <td>" . $AllocnItem->TypeNo . "</td> - <td class=number>" . $AllocnItem->TransDate . "</td> - <td class=number>" . number_format($AllocnItem->TransAmount,2) . "</td> - <td class=number>" . number_format($YetToAlloc,2) . "</td>"; + echo '<td>' . $AllocnItem->TransType . '</td> + <td>' . $AllocnItem->TypeNo . '</td> + <td class=number>' . $AllocnItem->TransDate . '</td> + <td class=number>' . number_format($AllocnItem->TransAmount,2) . '</td> + <td class=number>' . number_format($YetToAlloc,2) . '</td>'; $j++; if ($AllocnItem->TransAmount < 0) { $balance+=$YetToAlloc; - echo "<td>" . $curTrans ."</td><td class=number>" . number_format($balance,2) . "</td></tr>"; + echo '<td>' . $curTrans .'</td><td class="number">' . number_format($balance,2) . '</td></tr>'; } else { - echo "<input type=hidden name='YetToAlloc" . $Counter . "' value=" . round($YetToAlloc,2) . '></td>'; - echo "<td class=number><input tabindex=".$j." type='checkbox' name='All" . $Counter . "'"; + echo '<input type=hidden name="YetToAlloc' . $Counter . '" value="' . round($YetToAlloc,2) . '"></td>'; + echo '<td class="number"><input tabindex="' . $j .'" type="checkbox" name="All' . $Counter . '"'; if (ABS($AllocnItem->AllocAmt-$YetToAlloc) < 0.01) { - echo ' value=' . True . '>'; + echo ' value=' . True . ' />'; } else { - echo '>'; + echo ' />'; } $balance += $YetToAlloc-$AllocnItem->AllocAmt; $j++; - echo "<input tabindex=".$j." type=text class=number name='Amt" . $Counter ."' maxlength=12 size=13 value=" . round($AllocnItem->AllocAmt,2) . "> - <input type=hidden name='AllocID" . $Counter . "' value=" . $AllocnItem->ID . '></td> - <td class=number>' . number_format($balance,2) . '</td></tr>'; + echo '<input tabindex="'.$j.'" type="text" class="number" name="Amt' . $Counter .'" maxlength=12 size=13 value="' . round($AllocnItem->AllocAmt,2) . '" /> + <input type=hidden name="AllocID' . $Counter . '" value="' . $AllocnItem->ID . '"></td> + <td class="number">' . number_format($balance,2) . '</td></tr>'; } $TotalAllocated = $TotalAllocated + round($AllocnItem->AllocAmt,2); $Counter++; } - echo "<tr> - <td colspan=5 class=number><b>"._('Total Allocated').':</b></td> + echo '<tr> + <td colspan=5 class="number"><b>'._('Total Allocated').':</b></td> <td class=number><b><u>' . number_format($TotalAllocated,2) . '</u></b></td>'; $j++; echo '<td rowspan=2> @@ -421,9 +420,9 @@ <td class=number><b>' . number_format($remaining-$TotalAllocated,2).'</b></td> </tr>'; echo '</table><p>'; - 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>"; + 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>'; } elseif (isset($_GET['DebtorNo'])) { // Page called with customer code @@ -467,14 +466,14 @@ echo '<tr class="OddTableRows">';; $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><a href=' . $_SERVER['PHP_SELF']. '?' . SID . '&AllocTrans=' . $myrow['id'] . '>' . _('Allocate') . '</a></td></tr>'; + 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><a href=' . $_SERVER['PHP_SELF']. '?AllocTrans=' . $myrow['id'] . '>' . _('Allocate') . '</a></td></tr>'; } DB_free_result($result); echo '</table><p>'; @@ -516,7 +515,7 @@ if ( $curDebtor != $myrow['debtorno'] ) { if ( $curTrans > 1 ) { - echo "<tr class='OddTableRows'><td colspan=7 class=number>" . number_format($balance,2) . "</td><td><b>Balance</b></td></tr>"; + echo '<tr class="OddTableRows"><td colspan=7 class="number">' . number_format($balance,2) . '</td><td><b>' . _('Balance') . '</b></td></tr>'; } $balance = 0; @@ -548,20 +547,22 @@ $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>' . $allocate . '</td></tr>'; + 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> + <td>' . $allocate . '</td></tr>'; if ( $curTrans > $trans ) { if (!isset($balance)) { $balance=0; } - echo "<tr class='OddTableRows'><td colspan=7 class=number>" . number_format($balance,2) . "</td><td><b>Balance</b></td></tr>"; + echo '<tr class="OddTableRows"> + <td colspan="7" class="number">' . number_format($balance,2) .'</td> + <td><b>' . _('Balance') . '</b></td></tr>'; } } DB_free_result($result); Modified: trunk/FixedAssetTransfer.php =================================================================== --- trunk/FixedAssetTransfer.php 2011-04-14 09:18:16 UTC (rev 4549) +++ trunk/FixedAssetTransfer.php 2011-04-14 10:28:52 UTC (rev 4550) @@ -1,6 +1,6 @@ <?php -//$PageSecurity = 11; +/* $Id$*/ include('includes/session.inc'); @@ -26,7 +26,7 @@ } else { $sql='SELECT categoryid, categorydescription FROM fixedassetcategories'; $result=DB_query($sql, $db); - 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 '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; @@ -121,11 +121,11 @@ while ($myrow=DB_fetch_array($Result)) { echo '<tr><td>'.$myrow['assetid'].'</td> - <td>'.$myrow['description'].'</td> - <td>'.$myrow['serialno'].'</td> - <td class=number>'.number_format($myrow['cost'],2).'</td> - <td class=number>'.number_format($myrow['accumdepn'],2).'</td> - <td>'.$myrow['locationdescription'].'</td>'; + <td>'.$myrow['description'].'</td> + <td>'.$myrow['serialno'].'</td> + <td class=number>'.number_format($myrow['cost'],2).'</td> + <td class=number>'.number_format($myrow['accumdepn'],2).'</td> + <td>'.$myrow['locationdescription'].'</td>'; echo '<td><select name="Location'.$myrow['assetid'].'" onChange="ReloadForm(Move'.$myrow['assetid'].')">'; echo '<option></option>'; while ($LocationRow=DB_fetch_array($LocationResult)) { @@ -137,11 +137,11 @@ } DB_data_seek($LocationResult,0); echo '</select></td>'; - echo '<input type=hidden name=AssetCat value="' . $_POST['AssetCat'].'"'; - echo '<input type=hidden name=Keywords value="' . $_POST['Keywords'].'"'; - echo '<input type=hidden name=AssetID value="' . $_POST['AssetID'].'"'; - echo '<input type=hidden name=Search value="' . $_POST['Search'].'"'; - echo '<td><input type=submit name="Move'.$myrow['assetid'].'" value=Move></td>'; + echo '<input type="hidden" name="AssetCat" value="' . $_POST['AssetCat'].'"'; + echo '<input type="hidden" name="Keywords" value="' . $_POST['Keywords'].'"'; + echo '<input type="hidden" name="AssetID" value="' . $_POST['AssetID'].'"'; + echo '<input type="hidden" name="Search" value="' . $_POST['Search'].'"'; + echo '<td><input type="submit" name="Move'.$myrow['assetid'].'" value=Move></td>'; echo '</tr>'; } echo '</table></form>'; Modified: trunk/GeocodeSetup.php =================================================================== --- trunk/GeocodeSetup.php 2011-04-14 09:18:16 UTC (rev 4549) +++ trunk/GeocodeSetup.php 2011-04-14 10:28:52 UTC (rev 4550) @@ -1,7 +1,7 @@ <?php /* $Id$*/ -//$PageSecurity = 3; + include('includes/session.inc'); $title = _('Geocode Maintenance'); include('includes/header.inc'); @@ -139,15 +139,16 @@ '<a href="http://www.batchgeocode.com/lookup/" target="_blank">http://www.batchgeocode.com/lookup/</a></b>'; echo '<p>'. _('Set the maps centre point using the Center Longitude and Center Latitude. Set the maps screen size using the height and width in pixels (px)').'</div><br>'; echo '<table border=1>'; - echo "<tr> - <th>". _('Geocode ID') ."</th> - <th>". _('Geocode Key') ."</th> - <th>". _('Center Longitude') ."</th> - <th>". _('Center Latitude') ."</th> - <th>". _('Map height (px)') ."</th> - <th>". _('Map width (px)') ."</th> - <th>". _('Map host') .'</th>'; - + + echo '<tr> + <th>'. _('Geocode ID') .'</th> + <th>'. _('Geocode Key') .'</th> + <th>'. _('Center Longitude') .'</th> + <th>'. _('Center Latitude') .'</th> + <th>'. _('Map height (px)') .'</th> + <th>'. _('Map width (px)') .'</th> + <th>'. _('Map host') .'</th>'; + $k=0; //row colour counter while ($myrow=DB_fetch_row($result)) { @@ -159,15 +160,15 @@ $k=1; } - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> - <td><a href=\"%s?SelectedParam=%s\">" . _('Edit') . "</a></td> - <td><a href=\"%s?SelectedParam=%s&delete=%s\">". _('Delete') .'</a></td> + <td><a href=\'%s?SelectedParam=%s\'>' . _('Edit') . '</a></td> + <td><a href=\'%s?SelectedParam=%s&delete=%s\'>'. _('Delete') .'</a></td> </tr>', $myrow[0], $myrow[1], @@ -193,7 +194,7 @@ if (!isset($_GET['delete'])) { - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedParam) and ($InputError!=1)) { @@ -220,11 +221,12 @@ $_POST['map_width'] = $myrow['map_width']; $_POST['map_host'] = $myrow['map_host']; - echo "<input type=hidden name='SelectedParam' VALUE='" . $SelectedParam . "'>"; - echo "<input type=hidden name='geocodeid' VALUE='" . $_POST['geocodeid'] . "'>"; + echo '<input type="hidden" name="SelectedParam" value="' . $SelectedParam . '" />'; + echo '<input type="hidden" name="geocodeid" value="' . $_POST['geocodeid'] . '" />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Geocode Setup') . '" alt="">'. _('Setup configuration for Geocoding of Customers and Suppliers') .'</p>'; - echo "<table><tr><td>". _('Geocode Code') .':</td><td>'; - echo $_POST['geocodeid'] . '</td></tr>'; + echo '<table> + <tr><td>'. _('Geocode Code') .':</td> + <td>' . $_POST['geocodeid'] . '</td></tr>'; } else { //end of if $SelectedParam only do the else when a new record is being entered if (!isset($_POST['geocodeid'])) { @@ -242,29 +244,28 @@ $_POST['geocode_key'] = ''; } echo '<br><tr> - <td>'. _('Geocode Key') .":</td> - <td><input " . (in_array('geocode_key',$Errors) ? 'class="inputerror"' : '' ) . - " tabindex=2 type='text' name='geocode_key' VALUE='". $_POST['geocode_key'] ."' size=28 maxlength=300> - </td></tr> - <tr><td>". _('Geocode Center Long') . "</td> - <td><input tabindex=3 type='text' name='center_long' VALUE='". $_POST['center_long'] ."' size=28 maxlength=300></td></tr> + <td>'. _('Geocode Key') .':</td> + <td><input ' . (in_array('geocode_key',$Errors) ? 'class="inputerror"' : '' ) . + ' tabindex=2 type="text" name="geocode_key" VALUE="'. $_POST['geocode_key'] .'" size=28 maxlength=300> + </td></tr> + + <tr><td>'. _('Geocode Center Long') . '</td> + <td><input tabindex=3 type="text" name="center_long" VALUE="'. $_POST['center_long'] .'" size=28 maxlength=300></td></tr> -<tr><td>". _('Geocode Center Lat') . "</td> - <td><input tabindex=4 type='text' name='center_lat' VALUE='". $_POST['center_lat'] ."' size=28 maxlength=300></td></tr> + <tr><td>'. _('Geocode Center Lat') . '</td> + <td><input tabindex=4 type="text" name="center_lat" VALUE="'. $_POST['center_lat'] .'" size=28 maxlength=300></td></tr> -<tr><td>". _('Geocode Map Height') . "</td> - <td><input tabindex=5 type='text' name='map_height' VALUE='". $_POST['map_height'] ."' size=28 maxlength=300></td></tr> + <tr><td>'. _('Geocode Map Height') . '</td> + <td><input tabindex=5 type="text" name="map_height" VALUE="'. $_POST['map_height'] .'" size=28 maxlength=300></td></tr> -<tr><td>". _('Geocode Map Width') . "</td> - <td><input tabindex=6 type='text' name='map_width' VALUE='". $_POST['map_width'] ."' size=28 maxlength=300></td></tr> + <tr><td>'. _('Geocode Map Width') . '</td> + <td><input tabindex=6 type="text" name="map_width" VALUE="'. $_POST['map_width'] .'" size=28 maxlength=300></td></tr> -<tr><td>". _('Geocode Host') . "</td> - <td><input tabindex=7 type='text' name='map_host' VALUE='". $_POST['map_host'] ."' size=20 maxlength=300></td></tr> - - - </table> - <div class='centre'><input tabindex=4 type='Submit' name='submit' value='" . _('Enter Information') . "'</div><br><br> - </form>"; + <tr><td>'. _('Geocode Host') . '</td> + <td><input tabindex=7 type="text" name="map_host" VALUE="'. $_POST['map_host'] .'" size=20 maxlength=300></td></tr> + </table> + <div class="centre"><input tabindex=4 type="Submit" name="submit" value="' . _('Enter Information') . '"</div><br><br> + </form>'; echo '<div class="page_help_text">' . _('When ready, click on the link below to run the GeoCode process. This will Geocode all Branches and Suppliers. This may take some time. Errors will be returned to the screen.') . '</p>'; echo '<p>' . _('Suppliers and Customer Branches are geocoded when being entered/updated. You can rerun the geocode process from this screen at any time.') . '</p></div><br>'; Modified: trunk/WorkOrderReceive.php =================================================================== --- trunk/WorkOrderReceive.php 2011-04-14 09:18:16 UTC (rev 4549) +++ trunk/WorkOrderReceive.php 2011-04-14 10:28:52 UTC (rev 4550) @@ -10,7 +10,7 @@ echo '<a href="'. $rootpath . '/WorkOrderCosting.php?WO=' . $_REQUEST['WO'] . '">' . _('Back to Costing'). '</a><br>'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/group_add.png" title="' . - _('Search') . '" alt="" />' . ' ' . $title.'</p'; + _('Search') . '" alt="" />' . ' ' . $title.'</p>'; echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Deleted: trunk/Z_PriceChanges.php =================================================================== --- trunk/Z_PriceChanges.php 2011-04-14 09:18:16 UTC (rev 4549) +++ trunk/Z_PriceChanges.php 2011-04-14 10:28:52 UTC (rev 4550) @@ -1,141 +0,0 @@ -<?php -/* $Id$*/ - -include('includes/session.inc'); -$title=_('Update Pricing'); -include('includes/header.inc'); - - -echo '<br />' . _('This page updates already existing prices for a specified sales type (price list)') . '. ' . _('Choose between updating only customer special prices where the customer is set up under the price list selected, or all prices under the sales type or just specific prices for a customer for the stock category selected'); - -prnMsg (_('This script takes no account of start and end dates of prices and updates all historical prices as well as current prices - better to use new scripts under Inventory -> Maintenance'),'warn'); - -echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">'; -echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - -$SQL = "SELECT sales_type, typeabbrev FROM salestypes"; - -$result = DB_query($SQL,$db); - -echo '<p><table> - <tr> - <td>' . _('Select the Price List to update the costs for') .':</td> - <td><select name="PriceList">'; - -if (!isset($_POST['PriceList'])){ - echo '<option selected value=0>' . _('No Price List Selected') . '</option>'; -} - -while ($PriceLists=DB_fetch_array($result)){ - echo '<option value="' . $PriceLists['typeabbrev'] . '">' . $PriceLists['sales_type'] . '</option>'; -} - -echo '</select></td></tr>'; - -echo '<tr><td>' . _('Category') . ':</td> - <td><select name="StkCat">'; - -$sql = "SELECT categoryid, categorydescription FROM stockcategory"; - -$ErrMsg = _('The stock categories could not be retrieved because'); -$DbgMsg = _('The SQL used to retrieve stock categories and failed was'); -$result = DB_query($sql,$db,$ErrMsg,$DbgMsg); - -while ($myrow=DB_fetch_array($result)){ - if ($myrow['categoryid']==$_POST['StkCat']){ - echo '<option selected value="'. $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; - } else { - echo '<option value="'. $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; - } -} -echo '</select></td></tr>'; - -echo '<tr><td>' . _('Which Prices to update') . ":</td> - <td><select name='WhichPrices'>"; - echo "<option value='Only Non-customer special prices'>" . _('Only Non-customer special prices') . '</option>'; - echo "<option value='Only customer special prices'>" . _('Only customer special prices') . '</option>'; - echo "<option value='Both customer special prices and non-customer special prices'>" . _('Both customer special prices and non-customer special prices') . '</option>'; - echo "<option value='Selected customer special prices only'>" . $_SESSION['CustomerID'] . ' ' . _('customer special prices only') . '</option>'; -echo '</select></td></tr>'; - -if (!isset($_POST['IncreasePercent'])){ - $_POST['IncreasePercent']=0; -} - -echo '<tr><td>' . _('Percentage Increase (positive) or decrease (negative)') . "</td> - <td><input name='IncreasePercent' size=4 maxlength=4 value=" . $_POST['IncreasePercent'] . "></td></tr></table>"; - - -echo "<div class='centre'><p><input type=submit name='UpdatePrices' value='" . _('Update Prices') . '\' onclick="return confirm(\'' . _('Are you sure you wish to update all the prices according to the criteria selected?') . '\');"></div>'; - -echo '</form>'; - -if (isset($_POST['UpdatePrices']) AND isset($_POST['StkCat'])){ - - echo '<br />' . _('So we are using a price list/sales type of') .' : ' . $_POST['PriceList']; - echo '<br />' . _('and a stock category code of') . ' : ' . $_POST['StkCat']; - echo '<br />' . _('and a increase percent of') . ' : ' . $_POST['IncreasePercent']; - - if ($_POST['PriceList']=='0'){ - echo '<br />' . _('The price list/sales type to be updated must be selected first'); - include ('includes/footer.inc'); - exit; - } - - if (ABS($_POST['IncreasePercent']) < 0.5 OR ABS($_POST['IncreasePercent'])>40 OR !is_numeric($_POST['IncreasePercent'])){ - - echo '<br />' . _('The increase or decrease to be applied is expected to be an integer between 1 and 40 it is not necessary to enter the').' '. '%'.' '. _('sign') . ' - ' . _('the amount is assumed to be a percentage'); - include ('includes/footer.inc'); - exit; - } - - echo '<p>' . _('Price list') . ' ' . $_POST['PriceList'] . ' ' . _('prices for') . ' ' . $_POST['WhichPrices'] . ' ' . _('for the stock category') . ' ' . $_POST['StkCat'] . ' ' . _('will been incremented by') . ' ' . $_POST['IncreasePercent'] . ' ' . _('percent'); - - $sql = "SELECT stockid FROM stockmaster WHERE categoryid='" . $_POST['StkCat'] . "'"; - $PartsResult = DB_query($sql,$db); - - $IncrementPercentage = $_POST['IncreasePercent']/100; - - while ($myrow=DB_fetch_array($PartsResult)){ - - if ($_POST['WhichPrices'] == 'Only Non-customer special prices'){ - - $sql = "UPDATE prices SET price=price*(1+" . $IncrementPercentage . ") - WHERE typeabbrev='" . $_POST['PriceList'] . "' - AND stockid='" . $myrow['stockid'] . "' - AND typeabbrev='" . $_POST['PriceList'] . "' - AND debtorno=''"; - - }else if ($_POST['WhichPrices'] == 'Only customer special prices'){ - - $sql = "UPDATE prices SET price=price*(1+" . $IncrementPercentage . ") - WHERE typeabbrev='" . $_POST['PriceList'] . "' - AND stockid='" . $myrow['stockid'] . "' - AND typeabbrev='" . $_POST['PriceList'] . "' - AND debtorno!=''"; - - } else if ($_POST['WhichPrices'] == 'Both customer special prices and non-customer special prices'){ - - $sql = "UPDATE prices SET price=price*(1+" . $IncrementPercentage . ") - WHERE typeabbrev='" . $_POST['PriceList'] . "' - AND stockd='" . $myrow['stockid'] . "' - AND typeabbrev='" . $_POST['PriceList'] . "'"; - - } else if ($_POST['WhichPrices'] == 'Selected customer special prices only'){ - - $sql = "UPDATE prices SET price=price*(1+" . $IncrementPercentage . ") - WHERE typeabbrev='" . $_POST['PriceList'] . "' - AND stockid='" . $myrow['stockid'] . "' - AND typeabbrev='" . $_POST['PriceList'] . "' - AND debtorno='" . $_SESSION['CustomerID'] . "'"; - - } - - $result = DB_query($sql,$db); - $ErrMsg =_('Error updating prices for') . ' ' . $myrow['stockid'] . ' ' . _('because'); - prnMsg(_('Updating prices for') . ' ' . $myrow['stockid'],'info'); - } - -} -include('includes/footer.inc'); -?> \ No newline at end of file Modified: trunk/Z_index.php =================================================================== --- trunk/Z_index.php 2011-04-14 09:18:16 UTC (rev 4549) +++ trunk/Z_index.php 2011-04-14 10:28:52 UTC (rev 4550) @@ -1,6 +1,5 @@ <?php /* $Id$*/ -// $PageSecurity = 15; include('includes/session.inc'); $title = _('Special Fixes and Utilities') . ' - ' . _('Only System Administrator'); @@ -8,38 +7,36 @@ echo '<p>' . _('BE VERY CAREFUL DO NOT RUN THESE LINKS BELOW WITHOUT UNDERSTANDING EXACTLY WHAT THEY DO AND THE IMPLICATIONS'); - echo "<p><a href='$rootpath/Z_ReApplyCostToSA.php?" . SID . "'>". _('Re-apply costs to Sales Analysis') . '</a>'; - echo "<p><a href='$rootpath/EDISendInvoices.php?" . SID . "'>" . _('Send All Unsent EDI Invoices and Credits') .'</a>'; - echo "<p><a href='$rootpath/Z_ChangeCustomerCode.php?" . SID . "'>". _('Change A Customer Code') . '</a>'; - echo "<p><a href='$rootpath/Z_ChangeBranchCode.php?" . SID . "'>" . _('Change A Customer Branch Code') . '</a>'; - echo "<p><a href='$rootpath/Z_ChangeStockCode.php?" . SID . "'>" . _('Change An Inventory Item Code') . '</a>'; - echo "<p><a href='$rootpath/Z_ChangeSupplierCode.php?" . SID . "'>" . _('Change A Supplier Code') . '</a>'; - echo "<p><a href='$rootpath/Z_PriceChanges.php?" . SID . "'>" . _('Bulk Change Customer Pricing') . '</a>'; - echo "<p><a href='$rootpath/Z_BottomUpCosts.php?" . SID . "'>" . _('Update costs for all BOM items, from the bottom up') . '</a>'; + echo '<p><a href="' .$rootpath . '/Z_ReApplyCostToSA.php">'. _('Re-apply costs to Sales Analysis') . '</a>'; + echo '<p><a href="' .$rootpath . '/EDISendInvoices.php">' . _('Send All Unsent EDI Invoices and Credits') .'</a>'; + echo '<p><a href="' .$rootpath . '/Z_ChangeCustomerCode.php">'. _('Change A Customer Code') . '</a>'; + echo '<p><a href="' .$rootpath . '/Z_ChangeBranchCode.php">' . _('Change A Customer Branch Code') . '</a>'; + echo '<p><a href="' .$rootpath . '/Z_ChangeStockCode.php">' . _('Change An Inventory Item Code') . '</a>'; + echo '<p><a href="' .$rootpath . '/Z_ChangeSupplierCode.php">' . _('Change A Supplier Code') . '</a>'; + echo '<p><a href="' .$rootpath . '/Z_BottomUpCosts.php">' . _('Update costs for all BOM items, from the bottom up') . '</a>'; - echo "<p><a href='$rootpath/Z_CurrencyDebtorsBalances.php?" . SID . "'>" . _('Show Local Currency Total Debtor Balances') . '</a>'; - echo "<p><a href='$rootpath/Z_CurrencySuppliersBalances.php?" . SID . "'>" . _('Show Local Currency Total Suppliers Balances') . '</a>'; - echo "<p><a href='$rootpath/Z_CheckGLTransBalance.php?" . SID . "'>" . _('Show General Transactions That Do Not Balance') . '</a>'; - echo "<p><a href='$rootpath/Z_poAdmin.php?" . SID . "'>" . _('Maintain Language Files') . '</a>'; - echo "<p><a href='$rootpath/Z_MakeNewCompany.php?" . SID . "'>" . _('Make New Company') . '</a>'; - echo "<p><a href='$rootpath/Z_DataExport.php?" . SID . "'>" . _('Data Export Options') . '</a>'; - echo "<p><a href='$rootpath/Z_GetStockImage.php?" . SID . "'>" . _('Image Manipulation Utility') . '</a>'; - echo "<p><a href='$rootpath/Z_ImportStocks.php?" . SID . "'>" . _('Import Stock Items from .csv') . '</a>'; - echo "<p><a href='$rootpath/Z_ImportFixedAssets.php?" . SID . "'>" . _('Import Fixed Assets from .csv file') . '</a>'; - echo "<p><a href='$rootpath/Z_CreateCompanyTempla... [truncated message content] |
From: <dai...@us...> - 2011-04-16 06:21:05
|
Revision: 4551 http://web-erp.svn.sourceforge.net/web-erp/?rev=4551&view=rev Author: daintree Date: 2011-04-16 06:20:56 +0000 (Sat, 16 Apr 2011) Log Message: ----------- various Modified Paths: -------------- trunk/InventoryQuantities.php trunk/Locations.php trunk/MRPReschedules.php trunk/OutstandingGRNs.php trunk/PDFChequeListing.php trunk/PDFCustTransListing.php trunk/PDFLowGP.php trunk/PDFOrderStatus.php trunk/PDFPrintLabel.php trunk/PDFStockCheckComparison.php trunk/POReport.php trunk/PO_Header.php trunk/PaymentMethods.php trunk/PcAssignCashToTab.php trunk/PcAuthorizeExpenses.php trunk/PcClaimExpensesFromTab.php trunk/PcReportTab.php trunk/PcTypeTabs.php trunk/Prices.php trunk/PricesBasedOnMarkUp.php trunk/Prices_Customer.php trunk/PrintCustOrder.php trunk/PrintCustTrans.php trunk/RecurringSalesOrders.php trunk/ReorderLevel.php trunk/ReorderLevelLocation.php trunk/SalesAnalReptCols.php trunk/SalesAnalRepts.php trunk/SalesInquiry.php trunk/SalesPeople.php trunk/SalesTypes.php trunk/SelectCompletedOrder.php trunk/SelectCustomer.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/SelectSupplier.php trunk/ShipmentCosting.php trunk/Shipments.php trunk/Shipt_Select.php trunk/StockCategories.php trunk/StockCheck.php trunk/StockCostUpdate.php trunk/StockQties_csv.php trunk/StockSerialItems.php trunk/StockTransferControlled.php trunk/StockUsage.php trunk/Stocks.php trunk/SuppInvGRNs.php trunk/SupplierAllocations.php trunk/SupplierBalsAtPeriodEnd.php trunk/SupplierCredit.php trunk/SupplierInvoice.php trunk/SupplierTypes.php trunk/Suppliers.php trunk/WOSerialNos.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/doc/Change.log.html trunk/report_runner.php Modified: trunk/InventoryQuantities.php =================================================================== --- trunk/InventoryQuantities.php 2011-04-14 10:28:52 UTC (rev 4550) +++ trunk/InventoryQuantities.php 2011-04-16 06:20:56 UTC (rev 4551) @@ -1,12 +1,11 @@ <?php -/* $Revision: 1.4 $ */ /* $Id$ */ // InventoryQuantities.php - Report of parts with quantity. Sorts by part and shows // all locations where there are quantities of the part -//$PageSecurity = 2; + include('includes/session.inc'); If (isset($_POST['PrintPDF'])) { @@ -83,9 +82,9 @@ $title = _('Inventory Quantities') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The Inventory Quantity report 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; @@ -94,7 +93,7 @@ $title = _('Print Inventory Quantities Report'); include('includes/header.inc'); prnMsg(_('There were no items with inventory quantities'),'error'); - echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; + echo '<br><a href="'.$rootpath.'/index.php?">' . _('Back to the menu') . '</a>'; include('includes/footer.inc'); exit; } @@ -148,12 +147,12 @@ echo '<div class="page_help_text">' . _('Use this report to display the quantity of Inventory items in different categories.') . '</div><br>'; - echo '</br></br><form action=' . $_SERVER['PHP_SELF'] . " method='post'><table>"; + echo '</br></br><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection><tr><td>'; - echo '<tr><td>' . _('Selection') . ":</td><td><select name='Selection'>"; - echo "<option selected value='All'>" . _('All'); - echo "<option value='Multiple'>" . _('Only Parts With Multiple Locations'); + echo '<tr><td>' . _('Selection') . ':</td><td><select name="Selection">'; + echo '<option selected value="All">' . _('All') . '</option>'; + echo '<option value="Multiple">' . _('Only Parts With Multiple Locations') . '</option>'; echo '</select></td></tr>'; $SQL="SELECT categoryid, categorydescription FROM stockcategory where stocktype<>'A' ORDER BY categorydescription"; @@ -185,7 +184,7 @@ } } echo '</select></td></tr>'; - echo "</table><p><div class='centre'><input type=submit name='PrintPDF' value='" . _('Print PDF') . "'></div>"; + echo '</table><p><div class="centre"><input type=submit name="PrintPDF" value="' . _('Print PDF') . '"></div>'; include('includes/footer.inc'); Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2011-04-14 10:28:52 UTC (rev 4550) +++ trunk/Locations.php 2011-04-16 06:20:56 UTC (rev 4551) @@ -1,10 +1,7 @@ <?php /* $Id$*/ -/* $Revision: 1.25 $ */ -//$PageSecurity = 11; - include('includes/session.inc'); $title = _('Location Maintenance'); @@ -374,18 +371,19 @@ $myrow['managed'] = _('No'); } */ - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> - <td><a href='%sSelectedLocation=%s'>" . _('Edit') . "</td> - <td><a href='%sSelectedLocation=%s&delete=1'>" . _('Delete') . '</td> + <td>%s</td> + <td><a href="%sSelectedLocation=%s">' . _('Edit') . '</td> + <td><a href="%sSelectedLocation=%s&delete=1">' . _('Delete') . '</td> </tr>', $myrow['loccode'], $myrow['locationname'], $myrow['description'], - $_SERVER['PHP_SELF'] . '?' . SID . '&', + $_SERVER['PHP_SELF'] . '?', $myrow['loccode'], - $_SERVER['PHP_SELF'] . '?' . SID . '&', + $_SERVER['PHP_SELF'] . '?', $myrow['loccode']); } @@ -399,11 +397,11 @@ if (isset($SelectedLocation)) { echo '<a href="' . $_SERVER['PHP_SELF'] . '">' . _('Review Records') . '</a>'; } -echo "<p>"; +echo '<br />'; 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'] . '" />'; if (isset($SelectedLocation)) { @@ -451,8 +449,8 @@ $_POST['Managed'] = $myrow['managed']; - echo "<input type=hidden name=SelectedLocation VALUE=" . $SelectedLocation . '>'; - echo "<input type=hidden name=LocCode VALUE=" . $_POST['LocCode'] . '>'; + echo '<input type=hidden name=SelectedLocation VALUE="' . $SelectedLocation . '>'; + echo '<input type=hidden name=LocCode VALUE="' . $_POST['LocCode'] . '>'; echo '<table class=selection>'; echo '<tr><th colspan=2><font size=3 color=blue>'._('Amend Location details').'</font></th></tr>'; echo '<tr><td>' . _('Location Code') . ':</td><td>'; Modified: trunk/MRPReschedules.php =================================================================== --- trunk/MRPReschedules.php 2011-04-14 10:28:52 UTC (rev 4550) +++ trunk/MRPReschedules.php 2011-04-16 06:20:56 UTC (rev 4551) @@ -46,9 +46,9 @@ $title = _('MRP Reschedules') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The MRP reschedules 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; @@ -58,9 +58,9 @@ $title = _('MRP Reschedules') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('No MRP reschedule retrieved'), 'warn'); - 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; @@ -114,32 +114,7 @@ PrintHeader($pdf,$YPos,$PageNumber,$Page_Height,$Top_Margin,$Left_Margin,$Page_Width, $Right_Margin); } -/*Print out the grand totals */ - //$pdf->addTextWrap(80,$YPos,260-$Left_Margin,$FontSize,_('Grand Total Value'), 'right'); - //$DisplayTotalVal = number_format($Tot_Val,2); - //$pdf->addTextWrap(500,$YPos,60,$FontSize,$DisplayTotalVal, 'right'); -/* UldisN - $pdfcode = $pdf->output(); - $len = strlen($pdfcode); - if ($len<=20){ - $title = _('Print MRP Reschedules Error'); - include('includes/header.inc'); - prnMsg(_('There were no items with due dates different from MRP dates'),'error'); - echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; - include('includes/footer.inc'); - exit; - } else { - header('Content-type: application/pdf'); - header("Content-Length: " . $len); - header('Content-Disposition: inline; filename=MRPReschedules.pdf'); - header('Expires: 0'); - header('Cache-Control: private, post-check=0, pre-check=0'); - header('Pragma: public'); - - $pdf->Output('MRPRescedules.pdf', 'I'); - } -*/ $pdf->OutputD($_SESSION['DatabaseName'] . '_MRPReschedules_' . date('Y-m-d').'.pdf');//UldisN $pdf->__destruct(); //UldisN @@ -151,19 +126,19 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Stock') . '" alt="" />' . ' ' . $title . '</p>'; - echo '</br></br><form action=' . $_SERVER['PHP_SELF'] . " method='post'><table class=selection>"; + 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 '<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 '</select></td></tr>'; - echo '<tr><td>' . _('Selection') . ":</td><td><select name='Selection'>"; - echo "<option selected value='All'>" . _('All')."</option>"; - echo "<option value='WO'>" . _('Work Orders Only')."</option>"; - echo "<option value='PO'>" . _('Purchase Orders Only')."</option>"; + echo '<tr><td>' . _('Selection') . ':</td><td><select name="Selection">'; + echo '<option selected value="All">' . _('All').'</option>'; + echo '<option value="WO">' . _('Work Orders Only').'</option>'; + echo '<option value="PO">' . _('Purchase Orders Only').'</option>'; echo '</select></td></tr>'; - echo "</table><br>"; - echo "<div class='centre'><input type=submit name='PrintPDF' value='" . _('Print PDF') . "'></div>"; + echo '</table><br>'; + echo '<div class="centre"><input type=submit name="PrintPDF" value="' . _('Print PDF') . '"></div>'; include('includes/footer.inc'); Modified: trunk/OutstandingGRNs.php =================================================================== --- trunk/OutstandingGRNs.php 2011-04-14 10:28:52 UTC (rev 4550) +++ trunk/OutstandingGRNs.php 2011-04-16 06:20:56 UTC (rev 4551) @@ -51,9 +51,9 @@ $title = _('Outstanding GRN Valuation') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg(_('The outstanding GRNs valuation 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">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>".$SQL; + echo '<br>'.$SQL; } include('includes/footer.inc'); exit; @@ -63,9 +63,9 @@ $title = _('Outstanding GRN Valuation') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg(_('No outstanding GRNs valuation details retrieved'), 'warn'); - echo "<br><a href='" .$rootpath ."/index.php?" . SID . "'>" . _('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; @@ -142,28 +142,7 @@ $LeftOvers = $pdf->addTextWrap(500,$YPos,60,$FontSize,$DisplayTotalVal, 'right'); $pdf->line($Left_Margin, $YPos+$line_height-2,$Page_Width-$Right_Margin, $YPos+$line_height-2); $YPos -=(2*$line_height); -/* UldisN - $pdfcode = $pdf->output(); - $len = strlen($pdfcode); - if ($len<=20){ - $title = _('Outstanding GRNs Valuation Error'); - include('includes/header.inc'); - prnMsg(_('There were no GRNs with any value to print out for the specified supplier range'),'info'); - echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; - include('includes/footer.inc'); - exit; - } else { - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename=OSGRNsValuation.pdf'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - - $pdf->Output('OutstandingGRNs.pdf','I'); - } -*/ $pdf->OutputD($_SESSION['DatabaseName'] . '_OSGRNsValuation_' . date('Y-m-d').'.pdf');//UldisN $pdf->__destruct(); //UldisN } else { /*The option to print PDF was not hit */ @@ -174,15 +153,15 @@ 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'><table class=selection>"; + echo '<form action=' . $_SERVER['PHP_SELF'] . ' method="POST"><table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<tr><td>' . _('From Supplier Code') . ":</td> - <td><input type=text name='FromCriteria' value='0'></td></tr>"; - echo '<tr><td>' . _('To Supplier Code'). ":</td> - <td><input type=text name='ToCriteria' value='zzzzzzz'></td></tr>"; + echo '<tr><td>' . _('From Supplier Code') . ':</td> + <td><input type=text name="FromCriteria" value="0"></td></tr>'; + echo '<tr><td>' . _('To Supplier Code'). ':</td> + <td><input type=text name="ToCriteria" value="zzzzzzz"></td></tr>'; - echo "</table><br><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/PDFChequeListing.php =================================================================== --- trunk/PDFChequeListing.php 2011-04-14 10:28:52 UTC (rev 4550) +++ trunk/PDFChequeListing.php 2011-04-16 06:20:56 UTC (rev 4551) @@ -2,9 +2,6 @@ /* $Id$*/ -/* $Revision: 1.13 $ */ - -//$PageSecurity = 3; include('includes/SQL_CommonFunctions.inc'); include ('includes/session.inc'); @@ -33,37 +30,40 @@ prnMsg($msg,'error'); } - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection> <tr> - <td>' . _('Enter the date from which cheques are to be listed') . ":</td> - <td><input type=text name='FromDate' maxlength=10 size=10 class=date alt='".$_SESSION['DefaultDateFormat']."' VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td> - </tr>"; - echo '<tr><td>' . _('Enter the date to which cheques are to be listed') . ":</td> - <td><input type=text name='ToDate' maxlength=10 size=10 class=date alt='".$_SESSION['DefaultDateFormat']."' VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td> - </tr>"; + <td>' . _('Enter the date from which cheques are to be listed') . ':</td> + <td><input type="text" name="FromDate" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + </tr>'; + echo '<tr><td>' . _('Enter the date to which cheques are to be listed') . ':</td> + <td><input type=text name="ToDate" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + </tr>'; echo '<tr><td>' . _('Bank Account') . '</td><td>'; - $sql = 'SELECT bankaccountname, accountcode FROM bankaccounts'; + $sql = "SELECT bankaccountname, accountcode FROM bankaccounts"; $result = DB_query($sql,$db); - echo "<select name='BankAccount'>"; + 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>'; } 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 "</select></td></tr></table><br><div class='centre'><input type=submit name='Go' VALUE='" . _('Create PDF') . "'></div>"; + echo '<tr><td>' . _('Email the report off') . ':</td> + <td><select name="Email">'; + 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>'; - include('includes/footer.inc'); exit; } else { @@ -71,7 +71,6 @@ include('includes/ConnectDB.inc'); } - $SQL = "SELECT bankaccountname FROM bankaccounts WHERE accountcode = '" .$_POST['BankAccount'] . "'"; @@ -91,14 +90,13 @@ AND transdate >='" . FormatDateForSQL($_POST['FromDate']) . "' AND transdate <='" . FormatDateForSQL($_POST['ToDate']) . "'"; - $Result=DB_query($SQL,$db,'','',false,false); if (DB_error_no($db)!=0){ $title = _('Payment Listing'); include('includes/header.inc'); prnMsg(_('An error occurred getting the payments'),'error'); if ($Debug==1){ - prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br>' . $SQL,'error'); + prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br />' . $SQL,'error'); } include('includes/footer.inc'); exit; @@ -124,7 +122,7 @@ while ($myrow=DB_fetch_array($Result)){ - $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,number_format(-$myrow['amount'],2), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,number_format(-$myrow['amount'],2), 'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+65,$YPos,90,$FontSize,$myrow['ref'], 'left'); $sql = "SELECT accountname, @@ -160,12 +158,12 @@ } DB_free_result($GLTransResult); - $YPos -= ($line_height); - $TotalCheques = $TotalCheques - $myrow['amount']; + $YPos -= ($line_height); + $TotalCheques = $TotalCheques - $myrow['amount']; - if ($YPos - (2 *$line_height) < $Bottom_Margin){ + if ($YPos - (2 *$line_height) < $Bottom_Margin){ /*Then set up a new page */ - $PageNumber++; + $PageNumber++; include ('includes/PDFChequeListingPageHeader.inc'); } /*end of new page header */ } /* end of while there are customer receipts in the batch to print */ @@ -175,21 +173,9 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,number_format($TotalCheques,2), 'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+65,$YPos,300,$FontSize,_('TOTAL') . ' ' . $Currency . ' ' . _('CHEQUES'), 'left'); -/* UldisN -$pdfcode = $pdf->output(); -$len = strlen($pdfcode); -header('Content-type: application/pdf'); -header('Content-Length: ' . $len); -header('Content-Disposition: inline; filename=ChequeListing.pdf'); -header('Expires: 0'); -header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); -header('Pragma: public'); - -$pdf->stream(); -*/ $ReportFileName = $_SESSION['DatabaseName'] . '_ChequeListing_' . date('Y-m-d').'.pdf'; -$pdf->OutputD($ReportFileName);//UldisN -$pdf->__destruct(); //UldisN +$pdf->OutputD($ReportFileName); +$pdf->__destruct(); if ($_POST['Email']=='Yes'){ if (file_exists($_SESSION['reports_dir'] . '/'.$ReportFileName)){ unlink($_SESSION['reports_dir'] . '/'.$ReportFileName); Modified: trunk/PDFCustTransListing.php =================================================================== --- trunk/PDFCustTransListing.php 2011-04-14 10:28:52 UTC (rev 4550) +++ trunk/PDFCustTransListing.php 2011-04-16 06:20:56 UTC (rev 4551) @@ -28,9 +28,9 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection> <tr> - <td>' . _('Enter the date for which the transactions are to be listed') . ":</td> - <td><input type=text name='Date' maxlength=10 size=10 class=date alt='" . $_SESSION['DefaultDateFormat'] . "' value='" . Date($_SESSION['DefaultDateFormat']) . "'></td> - </tr>"; + <td>' . _('Enter the date for which the transactions are to be listed') . ':</td> + <td><input type=text name="Date" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + </tr>'; echo '<tr><td>' . _('Transaction type') . '</td><td>'; Modified: trunk/PDFLowGP.php =================================================================== --- trunk/PDFLowGP.php 2011-04-14 10:28:52 UTC (rev 4550) +++ trunk/PDFLowGP.php 2011-04-16 06:20:56 UTC (rev 4551) @@ -2,9 +2,6 @@ /* $Id$*/ -/* $Revision: 1.15 $ */ - -//$PageSecurity = 2; include('includes/session.inc'); if (!isset($_POST['FromCat']) OR $_POST['FromCat']=='') { @@ -60,9 +57,9 @@ include('includes/header.inc'); prnMsg(_('The low GP items 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">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>$SQL"; + echo '<br />' . $SQL; } include('includes/footer.inc'); exit; @@ -72,9 +69,9 @@ include('includes/header.inc'); prnMsg(_('No low GP items retrieved'), 'warn'); - echo "<br><a href='" . $rootpath . "/index.php?" . SID . "'>" . _('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; @@ -112,31 +109,9 @@ $FontSize =10; $YPos -= (2*$line_height); -/* UldisN - $pdfcode = $pdf->output(); - $len = strlen($pdfcode); + $pdf->OutputD($_SESSION['DatabaseName'] . '_LowGPSales_' . date('Y-m-d') . '.pdf'); + $pdf->__destruct(); - if ($len<=20){ - $title = _('Print Low GP Items Error'); - include('includes/header.inc'); - prnMsg (_('There were no items below print out for the location specified'),'error'); - echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; - include('includes/footer.inc'); - exit; - } else { - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename=LowGPSales.pdf'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - - $pdf->Output('PDFLowGP.pdf', 'I'); - } -*/ - $pdf->OutputD($_SESSION['DatabaseName'] . '_LowGPSales_' . date('Y-m-d') . '.pdf');//UldisN - $pdf->__destruct(); //UldisN - } else { /*The option to print PDF was not hit */ include('includes/header.inc'); @@ -150,22 +125,24 @@ $_POST['FromDate']=Date($_SESSION['DefaultDateFormat']); $_POST['ToDate']=Date($_SESSION['DefaultDateFormat']); $_POST['GPMin']=0; - echo '<form action=' . $_SERVER['PHP_SELF'] . " method='POST'><table class=selection>"; + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post"> + <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<tr><td>' . _('Sales Made From') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . "):</td> - <td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='FromDate' size=10 maxlength=10 VALUE='" . $_POST['FromDate'] . "'></td> - </tr>"; + echo '<tr><td>' . _('Sales Made From') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . '):</td> + <td><input type=text class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" size=10 maxlength="10" value="' . $_POST['FromDate'] . '"></td> + </tr>'; - echo '<tr><td>' . _('Sales Made To') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . "):</td> - <td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' size=10 maxlength=10 VALUE='" . $_POST['ToDate'] . "'></td> - </tr>"; + echo '<tr><td>' . _('Sales Made To') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . '):</td> + <td><input type=text class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '"></td> + </tr>'; - echo '<tr><td>' . _('Show sales with GP') . '%' . _('below') . ":</td> - <td><input type=text class='number' name='GPMin' maxlength=3 size=3 value=" . $_POST['GPMin'] . "></td> - </tr>"; + echo '<tr><td>' . _('Show sales with GP') . '%' . _('below') . ':</td> + <td><input type=text class="number" name="GPMin" maxlength="3" size="3" value="' . $_POST['GPMin'] . '"></td> + </tr>'; - echo "</table><br><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/PDFOrderStatus.php =================================================================== --- trunk/PDFOrderStatus.php 2011-04-14 10:28:52 UTC (rev 4550) +++ trunk/PDFOrderStatus.php 2011-04-16 06:20:56 UTC (rev 4551) @@ -2,9 +2,6 @@ /* $Id$*/ -/* $Revision: 1.10 $ */ - -//$PageSecurity = 3; include ('includes/session.inc'); include('includes/SQL_CommonFunctions.inc'); @@ -33,38 +30,45 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' . _('Order Status Report') . '</p>'; - 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><tr><td>' . _('Enter the date from which orders are to be listed') . ":</td><td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='FromDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . "'></td></tr>"; - echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ":</td><td>"; - echo "<input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; + echo '<table class=selection> + <tr> + <td>' . _('Enter the date from which orders are to be listed') . ':</td> + <td><input type=text class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '"></td> + </tr>'; + echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ':</td><td>'; + echo '<input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat']) . '"></td></tr>'; echo '<tr><td>' . _('Inventory Category') . '</td><td>'; $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; $result = DB_query($sql,$db); - echo "<select name='CategoryID'>"; - echo "<option selected VALUE='All'>" . _('Over All Categories'); + echo '<select name="CategoryID">'; + 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'); - $result= DB_query('SELECT loccode, locationname FROM locations',$db); + $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>' . _('Back Order Only') . ":</td><td><select name='BackOrders'>"; - echo "<option selected VALUE='Yes'>" . _('Only Show Back Orders'); - echo "<option VALUE='No'>" . _('Show All Orders'); - echo "</select></td></tr></table><br><div class='centre'><input type=submit name='Go' value='" . _('Create PDF') . "'></div>"; + echo '<tr><td>' . _('Back Order Only') . ':</td><td><select name="BackOrders">'; + echo '<option select... [truncated message content] |
From: <dai...@us...> - 2011-04-16 06:21:05
|
Revision: 4551 http://web-erp.svn.sourceforge.net/web-erp/?rev=4551&view=rev Author: daintree Date: 2011-04-16 06:20:56 +0000 (Sat, 16 Apr 2011) Log Message: ----------- various Modified Paths: -------------- trunk/InventoryQuantities.php trunk/Locations.php trunk/MRPReschedules.php trunk/OutstandingGRNs.php trunk/PDFChequeListing.php trunk/PDFCustTransListing.php trunk/PDFLowGP.php trunk/PDFOrderStatus.php trunk/PDFPrintLabel.php trunk/PDFStockCheckComparison.php trunk/POReport.php trunk/PO_Header.php trunk/PaymentMethods.php trunk/PcAssignCashToTab.php trunk/PcAuthorizeExpenses.php trunk/PcClaimExpensesFromTab.php trunk/PcReportTab.php trunk/PcTypeTabs.php trunk/Prices.php trunk/PricesBasedOnMarkUp.php trunk/Prices_Customer.php trunk/PrintCustOrder.php trunk/PrintCustTrans.php trunk/RecurringSalesOrders.php trunk/ReorderLevel.php trunk/ReorderLevelLocation.php trunk/SalesAnalReptCols.php trunk/SalesAnalRepts.php trunk/SalesInquiry.php trunk/SalesPeople.php trunk/SalesTypes.php trunk/SelectCompletedOrder.php trunk/SelectCustomer.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/SelectSupplier.php trunk/ShipmentCosting.php trunk/Shipments.php trunk/Shipt_Select.php trunk/StockCategories.php trunk/StockCheck.php trunk/StockCostUpdate.php trunk/StockQties_csv.php trunk/StockSerialItems.php trunk/StockTransferControlled.php trunk/StockUsage.php trunk/Stocks.php trunk/SuppInvGRNs.php trunk/SupplierAllocations.php trunk/SupplierBalsAtPeriodEnd.php trunk/SupplierCredit.php trunk/SupplierInvoice.php trunk/SupplierTypes.php trunk/Suppliers.php trunk/WOSerialNos.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/doc/Change.log.html trunk/report_runner.php Modified: trunk/InventoryQuantities.php =================================================================== --- trunk/InventoryQuantities.php 2011-04-14 10:28:52 UTC (rev 4550) +++ trunk/InventoryQuantities.php 2011-04-16 06:20:56 UTC (rev 4551) @@ -1,12 +1,11 @@ <?php -/* $Revision: 1.4 $ */ /* $Id$ */ // InventoryQuantities.php - Report of parts with quantity. Sorts by part and shows // all locations where there are quantities of the part -//$PageSecurity = 2; + include('includes/session.inc'); If (isset($_POST['PrintPDF'])) { @@ -83,9 +82,9 @@ $title = _('Inventory Quantities') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The Inventory Quantity report 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; @@ -94,7 +93,7 @@ $title = _('Print Inventory Quantities Report'); include('includes/header.inc'); prnMsg(_('There were no items with inventory quantities'),'error'); - echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; + echo '<br><a href="'.$rootpath.'/index.php?">' . _('Back to the menu') . '</a>'; include('includes/footer.inc'); exit; } @@ -148,12 +147,12 @@ echo '<div class="page_help_text">' . _('Use this report to display the quantity of Inventory items in different categories.') . '</div><br>'; - echo '</br></br><form action=' . $_SERVER['PHP_SELF'] . " method='post'><table>"; + echo '</br></br><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection><tr><td>'; - echo '<tr><td>' . _('Selection') . ":</td><td><select name='Selection'>"; - echo "<option selected value='All'>" . _('All'); - echo "<option value='Multiple'>" . _('Only Parts With Multiple Locations'); + echo '<tr><td>' . _('Selection') . ':</td><td><select name="Selection">'; + echo '<option selected value="All">' . _('All') . '</option>'; + echo '<option value="Multiple">' . _('Only Parts With Multiple Locations') . '</option>'; echo '</select></td></tr>'; $SQL="SELECT categoryid, categorydescription FROM stockcategory where stocktype<>'A' ORDER BY categorydescription"; @@ -185,7 +184,7 @@ } } echo '</select></td></tr>'; - echo "</table><p><div class='centre'><input type=submit name='PrintPDF' value='" . _('Print PDF') . "'></div>"; + echo '</table><p><div class="centre"><input type=submit name="PrintPDF" value="' . _('Print PDF') . '"></div>'; include('includes/footer.inc'); Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2011-04-14 10:28:52 UTC (rev 4550) +++ trunk/Locations.php 2011-04-16 06:20:56 UTC (rev 4551) @@ -1,10 +1,7 @@ <?php /* $Id$*/ -/* $Revision: 1.25 $ */ -//$PageSecurity = 11; - include('includes/session.inc'); $title = _('Location Maintenance'); @@ -374,18 +371,19 @@ $myrow['managed'] = _('No'); } */ - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> <td>%s</td> - <td><a href='%sSelectedLocation=%s'>" . _('Edit') . "</td> - <td><a href='%sSelectedLocation=%s&delete=1'>" . _('Delete') . '</td> + <td>%s</td> + <td><a href="%sSelectedLocation=%s">' . _('Edit') . '</td> + <td><a href="%sSelectedLocation=%s&delete=1">' . _('Delete') . '</td> </tr>', $myrow['loccode'], $myrow['locationname'], $myrow['description'], - $_SERVER['PHP_SELF'] . '?' . SID . '&', + $_SERVER['PHP_SELF'] . '?', $myrow['loccode'], - $_SERVER['PHP_SELF'] . '?' . SID . '&', + $_SERVER['PHP_SELF'] . '?', $myrow['loccode']); } @@ -399,11 +397,11 @@ if (isset($SelectedLocation)) { echo '<a href="' . $_SERVER['PHP_SELF'] . '">' . _('Review Records') . '</a>'; } -echo "<p>"; +echo '<br />'; 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'] . '" />'; if (isset($SelectedLocation)) { @@ -451,8 +449,8 @@ $_POST['Managed'] = $myrow['managed']; - echo "<input type=hidden name=SelectedLocation VALUE=" . $SelectedLocation . '>'; - echo "<input type=hidden name=LocCode VALUE=" . $_POST['LocCode'] . '>'; + echo '<input type=hidden name=SelectedLocation VALUE="' . $SelectedLocation . '>'; + echo '<input type=hidden name=LocCode VALUE="' . $_POST['LocCode'] . '>'; echo '<table class=selection>'; echo '<tr><th colspan=2><font size=3 color=blue>'._('Amend Location details').'</font></th></tr>'; echo '<tr><td>' . _('Location Code') . ':</td><td>'; Modified: trunk/MRPReschedules.php =================================================================== --- trunk/MRPReschedules.php 2011-04-14 10:28:52 UTC (rev 4550) +++ trunk/MRPReschedules.php 2011-04-16 06:20:56 UTC (rev 4551) @@ -46,9 +46,9 @@ $title = _('MRP Reschedules') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The MRP reschedules 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; @@ -58,9 +58,9 @@ $title = _('MRP Reschedules') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('No MRP reschedule retrieved'), 'warn'); - 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; @@ -114,32 +114,7 @@ PrintHeader($pdf,$YPos,$PageNumber,$Page_Height,$Top_Margin,$Left_Margin,$Page_Width, $Right_Margin); } -/*Print out the grand totals */ - //$pdf->addTextWrap(80,$YPos,260-$Left_Margin,$FontSize,_('Grand Total Value'), 'right'); - //$DisplayTotalVal = number_format($Tot_Val,2); - //$pdf->addTextWrap(500,$YPos,60,$FontSize,$DisplayTotalVal, 'right'); -/* UldisN - $pdfcode = $pdf->output(); - $len = strlen($pdfcode); - if ($len<=20){ - $title = _('Print MRP Reschedules Error'); - include('includes/header.inc'); - prnMsg(_('There were no items with due dates different from MRP dates'),'error'); - echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; - include('includes/footer.inc'); - exit; - } else { - header('Content-type: application/pdf'); - header("Content-Length: " . $len); - header('Content-Disposition: inline; filename=MRPReschedules.pdf'); - header('Expires: 0'); - header('Cache-Control: private, post-check=0, pre-check=0'); - header('Pragma: public'); - - $pdf->Output('MRPRescedules.pdf', 'I'); - } -*/ $pdf->OutputD($_SESSION['DatabaseName'] . '_MRPReschedules_' . date('Y-m-d').'.pdf');//UldisN $pdf->__destruct(); //UldisN @@ -151,19 +126,19 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Stock') . '" alt="" />' . ' ' . $title . '</p>'; - echo '</br></br><form action=' . $_SERVER['PHP_SELF'] . " method='post'><table class=selection>"; + 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 '<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 '</select></td></tr>'; - echo '<tr><td>' . _('Selection') . ":</td><td><select name='Selection'>"; - echo "<option selected value='All'>" . _('All')."</option>"; - echo "<option value='WO'>" . _('Work Orders Only')."</option>"; - echo "<option value='PO'>" . _('Purchase Orders Only')."</option>"; + echo '<tr><td>' . _('Selection') . ':</td><td><select name="Selection">'; + echo '<option selected value="All">' . _('All').'</option>'; + echo '<option value="WO">' . _('Work Orders Only').'</option>'; + echo '<option value="PO">' . _('Purchase Orders Only').'</option>'; echo '</select></td></tr>'; - echo "</table><br>"; - echo "<div class='centre'><input type=submit name='PrintPDF' value='" . _('Print PDF') . "'></div>"; + echo '</table><br>'; + echo '<div class="centre"><input type=submit name="PrintPDF" value="' . _('Print PDF') . '"></div>'; include('includes/footer.inc'); Modified: trunk/OutstandingGRNs.php =================================================================== --- trunk/OutstandingGRNs.php 2011-04-14 10:28:52 UTC (rev 4550) +++ trunk/OutstandingGRNs.php 2011-04-16 06:20:56 UTC (rev 4551) @@ -51,9 +51,9 @@ $title = _('Outstanding GRN Valuation') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg(_('The outstanding GRNs valuation 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">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>".$SQL; + echo '<br>'.$SQL; } include('includes/footer.inc'); exit; @@ -63,9 +63,9 @@ $title = _('Outstanding GRN Valuation') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg(_('No outstanding GRNs valuation details retrieved'), 'warn'); - echo "<br><a href='" .$rootpath ."/index.php?" . SID . "'>" . _('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; @@ -142,28 +142,7 @@ $LeftOvers = $pdf->addTextWrap(500,$YPos,60,$FontSize,$DisplayTotalVal, 'right'); $pdf->line($Left_Margin, $YPos+$line_height-2,$Page_Width-$Right_Margin, $YPos+$line_height-2); $YPos -=(2*$line_height); -/* UldisN - $pdfcode = $pdf->output(); - $len = strlen($pdfcode); - if ($len<=20){ - $title = _('Outstanding GRNs Valuation Error'); - include('includes/header.inc'); - prnMsg(_('There were no GRNs with any value to print out for the specified supplier range'),'info'); - echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; - include('includes/footer.inc'); - exit; - } else { - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename=OSGRNsValuation.pdf'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - - $pdf->Output('OutstandingGRNs.pdf','I'); - } -*/ $pdf->OutputD($_SESSION['DatabaseName'] . '_OSGRNsValuation_' . date('Y-m-d').'.pdf');//UldisN $pdf->__destruct(); //UldisN } else { /*The option to print PDF was not hit */ @@ -174,15 +153,15 @@ 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'><table class=selection>"; + echo '<form action=' . $_SERVER['PHP_SELF'] . ' method="POST"><table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<tr><td>' . _('From Supplier Code') . ":</td> - <td><input type=text name='FromCriteria' value='0'></td></tr>"; - echo '<tr><td>' . _('To Supplier Code'). ":</td> - <td><input type=text name='ToCriteria' value='zzzzzzz'></td></tr>"; + echo '<tr><td>' . _('From Supplier Code') . ':</td> + <td><input type=text name="FromCriteria" value="0"></td></tr>'; + echo '<tr><td>' . _('To Supplier Code'). ':</td> + <td><input type=text name="ToCriteria" value="zzzzzzz"></td></tr>'; - echo "</table><br><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/PDFChequeListing.php =================================================================== --- trunk/PDFChequeListing.php 2011-04-14 10:28:52 UTC (rev 4550) +++ trunk/PDFChequeListing.php 2011-04-16 06:20:56 UTC (rev 4551) @@ -2,9 +2,6 @@ /* $Id$*/ -/* $Revision: 1.13 $ */ - -//$PageSecurity = 3; include('includes/SQL_CommonFunctions.inc'); include ('includes/session.inc'); @@ -33,37 +30,40 @@ prnMsg($msg,'error'); } - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection> <tr> - <td>' . _('Enter the date from which cheques are to be listed') . ":</td> - <td><input type=text name='FromDate' maxlength=10 size=10 class=date alt='".$_SESSION['DefaultDateFormat']."' VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td> - </tr>"; - echo '<tr><td>' . _('Enter the date to which cheques are to be listed') . ":</td> - <td><input type=text name='ToDate' maxlength=10 size=10 class=date alt='".$_SESSION['DefaultDateFormat']."' VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td> - </tr>"; + <td>' . _('Enter the date from which cheques are to be listed') . ':</td> + <td><input type="text" name="FromDate" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + </tr>'; + echo '<tr><td>' . _('Enter the date to which cheques are to be listed') . ':</td> + <td><input type=text name="ToDate" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + </tr>'; echo '<tr><td>' . _('Bank Account') . '</td><td>'; - $sql = 'SELECT bankaccountname, accountcode FROM bankaccounts'; + $sql = "SELECT bankaccountname, accountcode FROM bankaccounts"; $result = DB_query($sql,$db); - echo "<select name='BankAccount'>"; + 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>'; } 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 "</select></td></tr></table><br><div class='centre'><input type=submit name='Go' VALUE='" . _('Create PDF') . "'></div>"; + echo '<tr><td>' . _('Email the report off') . ':</td> + <td><select name="Email">'; + 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>'; - include('includes/footer.inc'); exit; } else { @@ -71,7 +71,6 @@ include('includes/ConnectDB.inc'); } - $SQL = "SELECT bankaccountname FROM bankaccounts WHERE accountcode = '" .$_POST['BankAccount'] . "'"; @@ -91,14 +90,13 @@ AND transdate >='" . FormatDateForSQL($_POST['FromDate']) . "' AND transdate <='" . FormatDateForSQL($_POST['ToDate']) . "'"; - $Result=DB_query($SQL,$db,'','',false,false); if (DB_error_no($db)!=0){ $title = _('Payment Listing'); include('includes/header.inc'); prnMsg(_('An error occurred getting the payments'),'error'); if ($Debug==1){ - prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br>' . $SQL,'error'); + prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br />' . $SQL,'error'); } include('includes/footer.inc'); exit; @@ -124,7 +122,7 @@ while ($myrow=DB_fetch_array($Result)){ - $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,number_format(-$myrow['amount'],2), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,number_format(-$myrow['amount'],2), 'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+65,$YPos,90,$FontSize,$myrow['ref'], 'left'); $sql = "SELECT accountname, @@ -160,12 +158,12 @@ } DB_free_result($GLTransResult); - $YPos -= ($line_height); - $TotalCheques = $TotalCheques - $myrow['amount']; + $YPos -= ($line_height); + $TotalCheques = $TotalCheques - $myrow['amount']; - if ($YPos - (2 *$line_height) < $Bottom_Margin){ + if ($YPos - (2 *$line_height) < $Bottom_Margin){ /*Then set up a new page */ - $PageNumber++; + $PageNumber++; include ('includes/PDFChequeListingPageHeader.inc'); } /*end of new page header */ } /* end of while there are customer receipts in the batch to print */ @@ -175,21 +173,9 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,number_format($TotalCheques,2), 'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+65,$YPos,300,$FontSize,_('TOTAL') . ' ' . $Currency . ' ' . _('CHEQUES'), 'left'); -/* UldisN -$pdfcode = $pdf->output(); -$len = strlen($pdfcode); -header('Content-type: application/pdf'); -header('Content-Length: ' . $len); -header('Content-Disposition: inline; filename=ChequeListing.pdf'); -header('Expires: 0'); -header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); -header('Pragma: public'); - -$pdf->stream(); -*/ $ReportFileName = $_SESSION['DatabaseName'] . '_ChequeListing_' . date('Y-m-d').'.pdf'; -$pdf->OutputD($ReportFileName);//UldisN -$pdf->__destruct(); //UldisN +$pdf->OutputD($ReportFileName); +$pdf->__destruct(); if ($_POST['Email']=='Yes'){ if (file_exists($_SESSION['reports_dir'] . '/'.$ReportFileName)){ unlink($_SESSION['reports_dir'] . '/'.$ReportFileName); Modified: trunk/PDFCustTransListing.php =================================================================== --- trunk/PDFCustTransListing.php 2011-04-14 10:28:52 UTC (rev 4550) +++ trunk/PDFCustTransListing.php 2011-04-16 06:20:56 UTC (rev 4551) @@ -28,9 +28,9 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection> <tr> - <td>' . _('Enter the date for which the transactions are to be listed') . ":</td> - <td><input type=text name='Date' maxlength=10 size=10 class=date alt='" . $_SESSION['DefaultDateFormat'] . "' value='" . Date($_SESSION['DefaultDateFormat']) . "'></td> - </tr>"; + <td>' . _('Enter the date for which the transactions are to be listed') . ':</td> + <td><input type=text name="Date" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + </tr>'; echo '<tr><td>' . _('Transaction type') . '</td><td>'; Modified: trunk/PDFLowGP.php =================================================================== --- trunk/PDFLowGP.php 2011-04-14 10:28:52 UTC (rev 4550) +++ trunk/PDFLowGP.php 2011-04-16 06:20:56 UTC (rev 4551) @@ -2,9 +2,6 @@ /* $Id$*/ -/* $Revision: 1.15 $ */ - -//$PageSecurity = 2; include('includes/session.inc'); if (!isset($_POST['FromCat']) OR $_POST['FromCat']=='') { @@ -60,9 +57,9 @@ include('includes/header.inc'); prnMsg(_('The low GP items 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">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>$SQL"; + echo '<br />' . $SQL; } include('includes/footer.inc'); exit; @@ -72,9 +69,9 @@ include('includes/header.inc'); prnMsg(_('No low GP items retrieved'), 'warn'); - echo "<br><a href='" . $rootpath . "/index.php?" . SID . "'>" . _('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; @@ -112,31 +109,9 @@ $FontSize =10; $YPos -= (2*$line_height); -/* UldisN - $pdfcode = $pdf->output(); - $len = strlen($pdfcode); + $pdf->OutputD($_SESSION['DatabaseName'] . '_LowGPSales_' . date('Y-m-d') . '.pdf'); + $pdf->__destruct(); - if ($len<=20){ - $title = _('Print Low GP Items Error'); - include('includes/header.inc'); - prnMsg (_('There were no items below print out for the location specified'),'error'); - echo "<br><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; - include('includes/footer.inc'); - exit; - } else { - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename=LowGPSales.pdf'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - - $pdf->Output('PDFLowGP.pdf', 'I'); - } -*/ - $pdf->OutputD($_SESSION['DatabaseName'] . '_LowGPSales_' . date('Y-m-d') . '.pdf');//UldisN - $pdf->__destruct(); //UldisN - } else { /*The option to print PDF was not hit */ include('includes/header.inc'); @@ -150,22 +125,24 @@ $_POST['FromDate']=Date($_SESSION['DefaultDateFormat']); $_POST['ToDate']=Date($_SESSION['DefaultDateFormat']); $_POST['GPMin']=0; - echo '<form action=' . $_SERVER['PHP_SELF'] . " method='POST'><table class=selection>"; + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post"> + <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<tr><td>' . _('Sales Made From') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . "):</td> - <td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='FromDate' size=10 maxlength=10 VALUE='" . $_POST['FromDate'] . "'></td> - </tr>"; + echo '<tr><td>' . _('Sales Made From') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . '):</td> + <td><input type=text class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" size=10 maxlength="10" value="' . $_POST['FromDate'] . '"></td> + </tr>'; - echo '<tr><td>' . _('Sales Made To') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . "):</td> - <td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' size=10 maxlength=10 VALUE='" . $_POST['ToDate'] . "'></td> - </tr>"; + echo '<tr><td>' . _('Sales Made To') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . '):</td> + <td><input type=text class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '"></td> + </tr>'; - echo '<tr><td>' . _('Show sales with GP') . '%' . _('below') . ":</td> - <td><input type=text class='number' name='GPMin' maxlength=3 size=3 value=" . $_POST['GPMin'] . "></td> - </tr>"; + echo '<tr><td>' . _('Show sales with GP') . '%' . _('below') . ':</td> + <td><input type=text class="number" name="GPMin" maxlength="3" size="3" value="' . $_POST['GPMin'] . '"></td> + </tr>'; - echo "</table><br><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/PDFOrderStatus.php =================================================================== --- trunk/PDFOrderStatus.php 2011-04-14 10:28:52 UTC (rev 4550) +++ trunk/PDFOrderStatus.php 2011-04-16 06:20:56 UTC (rev 4551) @@ -2,9 +2,6 @@ /* $Id$*/ -/* $Revision: 1.10 $ */ - -//$PageSecurity = 3; include ('includes/session.inc'); include('includes/SQL_CommonFunctions.inc'); @@ -33,38 +30,45 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' . _('Order Status Report') . '</p>'; - 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><tr><td>' . _('Enter the date from which orders are to be listed') . ":</td><td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='FromDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . "'></td></tr>"; - echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ":</td><td>"; - echo "<input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; + echo '<table class=selection> + <tr> + <td>' . _('Enter the date from which orders are to be listed') . ':</td> + <td><input type=text class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '"></td> + </tr>'; + echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ':</td><td>'; + echo '<input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat']) . '"></td></tr>'; echo '<tr><td>' . _('Inventory Category') . '</td><td>'; $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; $result = DB_query($sql,$db); - echo "<select name='CategoryID'>"; - echo "<option selected VALUE='All'>" . _('Over All Categories'); + echo '<select name="CategoryID">'; + 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'); - $result= DB_query('SELECT loccode, locationname FROM locations',$db); + $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>' . _('Back Order Only') . ":</td><td><select name='BackOrders'>"; - echo "<option selected VALUE='Yes'>" . _('Only Show Back Orders'); - echo "<option VALUE='No'>" . _('Show All Orders'); - echo "</select></td></tr></table><br><div class='centre'><input type=submit name='Go' value='" . _('Create PDF') . "'></div>"; + echo '<tr><td>' . _('Back Order Only') . ':</td><td><select name="BackOrders">'; + echo '<option select... [truncated message content] |
From: <dai...@us...> - 2011-04-17 10:18:10
|
Revision: 4552 http://web-erp.svn.sourceforge.net/web-erp/?rev=4552&view=rev Author: daintree Date: 2011-04-17 10:18:02 +0000 (Sun, 17 Apr 2011) Log Message: ----------- various Modified Paths: -------------- trunk/PO_Header.php trunk/Prices_Customer.php trunk/PrintCustTrans.php trunk/RecurringSalesOrders.php trunk/SupplierTypes.php trunk/includes/OutputSerialItems.php Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-04-16 06:20:56 UTC (rev 4551) +++ trunk/PO_Header.php 2011-04-17 10:18:02 UTC (rev 4552) @@ -766,7 +766,7 @@ if($_SESSION['ExistingOrder'] != 0 AND $_SESSION['PO'.$identifier]->Status == 'Printed'){ - echo '<tr><td><a href="' . $rootpath . '/GoodsReceived.php?' . SID . '&PONumber=' . + echo '<tr><td><a href="' . $rootpath . '/GoodsReceived.php?PONumber=' . $_SESSION['PO'.$identifier]->OrderNo . '&identifier=' . $identifier . '">'._('Receive this order').'</a></td></tr>'; } if ($_SESSION['PO'.$identifier]->Status==''){ //then its a new order @@ -959,9 +959,9 @@ <td><input type="text" name="Tel" size="31" maxlength="30" value="' . $_SESSION['PO'.$identifier]->Tel . '"></td> </tr>'; - echo '<tr><td>' . _('Delivery By') . ':</td><td><select name=DeliveryBy>'; + echo '<tr><td>' . _('Delivery By') . ':</td><td><select name="DeliveryBy">'; - $ShipperResult = DB_query('SELECT shipper_id, shippername FROM shippers',$db); + $ShipperResult = DB_query("SELECT shipper_id, shippername FROM shippers",$db); while ($ShipperRow=DB_fetch_array($ShipperResult)){ if (isset($_POST['DeliveryBy']) and ($_POST['DeliveryBy'] == $ShipperRow['shipper_id'])) { @@ -978,7 +978,7 @@ echo '<table class=selection width=100%><tr><td>' . _('Supplier Selection') . ':</td><td> <select name=Keywords onChange="ReloadForm(form1.SearchSuppliers)">'; - $SuppCoResult = DB_query('SELECT supplierid, suppname FROM suppliers ORDER BY suppname',$db); + $SuppCoResult = DB_query("SELECT supplierid, suppname FROM suppliers ORDER BY suppname",$db); while ( $SuppCoRow=DB_fetch_array($SuppCoResult)){ if ($SuppCoRow['suppname'] == $_SESSION['PO'.$identifier]->SupplierName) { @@ -1029,9 +1029,10 @@ </td><td><input type="text" name="SuppTel" size="31" maxlength="30" value="' . $_SESSION['PO'.$identifier]->SuppTel . '"></td> </tr>'; - $result=DB_query('SELECT terms, termsindicator FROM paymentterms', $db); + $result=DB_query("SELECT terms, termsindicator FROM paymentterms", $db); - echo '<tr><td>' . _('Payment Terms') . ':</td><td><select name="PaymentTerms">'; + echo '<tr><td>' . _('Payment Terms') . ':</td> + <td><select name="PaymentTerms">'; while ($myrow = DB_fetch_array($result)) { if ($myrow['termsindicator']==$_SESSION['PO'.$identifier]->PaymentTerms) { @@ -1054,8 +1055,9 @@ </tr>'; if ($_SESSION['PO'.$identifier]->CurrCode != $_SESSION['CompanyRecord']['currencydefault']) { - echo '<tr><td>'. _('Exchange Rate').':'.'</td><td><input type=text name="ExRate" - value='.$_POST['ExRate'].' class=number size=11></td></tr>'; + echo '<tr><td>'. _('Exchange Rate').':'.'</td> + <td><input type=text name="ExRate" value='.$_POST['ExRate'].' class="number" size=11></td> + </tr>'; } else { echo '<input type=hidden name="ExRate" value="1">'; } Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2011-04-16 06:20:56 UTC (rev 4551) +++ trunk/Prices_Customer.php 2011-04-17 10:18:02 UTC (rev 4552) @@ -1,7 +1,5 @@ <?php -/* $Revision: 1.11 $ */ /* $Id$*/ -//$PageSecurity = 11; include('includes/session.inc'); @@ -275,158 +273,142 @@ } else { $EndDateDisplay = ConvertSQLDate($myrow['enddate']); } - printf("<tr bgcolor='#CCCCCC'> - <td class=number>%0.2f</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href='%s?Item=%s&Price=%s&Branch=%s&StartDate=%s&EndDate=%s&Edit=1'>" . _('Edit') . "</td> - <td><a href='%s?Item=%s&Branch=%s&StartDate=%s&EndDate=%s&delete=yes'>" . _('Delete') . "</td></tr>", - $myrow['price'], - $Branch, - ConvertSQLDate($myrow['startdate']), - $EndDateDisplay, - $_SERVER['PHP_SELF'], - $Item, - $myrow['price'], - $myrow['branchcode'], - $myrow['startdate'], - $myrow['enddate'], - $_SERVER['PHP_SELF'], - $Item, - $myrow['branchcode'], - $myrow['startdate'], - $myrow['enddate']); + echo '<tr bgcolor="#CCCCCC"> + <td class=number>'.number_format($myrow['price'],2).'</td> + <td>'.$Branch.'</td> + <td>'.$myrow['units'].'</td> + <td class=number>'.$myrow['conversionfactor'].'</td> + <td>'.ConvertSQLDate($myrow['startdate']).'</td> + <td>'.$EndDateDisplay.'</td> + <td><a href="'.$_SERVER['PHP_SELF'].'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode']. + '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td> + <td><a href="'.$_SERVER['PHP_SELF'].'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'] .'&EndDate='.$myrow['enddate'].'&delete=yes">' . _('Delete') . '</td></tr>'; + } //END WHILE LIST LOOP } -?> +echo '</table></tr></table><p />'; -</table></tr></table> +echo '<form method="post" action=' . $_SERVER['PHP_SELF'] . '?' . SID . '>'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<input type=hidden name="Item" VALUE="' . $Item . '">'; -<p> - -<?php - echo '<form method="post" action=' . $_SERVER['PHP_SELF'] . '?' . SID . '>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<input type=hidden name="Item" VALUE="' . $Item . '">'; - - if (isset($_GET['Edit']) and $_GET['Edit']==1){ - echo '<input type=hidden name="Editing" VALUE="Yes">'; - echo '<input type=hidden name="OldStartDate" VALUE="' . $_GET['StartDate'] .'">'; - echo '<input type=hidden name="OldEndDate" VALUE="' . $_GET['EndDate'] . '">'; - $_POST['Price']=$_GET['Price']; - $_POST['Branch']=$_GET['Branch']; - $_POST['StartDate'] = ConvertSQLDate($_GET['StartDate']); - if (Is_Date($_GET['EndDate'])){ - $_POST['EndDate'] = ConvertSQLDate($_GET['EndDate']); - } else { - $_POST['EndDate']=''; - } +if (isset($_GET['Edit']) and $_GET['Edit']==1){ + echo '<input type=hidden name="Editing" VALUE="Yes">'; + echo '<input type=hidden name="OldStartDate" VALUE="' . $_GET['StartDate'] .'">'; + echo '<input type=hidden name="OldEndDate" VALUE="' . $_GET['EndDate'] . '">'; + $_POST['Price']=$_GET['Price']; + $_POST['Branch']=$_GET['Branch']; + $_POST['StartDate'] = ConvertSQLDate($_GET['StartDate']); + if (Is_Date($_GET['EndDate'])){ + $_POST['EndDate'] = ConvertSQLDate($_GET['EndDate']); + } else { + $_POST['EndDate']=''; } - if (!isset($_POST['Branch'])) { - $_POST['Branch']=''; - } - if (!isset($_POST['Price'])) { - $_POST['Price']=0; - } +} +if (!isset($_POST['Branch'])) { + $_POST['Branch']=''; +} +if (!isset($_POST['Price'])) { + $_POST['Price']=0; +} - if (!isset($_POST['StartDate'])){ - $_POST['StartDate'] = Date($_SESSION['DefaultDateFormat']); - } +if (!isset($_POST['StartDate'])){ + $_POST['StartDate'] = Date($_SESSION['DefaultDateFormat']); +} - if (!isset($_POST['EndDate'])){ - $_POST['EndDate'] = DateAdd(Date($_SESSION['DefaultDateFormat']), 'y', 1); - } +if (!isset($_POST['EndDate'])){ + $_POST['EndDate'] = ''; +} - $sql = "SELECT - branchcode, - brname - FROM custbranch - WHERE debtorno='".$_SESSION['CustomerID'] ."'"; - $result = DB_query($sql, $db); - echo '<table class=selection>'; - echo '<tr><td>' . _('Branch') . ':</td>'; - echo '<td><select name="Branch"'; - while ($myrow=DB_fetch_array($result)) { - if ($myrow['branchcode']==$_POST['branch']) { - echo '<option selected value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>'; - } else { - echo '<option value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>'; - } +$sql = "SELECT + branchcode, + brname + FROM custbranch + WHERE debtorno='".$_SESSION['CustomerID'] ."'"; +$result = DB_query($sql, $db); +echo '<table class=selection>'; +echo '<tr><td>' . _('Branch') . ':</td>'; +echo '<td><select name="Branch"'; +while ($myrow=DB_fetch_array($result)) { + if ($myrow['branchcode']==$_POST['branch']) { + echo '<option selected value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>'; + } else { + echo '<option value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>'; } - echo '></td></tr>'; - echo '<tr><td>' . _('Start Date') . ':</td> - <td><input type="Text" name="StartDate" class=date alt='.$_SESSION['DefaultDateFormat']. - ' size=11 maxlength=10 value=' . $_POST['StartDate'] . '></td></tr>'; - echo '<tr><td>' . _('End Date') . ':</td> - <td><input type="Text" name="EndDate" class=date alt='.$_SESSION['DefaultDateFormat']. - ' size=11 maxlength=10 value=' . $_POST['EndDate'] . '></td></tr>'; +} +echo '></td></tr>'; +echo '<tr><td>' . _('Start Date') . ':</td> + <td><input type="Text" name="StartDate" class=date alt='.$_SESSION['DefaultDateFormat']. + ' size=11 maxlength=10 value=' . $_POST['StartDate'] . '></td></tr>'; +echo '<tr><td>' . _('End Date') . ':</td> + <td><input type="Text" name="EndDate" class=date alt='.$_SESSION['DefaultDateFormat']. + ' size=11 maxlength=10 value=' . $_POST['EndDate'] . '></td></tr>'; - echo '<tr><td>' . _('Price') . ':</td> - <td><input type="Text" class=number name="Price" size=11 maxlength=10 value=' . $_POST['Price'] . '></td> - </tr></table>'; +echo '<tr><td>' . _('Price') . ':</td> + <td><input type="Text" class=number name="Price" size=11 maxlength=10 value=' . $_POST['Price'] . '></td> + </tr></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>'; - include('includes/footer.inc'); +echo '</form>'; +include('includes/footer.inc'); - function ReSequenceEffectiveDates ($Item, $PriceList, $CurrAbbrev, $CustomerID, $db) { +function ReSequenceEffectiveDates ($Item, $PriceList, $CurrAbbrev, $CustomerID, $db) { - /*This is quite complicated - the idea is that prices set up should be unique and there is no way two prices could be returned as valid - when getting a price in includes/GetPrice.inc the logic is to first look for a price of the salestype/currency within the effective start and end dates - then if not get the price with a start date prior but a blank end date (the default price). We would not want two prices where the effective dates fall between an existing price so it is necessary to update enddates of prices - with me - I am just hanging on here myself + /*This is quite complicated - the idea is that prices set up should be unique and there is no way two prices could be returned as valid - when getting a price in includes/GetPrice.inc the logic is to first look for a price of the salestype/currency within the effective start and end dates - then if not get the price with a start date prior but a blank end date (the default price). We would not want two prices where the effective dates fall between an existing price so it is necessary to update enddates of prices - with me - I am just hanging on here myself - Prices with no end date are default prices and need to be ignored in this resquence*/ + Prices with no end date are default prices and need to be ignored in this resquence*/ - $SQL = "SELECT branchcode, - startdate, - enddate - FROM prices - WHERE debtorno='" . $CustomerID . "' - AND stockid='" . $Item . "' - AND currabrev='" . $CurrAbbrev . "' - AND typeabbrev='" . $PriceList . "' - AND enddate<>'' - ORDER BY - branchcode, - startdate, - enddate"; + $SQL = "SELECT branchcode, + startdate, + enddate + FROM prices + WHERE debtorno='" . $CustomerID . "' + AND stockid='" . $Item . "' + AND currabrev='" . $CurrAbbrev . "' + AND typeabbrev='" . $PriceList . "' + AND enddate<>'' + ORDER BY + branchcode, + startdate, + enddate"; - $result = DB_query($SQL,$db); + $result = DB_query($SQL,$db); - unset($BranchCode); + unset($BranchCode); - while ($myrow = DB_fetch_array($result)){ - if (!isset($BranchCode)){ - unset($NextDefaultStartDate); //a price with a blank end date - unset($NextStartDate); - unset($EndDate); - unset($StartDate); - $BranchCode = $myrow['branchcode']; - } - if (isset($NextStartDate)){ - if (Date1GreaterThanDate2(ConvertSQLDate($myrow['startdate']),$NextStartDate)){ - $NextStartDate = ConvertSQLDate($myrow['startdate']); - if (Date1GreaterThanDate2(ConvertSQLDate($EndDate),ConvertSQLDate($myrow['startdate']))) { - /*Need to make the end date the new start date less 1 day */ - $SQL = "UPDATE prices SET enddate = '" . FormatDateForSQL(DateAdd($NextStartDate,'d',-1)) . "' - WHERE stockid ='" .$Item . "' - AND currabrev='" . $CurrAbbrev . "' - AND typeabbrev='" . $PriceList . "' - AND startdate ='" . $StartDate . "' - AND enddate = '" . $EndDate . "' - AND debtorno ='" . $CustomerID . "'"; - $UpdateResult = DB_query($SQL,$db); - } - } //end of if startdate after NextStartDate - we have a new NextStartDate - } //end of if set NextStartDate - else { - $NextStartDate = ConvertSQLDate($myrow['startdate']); - } - $StartDate = $myrow['startdate']; - $EndDate = $myrow['enddate']; + while ($myrow = DB_fetch_array($result)){ + if (!isset($BranchCode)){ + unset($NextDefaultStartDate); //a price with a blank end date + unset($NextStartDate); + unset($EndDate); + unset($StartDate); + $BranchCode = $myrow['branchcode']; } + if (isset($NextStartDate)){ + if (Date1GreaterThanDate2(ConvertSQLDate($myrow['startdate']),$NextStartDate)){ + $NextStartDate = ConvertSQLDate($myrow['startdate']); + if (Date1GreaterThanDate2(ConvertSQLDate($EndDate),ConvertSQLDate($myrow['startdate']))) { + /*Need to make the end date the new start date less 1 day */ + $SQL = "UPDATE prices SET enddate = '" . FormatDateForSQL(DateAdd($NextStartDate,'d',-1)) . "' + WHERE stockid ='" .$Item . "' + AND currabrev='" . $CurrAbbrev . "' + AND typeabbrev='" . $PriceList . "' + AND startdate ='" . $StartDate . "' + AND enddate = '" . $EndDate . "' + AND debtorno ='" . $CustomerID . "'"; + $UpdateResult = DB_query($SQL,$db); + } + } //end of if startdate after NextStartDate - we have a new NextStartDate + } //end of if set NextStartDate + else { + $NextStartDate = ConvertSQLDate($myrow['startdate']); + } + $StartDate = $myrow['startdate']; + $EndDate = $myrow['enddate']; + } } ?> \ No newline at end of file Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2011-04-16 06:20:56 UTC (rev 4551) +++ trunk/PrintCustTrans.php 2011-04-17 10:18:02 UTC (rev 4552) @@ -1,6 +1,6 @@ <?php /* $Id$ */ -//$PageSecurity = 1; + include ('includes/session.inc'); if (isset($_GET['FromTransNo'])) { $FromTransNo = trim($_GET['FromTransNo']); @@ -31,7 +31,6 @@ if (isset($PrintPDF) or isset($_GET['PrintPDF']) and $PrintPDF and isset($FromTransNo) and isset($InvOrCredit) and $FromTransNo != '') { $PaperSize = $FormDesign->PaperSize; include ('includes/PDFStarter.php'); - // Javier: now I use the native constructor, better to not use references if ($InvOrCredit == 'Invoice') { $pdf->addInfo('Title', _('Sales Invoice') . ' ' . $FromTransNo . ' to ' . $_POST['ToTransNo']); $pdf->addInfo('Subject', _('Invoices from') . ' ' . $FromTransNo . ' ' . _('to') . ' ' . $_POST['ToTransNo']); @@ -39,11 +38,7 @@ $pdf->addInfo('Title', _('Sales Credit Note')); $pdf->addInfo('Subject', _('Credit Notes from') . ' ' . $FromTransNo . ' ' . _('to') . ' ' . $_POST['ToTransNo']); } - /* Javier: I have brought this piece from the pdf class constructor to get it closer to the admin/user, - I corrected it to match TCPDF, but it still needs some check, after which, - I think it should be moved to each report to provide flexible Document Header and Margins in a per-report basis. */ - /* END Brought from class.pdf.php constructor */ - // $pdf->selectFont('helvetica'); + $FirstPage = true; $line_height = $FormDesign->LineHeight; while ($FromTransNo <= $_POST['ToTransNo']) { @@ -167,7 +162,7 @@ AND debtortrans.branchcode=custbranch.branchcode AND custbranch.salesman=salesman.salesmancode"; if ($_POST['PrintEDI'] == 'No') { - $sql = $sql . ' AND debtorsmaster.ediinvoices=0'; + $sql = $sql . " AND debtorsmaster.ediinvoices=0"; } } // end else if ($FromTransNo!='Preview') { @@ -177,7 +172,7 @@ include ('includes/header.inc'); prnMsg(_('There was a problem retrieving the invoice or credit note details for note number') . ' ' . $InvoiceToPrint . ' ' . _('from the database') . '. ' . _('To print an invoice, the sales order record, the customer transaction record and the branch record for the customer must not have been purged') . '. ' . _('To print a credit note only requires the customer, transaction, salesman and branch records be available'), 'error'); if ($debug == 1) { - prnMsg(_('The SQL used to get this information that failed was') . "<br />" . $sql, 'error'); + prnMsg(_('The SQL used to get this information that failed was') . '<br />' . $sql, 'error'); } include ('includes/footer.inc'); exit; @@ -230,9 +225,9 @@ if (DB_error_no($db) != 0) { $title = _('Transaction Print Error Report'); include ('includes/header.inc'); - echo '<br>' . _('There was a problem retrieving the invoice or credit note stock movement details for invoice number') . ' ' . $FromTransNo . ' ' . _('from the database'); + echo '<br />' . _('There was a problem retrieving the invoice or credit note stock movement details for invoice number') . ' ' . $FromTransNo . ' ' . _('from the database'); if ($debug == 1) { - echo '<br>' . _('The SQL used to get this information that failed was') . "<br>$sql"; + echo '<br />' . _('The SQL used to get this information that failed was') . '<br />' . $sql; } include ('includes/footer.inc'); exit; @@ -389,36 +384,40 @@ include ('includes/header.inc'); if (!isset($FromTransNo) OR $FromTransNo == '') { /* if FromTransNo is not set then show a form to allow input of either a single invoice number or a range of invoices to be printed. Also get the last invoice number created to show the user where the current range is up to */ - echo "<form action='" . $_SERVER['PHP_SELF'] . '?' . SID . "' method='POST'><table class='selection'>"; + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST"> + <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . _('Print Invoices or Credit Notes (Landscape Mode)') . '</p>'; echo '<tr><td>' . _('Print Invoices or Credit Notes') . '</td><td><select name=InvOrCredit>'; if ($InvOrCredit == 'Invoice' OR !isset($InvOrCredit)) { - echo "<option selected VALUE='Invoice'>" . _('Invoices'); - echo "<option VALUE='Credit'>" . _('Credit Notes'); + echo '<option selected value="Invoice">' . _('Invoices') . '</option>'; + echo '<option value="Credit">' . _('Credit Notes'). '</option>'; } else { - echo "<option selected VALUE='Credit'>" . _('Credit Notes'); - echo "<option VALUE='Invoice'>" . _('Invoices'); + echo '<option selected value="Credit">' . _('Credit Notes') . '</option>'; + echo '<option value="Invoice">' . _('Invoices') . '</option>'; } echo '</select></td></tr>'; echo '<tr><td>' . _('Print EDI Transactions') . '</td><td><select name=PrintEDI>'; if ($InvOrCredit == 'Invoice' OR !isset($InvOrCredit)) { - echo "<option selected VALUE='No'>" . _('Do not Print PDF EDI Transactions'); - echo "<option VALUE='Yes'>" . _('Print PDF EDI Transactions Too'); + echo '<option selected value="No">' . _('Do not Print PDF EDI Transactions') . '</option>'; + echo '<option value="Yes">' . _('Print PDF EDI Transactions Too') . '</option>'; } else { - echo "<option VALUE='No'>" . _('Do not Print PDF EDI Transactions'); - echo "<option selected VALUE='Yes'>" . _('Print PDF EDI Transactions Too'); + echo '<option value="No">' . _('Do not Print PDF EDI Transactions') . '</option>'; + echo '<option selected value="Yes">' . _('Print PDF EDI Transactions Too') . '</option>'; } echo '</select></td></tr>'; - echo '<tr><td>' . _('Start invoice/credit note number to print') . '</td><td><input Type=text class=number max=6 size=7 name=FromTransNo></td></tr>'; - echo '<tr><td>' . _('End invoice/credit note number to print') . "</td><td><input Type=text class=number max=6 size=7 name='ToTransNo'></td></tr></table>"; - echo "<br><div class='centre'><input type=Submit Name='Print' Value='" . _('Print') . "'><p>"; - echo "<input type=Submit Name='PrintPDF' Value='" . _('Print PDF') . "'></div>"; - $sql = 'SELECT typeno FROM systypes WHERE typeid=10'; + echo '<tr><td>' . _('Start invoice/credit note number to print') . '</td> + <td><input type="text" class="number" max=6 size=7 name=FromTransNo></td></tr>'; + echo '<tr><td>' . _('End invoice/credit note number to print') . '</td> + <td><input Type="text" class="number" max=6 size=7 name="ToTransNo"></td> + </tr></table>'; + echo '<br /><div class="centre"><input type="submit" name="Print" value="' . _('Print') . '"><p />'; + echo '<input type="submit" name="PrintPDF" value="' . _('Print PDF') . '"></div>'; + $sql = "SELECT typeno FROM systypes WHERE typeid=10"; $result = DB_query($sql, $db); $myrow = DB_fetch_row($result); - echo '<div class="page_help_text"><b>' . _('The last invoice created was number') . ' ' . $myrow[0] . '</b><br>' . _('If only a single invoice is required') . ', ' . _('enter the invoice number to print in the Start transaction number to print field and leave the End transaction number to print field blank') . '. ' . _('Only use the end invoice to print field if you wish to print a sequential range of invoices') . ''; - $sql = 'SELECT typeno FROM systypes WHERE typeid=11'; + echo '<div class="page_help_text"><b>' . _('The last invoice created was number') . ' ' . $myrow[0] . '</b><br />' . _('If only a single invoice is required') . ', ' . _('enter the invoice number to print in the Start transaction number to print field and leave the End transaction number to print field blank') . '. ' . _('Only use the end invoice to print field if you wish to print a sequential range of invoices') . ''; + $sql = "SELECT typeno FROM systypes WHERE typeid=11"; $result = DB_query($sql, $db); $myrow = DB_fetch_row($result); echo '<br /><b>' . _('The last credit note created was number') . ' ' . $myrow[0] . '</b><br />' . @@ -518,12 +517,9 @@ } $result = DB_query($sql, $db); if (DB_num_rows($result) == 0 OR DB_error_no($db) != 0) { - echo '<div class="page_help_text">' . _('There was a problem retrieving the invoice or credit note details for note number') . - ' ' . $FromTransNo . ' ' . _('from the database') . '. ' . - _('To print an invoice, the sales order record, the customer transaction record and the branch record for the customer must not have been purged') . - '. ' . _('To print a credit note only requires the customer, transaction, salesman and branch records be available').'</div>'; + echo '<div class="page_help_text">' . _('There was a problem retrieving the invoice or credit note details for note number') . ' ' . $FromTransNo . ' ' . _('from the database') . '. ' . _('To print an invoice, the sales order record, the customer transaction record and the branch record for the customer must not have been purged') . '. ' . _('To print a credit note only requires the customer, transaction, salesman and branch records be available').'</div>'; if ($debug == 1) { - echo _('The SQL used to get this information that failed was') . "<br>$sql"; + echo _('The SQL used to get this information that failed was') . "<br />$sql"; } break; include ('includes/footer.inc'); @@ -543,22 +539,22 @@ } else { echo '<font color=RED size=4>' . _('TAX CREDIT NOTE') . ' '; } - echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br><font size=1>' . _('Tax Authority Ref') . '. ' . $_SESSION['CompanyRecord']['gstno'] . '</td></tr></table>'; + echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br /><font size=1>' . _('Tax Authority Ref') . '. ' . $_SESSION['CompanyRecord']['gstno'] . '</td></tr></table>'; /* Now print out the logo and company name and address */ - echo '<table class="table1"><tr><td><font size=4 color="#333333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font><br>'; - echo $_SESSION['CompanyRecord']['regoffice1'] . '<br>'; - echo $_SESSION['CompanyRecord']['regoffice2'] . '<br>'; - echo $_SESSION['CompanyRecord']['regoffice3'] . '<br>'; - echo $_SESSION['CompanyRecord']['regoffice4'] . '<br>'; - echo $_SESSION['CompanyRecord']['regoffice5'] . '<br>'; - echo $_SESSION['CompanyRecord']['regoffice6'] . '<br>'; - echo _('Telephone') . ': ' . $_SESSION['CompanyRecord']['telephone'] . '<br>'; - echo _('Facsimile') . ': ' . $_SESSION['CompanyRecord']['fax'] . '<br>'; - echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br>'; + echo '<table class="table1"><tr><td><font size=4 color="#333333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font><br />'; + echo $_SESSION['CompanyRecord']['regoffice1'] . '<br />'; + echo $_SESSION['CompanyRecord']['regoffice2'] . '<br />'; + echo $_SESSION['CompanyRecord']['regoffice3'] . '<br />'; + echo $_SESSION['CompanyRecord']['regoffice4'] . '<br />'; + echo $_SESSION['CompanyRecord']['regoffice5'] . '<br />'; + echo $_SESSION['CompanyRecord']['regoffice6'] . '<br />'; + echo _('Telephone') . ': ' . $_SESSION['CompanyRecord']['telephone'] . '<br />'; + echo _('Facsimile') . ': ' . $_SESSION['CompanyRecord']['fax'] . '<br />'; + echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br />'; echo '</td><td WIDTH=50% class=number>'; /* Now the customer charged to details in a sub table within a cell of the main table*/ echo '<table class="table1"><tr><td align=left bgcolor="#BBBBBB"><b>' . _('Charge To') . ':</b></td></tr><tr><td bgcolor="#EEEEEE">'; - echo $myrow['name'] . '<br>' . $myrow['address1'] . '<br>' . $myrow['address2'] . '<br>' . $myrow['address3'] . '<br>' . $myrow['address4'] . '<br>' . $myrow['address5'] . '<br>' . $myrow['address6']; + echo $myrow['name'] . '<br />' . $myrow['address1'] . '<br />' . $myrow['address2'] . '<br />' . $myrow['address3'] . '<br />' . $myrow['address4'] . '<br />' . $myrow['address5'] . '<br />' . $myrow['address6']; echo '</td></tr></table>'; /*end of the small table showing charge to account details */ echo _('Page') . ': ' . $PageNumber; @@ -571,8 +567,8 @@ <td align=left bgcolor="#BBBBBB"><b>' . _('Delivered To') . ':</b></td> </tr>'; echo '<tr> - <td bgcolor="#EEEEEE">' . $myrow['brname'] . '<br>' . $myrow['braddress1'] . '<br>' . $myrow['braddress2'] . '<br>' . $myrow['braddress3'] . '<br>' . $myrow['braddress4'] . '<br>' . $myrow['braddress5'] . '<br>' . $myrow['braddress6'] . '</td>'; - echo '<td bgcolor="#EEEEEE">' . $myrow['deliverto'] . '<br>' . $myrow['deladd1'] . '<br>' . $myrow['deladd2'] . '<br>' . $myrow['deladd3'] . '<br>' . $myrow['deladd4'] . '<br>' . $myrow['deladd5'] . '<br>' . $myrow['deladd6'] . '</td>'; + <td bgcolor="#EEEEEE">' . $myrow['brname'] . '<br />' . $myrow['braddress1'] . '<br />' . $myrow['braddress2'] . '<br />' . $myrow['braddress3'] . '<br />' . $myrow['braddress4'] . '<br />' . $myrow['braddress5'] . '<br />' . $myrow['braddress6'] . '</td>'; + echo '<td bgcolor="#EEEEEE">' . $myrow['deliverto'] . '<br />' . $myrow['deladd1'] . '<br />' . $myrow['deladd2'] . '<br />' . $myrow['deladd3'] . '<br />' . $myrow['deladd4'] . '<br />' . $myrow['deladd5'] . '<br />' . $myrow['deladd6'] . '</td>'; echo '</tr> </table><hr>'; echo '<table class="table1"> @@ -614,7 +610,7 @@ <td align=left bgcolor="#BBBBBB"><b>' . _('Branch') . ':</b></td> </tr>'; echo '<tr> - <td bgcolor="#EEEEEE">' . $myrow['brname'] . '<br>' . $myrow['braddress1'] . '<br>' . $myrow['braddress2'] . '<br>' . $myrow['braddress3'] . '<br>' . $myrow['braddress4'] . '<br>' . $myrow['braddress5'] . '<br>' . $myrow['braddress6'] . '</td> + <td bgcolor="#EEEEEE">' . $myrow['brname'] . '<br />' . $myrow['braddress1'] . '<br />' . $myrow['braddress2'] . '<br />' . $myrow['braddress3'] . '<br />' . $myrow['braddress4'] . '<br />' . $myrow['braddress5'] . '<br />' . $myrow['braddress6'] . '</td> </tr></table>'; echo '<hr><table class="table1"><tr> <td align=left bgcolor="#BBBBBB"><b>' . _('Date') . '</b></td> @@ -643,7 +639,7 @@ if (DB_error_no($db) != 0) { echo '<div class="page_help_text">' . _('There was a problem retrieving the invoice or credit note stock movement details for invoice number') . ' ' . $FromTransNo . ' ' . _('from the database').'</div>'; if ($debug == 1) { - echo '<br>' . _('The SQL used to get this information that failed was') . '<br>'.$sql; + echo '<br />' . _('The SQL used to get this information that failed was') . '<br />'.$sql; } exit; } @@ -700,16 +696,16 @@ echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br /><font size=1>' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno... [truncated message content] |
From: <dai...@us...> - 2011-04-17 10:18:10
|
Revision: 4552 http://web-erp.svn.sourceforge.net/web-erp/?rev=4552&view=rev Author: daintree Date: 2011-04-17 10:18:02 +0000 (Sun, 17 Apr 2011) Log Message: ----------- various Modified Paths: -------------- trunk/PO_Header.php trunk/Prices_Customer.php trunk/PrintCustTrans.php trunk/RecurringSalesOrders.php trunk/SupplierTypes.php trunk/includes/OutputSerialItems.php Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-04-16 06:20:56 UTC (rev 4551) +++ trunk/PO_Header.php 2011-04-17 10:18:02 UTC (rev 4552) @@ -766,7 +766,7 @@ if($_SESSION['ExistingOrder'] != 0 AND $_SESSION['PO'.$identifier]->Status == 'Printed'){ - echo '<tr><td><a href="' . $rootpath . '/GoodsReceived.php?' . SID . '&PONumber=' . + echo '<tr><td><a href="' . $rootpath . '/GoodsReceived.php?PONumber=' . $_SESSION['PO'.$identifier]->OrderNo . '&identifier=' . $identifier . '">'._('Receive this order').'</a></td></tr>'; } if ($_SESSION['PO'.$identifier]->Status==''){ //then its a new order @@ -959,9 +959,9 @@ <td><input type="text" name="Tel" size="31" maxlength="30" value="' . $_SESSION['PO'.$identifier]->Tel . '"></td> </tr>'; - echo '<tr><td>' . _('Delivery By') . ':</td><td><select name=DeliveryBy>'; + echo '<tr><td>' . _('Delivery By') . ':</td><td><select name="DeliveryBy">'; - $ShipperResult = DB_query('SELECT shipper_id, shippername FROM shippers',$db); + $ShipperResult = DB_query("SELECT shipper_id, shippername FROM shippers",$db); while ($ShipperRow=DB_fetch_array($ShipperResult)){ if (isset($_POST['DeliveryBy']) and ($_POST['DeliveryBy'] == $ShipperRow['shipper_id'])) { @@ -978,7 +978,7 @@ echo '<table class=selection width=100%><tr><td>' . _('Supplier Selection') . ':</td><td> <select name=Keywords onChange="ReloadForm(form1.SearchSuppliers)">'; - $SuppCoResult = DB_query('SELECT supplierid, suppname FROM suppliers ORDER BY suppname',$db); + $SuppCoResult = DB_query("SELECT supplierid, suppname FROM suppliers ORDER BY suppname",$db); while ( $SuppCoRow=DB_fetch_array($SuppCoResult)){ if ($SuppCoRow['suppname'] == $_SESSION['PO'.$identifier]->SupplierName) { @@ -1029,9 +1029,10 @@ </td><td><input type="text" name="SuppTel" size="31" maxlength="30" value="' . $_SESSION['PO'.$identifier]->SuppTel . '"></td> </tr>'; - $result=DB_query('SELECT terms, termsindicator FROM paymentterms', $db); + $result=DB_query("SELECT terms, termsindicator FROM paymentterms", $db); - echo '<tr><td>' . _('Payment Terms') . ':</td><td><select name="PaymentTerms">'; + echo '<tr><td>' . _('Payment Terms') . ':</td> + <td><select name="PaymentTerms">'; while ($myrow = DB_fetch_array($result)) { if ($myrow['termsindicator']==$_SESSION['PO'.$identifier]->PaymentTerms) { @@ -1054,8 +1055,9 @@ </tr>'; if ($_SESSION['PO'.$identifier]->CurrCode != $_SESSION['CompanyRecord']['currencydefault']) { - echo '<tr><td>'. _('Exchange Rate').':'.'</td><td><input type=text name="ExRate" - value='.$_POST['ExRate'].' class=number size=11></td></tr>'; + echo '<tr><td>'. _('Exchange Rate').':'.'</td> + <td><input type=text name="ExRate" value='.$_POST['ExRate'].' class="number" size=11></td> + </tr>'; } else { echo '<input type=hidden name="ExRate" value="1">'; } Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2011-04-16 06:20:56 UTC (rev 4551) +++ trunk/Prices_Customer.php 2011-04-17 10:18:02 UTC (rev 4552) @@ -1,7 +1,5 @@ <?php -/* $Revision: 1.11 $ */ /* $Id$*/ -//$PageSecurity = 11; include('includes/session.inc'); @@ -275,158 +273,142 @@ } else { $EndDateDisplay = ConvertSQLDate($myrow['enddate']); } - printf("<tr bgcolor='#CCCCCC'> - <td class=number>%0.2f</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href='%s?Item=%s&Price=%s&Branch=%s&StartDate=%s&EndDate=%s&Edit=1'>" . _('Edit') . "</td> - <td><a href='%s?Item=%s&Branch=%s&StartDate=%s&EndDate=%s&delete=yes'>" . _('Delete') . "</td></tr>", - $myrow['price'], - $Branch, - ConvertSQLDate($myrow['startdate']), - $EndDateDisplay, - $_SERVER['PHP_SELF'], - $Item, - $myrow['price'], - $myrow['branchcode'], - $myrow['startdate'], - $myrow['enddate'], - $_SERVER['PHP_SELF'], - $Item, - $myrow['branchcode'], - $myrow['startdate'], - $myrow['enddate']); + echo '<tr bgcolor="#CCCCCC"> + <td class=number>'.number_format($myrow['price'],2).'</td> + <td>'.$Branch.'</td> + <td>'.$myrow['units'].'</td> + <td class=number>'.$myrow['conversionfactor'].'</td> + <td>'.ConvertSQLDate($myrow['startdate']).'</td> + <td>'.$EndDateDisplay.'</td> + <td><a href="'.$_SERVER['PHP_SELF'].'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode']. + '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td> + <td><a href="'.$_SERVER['PHP_SELF'].'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'] .'&EndDate='.$myrow['enddate'].'&delete=yes">' . _('Delete') . '</td></tr>'; + } //END WHILE LIST LOOP } -?> +echo '</table></tr></table><p />'; -</table></tr></table> +echo '<form method="post" action=' . $_SERVER['PHP_SELF'] . '?' . SID . '>'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<input type=hidden name="Item" VALUE="' . $Item . '">'; -<p> - -<?php - echo '<form method="post" action=' . $_SERVER['PHP_SELF'] . '?' . SID . '>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<input type=hidden name="Item" VALUE="' . $Item . '">'; - - if (isset($_GET['Edit']) and $_GET['Edit']==1){ - echo '<input type=hidden name="Editing" VALUE="Yes">'; - echo '<input type=hidden name="OldStartDate" VALUE="' . $_GET['StartDate'] .'">'; - echo '<input type=hidden name="OldEndDate" VALUE="' . $_GET['EndDate'] . '">'; - $_POST['Price']=$_GET['Price']; - $_POST['Branch']=$_GET['Branch']; - $_POST['StartDate'] = ConvertSQLDate($_GET['StartDate']); - if (Is_Date($_GET['EndDate'])){ - $_POST['EndDate'] = ConvertSQLDate($_GET['EndDate']); - } else { - $_POST['EndDate']=''; - } +if (isset($_GET['Edit']) and $_GET['Edit']==1){ + echo '<input type=hidden name="Editing" VALUE="Yes">'; + echo '<input type=hidden name="OldStartDate" VALUE="' . $_GET['StartDate'] .'">'; + echo '<input type=hidden name="OldEndDate" VALUE="' . $_GET['EndDate'] . '">'; + $_POST['Price']=$_GET['Price']; + $_POST['Branch']=$_GET['Branch']; + $_POST['StartDate'] = ConvertSQLDate($_GET['StartDate']); + if (Is_Date($_GET['EndDate'])){ + $_POST['EndDate'] = ConvertSQLDate($_GET['EndDate']); + } else { + $_POST['EndDate']=''; } - if (!isset($_POST['Branch'])) { - $_POST['Branch']=''; - } - if (!isset($_POST['Price'])) { - $_POST['Price']=0; - } +} +if (!isset($_POST['Branch'])) { + $_POST['Branch']=''; +} +if (!isset($_POST['Price'])) { + $_POST['Price']=0; +} - if (!isset($_POST['StartDate'])){ - $_POST['StartDate'] = Date($_SESSION['DefaultDateFormat']); - } +if (!isset($_POST['StartDate'])){ + $_POST['StartDate'] = Date($_SESSION['DefaultDateFormat']); +} - if (!isset($_POST['EndDate'])){ - $_POST['EndDate'] = DateAdd(Date($_SESSION['DefaultDateFormat']), 'y', 1); - } +if (!isset($_POST['EndDate'])){ + $_POST['EndDate'] = ''; +} - $sql = "SELECT - branchcode, - brname - FROM custbranch - WHERE debtorno='".$_SESSION['CustomerID'] ."'"; - $result = DB_query($sql, $db); - echo '<table class=selection>'; - echo '<tr><td>' . _('Branch') . ':</td>'; - echo '<td><select name="Branch"'; - while ($myrow=DB_fetch_array($result)) { - if ($myrow['branchcode']==$_POST['branch']) { - echo '<option selected value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>'; - } else { - echo '<option value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>'; - } +$sql = "SELECT + branchcode, + brname + FROM custbranch + WHERE debtorno='".$_SESSION['CustomerID'] ."'"; +$result = DB_query($sql, $db); +echo '<table class=selection>'; +echo '<tr><td>' . _('Branch') . ':</td>'; +echo '<td><select name="Branch"'; +while ($myrow=DB_fetch_array($result)) { + if ($myrow['branchcode']==$_POST['branch']) { + echo '<option selected value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>'; + } else { + echo '<option value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>'; } - echo '></td></tr>'; - echo '<tr><td>' . _('Start Date') . ':</td> - <td><input type="Text" name="StartDate" class=date alt='.$_SESSION['DefaultDateFormat']. - ' size=11 maxlength=10 value=' . $_POST['StartDate'] . '></td></tr>'; - echo '<tr><td>' . _('End Date') . ':</td> - <td><input type="Text" name="EndDate" class=date alt='.$_SESSION['DefaultDateFormat']. - ' size=11 maxlength=10 value=' . $_POST['EndDate'] . '></td></tr>'; +} +echo '></td></tr>'; +echo '<tr><td>' . _('Start Date') . ':</td> + <td><input type="Text" name="StartDate" class=date alt='.$_SESSION['DefaultDateFormat']. + ' size=11 maxlength=10 value=' . $_POST['StartDate'] . '></td></tr>'; +echo '<tr><td>' . _('End Date') . ':</td> + <td><input type="Text" name="EndDate" class=date alt='.$_SESSION['DefaultDateFormat']. + ' size=11 maxlength=10 value=' . $_POST['EndDate'] . '></td></tr>'; - echo '<tr><td>' . _('Price') . ':</td> - <td><input type="Text" class=number name="Price" size=11 maxlength=10 value=' . $_POST['Price'] . '></td> - </tr></table>'; +echo '<tr><td>' . _('Price') . ':</td> + <td><input type="Text" class=number name="Price" size=11 maxlength=10 value=' . $_POST['Price'] . '></td> + </tr></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>'; - include('includes/footer.inc'); +echo '</form>'; +include('includes/footer.inc'); - function ReSequenceEffectiveDates ($Item, $PriceList, $CurrAbbrev, $CustomerID, $db) { +function ReSequenceEffectiveDates ($Item, $PriceList, $CurrAbbrev, $CustomerID, $db) { - /*This is quite complicated - the idea is that prices set up should be unique and there is no way two prices could be returned as valid - when getting a price in includes/GetPrice.inc the logic is to first look for a price of the salestype/currency within the effective start and end dates - then if not get the price with a start date prior but a blank end date (the default price). We would not want two prices where the effective dates fall between an existing price so it is necessary to update enddates of prices - with me - I am just hanging on here myself + /*This is quite complicated - the idea is that prices set up should be unique and there is no way two prices could be returned as valid - when getting a price in includes/GetPrice.inc the logic is to first look for a price of the salestype/currency within the effective start and end dates - then if not get the price with a start date prior but a blank end date (the default price). We would not want two prices where the effective dates fall between an existing price so it is necessary to update enddates of prices - with me - I am just hanging on here myself - Prices with no end date are default prices and need to be ignored in this resquence*/ + Prices with no end date are default prices and need to be ignored in this resquence*/ - $SQL = "SELECT branchcode, - startdate, - enddate - FROM prices - WHERE debtorno='" . $CustomerID . "' - AND stockid='" . $Item . "' - AND currabrev='" . $CurrAbbrev . "' - AND typeabbrev='" . $PriceList . "' - AND enddate<>'' - ORDER BY - branchcode, - startdate, - enddate"; + $SQL = "SELECT branchcode, + startdate, + enddate + FROM prices + WHERE debtorno='" . $CustomerID . "' + AND stockid='" . $Item . "' + AND currabrev='" . $CurrAbbrev . "' + AND typeabbrev='" . $PriceList . "' + AND enddate<>'' + ORDER BY + branchcode, + startdate, + enddate"; - $result = DB_query($SQL,$db); + $result = DB_query($SQL,$db); - unset($BranchCode); + unset($BranchCode); - while ($myrow = DB_fetch_array($result)){ - if (!isset($BranchCode)){ - unset($NextDefaultStartDate); //a price with a blank end date - unset($NextStartDate); - unset($EndDate); - unset($StartDate); - $BranchCode = $myrow['branchcode']; - } - if (isset($NextStartDate)){ - if (Date1GreaterThanDate2(ConvertSQLDate($myrow['startdate']),$NextStartDate)){ - $NextStartDate = ConvertSQLDate($myrow['startdate']); - if (Date1GreaterThanDate2(ConvertSQLDate($EndDate),ConvertSQLDate($myrow['startdate']))) { - /*Need to make the end date the new start date less 1 day */ - $SQL = "UPDATE prices SET enddate = '" . FormatDateForSQL(DateAdd($NextStartDate,'d',-1)) . "' - WHERE stockid ='" .$Item . "' - AND currabrev='" . $CurrAbbrev . "' - AND typeabbrev='" . $PriceList . "' - AND startdate ='" . $StartDate . "' - AND enddate = '" . $EndDate . "' - AND debtorno ='" . $CustomerID . "'"; - $UpdateResult = DB_query($SQL,$db); - } - } //end of if startdate after NextStartDate - we have a new NextStartDate - } //end of if set NextStartDate - else { - $NextStartDate = ConvertSQLDate($myrow['startdate']); - } - $StartDate = $myrow['startdate']; - $EndDate = $myrow['enddate']; + while ($myrow = DB_fetch_array($result)){ + if (!isset($BranchCode)){ + unset($NextDefaultStartDate); //a price with a blank end date + unset($NextStartDate); + unset($EndDate); + unset($StartDate); + $BranchCode = $myrow['branchcode']; } + if (isset($NextStartDate)){ + if (Date1GreaterThanDate2(ConvertSQLDate($myrow['startdate']),$NextStartDate)){ + $NextStartDate = ConvertSQLDate($myrow['startdate']); + if (Date1GreaterThanDate2(ConvertSQLDate($EndDate),ConvertSQLDate($myrow['startdate']))) { + /*Need to make the end date the new start date less 1 day */ + $SQL = "UPDATE prices SET enddate = '" . FormatDateForSQL(DateAdd($NextStartDate,'d',-1)) . "' + WHERE stockid ='" .$Item . "' + AND currabrev='" . $CurrAbbrev . "' + AND typeabbrev='" . $PriceList . "' + AND startdate ='" . $StartDate . "' + AND enddate = '" . $EndDate . "' + AND debtorno ='" . $CustomerID . "'"; + $UpdateResult = DB_query($SQL,$db); + } + } //end of if startdate after NextStartDate - we have a new NextStartDate + } //end of if set NextStartDate + else { + $NextStartDate = ConvertSQLDate($myrow['startdate']); + } + $StartDate = $myrow['startdate']; + $EndDate = $myrow['enddate']; + } } ?> \ No newline at end of file Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2011-04-16 06:20:56 UTC (rev 4551) +++ trunk/PrintCustTrans.php 2011-04-17 10:18:02 UTC (rev 4552) @@ -1,6 +1,6 @@ <?php /* $Id$ */ -//$PageSecurity = 1; + include ('includes/session.inc'); if (isset($_GET['FromTransNo'])) { $FromTransNo = trim($_GET['FromTransNo']); @@ -31,7 +31,6 @@ if (isset($PrintPDF) or isset($_GET['PrintPDF']) and $PrintPDF and isset($FromTransNo) and isset($InvOrCredit) and $FromTransNo != '') { $PaperSize = $FormDesign->PaperSize; include ('includes/PDFStarter.php'); - // Javier: now I use the native constructor, better to not use references if ($InvOrCredit == 'Invoice') { $pdf->addInfo('Title', _('Sales Invoice') . ' ' . $FromTransNo . ' to ' . $_POST['ToTransNo']); $pdf->addInfo('Subject', _('Invoices from') . ' ' . $FromTransNo . ' ' . _('to') . ' ' . $_POST['ToTransNo']); @@ -39,11 +38,7 @@ $pdf->addInfo('Title', _('Sales Credit Note')); $pdf->addInfo('Subject', _('Credit Notes from') . ' ' . $FromTransNo . ' ' . _('to') . ' ' . $_POST['ToTransNo']); } - /* Javier: I have brought this piece from the pdf class constructor to get it closer to the admin/user, - I corrected it to match TCPDF, but it still needs some check, after which, - I think it should be moved to each report to provide flexible Document Header and Margins in a per-report basis. */ - /* END Brought from class.pdf.php constructor */ - // $pdf->selectFont('helvetica'); + $FirstPage = true; $line_height = $FormDesign->LineHeight; while ($FromTransNo <= $_POST['ToTransNo']) { @@ -167,7 +162,7 @@ AND debtortrans.branchcode=custbranch.branchcode AND custbranch.salesman=salesman.salesmancode"; if ($_POST['PrintEDI'] == 'No') { - $sql = $sql . ' AND debtorsmaster.ediinvoices=0'; + $sql = $sql . " AND debtorsmaster.ediinvoices=0"; } } // end else if ($FromTransNo!='Preview') { @@ -177,7 +172,7 @@ include ('includes/header.inc'); prnMsg(_('There was a problem retrieving the invoice or credit note details for note number') . ' ' . $InvoiceToPrint . ' ' . _('from the database') . '. ' . _('To print an invoice, the sales order record, the customer transaction record and the branch record for the customer must not have been purged') . '. ' . _('To print a credit note only requires the customer, transaction, salesman and branch records be available'), 'error'); if ($debug == 1) { - prnMsg(_('The SQL used to get this information that failed was') . "<br />" . $sql, 'error'); + prnMsg(_('The SQL used to get this information that failed was') . '<br />' . $sql, 'error'); } include ('includes/footer.inc'); exit; @@ -230,9 +225,9 @@ if (DB_error_no($db) != 0) { $title = _('Transaction Print Error Report'); include ('includes/header.inc'); - echo '<br>' . _('There was a problem retrieving the invoice or credit note stock movement details for invoice number') . ' ' . $FromTransNo . ' ' . _('from the database'); + echo '<br />' . _('There was a problem retrieving the invoice or credit note stock movement details for invoice number') . ' ' . $FromTransNo . ' ' . _('from the database'); if ($debug == 1) { - echo '<br>' . _('The SQL used to get this information that failed was') . "<br>$sql"; + echo '<br />' . _('The SQL used to get this information that failed was') . '<br />' . $sql; } include ('includes/footer.inc'); exit; @@ -389,36 +384,40 @@ include ('includes/header.inc'); if (!isset($FromTransNo) OR $FromTransNo == '') { /* if FromTransNo is not set then show a form to allow input of either a single invoice number or a range of invoices to be printed. Also get the last invoice number created to show the user where the current range is up to */ - echo "<form action='" . $_SERVER['PHP_SELF'] . '?' . SID . "' method='POST'><table class='selection'>"; + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST"> + <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . _('Print Invoices or Credit Notes (Landscape Mode)') . '</p>'; echo '<tr><td>' . _('Print Invoices or Credit Notes') . '</td><td><select name=InvOrCredit>'; if ($InvOrCredit == 'Invoice' OR !isset($InvOrCredit)) { - echo "<option selected VALUE='Invoice'>" . _('Invoices'); - echo "<option VALUE='Credit'>" . _('Credit Notes'); + echo '<option selected value="Invoice">' . _('Invoices') . '</option>'; + echo '<option value="Credit">' . _('Credit Notes'). '</option>'; } else { - echo "<option selected VALUE='Credit'>" . _('Credit Notes'); - echo "<option VALUE='Invoice'>" . _('Invoices'); + echo '<option selected value="Credit">' . _('Credit Notes') . '</option>'; + echo '<option value="Invoice">' . _('Invoices') . '</option>'; } echo '</select></td></tr>'; echo '<tr><td>' . _('Print EDI Transactions') . '</td><td><select name=PrintEDI>'; if ($InvOrCredit == 'Invoice' OR !isset($InvOrCredit)) { - echo "<option selected VALUE='No'>" . _('Do not Print PDF EDI Transactions'); - echo "<option VALUE='Yes'>" . _('Print PDF EDI Transactions Too'); + echo '<option selected value="No">' . _('Do not Print PDF EDI Transactions') . '</option>'; + echo '<option value="Yes">' . _('Print PDF EDI Transactions Too') . '</option>'; } else { - echo "<option VALUE='No'>" . _('Do not Print PDF EDI Transactions'); - echo "<option selected VALUE='Yes'>" . _('Print PDF EDI Transactions Too'); + echo '<option value="No">' . _('Do not Print PDF EDI Transactions') . '</option>'; + echo '<option selected value="Yes">' . _('Print PDF EDI Transactions Too') . '</option>'; } echo '</select></td></tr>'; - echo '<tr><td>' . _('Start invoice/credit note number to print') . '</td><td><input Type=text class=number max=6 size=7 name=FromTransNo></td></tr>'; - echo '<tr><td>' . _('End invoice/credit note number to print') . "</td><td><input Type=text class=number max=6 size=7 name='ToTransNo'></td></tr></table>"; - echo "<br><div class='centre'><input type=Submit Name='Print' Value='" . _('Print') . "'><p>"; - echo "<input type=Submit Name='PrintPDF' Value='" . _('Print PDF') . "'></div>"; - $sql = 'SELECT typeno FROM systypes WHERE typeid=10'; + echo '<tr><td>' . _('Start invoice/credit note number to print') . '</td> + <td><input type="text" class="number" max=6 size=7 name=FromTransNo></td></tr>'; + echo '<tr><td>' . _('End invoice/credit note number to print') . '</td> + <td><input Type="text" class="number" max=6 size=7 name="ToTransNo"></td> + </tr></table>'; + echo '<br /><div class="centre"><input type="submit" name="Print" value="' . _('Print') . '"><p />'; + echo '<input type="submit" name="PrintPDF" value="' . _('Print PDF') . '"></div>'; + $sql = "SELECT typeno FROM systypes WHERE typeid=10"; $result = DB_query($sql, $db); $myrow = DB_fetch_row($result); - echo '<div class="page_help_text"><b>' . _('The last invoice created was number') . ' ' . $myrow[0] . '</b><br>' . _('If only a single invoice is required') . ', ' . _('enter the invoice number to print in the Start transaction number to print field and leave the End transaction number to print field blank') . '. ' . _('Only use the end invoice to print field if you wish to print a sequential range of invoices') . ''; - $sql = 'SELECT typeno FROM systypes WHERE typeid=11'; + echo '<div class="page_help_text"><b>' . _('The last invoice created was number') . ' ' . $myrow[0] . '</b><br />' . _('If only a single invoice is required') . ', ' . _('enter the invoice number to print in the Start transaction number to print field and leave the End transaction number to print field blank') . '. ' . _('Only use the end invoice to print field if you wish to print a sequential range of invoices') . ''; + $sql = "SELECT typeno FROM systypes WHERE typeid=11"; $result = DB_query($sql, $db); $myrow = DB_fetch_row($result); echo '<br /><b>' . _('The last credit note created was number') . ' ' . $myrow[0] . '</b><br />' . @@ -518,12 +517,9 @@ } $result = DB_query($sql, $db); if (DB_num_rows($result) == 0 OR DB_error_no($db) != 0) { - echo '<div class="page_help_text">' . _('There was a problem retrieving the invoice or credit note details for note number') . - ' ' . $FromTransNo . ' ' . _('from the database') . '. ' . - _('To print an invoice, the sales order record, the customer transaction record and the branch record for the customer must not have been purged') . - '. ' . _('To print a credit note only requires the customer, transaction, salesman and branch records be available').'</div>'; + echo '<div class="page_help_text">' . _('There was a problem retrieving the invoice or credit note details for note number') . ' ' . $FromTransNo . ' ' . _('from the database') . '. ' . _('To print an invoice, the sales order record, the customer transaction record and the branch record for the customer must not have been purged') . '. ' . _('To print a credit note only requires the customer, transaction, salesman and branch records be available').'</div>'; if ($debug == 1) { - echo _('The SQL used to get this information that failed was') . "<br>$sql"; + echo _('The SQL used to get this information that failed was') . "<br />$sql"; } break; include ('includes/footer.inc'); @@ -543,22 +539,22 @@ } else { echo '<font color=RED size=4>' . _('TAX CREDIT NOTE') . ' '; } - echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br><font size=1>' . _('Tax Authority Ref') . '. ' . $_SESSION['CompanyRecord']['gstno'] . '</td></tr></table>'; + echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br /><font size=1>' . _('Tax Authority Ref') . '. ' . $_SESSION['CompanyRecord']['gstno'] . '</td></tr></table>'; /* Now print out the logo and company name and address */ - echo '<table class="table1"><tr><td><font size=4 color="#333333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font><br>'; - echo $_SESSION['CompanyRecord']['regoffice1'] . '<br>'; - echo $_SESSION['CompanyRecord']['regoffice2'] . '<br>'; - echo $_SESSION['CompanyRecord']['regoffice3'] . '<br>'; - echo $_SESSION['CompanyRecord']['regoffice4'] . '<br>'; - echo $_SESSION['CompanyRecord']['regoffice5'] . '<br>'; - echo $_SESSION['CompanyRecord']['regoffice6'] . '<br>'; - echo _('Telephone') . ': ' . $_SESSION['CompanyRecord']['telephone'] . '<br>'; - echo _('Facsimile') . ': ' . $_SESSION['CompanyRecord']['fax'] . '<br>'; - echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br>'; + echo '<table class="table1"><tr><td><font size=4 color="#333333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font><br />'; + echo $_SESSION['CompanyRecord']['regoffice1'] . '<br />'; + echo $_SESSION['CompanyRecord']['regoffice2'] . '<br />'; + echo $_SESSION['CompanyRecord']['regoffice3'] . '<br />'; + echo $_SESSION['CompanyRecord']['regoffice4'] . '<br />'; + echo $_SESSION['CompanyRecord']['regoffice5'] . '<br />'; + echo $_SESSION['CompanyRecord']['regoffice6'] . '<br />'; + echo _('Telephone') . ': ' . $_SESSION['CompanyRecord']['telephone'] . '<br />'; + echo _('Facsimile') . ': ' . $_SESSION['CompanyRecord']['fax'] . '<br />'; + echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br />'; echo '</td><td WIDTH=50% class=number>'; /* Now the customer charged to details in a sub table within a cell of the main table*/ echo '<table class="table1"><tr><td align=left bgcolor="#BBBBBB"><b>' . _('Charge To') . ':</b></td></tr><tr><td bgcolor="#EEEEEE">'; - echo $myrow['name'] . '<br>' . $myrow['address1'] . '<br>' . $myrow['address2'] . '<br>' . $myrow['address3'] . '<br>' . $myrow['address4'] . '<br>' . $myrow['address5'] . '<br>' . $myrow['address6']; + echo $myrow['name'] . '<br />' . $myrow['address1'] . '<br />' . $myrow['address2'] . '<br />' . $myrow['address3'] . '<br />' . $myrow['address4'] . '<br />' . $myrow['address5'] . '<br />' . $myrow['address6']; echo '</td></tr></table>'; /*end of the small table showing charge to account details */ echo _('Page') . ': ' . $PageNumber; @@ -571,8 +567,8 @@ <td align=left bgcolor="#BBBBBB"><b>' . _('Delivered To') . ':</b></td> </tr>'; echo '<tr> - <td bgcolor="#EEEEEE">' . $myrow['brname'] . '<br>' . $myrow['braddress1'] . '<br>' . $myrow['braddress2'] . '<br>' . $myrow['braddress3'] . '<br>' . $myrow['braddress4'] . '<br>' . $myrow['braddress5'] . '<br>' . $myrow['braddress6'] . '</td>'; - echo '<td bgcolor="#EEEEEE">' . $myrow['deliverto'] . '<br>' . $myrow['deladd1'] . '<br>' . $myrow['deladd2'] . '<br>' . $myrow['deladd3'] . '<br>' . $myrow['deladd4'] . '<br>' . $myrow['deladd5'] . '<br>' . $myrow['deladd6'] . '</td>'; + <td bgcolor="#EEEEEE">' . $myrow['brname'] . '<br />' . $myrow['braddress1'] . '<br />' . $myrow['braddress2'] . '<br />' . $myrow['braddress3'] . '<br />' . $myrow['braddress4'] . '<br />' . $myrow['braddress5'] . '<br />' . $myrow['braddress6'] . '</td>'; + echo '<td bgcolor="#EEEEEE">' . $myrow['deliverto'] . '<br />' . $myrow['deladd1'] . '<br />' . $myrow['deladd2'] . '<br />' . $myrow['deladd3'] . '<br />' . $myrow['deladd4'] . '<br />' . $myrow['deladd5'] . '<br />' . $myrow['deladd6'] . '</td>'; echo '</tr> </table><hr>'; echo '<table class="table1"> @@ -614,7 +610,7 @@ <td align=left bgcolor="#BBBBBB"><b>' . _('Branch') . ':</b></td> </tr>'; echo '<tr> - <td bgcolor="#EEEEEE">' . $myrow['brname'] . '<br>' . $myrow['braddress1'] . '<br>' . $myrow['braddress2'] . '<br>' . $myrow['braddress3'] . '<br>' . $myrow['braddress4'] . '<br>' . $myrow['braddress5'] . '<br>' . $myrow['braddress6'] . '</td> + <td bgcolor="#EEEEEE">' . $myrow['brname'] . '<br />' . $myrow['braddress1'] . '<br />' . $myrow['braddress2'] . '<br />' . $myrow['braddress3'] . '<br />' . $myrow['braddress4'] . '<br />' . $myrow['braddress5'] . '<br />' . $myrow['braddress6'] . '</td> </tr></table>'; echo '<hr><table class="table1"><tr> <td align=left bgcolor="#BBBBBB"><b>' . _('Date') . '</b></td> @@ -643,7 +639,7 @@ if (DB_error_no($db) != 0) { echo '<div class="page_help_text">' . _('There was a problem retrieving the invoice or credit note stock movement details for invoice number') . ' ' . $FromTransNo . ' ' . _('from the database').'</div>'; if ($debug == 1) { - echo '<br>' . _('The SQL used to get this information that failed was') . '<br>'.$sql; + echo '<br />' . _('The SQL used to get this information that failed was') . '<br />'.$sql; } exit; } @@ -700,16 +696,16 @@ echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br /><font size=1>' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno... [truncated message content] |
From: <dai...@us...> - 2011-04-18 00:09:32
|
Revision: 4553 http://web-erp.svn.sourceforge.net/web-erp/?rev=4553&view=rev Author: daintree Date: 2011-04-18 00:09:23 +0000 (Mon, 18 Apr 2011) Log Message: ----------- lang updates, xhtml, closing > Modified Paths: -------------- trunk/Prices_Customer.php trunk/SelectCustomer.php trunk/SelectOrderItems.php trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2011-04-17 10:18:02 UTC (rev 4552) +++ trunk/Prices_Customer.php 2011-04-18 00:09:23 UTC (rev 4553) @@ -330,7 +330,7 @@ $result = DB_query($sql, $db); echo '<table class=selection>'; echo '<tr><td>' . _('Branch') . ':</td>'; -echo '<td><select name="Branch"'; +echo '<td><select name="Branch">'; while ($myrow=DB_fetch_array($result)) { if ($myrow['branchcode']==$_POST['branch']) { echo '<option selected value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>'; @@ -338,13 +338,13 @@ echo '<option value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>'; } } -echo '></td></tr>'; +echo '</select></td></tr>'; echo '<tr><td>' . _('Start Date') . ':</td> <td><input type="Text" name="StartDate" class=date alt='.$_SESSION['DefaultDateFormat']. - ' size=11 maxlength=10 value=' . $_POST['StartDate'] . '></td></tr>'; + ' size=11 maxlength=10 value="' . $_POST['StartDate'] . '"></td></tr>'; echo '<tr><td>' . _('End Date') . ':</td> <td><input type="Text" name="EndDate" class=date alt='.$_SESSION['DefaultDateFormat']. - ' size=11 maxlength=10 value=' . $_POST['EndDate'] . '></td></tr>'; + ' size=11 maxlength=10 value="' . $_POST['EndDate'] . '"></td></tr>'; echo '<tr><td>' . _('Price') . ':</td> <td><input type="Text" class=number name="Price" size=11 maxlength=10 value=' . $_POST['Price'] . '></td> Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2011-04-17 10:18:02 UTC (rev 4552) +++ trunk/SelectCustomer.php 2011-04-18 00:09:23 UTC (rev 4553) @@ -541,8 +541,8 @@ echo '<tr><td colspan=2>'; echo '<table width=45% colspan=2 cellpadding=4>'; echo '<tr><th width=33%>' . _('Customer Mapping') . '</th></tr>'; - echo '</td><td valign=TOp>'; /* Mapping */ - echo '<div class="centre"' . _('Mapping is enabled, Map will display below.') . '</div>'; + echo '</td><td valign="top">'; /* Mapping */ + echo '<div class="centre">' . _('Mapping is enabled, Map will display below.') . '</div>'; echo '<div align="center" id="map" style="width: ' . $map_width . 'px; height: ' . $map_height . 'px"></div><br />'; echo '</th></tr></table>'; } Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-04-17 10:18:02 UTC (rev 4552) +++ trunk/SelectOrderItems.php 2011-04-18 00:09:23 UTC (rev 4553) @@ -658,7 +658,7 @@ echo '<td></td>'; } echo '<td><input tabindex='.($j+5).' type=submit name="SubmitCustomerSelection' . $j .'" value="' . htmlentities($myrow['brname'], ENT_QUOTES,'UTF-8'). '"></td> - <input type="hidden" name="SelectedCustomer' . $j .'" value="'.$myrow['debtorno'].'"><input type="hidden" name="SelectedBranch' . $j .'" value="'. $myrow['branchcode'].'"> + <input type="hidden" name="SelectedCustomer' . $j .'" value="'.$myrow['debtorno'].'"><input type="hidden" name="SelectedBranch' . $j .'" value="'. $myrow['branchcode'].'" /> <td>'.$myrow['contactname'].'</td> <td>'.$myrow['phoneno'].'</td> <td>'.$myrow['faxno'].'</td> Modified: trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po 2011-04-17 10:18:02 UTC (rev 4552) +++ trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po 2011-04-18 00:09:23 UTC (rev 4553) @@ -7,21 +7,21 @@ msgstr "" "Project-Id-Version: Persian & rtl support\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-03-31 20:06+1200\n" -"PO-Revision-Date: 2011-02-18 11:42+0000\n" -"Last-Translator: Mohsen Karimi <Unknown>\n" +"POT-Creation-Date: 2011-01-04 22:15+1200\n" +"PO-Revision-Date: 2011-04-10 22:01+0000\n" +"Last-Translator: پویان <Unknown>\n" "Language-Team: Persian <hos...@io...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-03-31 06:31+0000\n" -"X-Generator: Launchpad (build 12696)\n" +"X-Launchpad-Export-Date: 2011-04-17 23:41+0000\n" +"X-Generator: Launchpad (build 12821)\n" "X-Poedit-Country: IRAN, ISLAMIC REPUBLIC OF\n" "Language: fa\n" "X-Poedit-Language: Persian\n" "X-Poedit-SourceCharset: utf-8\n" -#: AccountGroups.php:9 index.php:1277 +#: AccountGroups.php:9 index.php:1273 msgid "Account Groups" msgstr "گروه حساب" @@ -59,7 +59,7 @@ msgstr "حساب کاربری نام گروه می تواند شخصیت نیست" #: AccountGroups.php:71 AccountSections.php:75 PaymentMethods.php:41 -#: TaxCategories.php:33 TaxProvinces.php:32 UnitsOfMeasure.php:30 +#: TaxCategories.php:33 TaxProvinces.php:32 UnitsOfMeasure.php:32 msgid "or the character" msgstr "و یا شخصیت" @@ -117,7 +117,8 @@ msgstr "درج رکورد" #: AccountGroups.php:176 -msgid "An error occurred in retrieving the group information from chartmaster" +msgid "" +"An error occurred in retrieving the group information from chartmaster" msgstr "خطا رخ داده است در بازیابی اطلاعات از گروه chartmaster" #: AccountGroups.php:181 @@ -132,21 +133,22 @@ #: Areas.php:117 Areas.php:126 BankAccounts.php:163 CreditStatus.php:126 #: Currencies.php:144 Currencies.php:152 Currencies.php:159 #: CustomerBranches.php:296 CustomerBranches.php:306 CustomerBranches.php:316 -#: CustomerBranches.php:326 Customers.php:311 Customers.php:320 -#: Customers.php:328 Customers.php:336 CustomerTypes.php:149 -#: CustomerTypes.php:159 Factors.php:136 FixedAssetCategories.php:131 +#: CustomerBranches.php:326 Customers.php:317 Customers.php:326 +#: Customers.php:334 Customers.php:342 CustomerTypes.php:149 +#: CustomerTypes.php:159 Factors.php:136 FixedAssetCategories.php:132 #: GLAccounts.php:95 GLAccounts.php:109 Locations.php:247 Locations.php:255 #: Locations.php:264 Locations.php:272 Locations.php:280 Locations.php:288 #: Locations.php:296 Locations.php:304 MRPDemandTypes.php:89 #: PaymentMethods.php:146 PaymentTerms.php:147 PaymentTerms.php:154 -#: PcExpenses.php:129 SalesCategories.php:127 SalesCategories.php:135 +#: PcExpenses.php:119 SalesCategories.php:127 SalesCategories.php:135 #: SalesPeople.php:144 SalesPeople.php:151 SalesTypes.php:147 #: SalesTypes.php:157 Shippers.php:82 Shippers.php:94 StockCategories.php:182 -#: Stocks.php:469 Stocks.php:478 Stocks.php:486 Stocks.php:494 Stocks.php:502 -#: Stocks.php:510 Suppliers.php:613 Suppliers.php:622 Suppliers.php:630 +#: Stocks.php:471 Stocks.php:480 Stocks.php:488 Stocks.php:496 Stocks.php:504 +#: Stocks.php:512 Suppliers.php:613 Suppliers.php:622 Suppliers.php:630 #: SupplierTypes.php:147 TaxCategories.php:133 TaxGroups.php:128 -#: TaxGroups.php:135 TaxProvinces.php:127 UnitsOfMeasure.php:137 -#: WorkCentres.php:90 WorkCentres.php:96 WWW_Access.php:87 +#: TaxGroups.php:135 TaxProvinces.php:127 UnitsOfMeasure.php:142 +#: UnitsOfMeasure.php:149 WorkCentres.php:90 WorkCentres.php:96 +#: WWW_Access.php:87 msgid "There are" msgstr "وجود دارند" @@ -195,17 +197,17 @@ #: AccountGroups.php:226 AccountSections.php:177 AddCustomerContacts.php:25 #: AddCustomerContacts.php:28 AddCustomerNotes.php:97 #: AddCustomerTypeNotes.php:94 AgedDebtors.php:468 AgedSuppliers.php:277 -#: Areas.php:145 AuditTrail.php:13 BOMExtendedQty.php:272 BOMIndented.php:252 -#: BOMIndentedReverse.php:246 BOMInquiry.php:165 BOMListing.php:128 -#: BOMs.php:214 BOMs.php:793 COGSGLPostings.php:20 CompanyPreferences.php:155 -#: CounterSales.php:1983 CounterSales.php:2107 Credit_Invoice.php:256 +#: Areas.php:145 AuditTrail.php:13 BOMExtendedQty.php:286 BOMIndented.php:262 +#: BOMIndentedReverse.php:257 BOMInquiry.php:165 BOMListing.php:128 +#: BOMs.php:214 BOMs.php:793 COGSGLPostings.php:20 CompanyPreferences.php:158 +#: CounterSales.php:1940 CounterSales.php:2062 Credit_Invoice.php:257 #: CreditStatus.php:21 Currencies.php:29 CustEDISetup.php:19 #: DailyBankTransactions.php:9 DebtorsAtPeriodEnd.php:138 #: DiscountCategories.php:12 DiscountCategories.php:122 DiscountMatrix.php:18 -#: EDIMessageFormat.php:104 FixedAssetLocations.php:9 -#: FixedAssetRegister.php:13 FixedAssetRegister.php:238 +#: EDIMessageFormat.php:106 FixedAssetList.php:8 FixedAssetLocations.php:9 +#: FixedAssetRegister.php:13 FixedAssetRegister.php:232 #: FixedAssetTransfer.php:31 FormDesigner.php:132 GLBalanceSheet.php:351 -#: GLBudgets.php:28 GLJournal.php:228 InventoryPlanning.php:374 +#: GLBudgets.php:30 GLJournal.php:243 InventoryPlanning.php:369 #: InventoryPlanningPrefSupplier.php:474 Labels.php:117 Labels.php:273 #: MRPReport.php:536 OutstandingGRNs.php:174 PcAssignCashToTab.php:39 #: PcAssignCashToTab.php:113 PcAssignCashToTab.php:129 @@ -213,24 +215,24 @@ #: PDFStockLocTransfer.php:21 PO_AuthorisationLevels.php:12 POReport.php:61 #: POReport.php:65 POReport.php:69 PO_SelectOSPurchOrder.php:136 #: PricesBasedOnMarkUp.php:11 Prices_Customer.php:45 Prices.php:32 -#: PurchData.php:141 PurchData.php:256 PurchData.php:275 -#: RecurringSalesOrders.php:311 SalesAnalReptCols.php:51 SalesAnalRepts.php:13 +#: PurchData.php:141 PurchData.php:231 PurchData.php:250 +#: RecurringSalesOrders.php:307 SalesAnalReptCols.php:51 SalesAnalRepts.php:13 #: SalesCategories.php:13 SalesGLPostings.php:18 SalesGraph.php:34 #: SalesPeople.php:22 SalesTypes.php:22 SelectAsset.php:44 -#: SelectCompletedOrder.php:13 SelectContract.php:81 SelectCreditItems.php:202 -#: SelectCreditItems.php:270 SelectCustomer.php:323 SelectGLAccount.php:19 -#: SelectGLAccount.php:79 SelectOrderItems.php:607 SelectOrderItems.php:1431 -#: SelectOrderItems.php:1555 SelectProduct.php:473 SelectSalesOrder.php:457 +#: SelectCompletedOrder.php:13 SelectContract.php:81 SelectCreditItems.php:204 +#: SelectCreditItems.php:272 SelectCustomer.php:315 SelectGLAccount.php:19 +#: SelectGLAccount.php:79 SelectOrderItems.php:605 SelectOrderItems.php:1436 +#: SelectOrderItems.php:1556 SelectProduct.php:456 SelectSalesOrder.php:155 #: SelectSupplier.php:9 SelectSupplier.php:198 SelectWorkOrder.php:11 #: SelectWorkOrder.php:147 ShipmentCosting.php:13 Shipments.php:18 #: Shippers.php:123 Shippers.php:159 Shipt_Select.php:10 #: StockLocMovements.php:15 StockLocStatus.php:27 Suppliers.php:306 #: SupplierTenders.php:261 SupplierTenders.php:318 SupplierTransInquiry.php:11 -#: TaxGroups.php:16 TaxProvinces.php:12 TopItems.php:62 +#: TaxGroups.php:16 TaxProvinces.php:12 TopItems.php:60 #: WhereUsedInquiry.php:18 WorkCentres.php:111 WorkCentres.php:158 -#: WorkOrderCosting.php:14 WorkOrderEntry.php:10 WorkOrderIssue.php:22 +#: WorkOrderCosting.php:14 WorkOrderEntry.php:12 WorkOrderIssue.php:22 #: WorkOrderReceive.php:15 WorkOrderStatus.php:43 WWW_Access.php:13 -#: WWW_Users.php:33 Z_BottomUpCosts.php:51 +#: WWW_Users.php:38 Z_BottomUpCosts.php:51 msgid "Search" msgstr "جستجو" @@ -238,7 +240,7 @@ msgid "Group Name" msgstr "نام گروه" -#: AccountGroups.php:231 EDIMessageFormat.php:129 EDIMessageFormat.php:207 +#: AccountGroups.php:231 EDIMessageFormat.php:131 msgid "Section" msgstr "قسمت" @@ -260,34 +262,34 @@ #: AccountGroups.php:386 BankAccounts.php:217 BankAccounts.php:361 #: BankAccounts.php:363 BankAccounts.php:367 BOMs.php:128 BOMs.php:713 #: BOMs.php:715 CompanyPreferences.php:439 CompanyPreferences.php:441 -#: CompanyPreferences.php:452 CompanyPreferences.php:454 -#: CompanyPreferences.php:465 CompanyPreferences.php:467 +#: CompanyPreferences.php:451 CompanyPreferences.php:453 +#: CompanyPreferences.php:463 CompanyPreferences.php:465 #: ContractCosting.php:174 CustLoginSetup.php:590 CustLoginSetup.php:592 -#: CustomerBranches.php:420 Customers.php:590 Customers.php:847 -#: Customers.php:854 Customers.php:857 DeliveryDetails.php:1034 +#: CustomerBranches.php:420 Customers.php:600 Customers.php:857 +#: Customers.php:864 Customers.php:867 DeliveryDetails.php:1034 #: DeliveryDetails.php:1074 DeliveryDetails.php:1077 GLTransInquiry.php:73 -#: MRPCalendar.php:222 MRP.php:529 MRP.php:533 MRP.php:537 MRP.php:541 -#: PaymentMethods.php:203 PaymentMethods.php:204 PaymentMethods.php:264 -#: PaymentMethods.php:270 PDFChequeListing.php:63 +#: Locations.php:373 MRPCalendar.php:222 MRP.php:530 MRP.php:534 MRP.php:538 +#: MRP.php:542 PaymentMethods.php:203 PaymentMethods.php:204 +#: PaymentMethods.php:264 PaymentMethods.php:270 PDFChequeListing.php:63 #: PDFDeliveryDifferences.php:64 PDFDIFOT.php:67 #: PO_AuthorisationLevels.php:132 PO_AuthorisationLevels.php:137 -#: PO_Header.php:754 PO_PDFPurchOrder.php:344 PO_PDFPurchOrder.php:347 -#: PurchData.php:192 PurchData.php:494 PurchData.php:497 -#: RecurringSalesOrders.php:483 RecurringSalesOrders.php:486 +#: PO_Header.php:758 PO_PDFPurchOrder.php:367 PO_PDFPurchOrder.php:370 +#: PurchData.php:189 PurchData.php:469 PurchData.php:472 +#: RecurringSalesOrders.php:479 RecurringSalesOrders.php:482 #: SalesAnalReptCols.php:279 SalesAnalReptCols.php:401 #: SalesAnalReptCols.php:404 SalesAnalRepts.php:406 SalesAnalRepts.php:409 #: SalesAnalRepts.php:432 SalesAnalRepts.php:435 SalesAnalRepts.php:458 #: SalesAnalRepts.php:461 SelectProduct.php:351 ShipmentCosting.php:622 -#: Stocks.php:869 Stocks.php:871 Stocks.php:889 Stocks.php:891 +#: Stocks.php:867 Stocks.php:869 Stocks.php:887 Stocks.php:889 #: SuppContractChgs.php:83 SuppLoginSetup.php:511 SuppLoginSetup.php:513 -#: SystemParameters.php:376 SystemParameters.php:399 SystemParameters.php:415 +#: SystemParameters.php:373 SystemParameters.php:405 SystemParameters.php:450 #: SystemParameters.php:468 SystemParameters.php:476 SystemParameters.php:516 -#: SystemParameters.php:589 SystemParameters.php:598 SystemParameters.php:606 -#: SystemParameters.php:624 SystemParameters.php:631 SystemParameters.php:756 -#: SystemParameters.php:887 SystemParameters.php:889 SystemParameters.php:899 -#: SystemParameters.php:901 SystemParameters.php:955 SystemParameters.php:967 -#: SystemParameters.php:969 TaxGroups.php:292 TaxGroups.php:295 -#: TaxGroups.php:344 WWW_Users.php:605 WWW_Users.php:607 +#: SystemParameters.php:589 SystemParameters.php:597 SystemParameters.php:615 +#: SystemParameters.php:622 SystemParameters.php:746 SystemParameters.php:877 +#: SystemParameters.php:879 SystemParameters.php:889 SystemParameters.php:891 +#: SystemParameters.php:945 SystemParameters.php:957 SystemParameters.php:959 +#: TaxGroups.php:292 TaxGroups.php:295 TaxGroups.php:344 WWW_Users.php:610 +#: WWW_Users.php:612 msgid "Yes" msgstr "بلی" @@ -295,60 +297,59 @@ #: BankAccounts.php:215 BankAccounts.php:361 BankAccounts.php:363 #: BankAccounts.php:367 BOMs.php:130 BOMs.php:712 BOMs.php:716 #: CompanyPreferences.php:438 CompanyPreferences.php:442 -#: CompanyPreferences.php:451 CompanyPreferences.php:455 -#: CompanyPreferences.php:464 CompanyPreferences.php:468 +#: CompanyPreferences.php:450 CompanyPreferences.php:454 +#: CompanyPreferences.php:462 CompanyPreferences.php:466 #: ContractCosting.php:172 CustLoginSetup.php:589 CustLoginSetup.php:593 -#: CustomerBranches.php:420 Customers.php:589 Customers.php:845 -#: Customers.php:853 Customers.php:856 DeliveryDetails.php:1035 +#: CustomerBranches.php:420 Customers.php:599 Customers.php:855 +#: Customers.php:863 Customers.php:866 DeliveryDetails.php:1035 #: DeliveryDetails.php:1075 DeliveryDetails.php:1078 GLTransInquiry.php:127 -#: MRPCalendar.php:224 MRP.php:527 MRP.php:531 MRP.php:535 MRP.php:539 -#: PaymentMethods.php:203 PaymentMethods.php:204 PaymentMethods.php:265 -#: PaymentMethods.php:271 PDFChequeListing.php:62 +#: Locations.php:375 MRPCalendar.php:224 MRP.php:528 MRP.php:532 MRP.php:536 +#: MRP.php:540 PaymentMethods.php:203 PaymentMethods.php:204 +#: PaymentMethods.php:265 PaymentMethods.php:271 PDFChequeListing.php:62 #: PDFDeliveryDifferences.php:63 PDFDIFOT.php:66 #: PO_AuthorisationLevels.php:134 PO_AuthorisationLevels.php:139 -#: PO_Header.php:753 PO_PDFPurchOrder.php:345 PO_PDFPurchOrder.php:348 -#: PurchData.php:195 PurchData.php:495 PurchData.php:498 -#: RecurringSalesOrders.php:482 RecurringSalesOrders.php:485 +#: PO_Header.php:757 PO_PDFPurchOrder.php:368 PO_PDFPurchOrder.php:371 +#: PurchData.php:192 PurchData.php:470 PurchData.php:473 +#: RecurringSalesOrders.php:478 RecurringSalesOrders.php:481 #: SalesAnalReptCols.php:277 SalesAnalReptCols.php:402 #: SalesAnalReptCols.php:405 SalesAnalRepts.php:405 SalesAnalRepts.php:408 #: SalesAnalRepts.php:431 SalesAnalRepts.php:434 SalesAnalRepts.php:457 #: SalesAnalRepts.php:460 SelectProduct.php:353 ShipmentCosting.php:623 -#: Stocks.php:864 Stocks.php:866 Stocks.php:884 Stocks.php:886 +#: Stocks.php:862 Stocks.php:864 Stocks.php:882 Stocks.php:884 #: SuppContractChgs.php:85 SuppLoginSetup.php:510 SuppLoginSetup.php:514 -#: SystemParameters.php:377 SystemParameters.php:400 SystemParameters.php:416 +#: SystemParameters.php:374 SystemParameters.php:406 SystemParameters.php:451 #: SystemParameters.php:469 SystemParameters.php:477 SystemParameters.php:517 -#: SystemParameters.php:590 SystemParameters.php:599 SystemParameters.php:607 -#: SystemParameters.php:625 SystemParameters.php:632 SystemParameters.php:757 -#: SystemParameters.php:886 SystemParameters.php:890 SystemParameters.php:898 -#: SystemParameters.php:902 SystemParameters.php:956 SystemParameters.php:966 -#: SystemParameters.php:970 TaxGroups.php:293 TaxGroups.php:296 -#: TaxGroups.php:346 WWW_Users.php:604 WWW_Users.php:608 -#: includes/PDFLowGPPageHeader.inc:44 includes/PDFTaxPageHeader.inc:35 +#: SystemParameters.php:590 SystemParameters.php:598 SystemParameters.php:616 +#: SystemParameters.php:623 SystemParameters.php:747 SystemParameters.php:876 +#: SystemParameters.php:880 SystemParameters.php:888 SystemParameters.php:892 +#: SystemParameters.php:946 SystemParameters.php:956 SystemParameters.php:960 +#: TaxGroups.php:293 TaxGroups.php:296 TaxGroups.php:346 WWW_Users.php:609 +#: WWW_Users.php:613 includes/PDFLowGPPageHeader.inc:44 +#: includes/PDFTaxPageHeader.inc:35 msgid "No" msgstr "خیر" #: AccountGroups.php:265 AccountSections.php:197 AddCustomerContacts.php:131 #: AddCustomerNotes.php:125 AddCustomerTypeNotes.php:123 Areas.php:165 #: BankAccounts.php:226 BOMs.php:150 COGSGLPostings.php:113 -#: COGSGLPostings.php:215 CreditStatus.php:175 Currencies.php:239 -#: CustLoginSetup.php:312 CustomerBranches.php:424 Customers.php:899 -#: Customers.php:931 CustomerTypes.php:205 EDIMessageFormat.php:150 -#: Factors.php:208 FixedAssetCategories.php:181 FixedAssetLocations.php:102 +#: COGSGLPostings.php:218 CreditStatus.php:175 Currencies.php:239 +#: CustLoginSetup.php:312 CustomerBranches.php:424 Customers.php:909 +#: Customers.php:941 CustomerTypes.php:205 EDIMessageFormat.php:152 +#: Factors.php:208 FixedAssetCategories.php:182 FixedAssetLocations.php:102 #: FreightCosts.php:243 GeocodeSetup.php:169 GLAccounts.php:319 GLTags.php:62 -#: Labels.php:414 Locations.php:380 MRPDemands.php:304 MRPDemandTypes.php:122 +#: Labels.php:414 Locations.php:382 MRPDemands.php:304 MRPDemandTypes.php:122 #: PaymentMethods.php:205 PaymentTerms.php:203 PcAssignCashToTab.php:251 -#: PcClaimExpensesFromTab.php:229 PcExpenses.php:186 PcTabs.php:188 -#: PcTypeTabs.php:174 PO_AuthorisationLevels.php:148 Prices_Customer.php:283 -#: Prices.php:227 PurchData.php:207 SalesCategories.php:263 +#: PcClaimExpensesFromTab.php:229 PcExpenses.php:176 PcTabs.php:188 +#: PcTypeTabs.php:171 PO_AuthorisationLevels.php:148 Prices_Customer.php:283 +#: Prices.php:227 PurchData.php:202 SalesCategories.php:263 #: SalesGLPostings.php:135 SalesGLPostings.php:247 SalesPeople.php:210 -#: SalesTypes.php:206 SelectCustomer.php:610 SelectCustomer.php:626 -#: SelectCustomer.php:648 SelectCustomer.php:664 SelectCustomer.php:686 -#: SelectCustomer.php:702 Shippers.php:144 StockCategories.php:244 -#: SupplierContacts.php:153 SupplierTypes.php:192 SuppLoginSetup.php:274 +#: SalesTypes.php:206 SelectCustomer.php:607 SelectCustomer.php:623 +#: SelectCustomer.php:645 SelectCustomer.php:661 SelectCustomer.php:683 +#: SelectCustomer.php:699 Shippers.php:144 StockCategories.php:244 +#: SupplierContacts.php:156 SupplierTypes.php:192 SuppLoginSetup.php:274 #: TaxAuthorities.php:173 TaxCategories.php:184 TaxGroups.php:179 -#: TaxProvinces.php:178 UnitsOfMeasure.php:187 WorkCentres.php:138 -#: WWW_Access.php:127 WWW_Users.php:307 includes/InputSerialItems.php:88 -#: includes/OutputSerialItems.php:21 +#: TaxProvinces.php:178 UnitsOfMeasure.php:201 WorkCentres.php:138 +#: WWW_Access.php:127 WWW_Users.php:312 includes/InputSerialItems.php:88 #, php-format msgid "Edit" msgstr "ویرایش" @@ -356,32 +357,31 @@ #: AccountGroups.php:266 AccountSections.php:201 AddCustomerContacts.php:132 #: AddCustomerNotes.php:126 AddCustomerTypeNotes.php:124 Areas.php:166 #: BankAccounts.php:227 BOMs.php:152 COGSGLPostings.php:114 -#: COGSGLPostings.php:216 ContractBOM.php:272 ContractOtherReqts.php:121 -#: CounterSales.php:781 Credit_Invoice.php:385 CreditStatus.php:176 -#: Currencies.php:242 CustLoginSetup.php:313 CustomerReceipt.php:863 -#: Customers.php:932 CustomerTypes.php:206 DiscountCategories.php:204 -#: DiscountMatrix.php:178 EDIMessageFormat.php:151 -#: FixedAssetCategories.php:182 FreightCosts.php:244 GeocodeSetup.php:170 -#: GLAccounts.php:320 GLJournal.php:385 Labels.php:414 Locations.php:381 +#: COGSGLPostings.php:219 ContractBOM.php:272 ContractOtherReqts.php:121 +#: CounterSales.php:741 Credit_Invoice.php:386 CreditStatus.php:176 +#: Currencies.php:242 CustLoginSetup.php:313 CustomerReceipt.php:866 +#: Customers.php:942 CustomerTypes.php:206 DiscountCategories.php:204 +#: DiscountMatrix.php:178 EDIMessageFormat.php:153 +#: FixedAssetCategories.php:183 FreightCosts.php:244 GeocodeSetup.php:170 +#: GLAccounts.php:320 GLJournal.php:403 Labels.php:414 Locations.php:383 #: MRPDemands.php:305 MRPDemandTypes.php:123 PaymentMethods.php:206 -#: Payments.php:959 PaymentTerms.php:204 PcAssignCashToTab.php:255 -#: PcClaimExpensesFromTab.php:230 PcExpenses.php:187 PcExpensesTypeTab.php:164 -#: PcTabs.php:189 PcTypeTabs.php:175 PO_AuthorisationLevels.php:150 -#: PO_Items.php:762 Prices_Customer.php:284 Prices.php:228 PurchData.php:208 +#: Payments.php:961 PaymentTerms.php:204 PcAssignCashToTab.php:255 +#: PcClaimExpensesFromTab.php:230 PcExpenses.php:177 PcExpensesTypeTab.php:161 +#: PcTabs.php:189 PcTypeTabs.php:172 PO_AuthorisationLevels.php:150 +#: PO_Items.php:976 Prices_Customer.php:284 Prices.php:228 PurchData.php:203 #: SalesAnalReptCols.php:294 SalesAnalRepts.php:305 SalesCategories.php:264 #: SalesGLPostings.php:136 SalesGLPostings.php:248 SalesPeople.php:211 -#: SalesTypes.php:207 SelectCreditItems.php:745 SelectCustomer.php:611 -#: SelectCustomer.php:627 SelectCustomer.php:649 SelectCustomer.php:665 -#: SelectCustomer.php:687 SelectCustomer.php:703 SelectOrderItems.php:1358 +#: SalesTypes.php:207 SelectCreditItems.php:747 SelectCustomer.php:608 +#: SelectCustomer.php:624 SelectCustomer.php:646 SelectCustomer.php:662 +#: SelectCustomer.php:684 SelectCustomer.php:700 SelectOrderItems.php:1363 #: Shipments.php:424 Shippers.php:145 SpecialOrder.php:590 #: StockCategories.php:245 StockCategories.php:539 SuppContractChgs.php:91 -#: SuppCreditGRNs.php:93 SuppFixedAssetChgs.php:81 SuppInvGRNs.php:135 -#: SupplierContacts.php:154 SupplierTypes.php:194 SuppLoginSetup.php:275 +#: SuppCreditGRNs.php:93 SuppFixedAssetChgs.php:87 SuppInvGRNs.php:135 +#: SupplierContacts.php:157 SupplierTypes.php:194 SuppLoginSetup.php:275 #: SuppShiptChgs.php:86 SuppTransGLAnalysis.php:111 TaxAuthorities.php:174 #: TaxCategories.php:185 TaxGroups.php:180 TaxProvinces.php:179 -#: UnitsOfMeasure.php:188 WorkCentres.php:139 WOSerialNos.php:300 -#: WWW_Access.php:128 WWW_Users.php:308 includes/InputSerialItemsKeyed.php:57 -#: includes/OutputSerialItems.php:98 +#: UnitsOfMeasure.php:202 WorkCentres.php:139 WOSerialNos.php:300 +#: WWW_Access.php:128 WWW_Users.php:313 includes/InputSerialItemsKeyed.php:54 #, php-format msgid "Delete" msgstr "حذف" @@ -425,23 +425,23 @@ #: AccountGroups.php:401 AccountSections.php:262 AddCustomerContacts.php:208 #: AddCustomerNotes.php:201 AddCustomerTypeNotes.php:192 Areas.php:222 -#: BankAccounts.php:373 BOMs.php:725 COGSGLPostings.php:353 +#: BankAccounts.php:373 BOMs.php:725 COGSGLPostings.php:347 #: CreditStatus.php:247 Currencies.php:339 CustLoginSetup.php:611 -#: DiscountMatrix.php:141 EDIMessageFormat.php:247 -#: FixedAssetCategories.php:327 FixedAssetLocations.php:148 +#: DiscountMatrix.php:141 EDIMessageFormat.php:249 +#: FixedAssetCategories.php:328 FixedAssetLocations.php:148 #: FreightCosts.php:342 GeocodeSetup.php:266 GLAccounts.php:269 -#: Locations.php:558 MRPDemands.php:402 MRPDemandTypes.php:182 +#: Locations.php:553 MRPDemands.php:402 MRPDemandTypes.php:182 #: OffersReceived.php:52 OffersReceived.php:128 PaymentMethods.php:276 #: PaymentTerms.php:282 PO_AuthorisationLevels.php:217 Prices_Customer.php:372 #: SalesAnalReptCols.php:510 SalesAnalRepts.php:496 SalesGLPostings.php:415 #: SalesPeople.php:302 Shippers.php:196 StockCategories.php:561 -#: SupplierContacts.php:250 SuppLoginSetup.php:532 TaxAuthorities.php:313 -#: TaxCategories.php:235 TaxProvinces.php:229 UnitsOfMeasure.php:239 -#: WorkCentres.php:261 WWW_Users.php:638 +#: SupplierContacts.php:251 SuppLoginSetup.php:532 TaxAuthorities.php:313 +#: TaxCategories.php:235 TaxProvinces.php:229 UnitsOfMeasure.php:253 +#: WorkCentres.php:261 WWW_Users.php:643 msgid "Enter Information" msgstr "ورود اطلاعات" -#: AccountSections.php:9 index.php:1282 +#: AccountSections.php:9 index.php:1278 msgid "Account Sections" msgstr "بخش ها حساب کاربری" @@ -501,8 +501,8 @@ msgid "Could not retrieve the requested section please try again." msgstr "نمی توان بازیابی بخش های درخواست شده لطفا دوباره سعی کنید." -#: AddCustomerContacts.php:6 AddCustomerContacts.php:59 SelectCustomer.php:604 -#: SelectCustomer.php:633 +#: AddCustomerContacts.php:6 AddCustomerContacts.php:59 SelectCustomer.php:601 +#: SelectCustomer.php:630 msgid "Customer Contacts" msgstr "تماس با ما مشتریان" @@ -533,10 +533,10 @@ #: AddCustomerContacts.php:59 AddCustomerNotes.php:49 #: AddCustomerTypeNotes.php:49 Areas.php:74 CustomerTypes.php:71 -#: DeliveryDetails.php:748 Factors.php:117 FixedAssetItems.php:236 -#: PcAssignCashToTab.php:73 PcClaimExpensesFromTab.php:61 PcExpenses.php:70 -#: PcTabs.php:60 PcTypeTabs.php:62 PO_Items.php:411 SalesAnalReptCols.php:129 -#: SalesPeople.php:94 SalesTypes.php:63 Stocks.php:353 Suppliers.php:514 +#: DeliveryDetails.php:748 Factors.php:117 FixedAssetItems.php:230 +#: PcAssignCashToTab.php:73 PcClaimExpensesFromTab.php:61 PcExpenses.php:60 +#: PcTabs.php:60 PcTypeTabs.php:59 PO_Items.php:381 SalesAnalReptCols.php:129 +#: SalesPeople.php:94 SalesTypes.php:63 Stocks.php:355 Suppliers.php:514 #: SupplierTypes.php:69 msgid "has been updated" msgstr "به روز شده است" @@ -549,31 +549,31 @@ msgid "The contact record has been deleted" msgstr "تماس با سابقه حذف شده است" -#: AddCustomerContacts.php:112 CompanyPreferences.php:224 -#: CustomerBranches.php:377 Customers.php:889 Customers.php:895 -#: Customers.php:961 SalesPeople.php:185 SelectCustomer.php:606 -#: StockDispatch.php:186 StockDispatch.php:198 SupplierContacts.php:141 -#: SupplierCredit.php:437 SupplierInvoice.php:408 SuppTransGLAnalysis.php:96 +#: AddCustomerContacts.php:112 CompanyPreferences.php:229 +#: CustomerBranches.php:377 Customers.php:899 Customers.php:905 +#: Customers.php:971 SalesPeople.php:185 SelectCustomer.php:603 +#: StockDispatch.php:186 StockDispatch.php:198 SupplierContacts.php:144 +#: SupplierCredit.php:433 SupplierInvoice.php:407 SuppTransGLAnalysis.php:96 #: includes/InputSerialItemsFile.php:84 includes/InputSerialItemsFile.php:124 #: includes/PDFTaxPageHeader.inc:37 msgid "Name" msgstr "نام" -#: AddCustomerContacts.php:113 AddCustomerContacts.php:190 Customers.php:890 -#: Customers.php:896 Customers.php:962 SelectCustomer.php:607 +#: AddCustomerContacts.php:113 AddCustomerContacts.php:190 Customers.php:900 +#: Customers.php:906 Customers.php:972 SelectCustomer.php:604 #: WWW_Access.php:111 WWW_Access.php:172 msgid "Role" msgstr "نقش" -#: AddCustomerContacts.php:114 Customers.php:963 +#: AddCustomerContacts.php:114 Customers.php:973 msgid "Phone no" msgstr "تلفن" -#: AddCustomerContacts.php:115 AddCustomerContacts.php:202 Customers.php:892 -#: Customers.php:898 Customers.php:964 PcAssignCashToTab.php:216 +#: AddCustomerContacts.php:115 AddCustomerContacts.php:202 Customers.php:902 +#: Customers.php:908 Customers.php:974 PcAssignCashToTab.php:216 #: PcAssignCashToTab.php:341 PcAuthorizeExpenses.php:85 #: PcClaimExpensesFromTab.php:195 PcClaimExpensesFromTab.php:348 -#: PcReportTab.php:348 SelectCustomer.php:609 SystemParameters.php:316 +#: PcReportTab.php:348 SelectCustomer.php:606 SystemParameters.php:313 #: WOSerialNos.php:277 WOSerialNos.php:279 msgid "Notes" msgstr "یادداشت ها" @@ -586,20 +586,20 @@ msgid "Contact Code" msgstr "تماس با کد" -#: AddCustomerContacts.php:184 Factors.php:279 SupplierContacts.php:218 +#: AddCustomerContacts.php:184 Factors.php:279 SupplierContacts.php:219 msgid "Contact Name" msgstr "نام تماس با ما" -#: AddCustomerContacts.php:196 Contracts.php:777 PDFRemittanceAdvice.php:247 -#: PO_Header.php:956 PO_Header.php:1026 SelectCreditItems.php:223 -#: SelectCustomer.php:464 SelectOrderItems.php:639 -#: includes/PDFStatementPageHeader.inc:63 includes/PDFTransPageHeader.inc:117 +#: AddCustomerContacts.php:196 Contracts.php:766 PDFRemittanceAdvice.php:247 +#: PO_Header.php:958 PO_Header.php:1028 SelectCreditItems.php:225 +#: SelectCustomer.php:461 SelectOrderItems.php:638 +#: includes/PDFStatementPageHeader.inc:63 includes/PDFTransPageHeader.inc:113 #: incl... [truncated message content] |
From: <dai...@us...> - 2011-04-18 00:09:33
|
Revision: 4553 http://web-erp.svn.sourceforge.net/web-erp/?rev=4553&view=rev Author: daintree Date: 2011-04-18 00:09:23 +0000 (Mon, 18 Apr 2011) Log Message: ----------- lang updates, xhtml, closing > Modified Paths: -------------- trunk/Prices_Customer.php trunk/SelectCustomer.php trunk/SelectOrderItems.php trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2011-04-17 10:18:02 UTC (rev 4552) +++ trunk/Prices_Customer.php 2011-04-18 00:09:23 UTC (rev 4553) @@ -330,7 +330,7 @@ $result = DB_query($sql, $db); echo '<table class=selection>'; echo '<tr><td>' . _('Branch') . ':</td>'; -echo '<td><select name="Branch"'; +echo '<td><select name="Branch">'; while ($myrow=DB_fetch_array($result)) { if ($myrow['branchcode']==$_POST['branch']) { echo '<option selected value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>'; @@ -338,13 +338,13 @@ echo '<option value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>'; } } -echo '></td></tr>'; +echo '</select></td></tr>'; echo '<tr><td>' . _('Start Date') . ':</td> <td><input type="Text" name="StartDate" class=date alt='.$_SESSION['DefaultDateFormat']. - ' size=11 maxlength=10 value=' . $_POST['StartDate'] . '></td></tr>'; + ' size=11 maxlength=10 value="' . $_POST['StartDate'] . '"></td></tr>'; echo '<tr><td>' . _('End Date') . ':</td> <td><input type="Text" name="EndDate" class=date alt='.$_SESSION['DefaultDateFormat']. - ' size=11 maxlength=10 value=' . $_POST['EndDate'] . '></td></tr>'; + ' size=11 maxlength=10 value="' . $_POST['EndDate'] . '"></td></tr>'; echo '<tr><td>' . _('Price') . ':</td> <td><input type="Text" class=number name="Price" size=11 maxlength=10 value=' . $_POST['Price'] . '></td> Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2011-04-17 10:18:02 UTC (rev 4552) +++ trunk/SelectCustomer.php 2011-04-18 00:09:23 UTC (rev 4553) @@ -541,8 +541,8 @@ echo '<tr><td colspan=2>'; echo '<table width=45% colspan=2 cellpadding=4>'; echo '<tr><th width=33%>' . _('Customer Mapping') . '</th></tr>'; - echo '</td><td valign=TOp>'; /* Mapping */ - echo '<div class="centre"' . _('Mapping is enabled, Map will display below.') . '</div>'; + echo '</td><td valign="top">'; /* Mapping */ + echo '<div class="centre">' . _('Mapping is enabled, Map will display below.') . '</div>'; echo '<div align="center" id="map" style="width: ' . $map_width . 'px; height: ' . $map_height . 'px"></div><br />'; echo '</th></tr></table>'; } Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-04-17 10:18:02 UTC (rev 4552) +++ trunk/SelectOrderItems.php 2011-04-18 00:09:23 UTC (rev 4553) @@ -658,7 +658,7 @@ echo '<td></td>'; } echo '<td><input tabindex='.($j+5).' type=submit name="SubmitCustomerSelection' . $j .'" value="' . htmlentities($myrow['brname'], ENT_QUOTES,'UTF-8'). '"></td> - <input type="hidden" name="SelectedCustomer' . $j .'" value="'.$myrow['debtorno'].'"><input type="hidden" name="SelectedBranch' . $j .'" value="'. $myrow['branchcode'].'"> + <input type="hidden" name="SelectedCustomer' . $j .'" value="'.$myrow['debtorno'].'"><input type="hidden" name="SelectedBranch' . $j .'" value="'. $myrow['branchcode'].'" /> <td>'.$myrow['contactname'].'</td> <td>'.$myrow['phoneno'].'</td> <td>'.$myrow['faxno'].'</td> Modified: trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po 2011-04-17 10:18:02 UTC (rev 4552) +++ trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po 2011-04-18 00:09:23 UTC (rev 4553) @@ -7,21 +7,21 @@ msgstr "" "Project-Id-Version: Persian & rtl support\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-03-31 20:06+1200\n" -"PO-Revision-Date: 2011-02-18 11:42+0000\n" -"Last-Translator: Mohsen Karimi <Unknown>\n" +"POT-Creation-Date: 2011-01-04 22:15+1200\n" +"PO-Revision-Date: 2011-04-10 22:01+0000\n" +"Last-Translator: پویان <Unknown>\n" "Language-Team: Persian <hos...@io...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-03-31 06:31+0000\n" -"X-Generator: Launchpad (build 12696)\n" +"X-Launchpad-Export-Date: 2011-04-17 23:41+0000\n" +"X-Generator: Launchpad (build 12821)\n" "X-Poedit-Country: IRAN, ISLAMIC REPUBLIC OF\n" "Language: fa\n" "X-Poedit-Language: Persian\n" "X-Poedit-SourceCharset: utf-8\n" -#: AccountGroups.php:9 index.php:1277 +#: AccountGroups.php:9 index.php:1273 msgid "Account Groups" msgstr "گروه حساب" @@ -59,7 +59,7 @@ msgstr "حساب کاربری نام گروه می تواند شخصیت نیست" #: AccountGroups.php:71 AccountSections.php:75 PaymentMethods.php:41 -#: TaxCategories.php:33 TaxProvinces.php:32 UnitsOfMeasure.php:30 +#: TaxCategories.php:33 TaxProvinces.php:32 UnitsOfMeasure.php:32 msgid "or the character" msgstr "و یا شخصیت" @@ -117,7 +117,8 @@ msgstr "درج رکورد" #: AccountGroups.php:176 -msgid "An error occurred in retrieving the group information from chartmaster" +msgid "" +"An error occurred in retrieving the group information from chartmaster" msgstr "خطا رخ داده است در بازیابی اطلاعات از گروه chartmaster" #: AccountGroups.php:181 @@ -132,21 +133,22 @@ #: Areas.php:117 Areas.php:126 BankAccounts.php:163 CreditStatus.php:126 #: Currencies.php:144 Currencies.php:152 Currencies.php:159 #: CustomerBranches.php:296 CustomerBranches.php:306 CustomerBranches.php:316 -#: CustomerBranches.php:326 Customers.php:311 Customers.php:320 -#: Customers.php:328 Customers.php:336 CustomerTypes.php:149 -#: CustomerTypes.php:159 Factors.php:136 FixedAssetCategories.php:131 +#: CustomerBranches.php:326 Customers.php:317 Customers.php:326 +#: Customers.php:334 Customers.php:342 CustomerTypes.php:149 +#: CustomerTypes.php:159 Factors.php:136 FixedAssetCategories.php:132 #: GLAccounts.php:95 GLAccounts.php:109 Locations.php:247 Locations.php:255 #: Locations.php:264 Locations.php:272 Locations.php:280 Locations.php:288 #: Locations.php:296 Locations.php:304 MRPDemandTypes.php:89 #: PaymentMethods.php:146 PaymentTerms.php:147 PaymentTerms.php:154 -#: PcExpenses.php:129 SalesCategories.php:127 SalesCategories.php:135 +#: PcExpenses.php:119 SalesCategories.php:127 SalesCategories.php:135 #: SalesPeople.php:144 SalesPeople.php:151 SalesTypes.php:147 #: SalesTypes.php:157 Shippers.php:82 Shippers.php:94 StockCategories.php:182 -#: Stocks.php:469 Stocks.php:478 Stocks.php:486 Stocks.php:494 Stocks.php:502 -#: Stocks.php:510 Suppliers.php:613 Suppliers.php:622 Suppliers.php:630 +#: Stocks.php:471 Stocks.php:480 Stocks.php:488 Stocks.php:496 Stocks.php:504 +#: Stocks.php:512 Suppliers.php:613 Suppliers.php:622 Suppliers.php:630 #: SupplierTypes.php:147 TaxCategories.php:133 TaxGroups.php:128 -#: TaxGroups.php:135 TaxProvinces.php:127 UnitsOfMeasure.php:137 -#: WorkCentres.php:90 WorkCentres.php:96 WWW_Access.php:87 +#: TaxGroups.php:135 TaxProvinces.php:127 UnitsOfMeasure.php:142 +#: UnitsOfMeasure.php:149 WorkCentres.php:90 WorkCentres.php:96 +#: WWW_Access.php:87 msgid "There are" msgstr "وجود دارند" @@ -195,17 +197,17 @@ #: AccountGroups.php:226 AccountSections.php:177 AddCustomerContacts.php:25 #: AddCustomerContacts.php:28 AddCustomerNotes.php:97 #: AddCustomerTypeNotes.php:94 AgedDebtors.php:468 AgedSuppliers.php:277 -#: Areas.php:145 AuditTrail.php:13 BOMExtendedQty.php:272 BOMIndented.php:252 -#: BOMIndentedReverse.php:246 BOMInquiry.php:165 BOMListing.php:128 -#: BOMs.php:214 BOMs.php:793 COGSGLPostings.php:20 CompanyPreferences.php:155 -#: CounterSales.php:1983 CounterSales.php:2107 Credit_Invoice.php:256 +#: Areas.php:145 AuditTrail.php:13 BOMExtendedQty.php:286 BOMIndented.php:262 +#: BOMIndentedReverse.php:257 BOMInquiry.php:165 BOMListing.php:128 +#: BOMs.php:214 BOMs.php:793 COGSGLPostings.php:20 CompanyPreferences.php:158 +#: CounterSales.php:1940 CounterSales.php:2062 Credit_Invoice.php:257 #: CreditStatus.php:21 Currencies.php:29 CustEDISetup.php:19 #: DailyBankTransactions.php:9 DebtorsAtPeriodEnd.php:138 #: DiscountCategories.php:12 DiscountCategories.php:122 DiscountMatrix.php:18 -#: EDIMessageFormat.php:104 FixedAssetLocations.php:9 -#: FixedAssetRegister.php:13 FixedAssetRegister.php:238 +#: EDIMessageFormat.php:106 FixedAssetList.php:8 FixedAssetLocations.php:9 +#: FixedAssetRegister.php:13 FixedAssetRegister.php:232 #: FixedAssetTransfer.php:31 FormDesigner.php:132 GLBalanceSheet.php:351 -#: GLBudgets.php:28 GLJournal.php:228 InventoryPlanning.php:374 +#: GLBudgets.php:30 GLJournal.php:243 InventoryPlanning.php:369 #: InventoryPlanningPrefSupplier.php:474 Labels.php:117 Labels.php:273 #: MRPReport.php:536 OutstandingGRNs.php:174 PcAssignCashToTab.php:39 #: PcAssignCashToTab.php:113 PcAssignCashToTab.php:129 @@ -213,24 +215,24 @@ #: PDFStockLocTransfer.php:21 PO_AuthorisationLevels.php:12 POReport.php:61 #: POReport.php:65 POReport.php:69 PO_SelectOSPurchOrder.php:136 #: PricesBasedOnMarkUp.php:11 Prices_Customer.php:45 Prices.php:32 -#: PurchData.php:141 PurchData.php:256 PurchData.php:275 -#: RecurringSalesOrders.php:311 SalesAnalReptCols.php:51 SalesAnalRepts.php:13 +#: PurchData.php:141 PurchData.php:231 PurchData.php:250 +#: RecurringSalesOrders.php:307 SalesAnalReptCols.php:51 SalesAnalRepts.php:13 #: SalesCategories.php:13 SalesGLPostings.php:18 SalesGraph.php:34 #: SalesPeople.php:22 SalesTypes.php:22 SelectAsset.php:44 -#: SelectCompletedOrder.php:13 SelectContract.php:81 SelectCreditItems.php:202 -#: SelectCreditItems.php:270 SelectCustomer.php:323 SelectGLAccount.php:19 -#: SelectGLAccount.php:79 SelectOrderItems.php:607 SelectOrderItems.php:1431 -#: SelectOrderItems.php:1555 SelectProduct.php:473 SelectSalesOrder.php:457 +#: SelectCompletedOrder.php:13 SelectContract.php:81 SelectCreditItems.php:204 +#: SelectCreditItems.php:272 SelectCustomer.php:315 SelectGLAccount.php:19 +#: SelectGLAccount.php:79 SelectOrderItems.php:605 SelectOrderItems.php:1436 +#: SelectOrderItems.php:1556 SelectProduct.php:456 SelectSalesOrder.php:155 #: SelectSupplier.php:9 SelectSupplier.php:198 SelectWorkOrder.php:11 #: SelectWorkOrder.php:147 ShipmentCosting.php:13 Shipments.php:18 #: Shippers.php:123 Shippers.php:159 Shipt_Select.php:10 #: StockLocMovements.php:15 StockLocStatus.php:27 Suppliers.php:306 #: SupplierTenders.php:261 SupplierTenders.php:318 SupplierTransInquiry.php:11 -#: TaxGroups.php:16 TaxProvinces.php:12 TopItems.php:62 +#: TaxGroups.php:16 TaxProvinces.php:12 TopItems.php:60 #: WhereUsedInquiry.php:18 WorkCentres.php:111 WorkCentres.php:158 -#: WorkOrderCosting.php:14 WorkOrderEntry.php:10 WorkOrderIssue.php:22 +#: WorkOrderCosting.php:14 WorkOrderEntry.php:12 WorkOrderIssue.php:22 #: WorkOrderReceive.php:15 WorkOrderStatus.php:43 WWW_Access.php:13 -#: WWW_Users.php:33 Z_BottomUpCosts.php:51 +#: WWW_Users.php:38 Z_BottomUpCosts.php:51 msgid "Search" msgstr "جستجو" @@ -238,7 +240,7 @@ msgid "Group Name" msgstr "نام گروه" -#: AccountGroups.php:231 EDIMessageFormat.php:129 EDIMessageFormat.php:207 +#: AccountGroups.php:231 EDIMessageFormat.php:131 msgid "Section" msgstr "قسمت" @@ -260,34 +262,34 @@ #: AccountGroups.php:386 BankAccounts.php:217 BankAccounts.php:361 #: BankAccounts.php:363 BankAccounts.php:367 BOMs.php:128 BOMs.php:713 #: BOMs.php:715 CompanyPreferences.php:439 CompanyPreferences.php:441 -#: CompanyPreferences.php:452 CompanyPreferences.php:454 -#: CompanyPreferences.php:465 CompanyPreferences.php:467 +#: CompanyPreferences.php:451 CompanyPreferences.php:453 +#: CompanyPreferences.php:463 CompanyPreferences.php:465 #: ContractCosting.php:174 CustLoginSetup.php:590 CustLoginSetup.php:592 -#: CustomerBranches.php:420 Customers.php:590 Customers.php:847 -#: Customers.php:854 Customers.php:857 DeliveryDetails.php:1034 +#: CustomerBranches.php:420 Customers.php:600 Customers.php:857 +#: Customers.php:864 Customers.php:867 DeliveryDetails.php:1034 #: DeliveryDetails.php:1074 DeliveryDetails.php:1077 GLTransInquiry.php:73 -#: MRPCalendar.php:222 MRP.php:529 MRP.php:533 MRP.php:537 MRP.php:541 -#: PaymentMethods.php:203 PaymentMethods.php:204 PaymentMethods.php:264 -#: PaymentMethods.php:270 PDFChequeListing.php:63 +#: Locations.php:373 MRPCalendar.php:222 MRP.php:530 MRP.php:534 MRP.php:538 +#: MRP.php:542 PaymentMethods.php:203 PaymentMethods.php:204 +#: PaymentMethods.php:264 PaymentMethods.php:270 PDFChequeListing.php:63 #: PDFDeliveryDifferences.php:64 PDFDIFOT.php:67 #: PO_AuthorisationLevels.php:132 PO_AuthorisationLevels.php:137 -#: PO_Header.php:754 PO_PDFPurchOrder.php:344 PO_PDFPurchOrder.php:347 -#: PurchData.php:192 PurchData.php:494 PurchData.php:497 -#: RecurringSalesOrders.php:483 RecurringSalesOrders.php:486 +#: PO_Header.php:758 PO_PDFPurchOrder.php:367 PO_PDFPurchOrder.php:370 +#: PurchData.php:189 PurchData.php:469 PurchData.php:472 +#: RecurringSalesOrders.php:479 RecurringSalesOrders.php:482 #: SalesAnalReptCols.php:279 SalesAnalReptCols.php:401 #: SalesAnalReptCols.php:404 SalesAnalRepts.php:406 SalesAnalRepts.php:409 #: SalesAnalRepts.php:432 SalesAnalRepts.php:435 SalesAnalRepts.php:458 #: SalesAnalRepts.php:461 SelectProduct.php:351 ShipmentCosting.php:622 -#: Stocks.php:869 Stocks.php:871 Stocks.php:889 Stocks.php:891 +#: Stocks.php:867 Stocks.php:869 Stocks.php:887 Stocks.php:889 #: SuppContractChgs.php:83 SuppLoginSetup.php:511 SuppLoginSetup.php:513 -#: SystemParameters.php:376 SystemParameters.php:399 SystemParameters.php:415 +#: SystemParameters.php:373 SystemParameters.php:405 SystemParameters.php:450 #: SystemParameters.php:468 SystemParameters.php:476 SystemParameters.php:516 -#: SystemParameters.php:589 SystemParameters.php:598 SystemParameters.php:606 -#: SystemParameters.php:624 SystemParameters.php:631 SystemParameters.php:756 -#: SystemParameters.php:887 SystemParameters.php:889 SystemParameters.php:899 -#: SystemParameters.php:901 SystemParameters.php:955 SystemParameters.php:967 -#: SystemParameters.php:969 TaxGroups.php:292 TaxGroups.php:295 -#: TaxGroups.php:344 WWW_Users.php:605 WWW_Users.php:607 +#: SystemParameters.php:589 SystemParameters.php:597 SystemParameters.php:615 +#: SystemParameters.php:622 SystemParameters.php:746 SystemParameters.php:877 +#: SystemParameters.php:879 SystemParameters.php:889 SystemParameters.php:891 +#: SystemParameters.php:945 SystemParameters.php:957 SystemParameters.php:959 +#: TaxGroups.php:292 TaxGroups.php:295 TaxGroups.php:344 WWW_Users.php:610 +#: WWW_Users.php:612 msgid "Yes" msgstr "بلی" @@ -295,60 +297,59 @@ #: BankAccounts.php:215 BankAccounts.php:361 BankAccounts.php:363 #: BankAccounts.php:367 BOMs.php:130 BOMs.php:712 BOMs.php:716 #: CompanyPreferences.php:438 CompanyPreferences.php:442 -#: CompanyPreferences.php:451 CompanyPreferences.php:455 -#: CompanyPreferences.php:464 CompanyPreferences.php:468 +#: CompanyPreferences.php:450 CompanyPreferences.php:454 +#: CompanyPreferences.php:462 CompanyPreferences.php:466 #: ContractCosting.php:172 CustLoginSetup.php:589 CustLoginSetup.php:593 -#: CustomerBranches.php:420 Customers.php:589 Customers.php:845 -#: Customers.php:853 Customers.php:856 DeliveryDetails.php:1035 +#: CustomerBranches.php:420 Customers.php:599 Customers.php:855 +#: Customers.php:863 Customers.php:866 DeliveryDetails.php:1035 #: DeliveryDetails.php:1075 DeliveryDetails.php:1078 GLTransInquiry.php:127 -#: MRPCalendar.php:224 MRP.php:527 MRP.php:531 MRP.php:535 MRP.php:539 -#: PaymentMethods.php:203 PaymentMethods.php:204 PaymentMethods.php:265 -#: PaymentMethods.php:271 PDFChequeListing.php:62 +#: Locations.php:375 MRPCalendar.php:224 MRP.php:528 MRP.php:532 MRP.php:536 +#: MRP.php:540 PaymentMethods.php:203 PaymentMethods.php:204 +#: PaymentMethods.php:265 PaymentMethods.php:271 PDFChequeListing.php:62 #: PDFDeliveryDifferences.php:63 PDFDIFOT.php:66 #: PO_AuthorisationLevels.php:134 PO_AuthorisationLevels.php:139 -#: PO_Header.php:753 PO_PDFPurchOrder.php:345 PO_PDFPurchOrder.php:348 -#: PurchData.php:195 PurchData.php:495 PurchData.php:498 -#: RecurringSalesOrders.php:482 RecurringSalesOrders.php:485 +#: PO_Header.php:757 PO_PDFPurchOrder.php:368 PO_PDFPurchOrder.php:371 +#: PurchData.php:192 PurchData.php:470 PurchData.php:473 +#: RecurringSalesOrders.php:478 RecurringSalesOrders.php:481 #: SalesAnalReptCols.php:277 SalesAnalReptCols.php:402 #: SalesAnalReptCols.php:405 SalesAnalRepts.php:405 SalesAnalRepts.php:408 #: SalesAnalRepts.php:431 SalesAnalRepts.php:434 SalesAnalRepts.php:457 #: SalesAnalRepts.php:460 SelectProduct.php:353 ShipmentCosting.php:623 -#: Stocks.php:864 Stocks.php:866 Stocks.php:884 Stocks.php:886 +#: Stocks.php:862 Stocks.php:864 Stocks.php:882 Stocks.php:884 #: SuppContractChgs.php:85 SuppLoginSetup.php:510 SuppLoginSetup.php:514 -#: SystemParameters.php:377 SystemParameters.php:400 SystemParameters.php:416 +#: SystemParameters.php:374 SystemParameters.php:406 SystemParameters.php:451 #: SystemParameters.php:469 SystemParameters.php:477 SystemParameters.php:517 -#: SystemParameters.php:590 SystemParameters.php:599 SystemParameters.php:607 -#: SystemParameters.php:625 SystemParameters.php:632 SystemParameters.php:757 -#: SystemParameters.php:886 SystemParameters.php:890 SystemParameters.php:898 -#: SystemParameters.php:902 SystemParameters.php:956 SystemParameters.php:966 -#: SystemParameters.php:970 TaxGroups.php:293 TaxGroups.php:296 -#: TaxGroups.php:346 WWW_Users.php:604 WWW_Users.php:608 -#: includes/PDFLowGPPageHeader.inc:44 includes/PDFTaxPageHeader.inc:35 +#: SystemParameters.php:590 SystemParameters.php:598 SystemParameters.php:616 +#: SystemParameters.php:623 SystemParameters.php:747 SystemParameters.php:876 +#: SystemParameters.php:880 SystemParameters.php:888 SystemParameters.php:892 +#: SystemParameters.php:946 SystemParameters.php:956 SystemParameters.php:960 +#: TaxGroups.php:293 TaxGroups.php:296 TaxGroups.php:346 WWW_Users.php:609 +#: WWW_Users.php:613 includes/PDFLowGPPageHeader.inc:44 +#: includes/PDFTaxPageHeader.inc:35 msgid "No" msgstr "خیر" #: AccountGroups.php:265 AccountSections.php:197 AddCustomerContacts.php:131 #: AddCustomerNotes.php:125 AddCustomerTypeNotes.php:123 Areas.php:165 #: BankAccounts.php:226 BOMs.php:150 COGSGLPostings.php:113 -#: COGSGLPostings.php:215 CreditStatus.php:175 Currencies.php:239 -#: CustLoginSetup.php:312 CustomerBranches.php:424 Customers.php:899 -#: Customers.php:931 CustomerTypes.php:205 EDIMessageFormat.php:150 -#: Factors.php:208 FixedAssetCategories.php:181 FixedAssetLocations.php:102 +#: COGSGLPostings.php:218 CreditStatus.php:175 Currencies.php:239 +#: CustLoginSetup.php:312 CustomerBranches.php:424 Customers.php:909 +#: Customers.php:941 CustomerTypes.php:205 EDIMessageFormat.php:152 +#: Factors.php:208 FixedAssetCategories.php:182 FixedAssetLocations.php:102 #: FreightCosts.php:243 GeocodeSetup.php:169 GLAccounts.php:319 GLTags.php:62 -#: Labels.php:414 Locations.php:380 MRPDemands.php:304 MRPDemandTypes.php:122 +#: Labels.php:414 Locations.php:382 MRPDemands.php:304 MRPDemandTypes.php:122 #: PaymentMethods.php:205 PaymentTerms.php:203 PcAssignCashToTab.php:251 -#: PcClaimExpensesFromTab.php:229 PcExpenses.php:186 PcTabs.php:188 -#: PcTypeTabs.php:174 PO_AuthorisationLevels.php:148 Prices_Customer.php:283 -#: Prices.php:227 PurchData.php:207 SalesCategories.php:263 +#: PcClaimExpensesFromTab.php:229 PcExpenses.php:176 PcTabs.php:188 +#: PcTypeTabs.php:171 PO_AuthorisationLevels.php:148 Prices_Customer.php:283 +#: Prices.php:227 PurchData.php:202 SalesCategories.php:263 #: SalesGLPostings.php:135 SalesGLPostings.php:247 SalesPeople.php:210 -#: SalesTypes.php:206 SelectCustomer.php:610 SelectCustomer.php:626 -#: SelectCustomer.php:648 SelectCustomer.php:664 SelectCustomer.php:686 -#: SelectCustomer.php:702 Shippers.php:144 StockCategories.php:244 -#: SupplierContacts.php:153 SupplierTypes.php:192 SuppLoginSetup.php:274 +#: SalesTypes.php:206 SelectCustomer.php:607 SelectCustomer.php:623 +#: SelectCustomer.php:645 SelectCustomer.php:661 SelectCustomer.php:683 +#: SelectCustomer.php:699 Shippers.php:144 StockCategories.php:244 +#: SupplierContacts.php:156 SupplierTypes.php:192 SuppLoginSetup.php:274 #: TaxAuthorities.php:173 TaxCategories.php:184 TaxGroups.php:179 -#: TaxProvinces.php:178 UnitsOfMeasure.php:187 WorkCentres.php:138 -#: WWW_Access.php:127 WWW_Users.php:307 includes/InputSerialItems.php:88 -#: includes/OutputSerialItems.php:21 +#: TaxProvinces.php:178 UnitsOfMeasure.php:201 WorkCentres.php:138 +#: WWW_Access.php:127 WWW_Users.php:312 includes/InputSerialItems.php:88 #, php-format msgid "Edit" msgstr "ویرایش" @@ -356,32 +357,31 @@ #: AccountGroups.php:266 AccountSections.php:201 AddCustomerContacts.php:132 #: AddCustomerNotes.php:126 AddCustomerTypeNotes.php:124 Areas.php:166 #: BankAccounts.php:227 BOMs.php:152 COGSGLPostings.php:114 -#: COGSGLPostings.php:216 ContractBOM.php:272 ContractOtherReqts.php:121 -#: CounterSales.php:781 Credit_Invoice.php:385 CreditStatus.php:176 -#: Currencies.php:242 CustLoginSetup.php:313 CustomerReceipt.php:863 -#: Customers.php:932 CustomerTypes.php:206 DiscountCategories.php:204 -#: DiscountMatrix.php:178 EDIMessageFormat.php:151 -#: FixedAssetCategories.php:182 FreightCosts.php:244 GeocodeSetup.php:170 -#: GLAccounts.php:320 GLJournal.php:385 Labels.php:414 Locations.php:381 +#: COGSGLPostings.php:219 ContractBOM.php:272 ContractOtherReqts.php:121 +#: CounterSales.php:741 Credit_Invoice.php:386 CreditStatus.php:176 +#: Currencies.php:242 CustLoginSetup.php:313 CustomerReceipt.php:866 +#: Customers.php:942 CustomerTypes.php:206 DiscountCategories.php:204 +#: DiscountMatrix.php:178 EDIMessageFormat.php:153 +#: FixedAssetCategories.php:183 FreightCosts.php:244 GeocodeSetup.php:170 +#: GLAccounts.php:320 GLJournal.php:403 Labels.php:414 Locations.php:383 #: MRPDemands.php:305 MRPDemandTypes.php:123 PaymentMethods.php:206 -#: Payments.php:959 PaymentTerms.php:204 PcAssignCashToTab.php:255 -#: PcClaimExpensesFromTab.php:230 PcExpenses.php:187 PcExpensesTypeTab.php:164 -#: PcTabs.php:189 PcTypeTabs.php:175 PO_AuthorisationLevels.php:150 -#: PO_Items.php:762 Prices_Customer.php:284 Prices.php:228 PurchData.php:208 +#: Payments.php:961 PaymentTerms.php:204 PcAssignCashToTab.php:255 +#: PcClaimExpensesFromTab.php:230 PcExpenses.php:177 PcExpensesTypeTab.php:161 +#: PcTabs.php:189 PcTypeTabs.php:172 PO_AuthorisationLevels.php:150 +#: PO_Items.php:976 Prices_Customer.php:284 Prices.php:228 PurchData.php:203 #: SalesAnalReptCols.php:294 SalesAnalRepts.php:305 SalesCategories.php:264 #: SalesGLPostings.php:136 SalesGLPostings.php:248 SalesPeople.php:211 -#: SalesTypes.php:207 SelectCreditItems.php:745 SelectCustomer.php:611 -#: SelectCustomer.php:627 SelectCustomer.php:649 SelectCustomer.php:665 -#: SelectCustomer.php:687 SelectCustomer.php:703 SelectOrderItems.php:1358 +#: SalesTypes.php:207 SelectCreditItems.php:747 SelectCustomer.php:608 +#: SelectCustomer.php:624 SelectCustomer.php:646 SelectCustomer.php:662 +#: SelectCustomer.php:684 SelectCustomer.php:700 SelectOrderItems.php:1363 #: Shipments.php:424 Shippers.php:145 SpecialOrder.php:590 #: StockCategories.php:245 StockCategories.php:539 SuppContractChgs.php:91 -#: SuppCreditGRNs.php:93 SuppFixedAssetChgs.php:81 SuppInvGRNs.php:135 -#: SupplierContacts.php:154 SupplierTypes.php:194 SuppLoginSetup.php:275 +#: SuppCreditGRNs.php:93 SuppFixedAssetChgs.php:87 SuppInvGRNs.php:135 +#: SupplierContacts.php:157 SupplierTypes.php:194 SuppLoginSetup.php:275 #: SuppShiptChgs.php:86 SuppTransGLAnalysis.php:111 TaxAuthorities.php:174 #: TaxCategories.php:185 TaxGroups.php:180 TaxProvinces.php:179 -#: UnitsOfMeasure.php:188 WorkCentres.php:139 WOSerialNos.php:300 -#: WWW_Access.php:128 WWW_Users.php:308 includes/InputSerialItemsKeyed.php:57 -#: includes/OutputSerialItems.php:98 +#: UnitsOfMeasure.php:202 WorkCentres.php:139 WOSerialNos.php:300 +#: WWW_Access.php:128 WWW_Users.php:313 includes/InputSerialItemsKeyed.php:54 #, php-format msgid "Delete" msgstr "حذف" @@ -425,23 +425,23 @@ #: AccountGroups.php:401 AccountSections.php:262 AddCustomerContacts.php:208 #: AddCustomerNotes.php:201 AddCustomerTypeNotes.php:192 Areas.php:222 -#: BankAccounts.php:373 BOMs.php:725 COGSGLPostings.php:353 +#: BankAccounts.php:373 BOMs.php:725 COGSGLPostings.php:347 #: CreditStatus.php:247 Currencies.php:339 CustLoginSetup.php:611 -#: DiscountMatrix.php:141 EDIMessageFormat.php:247 -#: FixedAssetCategories.php:327 FixedAssetLocations.php:148 +#: DiscountMatrix.php:141 EDIMessageFormat.php:249 +#: FixedAssetCategories.php:328 FixedAssetLocations.php:148 #: FreightCosts.php:342 GeocodeSetup.php:266 GLAccounts.php:269 -#: Locations.php:558 MRPDemands.php:402 MRPDemandTypes.php:182 +#: Locations.php:553 MRPDemands.php:402 MRPDemandTypes.php:182 #: OffersReceived.php:52 OffersReceived.php:128 PaymentMethods.php:276 #: PaymentTerms.php:282 PO_AuthorisationLevels.php:217 Prices_Customer.php:372 #: SalesAnalReptCols.php:510 SalesAnalRepts.php:496 SalesGLPostings.php:415 #: SalesPeople.php:302 Shippers.php:196 StockCategories.php:561 -#: SupplierContacts.php:250 SuppLoginSetup.php:532 TaxAuthorities.php:313 -#: TaxCategories.php:235 TaxProvinces.php:229 UnitsOfMeasure.php:239 -#: WorkCentres.php:261 WWW_Users.php:638 +#: SupplierContacts.php:251 SuppLoginSetup.php:532 TaxAuthorities.php:313 +#: TaxCategories.php:235 TaxProvinces.php:229 UnitsOfMeasure.php:253 +#: WorkCentres.php:261 WWW_Users.php:643 msgid "Enter Information" msgstr "ورود اطلاعات" -#: AccountSections.php:9 index.php:1282 +#: AccountSections.php:9 index.php:1278 msgid "Account Sections" msgstr "بخش ها حساب کاربری" @@ -501,8 +501,8 @@ msgid "Could not retrieve the requested section please try again." msgstr "نمی توان بازیابی بخش های درخواست شده لطفا دوباره سعی کنید." -#: AddCustomerContacts.php:6 AddCustomerContacts.php:59 SelectCustomer.php:604 -#: SelectCustomer.php:633 +#: AddCustomerContacts.php:6 AddCustomerContacts.php:59 SelectCustomer.php:601 +#: SelectCustomer.php:630 msgid "Customer Contacts" msgstr "تماس با ما مشتریان" @@ -533,10 +533,10 @@ #: AddCustomerContacts.php:59 AddCustomerNotes.php:49 #: AddCustomerTypeNotes.php:49 Areas.php:74 CustomerTypes.php:71 -#: DeliveryDetails.php:748 Factors.php:117 FixedAssetItems.php:236 -#: PcAssignCashToTab.php:73 PcClaimExpensesFromTab.php:61 PcExpenses.php:70 -#: PcTabs.php:60 PcTypeTabs.php:62 PO_Items.php:411 SalesAnalReptCols.php:129 -#: SalesPeople.php:94 SalesTypes.php:63 Stocks.php:353 Suppliers.php:514 +#: DeliveryDetails.php:748 Factors.php:117 FixedAssetItems.php:230 +#: PcAssignCashToTab.php:73 PcClaimExpensesFromTab.php:61 PcExpenses.php:60 +#: PcTabs.php:60 PcTypeTabs.php:59 PO_Items.php:381 SalesAnalReptCols.php:129 +#: SalesPeople.php:94 SalesTypes.php:63 Stocks.php:355 Suppliers.php:514 #: SupplierTypes.php:69 msgid "has been updated" msgstr "به روز شده است" @@ -549,31 +549,31 @@ msgid "The contact record has been deleted" msgstr "تماس با سابقه حذف شده است" -#: AddCustomerContacts.php:112 CompanyPreferences.php:224 -#: CustomerBranches.php:377 Customers.php:889 Customers.php:895 -#: Customers.php:961 SalesPeople.php:185 SelectCustomer.php:606 -#: StockDispatch.php:186 StockDispatch.php:198 SupplierContacts.php:141 -#: SupplierCredit.php:437 SupplierInvoice.php:408 SuppTransGLAnalysis.php:96 +#: AddCustomerContacts.php:112 CompanyPreferences.php:229 +#: CustomerBranches.php:377 Customers.php:899 Customers.php:905 +#: Customers.php:971 SalesPeople.php:185 SelectCustomer.php:603 +#: StockDispatch.php:186 StockDispatch.php:198 SupplierContacts.php:144 +#: SupplierCredit.php:433 SupplierInvoice.php:407 SuppTransGLAnalysis.php:96 #: includes/InputSerialItemsFile.php:84 includes/InputSerialItemsFile.php:124 #: includes/PDFTaxPageHeader.inc:37 msgid "Name" msgstr "نام" -#: AddCustomerContacts.php:113 AddCustomerContacts.php:190 Customers.php:890 -#: Customers.php:896 Customers.php:962 SelectCustomer.php:607 +#: AddCustomerContacts.php:113 AddCustomerContacts.php:190 Customers.php:900 +#: Customers.php:906 Customers.php:972 SelectCustomer.php:604 #: WWW_Access.php:111 WWW_Access.php:172 msgid "Role" msgstr "نقش" -#: AddCustomerContacts.php:114 Customers.php:963 +#: AddCustomerContacts.php:114 Customers.php:973 msgid "Phone no" msgstr "تلفن" -#: AddCustomerContacts.php:115 AddCustomerContacts.php:202 Customers.php:892 -#: Customers.php:898 Customers.php:964 PcAssignCashToTab.php:216 +#: AddCustomerContacts.php:115 AddCustomerContacts.php:202 Customers.php:902 +#: Customers.php:908 Customers.php:974 PcAssignCashToTab.php:216 #: PcAssignCashToTab.php:341 PcAuthorizeExpenses.php:85 #: PcClaimExpensesFromTab.php:195 PcClaimExpensesFromTab.php:348 -#: PcReportTab.php:348 SelectCustomer.php:609 SystemParameters.php:316 +#: PcReportTab.php:348 SelectCustomer.php:606 SystemParameters.php:313 #: WOSerialNos.php:277 WOSerialNos.php:279 msgid "Notes" msgstr "یادداشت ها" @@ -586,20 +586,20 @@ msgid "Contact Code" msgstr "تماس با کد" -#: AddCustomerContacts.php:184 Factors.php:279 SupplierContacts.php:218 +#: AddCustomerContacts.php:184 Factors.php:279 SupplierContacts.php:219 msgid "Contact Name" msgstr "نام تماس با ما" -#: AddCustomerContacts.php:196 Contracts.php:777 PDFRemittanceAdvice.php:247 -#: PO_Header.php:956 PO_Header.php:1026 SelectCreditItems.php:223 -#: SelectCustomer.php:464 SelectOrderItems.php:639 -#: includes/PDFStatementPageHeader.inc:63 includes/PDFTransPageHeader.inc:117 +#: AddCustomerContacts.php:196 Contracts.php:766 PDFRemittanceAdvice.php:247 +#: PO_Header.php:958 PO_Header.php:1028 SelectCreditItems.php:225 +#: SelectCustomer.php:461 SelectOrderItems.php:638 +#: includes/PDFStatementPageHeader.inc:63 includes/PDFTransPageHeader.inc:113 #: incl... [truncated message content] |
From: <dai...@us...> - 2011-04-18 07:49:49
|
Revision: 4554 http://web-erp.svn.sourceforge.net/web-erp/?rev=4554&view=rev Author: daintree Date: 2011-04-18 07:49:36 +0000 (Mon, 18 Apr 2011) Log Message: ----------- pre 4.03.8 Modified Paths: -------------- trunk/PO_Header.php trunk/PO_Items.php trunk/PO_PDFPurchOrder.php trunk/PurchData.php trunk/doc/Change.log.html trunk/includes/ConnectDB.inc trunk/includes/DefinePOClass.php trunk/includes/PO_ReadInOrder.inc trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.mo trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/sql/mysql/upgrade3.11.1-4.00.sql trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-04-18 00:09:23 UTC (rev 4553) +++ trunk/PO_Header.php 2011-04-18 07:49:36 UTC (rev 4554) @@ -228,7 +228,7 @@ $_POST['RePrint'] = 0; } - echo "<meta http-equiv='Refresh' content='0; url=" . $rootpath . '/PO_Items.php?identifier='.$identifier. "'>"; + echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/PO_Items.php?identifier='.$identifier. '">'; echo '<p>'; prnMsg(_('You should automatically be forwarded to the entry of the purchase order line items page') . '. ' . _('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' . @@ -613,6 +613,7 @@ purchdata.suppliersuom, purchdata.suppliers_partno, purchdata.conversionfactor, + purchdata.leadtime, stockcategory.stockact FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid @@ -626,6 +627,9 @@ if (!isset($PurchItemRow['conversionfactor'])) { $PurchItemRow['conversionfactor']=1; } + if (!isset($PurchItemRow['leadtime'])) { + $PurchItemRow['leadtime']=1; + } $_SESSION['PO'.$identifier]->add_to_order( 1, $Purch_Item, @@ -644,18 +648,10 @@ 0, '', $PurchItemRow['decimalplaces'], - $Purch_Item, $PurchItemRow['suppliersuom'], $PurchItemRow['conversionfactor'], - $PurchItemRow['suppliers_partno'], - $Qty*$PurchItemRow['price'], - '', - 0, - 0, - 0, - 0, - $Qty, - $Qty*$PurchItemRow['price']); + $PurchItemRow['leadtime'], + $PurchItemRow['suppliers_partno'] ); echo "<meta http-equiv='Refresh' content='0; url=" . $rootpath . '/PO_Items.php?identifier='.$identifier. "'>"; } Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-04-18 00:09:23 UTC (rev 4553) +++ trunk/PO_Items.php 2011-04-18 07:49:36 UTC (rev 4554) @@ -49,7 +49,6 @@ } else { //ok to update the PO object variables $_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->Price=(doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['SuppPrice'.$POLine->LineNo]))/$_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->ConversionFactor); } - $_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->NetWeight=$_POST['NetWeight'.$POLine->LineNo]; $_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->ReqDelDate=$_POST['ReqDelDate'.$POLine->LineNo]; } } @@ -202,57 +201,39 @@ foreach ($_SESSION['PO'.$identifier]->LineItems as $POLine) { if ($POLine->Deleted==False) { $sql = "INSERT INTO purchorderdetails ( orderno, - itemcode, - deliverydate, - itemdescription, - glcode, - unitprice, - quantityord, - shiptref, - jobref, - itemno, - suppliersunit, - suppliers_partno, - subtotal_amount, - package, - pcunit, - netweight, - kgs, - cuft, - total_quantity, - total_amount, - assetid, - conversionfactor ) - VALUES ( - '" . $_SESSION['PO'.$identifier]->OrderNo . "', - '" . $POLine->StockID . "', - '" . FormatDateForSQL($POLine->ReqDelDate) . "', - '" . $POLine->ItemDescription . "', - '" . $POLine->GLCode . "', - '" . $POLine->Price . "', - '" . $POLine->Quantity . "', - '" . $POLine->ShiptRef . "', - '" . $POLine->JobRef . "', - '" . $POLine->ItemNo . "', - '" . $POLine->SuppliersUnit . "', - '" . $POLine->Suppliers_PartNo . "', - '" . $POLine->SubTotal_Amount . "', - '" . $POLine->Package . "', - '" . $POLine->PcUnit . "', - '" . $POLine->NetWeight . "', - '" . $POLine->KGs . "', - '" . $POLine->CuFt . "', - '" . $POLine->Total_Quantity . "', - '" . $POLine->Total_Amount . "', - '" . $POLine->AssetID . "', - '" . $POLine->ConversionFactor . "')"; + itemcode, + deliverydate, + itemdescription, + glcode, + unitprice, + quantityord, + shiptref, + jobref, + suppliersunit, + suppliers_partno, + assetid, + conversionfactor ) + VALUES ( + '" . $_SESSION['PO'.$identifier]->OrderNo . "', + '" . $POLine->StockID . "', + '" . FormatDateForSQL($POLine->ReqDelDate) . "', + '" . $POLine->ItemDescription . "', + '" . $POLine->GLCode . "', + '" . $POLine->Price . "', + '" . $POLine->Quantity . "', + '" . $POLine->ShiptRef . "', + '" . $POLine->JobRef . "', + '" . $POLine->SuppliersUnit . "', + '" . $POLine->Suppliers_PartNo . "', + '" . $POLine->AssetID . "', + '" . $POLine->ConversionFactor . "')"; $ErrMsg =_('One of the purchase order detail records could not be inserted into the database because'); $DbgMsg =_('The SQL statement used to insert the purchase order detail record and failed was'); $result =DB_query($sql,$db,$ErrMsg,$DbgMsg,true); } } /* end of the loop round the detail line items on the order */ - echo '<p>'; + echo '<p />'; prnMsg(_('Purchase Order') . ' ' . $_SESSION['PO'.$identifier]->OrderNo . ' ' . _('on') . ' ' . $_SESSION['PO'.$identifier]->SupplierName . ' ' . _('has been created'),'success'); } else { /*its an existing order need to update the old order info */ @@ -315,17 +296,8 @@ quantityord, shiptref, jobref, - itemno, suppliersunit, suppliers_partno, - subtotal_amount, - package, - pcunit, - netweight, - kgs, - cuft, - total_quantity, - total_amount, assetid, conversionfactor) VALUES ( @@ -338,17 +310,8 @@ '" . $POLine->Quantity . "', '" . $POLine->ShiptRef . "', '" . $POLine->JobRef . "', - '" . $POLine->ItemNo . "', '" . $POLine->SuppliersUnit . "', '" . $POLine->Suppliers_PartNo . "', - '" . $POLine->SubTotal_Amount . "', - '" . $POLine->Package . "', - '" . $POLine->PcUnit . "', - '" . $POLine->NetWeight . "', - '" . $POLine->KGs . "', - '" . $POLine->CuFt . "', - '" . $POLine->Total_Quantity . "', - '" . $POLine->Total_Amount . "', '" . $POLine->AssetID . "', '" . $POLine->ConversionFactor . "')"; @@ -362,17 +325,8 @@ quantityord='" . $POLine->Quantity . "', shiptref='" . $POLine->ShiptRef . "', jobref='" . $POLine->JobRef . "', - itemno='" . $POLine->ItemNo . "', suppliersunit='" . $POLine->SuppliersUnit . "', suppliers_partno='" . $POLine->Suppliers_PartNo . "', - subtotal_amount='" . $POLine->SubTotal_Amount . "', - package='" . $POLine->Package . "', - pcunit='" . $POLine->PcUnit . "', - netweight='" . $POLine->NetWeight . "', - kgs='" . $POLine->KGs . "', - cuft='" . $POLine->CuFt . "', - total_quantity='" . $POLine->Total_Quantity . "', - total_amount='" . $POLine->Total_Amount . "', completed=1, assetid='" . $POLine->AssetID . "', conversionfactor = '" . $POLine->ConversionFactor . "' @@ -386,17 +340,8 @@ quantityord='" . $POLine->Quantity . "', shiptref='" . $POLine->ShiptRef . "', jobref='" . $POLine->JobRef . "', - itemno='" . $POLine->ItemNo . "', suppliersunit='" . $POLine->SuppliersUnit . "', suppliers_partno='" . $POLine->Suppliers_PartNo . "', - subtotal_amount='" . $POLine->SubTotal_Amount . "', - package='" . $POLine->Package . "', - pcunit='" . $POLine->PcUnit . "', - netweight='" . $POLine->NetWeight . "', - kgs='" . $POLine->KGs . "', - cuft='" . $POLine->CuFt . "', - total_quantity='" . $POLine->Total_Quantity . "', - total_amount='" . $POLine->Total_Amount . "', assetid='" . $POLine->AssetID . "', conversionfactor = '" . $POLine->ConversionFactor . "' WHERE podetailitem='" . $POLine->PODetailRec . "'"; @@ -540,19 +485,9 @@ 0, $GLAccountName, 2, - '', $_POST['SuppliersUnit'], 1, '', - '', - ($_POST['Qty']*$_POST['Price']), - '', - '', - '', - '', - '', - $_POST['Qty'], - ($_POST['Qty']*$_POST['Price']), $_POST['AssetID']); include ('includes/PO_UnsetFormVbls.php'); } @@ -592,8 +527,6 @@ stockid, units, decimalplaces, - kgs, - netweight, stockact, accountname FROM stockmaster INNER JOIN stockcategory @@ -612,12 +545,10 @@ conversionfactor, supplierdescription, suppliersuom, - unitname, suppliers_partno, leadtime, MAX(purchdata.effectivefrom) AS latesteffectivefrom - FROM purchdata LEFT JOIN unitsofmeasure - ON purchdata.suppliersuom=unitsofmeasure.unitid + FROM purchdata WHERE purchdata.supplierno = '" . $_SESSION['PO'.$identifier]->SupplierID . "' AND purchdata.effectivefrom <='" . Date('Y-m-d') . "' AND purchdata.stockid = '". $ItemCode . "' @@ -625,7 +556,6 @@ purchdata.conversionfactor, purchdata.supplierdescription, purchdata.suppliersuom, - unitsofmeasure.unitname, purchdata.suppliers_partno, purchdata.leadtime"; @@ -637,14 +567,14 @@ $PurchPrice = $PurchRow['price']/$PurchRow['conversionfactor']; $ConversionFactor = $PurchRow['conversionfactor']; $SupplierDescription = $PurchRow['suppliers_partno'] .' - ' . $PurchRow['supplierdescription']; - $SuppliersUnitOfMeasure = $PurchRow['unitname']; + $SuppliersUnitOfMeasure = $PurchRow['suppliersuom']; $SuppliersPartNo = $PurchRow['suppliers_partno']; $LeadTime = $PurchRow['leadtime']; } else { // no purchasing data setup $PurchPrice = 0; $ConversionFactor = 1; $SupplierDescription = $ItemRow['description']; - $SuppliersUnitOfMeasure = $ItemRow['units']; + $SuppliersUnitOfMeasure = $ItemRow['unitname']; $SuppliersPartNo = ''; $LeadTime = 1; } @@ -666,19 +596,11 @@ 0, $Itemrow['accountname'], $ItemRow['decimalplaces'], - $ItemCode, $SuppliersUnitOfMeasure, $ConversionFactor, $LeadTime, - $SuppliersPartNo, - $Quantity*$PurchPrice, - '', - 0, - $ItemRow['netweight'], - $ItemRow['kgs'], - '', - $Quantity, - $Quantity*$PurchPrice ); + $SuppliersPartNo + ); } else { //no rows returned by the SQL to get the item prnMsg (_('The item code') . ' ' . $ItemCode . ' ' . _('does not exist in the database and therefore cannot be added to the order'),'error'); if ($debug==1){ @@ -711,15 +633,14 @@ echo '<tr> <th>' . _('Item Code') . '</th> <th>' . _('Description') . '</th> - <th>' . _('Weight') . '</th> <th>' . _('Quantity Our Units') . '</th> <th>' . _('Our Unit') .'</th> <th>' . _('Price Our Units') .' ('.$_SESSION['PO'.$identifier]->CurrCode. ')</th> <th>' . _('Unit Conversion Factor') . '</th> - <th>' . _('Quantity Supplier Units') . '</th> + <th>' . _('Order Quantity') . '<br />' . _('Supplier Units') . '</th> <th>' . _('Supplier Unit') . '</th> - <th>' . _('Price Supp Units') . ' ('.$_SESSION['PO'.$identifier]->CurrCode. ')</th> - <th>' . _('Subtotal') .' ('.$_SESSION['PO'.$identifier]->CurrCode. ')</th> + <th>' . _('Order Price') . '<br />' . _('Supp Units') . ' ('.$_SESSION['PO'.$identifier]->CurrCode. ')</th> + <th>' . _('Sub-Total') .' ('.$_SESSION['PO'.$identifier]->CurrCode. ')</th> <th>' . _('Deliver By') .'</th> </tr>'; @@ -749,7 +670,6 @@ echo '<td>' . $POLine->StockID . '</td> <td>' . $POLine->ItemDescription . '</td> - <td><input type="text" class="number" name="NetWeight' . $POLine->LineNo . '" size="8" value="' . $POLine->NetWeight . '"></td> <td class="number">' . number_format($POLine->Quantity,$POLine->DecimalPlaces) . '</td> <td>' . $POLine->Units . '</td> <td class="number">' . $DisplayPrice . '</td> @@ -759,7 +679,7 @@ <td><input type="text" class="number" name="SuppPrice' . $POLine->LineNo . '" size="10" value="' .number_format(($POLine->Price *$POLine->ConversionFactor),2) .'"></td> <td class="number">' . $DisplayLineTotal . '</td> <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'].'" name="ReqDelDate' . $POLine->LineNo.'" size="10" value="' .$POLine->ReqDelDate .'"></td> - <td><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . 'identifier='.$identifier. '&Delete=' . $POLine->LineNo . '">' . _('Delete') . '</a></td></tr>'; + <td><a href="' . $_SERVER['PHP_SELF'] . '?identifier='.$identifier. '&Delete=' . $POLine->LineNo . '">' . _('Delete') . '</a></td></tr>'; $_SESSION['PO'.$identifier]->Total = $_SESSION['PO'.$identifier]->Total + $LineTotal; } } @@ -777,14 +697,15 @@ if (isset($_POST['NonStockOrder'])) { - echo '<br /><table class=selection><tr><td>' . _('Item Description') . '</td>'; + echo '<br /><table class="selection"><tr> + <td>' . _('Item Description') . '</td>'; echo '<td><input type=text name=ItemDescription size=40></td></tr>'; echo '<tr><td>' . _('General Ledger Code') . '</td>'; echo '<td><select name="GLCode">'; - $sql='SELECT accountcode, + $sql="SELECT accountcode, accountname FROM chartmaster - ORDER BY accountcode ASC'; + ORDER BY accountcode ASC"; $result=DB_query($sql, $db); while ($myrow=DB_fetch_array($result)) { @@ -793,7 +714,7 @@ echo '</select></td></tr>'; echo '<tr><td>'._('OR Asset ID'). '</td> <td><select name="AssetID">'; - $AssetsResult = DB_query('SELECT assetid, description, datepurchased FROM fixedassets ORDER BY assetid DESC',$db); + $AssetsResult = DB_query("SELECT assetid, description, datepurchased FROM fixedassets ORDER BY assetid DESC",$db); echo '<option selected value="Not an Asset">' . _('Not an Asset') . '</option>'; while ($AssetRow = DB_fetch_array($AssetsResult)){ if ($AssetRow['datepurchased']=='0000-00-00'){ @@ -831,42 +752,26 @@ $sql = "SELECT stockmaster.stockid, stockmaster.description, - stockmaster.units, - purchdata.conversionfactor, - unitsofmeasure.unitname + stockmaster.units FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid - LEFT JOIN purchdata - ON stockmaster.stockid=purchdata.stockid - LEFT JOIN unitsofmeasure - ON unitsofmeasure.unitid=purchdata.suppliersuom WHERE stockmaster.mbflag<>'D' AND stockmaster.mbflag<>'K' AND stockmaster.mbflag<>'G' AND stockmaster.discontinued<>1 AND stockmaster.description " . LIKE . " '" . $SearchString ."' - AND (purchdata.supplierno='" . $_SESSION['PO'.$identifier]->SupplierID."' - OR purchdata.supplierno IS NULL) ORDER BY stockmaster.stockid LIMIT " .$_SESSION['DefaultDisplayRecordsMax']; } else { $sql = "SELECT stockmaster.stockid, stockmaster.description, - stockmaster.units, - purchdata.conversionfactor, - unitsofmeasure.unitname + stockmaster.units FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid - LEFT JOIN purchdata - ON stockmaster.stockid=purchdata.stockid - LEFT JOIN unitsofmeasure - ON unitsofmeasure.unitid=purchdata.suppliersuom WHERE stockmaster.mbflag<>'D' AND stockmaster.mbflag<>'K' AND stockmaster.mbflag<>'G' AND stockmaster.discontinued<>1 - AND (purchdata.supplierno='" . $_SESSION['PO'.$identifier]->SupplierID."' - OR purchdata.supplierno IS NULL) AND stockmaster.description " . LIKE . " '". $SearchString ."' AND stockmaster.categoryid='" . $_POST['StockCat'] . "' ORDER BY stockmaster.stockid @@ -880,42 +785,26 @@ if ($_POST['StockCat']=='All'){ $sql = "SELECT stockmaster.stockid, stockmaster.description, - stockmaster.units, - purchdata.conversionfactor, - unitsofmeasure.unitname + stockmaster.units FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid - LEFT JOIN purchdata - ON stockmaster.stockid=purchdata.stockid - LEFT JOIN unitsofmeasure - ON unitsofmeasure.unitid=purchdata.suppliersuom WHERE stockmaster.mbflag<>'D' AND stockmaster.mbflag<>'K' AND stockmaster.mbflag<>'G' AND stockmaster.discontinued<>1 - AND (purchdata.supplierno='" . $_SESSION['PO'.$identifier]->SupplierID."' - OR purchdata.supplierno IS NULL) AND stockmaster.stockid " . LIKE . " '" . $_POST['StockCode'] . "' ORDER BY stockmaster.stockid LIMIT ".$_SESSION['DefaultDisplayRecordsMax']; } else { $sql = "SELECT stockmaster.stockid, stockmaster.description, - stockmaster.units, - purchdata.conversionfactor, - unitsofmeasure.unitname + stockmaster.units FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid - LEFT JOIN purchdata - ON stockmaster.stockid=purchdata.stockid - LEFT JOIN unitsofmeasure - ON unitsofmeasure.unitid=purchdata.suppliersuom WHERE stockmaster.mbflag<>'D' AND stockmaster.mbflag<>'K' AND stockmaster.mbflag<>'G' and stockmaster.discontinued<>1 - AND (purchdata.supplierno='" . $_SESSION['PO'.$identifier]->SupplierID."' - OR purchdata.supplierno IS NULL) AND stockmaster.stockid " . LIKE . " '" . $_POST['StockCode'] . "' AND stockmaster.categoryid='" . $_POST['StockCat'] . "' ORDER BY stockmaster.stockid @@ -926,41 +815,25 @@ if ($_POST['StockCat']=='All'){ $sql = "SELECT stockmaster.stockid, stockmaster.description, - stockmaster.units, - purchdata.conversionfactor, - unitsofmeasure.unitname + stockmaster.units FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid - LEFT JOIN purchdata - ON stockmaster.stockid=purchdata.stockid - LEFT JOIN unitsofmeasure - ON unitsofmeasure.unitid=purchdata.suppliersuom WHERE stockmaster.mbflag<>'D' AND stockmaster.mbflag<>'K' AND stockmaster.mbflag<>'G' AND stockmaster.discontinued<>1 - AND (purchdata.supplierno='" . $_SESSION['PO'.$identifier]->SupplierID."' - OR purchdata.supplierno IS NULL) ORDER BY stockmaster.stockid LIMIT " . $_SESSION['DefaultDisplayRecordsMax']; } else { $sql = "SELECT stockmaster.stockid, stockmaster.description, - stockmaster.units, - purchdata.conversionfactor, - unitsofmeasure.unitname + stockmaster.units FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid - LEFT JOIN purchdata - ON stockmaster.stockid=purchdata.stockid - LEFT JOIN unitsofmeasure - ON unitsofmeasure.unitid=purchdata.suppliersuom WHERE stockmaster.mbflag<>'D' AND stockmaster.mbflag<>'K' AND stockmaster.mbflag<>'G' AND stockmaster.discontinued<>1 - AND (purchdata.supplierno='" . $_SESSION['PO'.$identifier]->SupplierID."' - OR purchdata.supplierno IS NULL) AND stockmaster.categoryid='" . $_POST['StockCat'] . "' ORDER BY stockmaster.stockid LIMIT " . $_SESSION['DefaultDisplayRecordsMax']; @@ -994,11 +867,16 @@ $DbgMsg = _('The SQL used to retrieve the category details but failed was'); $result1 = DB_query($sql,$db,$ErrMsg,$DbgMsg); - echo '<table class=selection><tr><th colspan=3><font size=3 color=blue>'. _('Search For Stock Items') . '</th>'; + echo '<table class=selection> + <tr> + <th colspan=3><font size=3 color=blue>'. _('Search For Stock Items') . '</th>'; - echo ':</font></tr><tr><td><select name="StockCat">'; + 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>'; @@ -1019,16 +897,17 @@ } echo '</select></td> - <td>' . _('Enter text extracts in the description') . ":</td> - <td><input type='text' name='Keywords' size=20 maxlength=25 value='" . $_POST['Keywords'] . "'></td></tr> + <td>' . _('Enter text extracts in the description') . ':</td> + <td><input type="text" name="Keywords" size=20 maxlength=25 value="' . $_POST['Keywords'] . '"></td></tr> <tr><td></td> - <td><font size=3><b>" . _('OR') . ' </b></font>' . _('Enter extract of the Stock Code') . - ":</td> - <td><input type='text' name='StockCode' size=15 maxlength=18 value='" . $_POST['StockCode'] . "'></td> + <td><font size=3><b>' . _('OR') . ' </b></font>' . _('Enter extract of the Stock Code') . ':</td> + <td><input type="text" name="StockCode" size=15 maxlength=18 value="' . $_POST['StockCode'] . '"></td> </tr> <tr><td></td> - <td><font size=3><b>" . _('OR') . ' </b></font><a target="_blank" href="'.$rootpath.'/Stocks.php?">' . _('Create a New Stock Item') . '</a></td></tr> - </table><br /> + <td><font size=3><b>' . _('OR') . ' </b></font><a target="_blank" href="'.$rootpath.'/Stocks.php">' . _('Create a New Stock Item') . '</a></td></tr> + </table> + <br /> + <div class="centre"><input type="submit" name="Search" value="' . _('Search Now') . '"> <input type="submit" name="NonStockOrder" value="' . _('Order a non stock item') . '"> </div><br />'; @@ -1070,9 +949,19 @@ $ImageSource = '<i>'._('No Image').'</i>'; } - if (strlen($myrow['unitname'])>0) { - $OrderUnits=$myrow['unitname']; - $ConversionFactor =$myrow['conversionfactor']; + /*Get conversion factor and supplier units if any */ + $sql = "SELECT purchdata.conversionfactor, + purchdata.suppliersuom + FROM purchdata + WHERE purchdata.supplierno='" . $_SESSION['PO'.$identifier]->SupplierID . "' + AND purchdata.stockid='" . $myrow['stockid'] . "'"; + $ErrMsg = _('Could not retrieve the purchasing data for the item'); + $PurchDataResult = DB_query($sql,$db,$ErrMsg); + + if (DB_num_rows($PurchDataResult)>0) { + $PurchDataRow = DB_fetch_array($PurchDataResult); + $OrderUnits=$PurchDataRow['suppliersuom']; + $ConversionFactor =$PurchDataRow['conversionfactor']; } else { $OrderUnits=$myrow['units']; $ConversionFactor =1; Modified: trunk/PO_PDFPurchOrder.php =================================================================== --- trunk/PO_PDFPurchOrder.php 2011-04-18 00:09:23 UTC (rev 4553) +++ trunk/PO_PDFPurchOrder.php 2011-04-18 07:49:36 UTC (rev 4554) @@ -1,6 +1,7 @@ <?php + /* $Id$*/ -//$PageSecurity = 2; + include('includes/session.inc'); include('includes/SQL_CommonFunctions.inc'); include('includes/DefinePOClass.php'); @@ -69,31 +70,31 @@ $ErrMsg = _('There was a problem retrieving the purchase order header details for Order Number'). ' ' . $OrderNo . ' ' . _('from the database'); $sql = "SELECT purchorders.supplierno, - suppliers.suppname, - suppliers.address1, - suppliers.address2, - suppliers.address3, - suppliers.address4, - purchorders.comments, - purchorders.orddate, - purchorders.rate, - purchorders.dateprinted, - purchorders.deladd1, - purchorders.deladd2, - purchorders.deladd3, - purchorders.deladd4, - purchorders.deladd5, - purchorders.deladd6, - purchorders.allowprint, - purchorders.requisitionno, - purchorders.initiator, - purchorders.paymentterms, - suppliers.currcode, - purchorders.status, - purchorders.stat_comment - FROM purchorders INNER JOIN suppliers - ON purchorders.supplierno = suppliers.supplierid - WHERE purchorders.orderno='" . $OrderNo ."'"; + suppliers.suppname, + suppliers.address1, + suppliers.address2, + suppliers.address3, + suppliers.address4, + purchorders.comments, + purchorders.orddate, + purchorders.rate, + purchorders.dateprinted, + purchorders.deladd1, + purchorders.deladd2, + purchorders.deladd3, + purchorders.deladd4, + purchorders.deladd5, + purchorders.deladd6, + purchorders.allowprint, + purchorders.requisitionno, + purchorders.initiator, + purchorders.paymentterms, + suppliers.currcode, + purchorders.status, + purchorders.stat_comment + FROM purchorders INNER JOIN suppliers + ON purchorders.supplierno = suppliers.supplierid + WHERE purchorders.orderno='" . $OrderNo ."'"; $result=DB_query($sql,$db, $ErrMsg); if (DB_num_rows($result)==0){ /*There is no order header returned */ $title = _('Print Purchase Order Error'); @@ -101,16 +102,16 @@ echo '<div class="centre"><br /><br /><br />'; prnMsg( _('Unable to Locate... [truncated message content] |
From: <dai...@us...> - 2011-04-18 07:49:50
|
Revision: 4554 http://web-erp.svn.sourceforge.net/web-erp/?rev=4554&view=rev Author: daintree Date: 2011-04-18 07:49:36 +0000 (Mon, 18 Apr 2011) Log Message: ----------- pre 4.03.8 Modified Paths: -------------- trunk/PO_Header.php trunk/PO_Items.php trunk/PO_PDFPurchOrder.php trunk/PurchData.php trunk/doc/Change.log.html trunk/includes/ConnectDB.inc trunk/includes/DefinePOClass.php trunk/includes/PO_ReadInOrder.inc trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.mo trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/sql/mysql/upgrade3.11.1-4.00.sql trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-04-18 00:09:23 UTC (rev 4553) +++ trunk/PO_Header.php 2011-04-18 07:49:36 UTC (rev 4554) @@ -228,7 +228,7 @@ $_POST['RePrint'] = 0; } - echo "<meta http-equiv='Refresh' content='0; url=" . $rootpath . '/PO_Items.php?identifier='.$identifier. "'>"; + echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/PO_Items.php?identifier='.$identifier. '">'; echo '<p>'; prnMsg(_('You should automatically be forwarded to the entry of the purchase order line items page') . '. ' . _('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' . @@ -613,6 +613,7 @@ purchdata.suppliersuom, purchdata.suppliers_partno, purchdata.conversionfactor, + purchdata.leadtime, stockcategory.stockact FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid @@ -626,6 +627,9 @@ if (!isset($PurchItemRow['conversionfactor'])) { $PurchItemRow['conversionfactor']=1; } + if (!isset($PurchItemRow['leadtime'])) { + $PurchItemRow['leadtime']=1; + } $_SESSION['PO'.$identifier]->add_to_order( 1, $Purch_Item, @@ -644,18 +648,10 @@ 0, '', $PurchItemRow['decimalplaces'], - $Purch_Item, $PurchItemRow['suppliersuom'], $PurchItemRow['conversionfactor'], - $PurchItemRow['suppliers_partno'], - $Qty*$PurchItemRow['price'], - '', - 0, - 0, - 0, - 0, - $Qty, - $Qty*$PurchItemRow['price']); + $PurchItemRow['leadtime'], + $PurchItemRow['suppliers_partno'] ); echo "<meta http-equiv='Refresh' content='0; url=" . $rootpath . '/PO_Items.php?identifier='.$identifier. "'>"; } Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-04-18 00:09:23 UTC (rev 4553) +++ trunk/PO_Items.php 2011-04-18 07:49:36 UTC (rev 4554) @@ -49,7 +49,6 @@ } else { //ok to update the PO object variables $_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->Price=(doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['SuppPrice'.$POLine->LineNo]))/$_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->ConversionFactor); } - $_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->NetWeight=$_POST['NetWeight'.$POLine->LineNo]; $_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->ReqDelDate=$_POST['ReqDelDate'.$POLine->LineNo]; } } @@ -202,57 +201,39 @@ foreach ($_SESSION['PO'.$identifier]->LineItems as $POLine) { if ($POLine->Deleted==False) { $sql = "INSERT INTO purchorderdetails ( orderno, - itemcode, - deliverydate, - itemdescription, - glcode, - unitprice, - quantityord, - shiptref, - jobref, - itemno, - suppliersunit, - suppliers_partno, - subtotal_amount, - package, - pcunit, - netweight, - kgs, - cuft, - total_quantity, - total_amount, - assetid, - conversionfactor ) - VALUES ( - '" . $_SESSION['PO'.$identifier]->OrderNo . "', - '" . $POLine->StockID . "', - '" . FormatDateForSQL($POLine->ReqDelDate) . "', - '" . $POLine->ItemDescription . "', - '" . $POLine->GLCode . "', - '" . $POLine->Price . "', - '" . $POLine->Quantity . "', - '" . $POLine->ShiptRef . "', - '" . $POLine->JobRef . "', - '" . $POLine->ItemNo . "', - '" . $POLine->SuppliersUnit . "', - '" . $POLine->Suppliers_PartNo . "', - '" . $POLine->SubTotal_Amount . "', - '" . $POLine->Package . "', - '" . $POLine->PcUnit . "', - '" . $POLine->NetWeight . "', - '" . $POLine->KGs . "', - '" . $POLine->CuFt . "', - '" . $POLine->Total_Quantity . "', - '" . $POLine->Total_Amount . "', - '" . $POLine->AssetID . "', - '" . $POLine->ConversionFactor . "')"; + itemcode, + deliverydate, + itemdescription, + glcode, + unitprice, + quantityord, + shiptref, + jobref, + suppliersunit, + suppliers_partno, + assetid, + conversionfactor ) + VALUES ( + '" . $_SESSION['PO'.$identifier]->OrderNo . "', + '" . $POLine->StockID . "', + '" . FormatDateForSQL($POLine->ReqDelDate) . "', + '" . $POLine->ItemDescription . "', + '" . $POLine->GLCode . "', + '" . $POLine->Price . "', + '" . $POLine->Quantity . "', + '" . $POLine->ShiptRef . "', + '" . $POLine->JobRef . "', + '" . $POLine->SuppliersUnit . "', + '" . $POLine->Suppliers_PartNo . "', + '" . $POLine->AssetID . "', + '" . $POLine->ConversionFactor . "')"; $ErrMsg =_('One of the purchase order detail records could not be inserted into the database because'); $DbgMsg =_('The SQL statement used to insert the purchase order detail record and failed was'); $result =DB_query($sql,$db,$ErrMsg,$DbgMsg,true); } } /* end of the loop round the detail line items on the order */ - echo '<p>'; + echo '<p />'; prnMsg(_('Purchase Order') . ' ' . $_SESSION['PO'.$identifier]->OrderNo . ' ' . _('on') . ' ' . $_SESSION['PO'.$identifier]->SupplierName . ' ' . _('has been created'),'success'); } else { /*its an existing order need to update the old order info */ @@ -315,17 +296,8 @@ quantityord, shiptref, jobref, - itemno, suppliersunit, suppliers_partno, - subtotal_amount, - package, - pcunit, - netweight, - kgs, - cuft, - total_quantity, - total_amount, assetid, conversionfactor) VALUES ( @@ -338,17 +310,8 @@ '" . $POLine->Quantity . "', '" . $POLine->ShiptRef . "', '" . $POLine->JobRef . "', - '" . $POLine->ItemNo . "', '" . $POLine->SuppliersUnit . "', '" . $POLine->Suppliers_PartNo . "', - '" . $POLine->SubTotal_Amount . "', - '" . $POLine->Package . "', - '" . $POLine->PcUnit . "', - '" . $POLine->NetWeight . "', - '" . $POLine->KGs . "', - '" . $POLine->CuFt . "', - '" . $POLine->Total_Quantity . "', - '" . $POLine->Total_Amount . "', '" . $POLine->AssetID . "', '" . $POLine->ConversionFactor . "')"; @@ -362,17 +325,8 @@ quantityord='" . $POLine->Quantity . "', shiptref='" . $POLine->ShiptRef . "', jobref='" . $POLine->JobRef . "', - itemno='" . $POLine->ItemNo . "', suppliersunit='" . $POLine->SuppliersUnit . "', suppliers_partno='" . $POLine->Suppliers_PartNo . "', - subtotal_amount='" . $POLine->SubTotal_Amount . "', - package='" . $POLine->Package . "', - pcunit='" . $POLine->PcUnit . "', - netweight='" . $POLine->NetWeight . "', - kgs='" . $POLine->KGs . "', - cuft='" . $POLine->CuFt . "', - total_quantity='" . $POLine->Total_Quantity . "', - total_amount='" . $POLine->Total_Amount . "', completed=1, assetid='" . $POLine->AssetID . "', conversionfactor = '" . $POLine->ConversionFactor . "' @@ -386,17 +340,8 @@ quantityord='" . $POLine->Quantity . "', shiptref='" . $POLine->ShiptRef . "', jobref='" . $POLine->JobRef . "', - itemno='" . $POLine->ItemNo . "', suppliersunit='" . $POLine->SuppliersUnit . "', suppliers_partno='" . $POLine->Suppliers_PartNo . "', - subtotal_amount='" . $POLine->SubTotal_Amount . "', - package='" . $POLine->Package . "', - pcunit='" . $POLine->PcUnit . "', - netweight='" . $POLine->NetWeight . "', - kgs='" . $POLine->KGs . "', - cuft='" . $POLine->CuFt . "', - total_quantity='" . $POLine->Total_Quantity . "', - total_amount='" . $POLine->Total_Amount . "', assetid='" . $POLine->AssetID . "', conversionfactor = '" . $POLine->ConversionFactor . "' WHERE podetailitem='" . $POLine->PODetailRec . "'"; @@ -540,19 +485,9 @@ 0, $GLAccountName, 2, - '', $_POST['SuppliersUnit'], 1, '', - '', - ($_POST['Qty']*$_POST['Price']), - '', - '', - '', - '', - '', - $_POST['Qty'], - ($_POST['Qty']*$_POST['Price']), $_POST['AssetID']); include ('includes/PO_UnsetFormVbls.php'); } @@ -592,8 +527,6 @@ stockid, units, decimalplaces, - kgs, - netweight, stockact, accountname FROM stockmaster INNER JOIN stockcategory @@ -612,12 +545,10 @@ conversionfactor, supplierdescription, suppliersuom, - unitname, suppliers_partno, leadtime, MAX(purchdata.effectivefrom) AS latesteffectivefrom - FROM purchdata LEFT JOIN unitsofmeasure - ON purchdata.suppliersuom=unitsofmeasure.unitid + FROM purchdata WHERE purchdata.supplierno = '" . $_SESSION['PO'.$identifier]->SupplierID . "' AND purchdata.effectivefrom <='" . Date('Y-m-d') . "' AND purchdata.stockid = '". $ItemCode . "' @@ -625,7 +556,6 @@ purchdata.conversionfactor, purchdata.supplierdescription, purchdata.suppliersuom, - unitsofmeasure.unitname, purchdata.suppliers_partno, purchdata.leadtime"; @@ -637,14 +567,14 @@ $PurchPrice = $PurchRow['price']/$PurchRow['conversionfactor']; $ConversionFactor = $PurchRow['conversionfactor']; $SupplierDescription = $PurchRow['suppliers_partno'] .' - ' . $PurchRow['supplierdescription']; - $SuppliersUnitOfMeasure = $PurchRow['unitname']; + $SuppliersUnitOfMeasure = $PurchRow['suppliersuom']; $SuppliersPartNo = $PurchRow['suppliers_partno']; $LeadTime = $PurchRow['leadtime']; } else { // no purchasing data setup $PurchPrice = 0; $ConversionFactor = 1; $SupplierDescription = $ItemRow['description']; - $SuppliersUnitOfMeasure = $ItemRow['units']; + $SuppliersUnitOfMeasure = $ItemRow['unitname']; $SuppliersPartNo = ''; $LeadTime = 1; } @@ -666,19 +596,11 @@ 0, $Itemrow['accountname'], $ItemRow['decimalplaces'], - $ItemCode, $SuppliersUnitOfMeasure, $ConversionFactor, $LeadTime, - $SuppliersPartNo, - $Quantity*$PurchPrice, - '', - 0, - $ItemRow['netweight'], - $ItemRow['kgs'], - '', - $Quantity, - $Quantity*$PurchPrice ); + $SuppliersPartNo + ); } else { //no rows returned by the SQL to get the item prnMsg (_('The item code') . ' ' . $ItemCode . ' ' . _('does not exist in the database and therefore cannot be added to the order'),'error'); if ($debug==1){ @@ -711,15 +633,14 @@ echo '<tr> <th>' . _('Item Code') . '</th> <th>' . _('Description') . '</th> - <th>' . _('Weight') . '</th> <th>' . _('Quantity Our Units') . '</th> <th>' . _('Our Unit') .'</th> <th>' . _('Price Our Units') .' ('.$_SESSION['PO'.$identifier]->CurrCode. ')</th> <th>' . _('Unit Conversion Factor') . '</th> - <th>' . _('Quantity Supplier Units') . '</th> + <th>' . _('Order Quantity') . '<br />' . _('Supplier Units') . '</th> <th>' . _('Supplier Unit') . '</th> - <th>' . _('Price Supp Units') . ' ('.$_SESSION['PO'.$identifier]->CurrCode. ')</th> - <th>' . _('Subtotal') .' ('.$_SESSION['PO'.$identifier]->CurrCode. ')</th> + <th>' . _('Order Price') . '<br />' . _('Supp Units') . ' ('.$_SESSION['PO'.$identifier]->CurrCode. ')</th> + <th>' . _('Sub-Total') .' ('.$_SESSION['PO'.$identifier]->CurrCode. ')</th> <th>' . _('Deliver By') .'</th> </tr>'; @@ -749,7 +670,6 @@ echo '<td>' . $POLine->StockID . '</td> <td>' . $POLine->ItemDescription . '</td> - <td><input type="text" class="number" name="NetWeight' . $POLine->LineNo . '" size="8" value="' . $POLine->NetWeight . '"></td> <td class="number">' . number_format($POLine->Quantity,$POLine->DecimalPlaces) . '</td> <td>' . $POLine->Units . '</td> <td class="number">' . $DisplayPrice . '</td> @@ -759,7 +679,7 @@ <td><input type="text" class="number" name="SuppPrice' . $POLine->LineNo . '" size="10" value="' .number_format(($POLine->Price *$POLine->ConversionFactor),2) .'"></td> <td class="number">' . $DisplayLineTotal . '</td> <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'].'" name="ReqDelDate' . $POLine->LineNo.'" size="10" value="' .$POLine->ReqDelDate .'"></td> - <td><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . 'identifier='.$identifier. '&Delete=' . $POLine->LineNo . '">' . _('Delete') . '</a></td></tr>'; + <td><a href="' . $_SERVER['PHP_SELF'] . '?identifier='.$identifier. '&Delete=' . $POLine->LineNo . '">' . _('Delete') . '</a></td></tr>'; $_SESSION['PO'.$identifier]->Total = $_SESSION['PO'.$identifier]->Total + $LineTotal; } } @@ -777,14 +697,15 @@ if (isset($_POST['NonStockOrder'])) { - echo '<br /><table class=selection><tr><td>' . _('Item Description') . '</td>'; + echo '<br /><table class="selection"><tr> + <td>' . _('Item Description') . '</td>'; echo '<td><input type=text name=ItemDescription size=40></td></tr>'; echo '<tr><td>' . _('General Ledger Code') . '</td>'; echo '<td><select name="GLCode">'; - $sql='SELECT accountcode, + $sql="SELECT accountcode, accountname FROM chartmaster - ORDER BY accountcode ASC'; + ORDER BY accountcode ASC"; $result=DB_query($sql, $db); while ($myrow=DB_fetch_array($result)) { @@ -793,7 +714,7 @@ echo '</select></td></tr>'; echo '<tr><td>'._('OR Asset ID'). '</td> <td><select name="AssetID">'; - $AssetsResult = DB_query('SELECT assetid, description, datepurchased FROM fixedassets ORDER BY assetid DESC',$db); + $AssetsResult = DB_query("SELECT assetid, description, datepurchased FROM fixedassets ORDER BY assetid DESC",$db); echo '<option selected value="Not an Asset">' . _('Not an Asset') . '</option>'; while ($AssetRow = DB_fetch_array($AssetsResult)){ if ($AssetRow['datepurchased']=='0000-00-00'){ @@ -831,42 +752,26 @@ $sql = "SELECT stockmaster.stockid, stockmaster.description, - stockmaster.units, - purchdata.conversionfactor, - unitsofmeasure.unitname + stockmaster.units FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid - LEFT JOIN purchdata - ON stockmaster.stockid=purchdata.stockid - LEFT JOIN unitsofmeasure - ON unitsofmeasure.unitid=purchdata.suppliersuom WHERE stockmaster.mbflag<>'D' AND stockmaster.mbflag<>'K' AND stockmaster.mbflag<>'G' AND stockmaster.discontinued<>1 AND stockmaster.description " . LIKE . " '" . $SearchString ."' - AND (purchdata.supplierno='" . $_SESSION['PO'.$identifier]->SupplierID."' - OR purchdata.supplierno IS NULL) ORDER BY stockmaster.stockid LIMIT " .$_SESSION['DefaultDisplayRecordsMax']; } else { $sql = "SELECT stockmaster.stockid, stockmaster.description, - stockmaster.units, - purchdata.conversionfactor, - unitsofmeasure.unitname + stockmaster.units FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid - LEFT JOIN purchdata - ON stockmaster.stockid=purchdata.stockid - LEFT JOIN unitsofmeasure - ON unitsofmeasure.unitid=purchdata.suppliersuom WHERE stockmaster.mbflag<>'D' AND stockmaster.mbflag<>'K' AND stockmaster.mbflag<>'G' AND stockmaster.discontinued<>1 - AND (purchdata.supplierno='" . $_SESSION['PO'.$identifier]->SupplierID."' - OR purchdata.supplierno IS NULL) AND stockmaster.description " . LIKE . " '". $SearchString ."' AND stockmaster.categoryid='" . $_POST['StockCat'] . "' ORDER BY stockmaster.stockid @@ -880,42 +785,26 @@ if ($_POST['StockCat']=='All'){ $sql = "SELECT stockmaster.stockid, stockmaster.description, - stockmaster.units, - purchdata.conversionfactor, - unitsofmeasure.unitname + stockmaster.units FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid - LEFT JOIN purchdata - ON stockmaster.stockid=purchdata.stockid - LEFT JOIN unitsofmeasure - ON unitsofmeasure.unitid=purchdata.suppliersuom WHERE stockmaster.mbflag<>'D' AND stockmaster.mbflag<>'K' AND stockmaster.mbflag<>'G' AND stockmaster.discontinued<>1 - AND (purchdata.supplierno='" . $_SESSION['PO'.$identifier]->SupplierID."' - OR purchdata.supplierno IS NULL) AND stockmaster.stockid " . LIKE . " '" . $_POST['StockCode'] . "' ORDER BY stockmaster.stockid LIMIT ".$_SESSION['DefaultDisplayRecordsMax']; } else { $sql = "SELECT stockmaster.stockid, stockmaster.description, - stockmaster.units, - purchdata.conversionfactor, - unitsofmeasure.unitname + stockmaster.units FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid - LEFT JOIN purchdata - ON stockmaster.stockid=purchdata.stockid - LEFT JOIN unitsofmeasure - ON unitsofmeasure.unitid=purchdata.suppliersuom WHERE stockmaster.mbflag<>'D' AND stockmaster.mbflag<>'K' AND stockmaster.mbflag<>'G' and stockmaster.discontinued<>1 - AND (purchdata.supplierno='" . $_SESSION['PO'.$identifier]->SupplierID."' - OR purchdata.supplierno IS NULL) AND stockmaster.stockid " . LIKE . " '" . $_POST['StockCode'] . "' AND stockmaster.categoryid='" . $_POST['StockCat'] . "' ORDER BY stockmaster.stockid @@ -926,41 +815,25 @@ if ($_POST['StockCat']=='All'){ $sql = "SELECT stockmaster.stockid, stockmaster.description, - stockmaster.units, - purchdata.conversionfactor, - unitsofmeasure.unitname + stockmaster.units FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid - LEFT JOIN purchdata - ON stockmaster.stockid=purchdata.stockid - LEFT JOIN unitsofmeasure - ON unitsofmeasure.unitid=purchdata.suppliersuom WHERE stockmaster.mbflag<>'D' AND stockmaster.mbflag<>'K' AND stockmaster.mbflag<>'G' AND stockmaster.discontinued<>1 - AND (purchdata.supplierno='" . $_SESSION['PO'.$identifier]->SupplierID."' - OR purchdata.supplierno IS NULL) ORDER BY stockmaster.stockid LIMIT " . $_SESSION['DefaultDisplayRecordsMax']; } else { $sql = "SELECT stockmaster.stockid, stockmaster.description, - stockmaster.units, - purchdata.conversionfactor, - unitsofmeasure.unitname + stockmaster.units FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid - LEFT JOIN purchdata - ON stockmaster.stockid=purchdata.stockid - LEFT JOIN unitsofmeasure - ON unitsofmeasure.unitid=purchdata.suppliersuom WHERE stockmaster.mbflag<>'D' AND stockmaster.mbflag<>'K' AND stockmaster.mbflag<>'G' AND stockmaster.discontinued<>1 - AND (purchdata.supplierno='" . $_SESSION['PO'.$identifier]->SupplierID."' - OR purchdata.supplierno IS NULL) AND stockmaster.categoryid='" . $_POST['StockCat'] . "' ORDER BY stockmaster.stockid LIMIT " . $_SESSION['DefaultDisplayRecordsMax']; @@ -994,11 +867,16 @@ $DbgMsg = _('The SQL used to retrieve the category details but failed was'); $result1 = DB_query($sql,$db,$ErrMsg,$DbgMsg); - echo '<table class=selection><tr><th colspan=3><font size=3 color=blue>'. _('Search For Stock Items') . '</th>'; + echo '<table class=selection> + <tr> + <th colspan=3><font size=3 color=blue>'. _('Search For Stock Items') . '</th>'; - echo ':</font></tr><tr><td><select name="StockCat">'; + 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>'; @@ -1019,16 +897,17 @@ } echo '</select></td> - <td>' . _('Enter text extracts in the description') . ":</td> - <td><input type='text' name='Keywords' size=20 maxlength=25 value='" . $_POST['Keywords'] . "'></td></tr> + <td>' . _('Enter text extracts in the description') . ':</td> + <td><input type="text" name="Keywords" size=20 maxlength=25 value="' . $_POST['Keywords'] . '"></td></tr> <tr><td></td> - <td><font size=3><b>" . _('OR') . ' </b></font>' . _('Enter extract of the Stock Code') . - ":</td> - <td><input type='text' name='StockCode' size=15 maxlength=18 value='" . $_POST['StockCode'] . "'></td> + <td><font size=3><b>' . _('OR') . ' </b></font>' . _('Enter extract of the Stock Code') . ':</td> + <td><input type="text" name="StockCode" size=15 maxlength=18 value="' . $_POST['StockCode'] . '"></td> </tr> <tr><td></td> - <td><font size=3><b>" . _('OR') . ' </b></font><a target="_blank" href="'.$rootpath.'/Stocks.php?">' . _('Create a New Stock Item') . '</a></td></tr> - </table><br /> + <td><font size=3><b>' . _('OR') . ' </b></font><a target="_blank" href="'.$rootpath.'/Stocks.php">' . _('Create a New Stock Item') . '</a></td></tr> + </table> + <br /> + <div class="centre"><input type="submit" name="Search" value="' . _('Search Now') . '"> <input type="submit" name="NonStockOrder" value="' . _('Order a non stock item') . '"> </div><br />'; @@ -1070,9 +949,19 @@ $ImageSource = '<i>'._('No Image').'</i>'; } - if (strlen($myrow['unitname'])>0) { - $OrderUnits=$myrow['unitname']; - $ConversionFactor =$myrow['conversionfactor']; + /*Get conversion factor and supplier units if any */ + $sql = "SELECT purchdata.conversionfactor, + purchdata.suppliersuom + FROM purchdata + WHERE purchdata.supplierno='" . $_SESSION['PO'.$identifier]->SupplierID . "' + AND purchdata.stockid='" . $myrow['stockid'] . "'"; + $ErrMsg = _('Could not retrieve the purchasing data for the item'); + $PurchDataResult = DB_query($sql,$db,$ErrMsg); + + if (DB_num_rows($PurchDataResult)>0) { + $PurchDataRow = DB_fetch_array($PurchDataResult); + $OrderUnits=$PurchDataRow['suppliersuom']; + $ConversionFactor =$PurchDataRow['conversionfactor']; } else { $OrderUnits=$myrow['units']; $ConversionFactor =1; Modified: trunk/PO_PDFPurchOrder.php =================================================================== --- trunk/PO_PDFPurchOrder.php 2011-04-18 00:09:23 UTC (rev 4553) +++ trunk/PO_PDFPurchOrder.php 2011-04-18 07:49:36 UTC (rev 4554) @@ -1,6 +1,7 @@ <?php + /* $Id$*/ -//$PageSecurity = 2; + include('includes/session.inc'); include('includes/SQL_CommonFunctions.inc'); include('includes/DefinePOClass.php'); @@ -69,31 +70,31 @@ $ErrMsg = _('There was a problem retrieving the purchase order header details for Order Number'). ' ' . $OrderNo . ' ' . _('from the database'); $sql = "SELECT purchorders.supplierno, - suppliers.suppname, - suppliers.address1, - suppliers.address2, - suppliers.address3, - suppliers.address4, - purchorders.comments, - purchorders.orddate, - purchorders.rate, - purchorders.dateprinted, - purchorders.deladd1, - purchorders.deladd2, - purchorders.deladd3, - purchorders.deladd4, - purchorders.deladd5, - purchorders.deladd6, - purchorders.allowprint, - purchorders.requisitionno, - purchorders.initiator, - purchorders.paymentterms, - suppliers.currcode, - purchorders.status, - purchorders.stat_comment - FROM purchorders INNER JOIN suppliers - ON purchorders.supplierno = suppliers.supplierid - WHERE purchorders.orderno='" . $OrderNo ."'"; + suppliers.suppname, + suppliers.address1, + suppliers.address2, + suppliers.address3, + suppliers.address4, + purchorders.comments, + purchorders.orddate, + purchorders.rate, + purchorders.dateprinted, + purchorders.deladd1, + purchorders.deladd2, + purchorders.deladd3, + purchorders.deladd4, + purchorders.deladd5, + purchorders.deladd6, + purchorders.allowprint, + purchorders.requisitionno, + purchorders.initiator, + purchorders.paymentterms, + suppliers.currcode, + purchorders.status, + purchorders.stat_comment + FROM purchorders INNER JOIN suppliers + ON purchorders.supplierno = suppliers.supplierid + WHERE purchorders.orderno='" . $OrderNo ."'"; $result=DB_query($sql,$db, $ErrMsg); if (DB_num_rows($result)==0){ /*There is no order header returned */ $title = _('Print Purchase Order Error'); @@ -101,16 +102,16 @@ echo '<div class="centre"><br /><br /><br />'; prnMsg( _('Unable to Locate... [truncated message content] |
From: <dai...@us...> - 2011-04-19 10:18:59
|
Revision: 4555 http://web-erp.svn.sourceforge.net/web-erp/?rev=4555&view=rev Author: daintree Date: 2011-04-19 10:18:49 +0000 (Tue, 19 Apr 2011) Log Message: ----------- more quoting xhtml sql Modified Paths: -------------- trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/DiscountCategories.php trunk/DiscountMatrix.php trunk/EDIMessageFormat.php trunk/EmailCustTrans.php trunk/ExchangeRateTrend.php trunk/FixedAssetCategories.php trunk/GLAccountInquiry.php trunk/GLBalanceSheet.php trunk/GLBudgets.php trunk/GLTags.php trunk/GLTrialBalance.php trunk/GoodsReceived.php trunk/InventoryQuantities.php trunk/InventoryValuation.php trunk/Locations.php trunk/MRPReschedules.php trunk/OutstandingGRNs.php trunk/geo_displaymap_customers.php trunk/geo_displaymap_suppliers.php trunk/includes/ConnectDB_mysqli.inc trunk/includes/PDFInventoryValnPageHeader.inc trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/sql/mysql/upgrade3.11.1-4.00.sql trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2011-04-18 07:49:36 UTC (rev 4554) +++ trunk/DebtorsAtPeriodEnd.php 2011-04-19 10:18:49 UTC (rev 4555) @@ -1,9 +1,7 @@ <?php -//$PageSecurity = 2; /* $Id$*/ -/* $Revision: 1.16 $ */ include('includes/session.inc'); if (isset($_POST['PrintPDF']) @@ -58,9 +56,9 @@ $title = _('Customer Balances') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg(_('The customer 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">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br>$SQL"; + echo '<br />' . $SQL; } include('includes/footer.inc'); exit; @@ -70,7 +68,7 @@ $title = _('Customer Balances') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg(_('The customer details listing has no clients to report on'),'warn'); - echo "<br><a href='".$rootpath."'/index.php?.'" . SID . "'>" . _('Back to the menu') . "</a>"; + echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; include('includes/footer.inc'); exit; } @@ -115,22 +113,10 @@ $LeftOvers = $pdf->addTextWrap(50,$YPos,160,$FontSize,_('Total balances'),'left'); $LeftOvers = $pdf->addTextWrap(220,$YPos,60,$FontSize,$DisplayTotBalance,'right'); - /* UldisN - $buf = $pdf->output(); - $len = strlen($buf); + + $pdf->OutputD($_SESSION['DatabaseName'] . '_DebtorBals_' . date('Y-m-d').'.pdf'); + $pdf->__destruct(); - header('Content-type: application/pdf'); - header("Content-Length: ".$len); - header('Content-Disposition: inline; filename=DebtorBals.pdf'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - - $pdf->stream(); - */ - $pdf->OutputD($_SESSION['DatabaseName'] . '_DebtorBals_' . date('Y-m-d').'.pdf');//UldisN - $pdf->__destruct(); //UldisN - } else { /*The option to print PDF was not hit */ $title=_('Debtor Balances'); @@ -142,29 +128,33 @@ /*if $FromCriteria is not set then show a form to allow input */ - echo '<form action=' . $_SERVER['PHP_SELF'] . " method='POST'><table class=selection>"; + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post"> + <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<tr><td>' . _('From Customer Code') .":</font></td><td><input tabindex=1 Type=text maxlength=6 size=7 name=FromCriteria value='1'></td></tr>"; - echo '<tr><td>' . _('To Customer Code') . ":</td><td><input tabindex=2 Type=text maxlength=6 size=7 name=ToCriteria value='zzzzzz'></td></tr>"; + echo '<tr><td>' . _('From Customer Code') .':</font></td> + <td><input tabindex=1 Type=text maxlength=6 size=7 name="FromCriteria" value="1"></td> + </tr>'; + echo '<tr><td>' . _('To Customer Code') . ':</td> + <td><input tabindex=2 type="text" maxlength=6 size=7 name="ToCriteria" value="zzzzzz"></td></tr>'; - echo '<tr><td>' . _('Balances As At') . ":</td><td><select tabindex=3 Name='PeriodEnd'>"; + echo '<tr><td>' . _('Balances As At') . ':</td> + <td><select tabindex=3 name="PeriodEnd">'; - $sql = 'SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno DESC'; + $sql = "SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno DESC"; $Periods = DB_query($sql,$db,_('Could not retrieve period data because'),_('The SQL that failed to get the period data was')); 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>'; } } echo '</select></td></tr>'; + echo '</table> + <br /><div class="centre"><input tabindex=5 type=submit name="PrintPDF" value="' . _('Print PDF') . '"></div>'; - - echo "</table><br><div class='centre'><input tabindex=5 type=Submit Name='PrintPDF' Value='" . _('Print PDF') . "'></div>"; - include('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-04-18 07:49:36 UTC (rev 4554) +++ trunk/DeliveryDetails.php 2011-04-19 10:18:49 UTC (rev 4555) @@ -10,7 +10,6 @@ /* Session started in header.inc for password checking the session will contain the details of the order from the Cart class object. The details of the order come from SelectOrderItems.php */ -//$PageSecurity=1; include('includes/session.inc'); $title = _('Order Delivery Details'); include('includes/header.inc'); @@ -644,35 +643,35 @@ WHERE orderno='" .$_SESSION['ExistingOrder'] . "'", $db,$ErrMsg,$DbgMsg,true); $ErrMsg = _('Could not insert the contract bill of materials'); $InsContractBOM = DB_query("INSERT INTO bom (parent, - component, - workcentreadded, - loccode, - effectiveafter, - effectiveto) - SELECT contractref, - stockid, - workcentreadded, - '" . $_SESSION['Items'.$identifier]->Location ."', - '" . Date('Y-m-d') . "', - '2037-12-31' - FROM contractbom - WHERE contractref='" . $ContractRow['contractref'] . "'",$db,$ErrMsg,$DbgMsg); + component, + workcentreadded, + loccode, + effectiveafter, + effectiveto) + SELECT contractref, + stockid, + workcentreadded, + '" . $_SESSION['Items'.$identifier]->Location ."', + '" . Date('Y-m-d') . "', + '2037-12-31' + FROM contractbom + WHERE contractref='" . $ContractRow['contractref'] . "'",$db,$ErrMsg,$DbgMsg); $ErrMsg = _('Unable to insert a new work order for the sales order item'); $InsWOResult = DB_query("INSERT INTO workorders (wo, - loccode, - requiredby, - startdate) - VALUES ('" . $WONo . "', - '" . $_SESSION['Items'.$identifier]->Location ."', - '" . $ContractRow['requireddate'] . "', - '" . Date('Y-m-d'). "')", - $db,$ErrMsg,$DbgMsg); + loccode, + requiredby, + startdate) + VALUES ('" . $WONo . "', + '" . $_SESSION['Items'.$identifier]->Location ."', + '" . $ContractRow['requireddate'] . "', + '" . Date('Y-m-d'). "')", + $db,$ErrMsg,$DbgMsg); //Need to get the latest BOM to roll up cost but also add the contract other requirements $CostResult = DB_query("SELECT SUM((materialcost+labourcost+overheadcost)*contractbom.quantity) AS cost - FROM stockmaster INNER JOIN contractbom - ON stockmaster.stockid=contractbom.stockid - WHERE contractbom.contractref='" . $ContractRow['contractref'] . "'", + FROM stockmaster INNER JOIN contractbom + ON stockmaster.stockid=contractbom.stockid + WHERE contractbom.contractref='" . $ContractRow['contractref'] . "'", $db); $CostRow = DB_fetch_row($CostResult); if (is_null($CostRow[0]) OR $CostRow[0]==0){ @@ -682,8 +681,8 @@ $Cost = $CostRow[0]; //cost of contract BOM } $CostResult = DB_query("SELECT SUM(costperunit*quantity) AS cost - FROM contractreqts - WHERE contractreqts.contractref='" . $ContractRow['contractref'] . "'", + FROM contractreqts + WHERE contractreqts.contractref='" . $ContractRow['contractref'] . "'", $db); $CostRow = DB_fetch_row($CostResult); //add other requirements cost to cost of contract BOM @@ -750,13 +749,13 @@ } $LineItemsSQL = "UPDATE salesorderdetails SET unitprice='" . $StockItem->Price . "', - quantity='" . $StockItem->Quantity . "', - discountpercent='" . floatval($StockItem->DiscountPercent) . "', - completed='" . $Completed . "', - poline='" . $StockItem->POLine . "', - itemdue='" . FormatDateForSQL($StockItem->ItemDue) . "' - WHERE salesorderdetails.orderno='" . $_SESSION['ExistingOrder'] . "' - AND salesorderdetails.orderlineno='" . $StockItem->LineNumber . "'"; + quantity='" . $StockItem->Quantity . "', + discountpercent='" . floatval($StockItem->DiscountPercent) . "', + completed='" . $Completed . "', + poline='" . $StockItem->POLine . "', + itemdue='" . FormatDateForSQL($StockItem->ItemDue) . "' + WHERE salesorderdetails.orderno='" . $_SESSION['ExistingOrder'] . "' + AND salesorderdetails.orderlineno='" . $StockItem->LineNumber . "'"; $DbgMsg = _('The SQL that was used to modify the order line and failed was'); $ErrMsg = _('The updated order line cannot be modified because'); @@ -771,10 +770,24 @@ prnMsg(_('Order Number') .' ' . $_SESSION['ExistingOrder'] . ' ' . _('has been updated'),'success'); - echo '<br /><table class=selection><tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td><td><a href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'] . '">'. _('Print packing slip - pre-printed stationery') .'</a></td></tr>'; - echo '<tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td><td><a target="_blank" href="' . $rootpath . '/PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'] . '">'. _('Print packing slip') . ' (' . _('Laser') . ')' .'</a></td></tr>'; - echo '<tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt=""></td><td><a href="' . $rootpath .'/ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $_SESSION['ExistingOrder'] . '">'. _('Confirm Order Delivery Quantities and Produce Invoice') .'</a></td></tr>'; - echo '<tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt=""></td><td><a href="' . $rootpath .'/SelectSalesOrder.php?identifier='.$identifier . '">'. _('Select A Different Order') .'</a></td></tr></table>'; + echo '<br /> + <table class="selection"> + <tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td><td><a href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'] . '">'. _('Print packing slip - pre-printed stationery') .'</a></td> + </tr>'; + echo '<tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td> + <td><a target="_blank" href="' . $rootpath . '/PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'] . '">'. _('Print packing slip') . ' (' . _('Laser') . ')' .'</a></td> + </tr>'; + echo '<tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt=""></td> + <td><a href="' . $rootpath .'/ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $_SESSION['ExistingOrder'] . '">'. _('Confirm Order Delivery Quantities and Produce Invoice') .'</a></td> + </tr>'; + echo '<tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt=""></td> + <td><a href="' . $rootpath .'/SelectSalesOrder.php?identifier='.$identifier . '">'. _('Select A Different Order') .'</a></td> + </tr> + </table>'; include('includes/footer.inc'); exit; } @@ -786,7 +799,7 @@ 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 '<font size=4><b>'. _('Customer') .' : ' . $_SESSION['Items'.$identifier]->CustomerName . '</b></font>'; + echo '<form action="' . $_SERVER['PHP_SELF'] . '?identifier='.$identifier . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -942,14 +955,14 @@ $ErrMsg = _('The stock locations could not be retrieved'); $DbgMsg = _('SQL used to retrieve the stock locations was') . ':'; -$StkLocsResult = DB_query('SELECT locationname,loccode - FROM locations',$db, $ErrMsg, $DbgMsg); +$StkLocsResult = DB_query("SELECT locationname,loccode + FROM locations",$db, $ErrMsg, $DbgMsg); 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>'; } } @@ -1031,75 +1044,68 @@ /* This field will control whether or not to display the company logo and address on the packlist */ - echo '<tr><td>' . _('Packlist Type') . ':</td><td><select name="DeliverBlind">'; - for ($p = 1; $p <= 2; $p++) { - echo '<option value=' . $p; - if ($p == $_SESSION['Items'.$identifier]->DeliverBlind) { - echo ' selected>'; - } else { - echo '>'; - } - switch ($p) { - case 2: - echo _('Hide Company Details/Logo'); - break; - default: - echo _('Show Company Details/Logo'); - break; - } - } + echo '<tr><td>' . _('Packlist Type') . ':</td> + <td><select name="DeliverBlind">'; + + if ($_SESSION['Items'.$identifier]->DeliverBlind ==2){ + echo '<option value="1">' . _('Show Company Details/Logo') . '</option>'; + echo '<option selected value="2">' . _('Hide Company Details/Logo') . '</option>'; + } else { + echo '<option selected value="1">' . _('Show Company Details/Logo') . '</option>'; + echo '<option value="2">' . _('Hide Company Details/Logo') . '</option>'; + } echo '</select></td></tr>'; if (isset($_SESSION['PrintedPackingSlip']) and $_SESSION['PrintedPackingSlip']==1){ echo '<tr> <td>'. _('Reprint packing slip') .':</td> - <td><select name="ReprintPackingSlip">'; - echo '<option value=0>' . _('Yes'); - echo '<option selected value=1>' . _('No'); + <td><select name="ReprintPackingSlip">'; + echo '<option value=0>' . _('Yes') . '</option>'; + echo '<option selected value=1>' . _('No') . '</option>'; echo '</select> '. _('Last printed') .': ' . ConvertSQLDate($_SESSION['DatePackingSlipPrinted']) . '</td></tr>'; - } else { - echo '<input type=hidden name="ReprintPackingSlip" value=0>'; - } 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)){ $_POST['ShipVia'] = $_SESSION['Items'.$identifier]->ShipVia; } -echo '<tr><td>'. _('Freight/Shipper Method') .':</td><td><select name="ShipVia">'; +echo '<tr><td>'. _('Freight/Shipper Method') .':</td> + <td><select name="ShipVia">'; + $ErrMsg = _('The shipper details could not be retrieved'); $DbgMsg = _('SQL used to retrieve the shipper details was') . ':'; -$sql = 'SELECT shipper_id, shippername - FROM shippers'; + +$sql = "SELECT shipper_id, shippername FROM shippers"; $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>'; } } echo '</select></td></tr>'; -echo '<tr><td>'. _('Quotation Only') .':</td><td><select name="Quotation">'; +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>'; @@ -1110,9 +1116,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/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2011-04-18 07:49:36 UTC (rev 4554) +++ trunk/DiscountCategories.php 2011-04-19 10:18:49 UTC (rev 4555) @@ -1,9 +1,7 @@ <?php -/* $Revision: 1.10 $ */ + /* $Id$*/ -//$PageSecurity = 11; - include('includes/session.inc'); $title = _('Discount Categories Maintenance'); @@ -15,7 +13,7 @@ $_POST['StockID']=$_POST['stockID']; } elseif (isset($_GET['StockID'])) { $_POST['StockID']=$_GET['StockID']; - $_POST['chooseoption']=1; + $_POST['ChooseOption']=1; $_POST['selectchoice']=1; } @@ -42,7 +40,7 @@ if ($InputError !=1) { $sql = "UPDATE stockmaster SET discountcategory='" . $_POST['DiscountCategory'] . "' - WHERE stockid='" . strtoupper($_POST['StockID']) . "'"; + WHERE stockid='" . strtoupper($_POST['StockID']) . "'"; $result = DB_query($sql,$db, _('The discount category') . ' ' . $_POST['DiscountCategory'] . ' ' . _('record for') . ' ' . strtoupper($_POST['StockID']) . ' ' . _('could not be updated because')); @@ -58,8 +56,8 @@ $sql="UPDATE stockmaster SET discountcategory='' WHERE stockid='" . trim(strtoupper($_GET['StockID'])) ."'"; $result = DB_query($sql,$db); prnMsg( _('The stock master record has been updated to no discount category'),'success'); - echo '<br>'; -} elseif (isset($_POST['submitcategory'])) { + echo '<br />'; +} elseif (isset($_POST['SubmitCategory'])) { $sql="UPDATE stockmaster SET discountcategory='".$_POST['DiscountCategory']."' WHERE categoryid='".$_POST['stockcategory']."'"; @@ -67,7 +65,7 @@ } if (isset($_POST['selectchoice'])) { - echo "<form name='update' method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo '<form name="update" method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $sql = "SELECT DISTINCT discountcategory FROM stockmaster WHERE discountcategory <>''"; @@ -79,31 +77,37 @@ while ($myrow = DB_fetch_array($result)){ if ($myrow['discountcategory']==$_POST['DiscCat']){ - echo "<option selected value='" . $myrow['discountcategory'] . "'>" . $myrow['discountcategory']; + echo '<option selected value="' . $myrow['discountcategory'] . '">' . $myrow['discountcategory'] . '</option>'; } else { - echo "<option value='" . $myrow['discountcategory'] . "'>" . $myrow['discountcategory']; + echo '<option value="' . $myrow['discountcategory'] . '">' . $myrow['discountcategory'] . '</option>'; } echo '</option>'; } echo '</select></td>'; - echo '<td><input type="submit" name="select" value="'._('Select').'"></td></tr></table><br>'; + echo '<td><input type="submit" name="select" value="'._('Select').'"></td></tr></table><br />'; } - 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 '<input type="hidden" name="chooseoption" value="'.$_POST['chooseoption'].'">'; + echo '<input type="hidden" name="ChooseOption" value="'.$_POST['ChooseOption'].'">'; echo '<input type="hidden" name="selectchoice" value="'.$_POST['selectchoice'].'">'; - if (isset($_POST['chooseoption']) and $_POST['chooseoption']==1) { - echo '<table class=selection><tr><td>'. _('Discount Category Code') .':</td><td>'; + if (isset($_POST['ChooseOption']) and $_POST['ChooseOption']==1) { + echo '<table class="selection"><tr><td>'. _('Discount Category Code') .':</td><td>'; if (isset($_POST['DiscCat'])) { - echo "<input type='text' name='DiscountCategory' maxlength=2 size=2 value='" . $_POST['DiscCat'] . - "'></td><td>"._('OR')."</td><td></td><td>"._('OR')."</td></tr>"; + echo '<input type="text" name="DiscountCategory" maxlength=2 size=2 value="' . $_POST['DiscCat'] .'"></td> + <td>'._('OR') . '</td> + <td></td> + <td>'._('OR').'</td> + </tr>'; } else { - echo "<input type='text' name='DiscountCategory' maxlength=2 size=2></td><td>". - _('OR')."</td><td></td><td>"._('OR')."</td></tr>"; + echo '<input type="text" name="DiscountCategory" maxlength=2 size=2></td> + <td>' ._('OR') . '</td> + <td></td> + <td>'._('OR') . '</td> + </tr>'; } if (!isset($_POST['StockID'])) { @@ -115,46 +119,53 @@ if (!isset($_POST['PartDesc'])) { $_POST['PartDesc']=''; } - echo '<tr><td>'. _('Enter Stock Code') .":</td><td><input type='text' name='StockID' size=20 maxlength=20 - value='".$_POST['StockID']."'></td> - <td>"._('Partial code').":</td><td><input type='text' name='PartID' size=10 maxlength=10 value='".$_POST['PartID']."'></td> - <td>"._('Partial description').":</td><td><input type='text' name='PartDesc' size=10 value='".$_POST['PartDesc']."' maxlength=10></td> - <td><input type='Submit' name='search' value='". _('Search') ."'></td></tr>"; + echo '<tr><td>'. _('Enter Stock Code') .':</td> + <td><input type="text" name="StockID" size=20 maxlength=20 value="' . $_POST['StockID'] . '"></td> + <td>'._('Partial code') . ':</td> + <td><input type="text" name="PartID" size=10 maxlength=10 value="' . $_POST['PartID'] . '"></td> + <td>' . _('Partial description') . ':</td> + <td><input type="text" name="PartDesc" size=10 value="' . $_POST['PartDesc'] .'" maxlength=10></td> + <td><input type="submit" name="search" value="' . _('Search') .'"></td></tr>'; echo '</table>'; - echo "<br><div class='centre'><input type='Submit' name='submit' value='". _('Update Item') ."'></div>"; + echo '<br /><div class="centre"><input type="submit" name="submit" value="'. _('Update Item') .'"></div>'; if (isset($_POST['search'])) { if ($_POST['PartID']!='' and $_POST['PartDesc']=='') - $sql="SELECT stockid, description FROM stockmaster WHERE stockid LIKE '%".$_POST['PartID']."%'"; + $sql="SELECT stockid, description FROM stockmaster + WHERE stockid " . LIKE . " '%".$_POST['PartID']."%'"; if ($_POST['PartID']=='' and $_POST['PartDesc']!='') - $sql="SELECT stockid, description FROM stockmaster WHERE description LIKE '%".$_POST['PartDesc']."%'"; + $sql="SELECT stockid, description FROM stockmaster + WHERE description " . LIKE . " '%".$_POST['PartDesc']."%'"; if ($_POST['PartID']!='' and $_POST['PartDesc']!='') - $sql="SELECT stockid, description FROM stockmaster WHERE stockid LIKE '%".$_POST['PartID']."%' and - description LIKE '%".$_POST['PartDesc']."%'"; + $sql="SELECT stockid, description FROM stockmaster + WHERE stockid " . LIKE . " '%".$_POST['PartID']."%' + AND description " . LIKE . " '%".$_POST['PartDesc']."%'"; $result=DB_query($sql,$db); if (!isset($_POST['stockID'])) { - echo _('Select a part code').':<br>'; + echo _('Select a part code').':<br />'; while ($myrow=DB_fetch_array($result)) { - echo '<input type="submit" name="stockID" value="'.$myrow['stockid'].'"><br>'; + echo '<input type="submit" name="stockID" value="'.$myrow['stockid'].'" /><br />'; } } } } else { - echo '<table class=selection><tr><td>'._('Assign discount category').'</td>'; - echo '<td><input type="text" name="DiscountCategory" maxlength=2 size=2></td>'; + echo '<table class=selection> + <tr> + <td>'._('Assign discount category').'</td>'; + echo '<td><input type="text" name="DiscountCategory" maxlength=2 size=2 /></td>'; echo '<td>'._('to all items in stock category').'</td>'; - $sql = 'SELECT categoryid, + $sql = "SELECT categoryid, categorydescription - FROM stockcategory'; + FROM stockcategory"; $result = DB_query($sql, $db); echo '<td><select name="stockcategory">'; while ($myrow=DB_fetch_array($result)) { echo '<option value="'.$myrow['categoryid'].'">'.$myrow['categorydescription'].'</option>'; } echo '</select></td></tr></table>'; - echo "<br><div class='centre'><input type='Submit' name='submitcategory' value='". _('Update Items') ."'></div>"; + echo '<br /><div class="centre"><input type="submit" name="SubmitCategory" value="'. _('Update Items') .'"></div>'; } echo '</form>'; @@ -182,10 +193,10 @@ $result = DB_query($sql,$db); - echo '<br><table class=selection>'; - echo "<tr> - <th>". _('Discount Category') ."</th> - <th>". _('Item') .'</th></tr>'; + echo '<br /><table class="selection">'; + echo '<tr> + <th>'. _('Discount Category') .'</th> + <th>'. _('Item') .'</th></tr>'; $k=0; //row colour counter @@ -197,16 +208,16 @@ echo '<tr class="OddTableRows">'; $k=1; } - $DeleteURL = $_SERVER['PHP_SELF'] . '?' . SID . '&Delete=yes&StockID=' . $myrow['stockid'] . '&DiscountCategory=' . $myrow['discountcategory']; + $DeleteURL = $_SERVER['PHP_SELF'] . '?Delete=yes&StockID=' . $myrow['stockid'] . '&DiscountCategory=' . $myrow['discountcategory']; - printf("<td>%s</td> - <td>%s - %s</td> - <td><a href='%s'>". _('Delete') .'</td> - </tr>', - $myrow['discountcategory'], - $myrow['stockid'], - $myrow['description'], - $DeleteURL); + printf('<td>%s</td> + <td>%s - %s</td> + <td><a href="%s">'. _('Delete') .'</td> + </tr>', + $myrow['discountcategory'], + $myrow['stockid'], + $myrow['description'], + $DeleteURL); } @@ -214,20 +225,22 @@ } else { /* $_POST['DiscCat'] ==0 */ - echo '</div><br>'; + echo '</div><br />'; prnMsg( _('There are currently no discount categories defined') . '. ' . _('Enter a two character abbreviation for the discount category and the stock code to which this category will apply to. Discount rules can then be applied to this discount category'),'info'); } } if (!isset($_POST['selectchoice'])) { - echo "<form method='post' name='choose' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo '<form method="post" name="choose" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection>'; + echo '<table class="selection">'; echo '<tr><td>'._('Update discount category for').'</td>'; - echo '<td><select name="chooseoption" onChange="ReloadForm(choose.selectchoice)">'; + echo '<td><select name="ChooseOption" onChange="ReloadForm(choose.selectchoice)">'; echo '<option value="1">'._('a single stock item').'</option>'; echo '<option value="2">'._('a complete stock category').'</option>'; - echo '</select></td></tr></table><br>'; + echo '</select></td></tr> + </table> + <br />'; echo '<div class="centre"><input ty... [truncated message content] |