From: <vv...@us...> - 2012-04-01 02:42:54
|
Revision: 5185 http://web-erp.svn.sourceforge.net/web-erp/?rev=5185&view=rev Author: vvs2012 Date: 2012-04-01 02:42:45 +0000 (Sun, 01 Apr 2012) Log Message: ----------- xhtml Modified Paths: -------------- trunk/GLAccountCSV.php trunk/GLAccountInquiry.php trunk/GLAccountReport.php trunk/GLAccounts.php trunk/GLBalanceSheet.php trunk/GLBudgets.php trunk/GLCodesInquiry.php trunk/GLJournal.php trunk/GLProfit_Loss.php trunk/GLTagProfit_Loss.php trunk/GLTags.php trunk/GLTransInquiry.php trunk/GLTrialBalance.php trunk/GeocodeSetup.php trunk/GoodsReceived.php trunk/GoodsReceivedControlled.php trunk/Labels.php trunk/MRP.php trunk/PDFCustomerList.php trunk/PDFPriceList.php trunk/PDFPrintLabel.php trunk/PDFRemittanceAdvice.php trunk/PDFStockCheckComparison.php trunk/PO_SelectOSPurchOrder.php trunk/PcAuthorizeExpenses.php trunk/PcReportTab.php trunk/PricesBasedOnMarkUp.php trunk/PricesByCost.php trunk/PrintCustStatements.php trunk/SalesGraph.php trunk/SecurityTokens.php trunk/SelectCustomer.php trunk/SelectSupplier.php trunk/SelectWorkOrder.php trunk/StockSerialItemResearch.php trunk/WhereUsedInquiry.php trunk/WorkCentres.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/Z_RePostGLFromPeriod.php trunk/Z_UpdateChartDetailsBFwd.php trunk/doc/Manual/ManualContents.php trunk/includes/InputSerialItemsExisting.php Modified: trunk/GLAccountCSV.php =================================================================== --- trunk/GLAccountCSV.php 2012-03-31 14:49:04 UTC (rev 5184) +++ trunk/GLAccountCSV.php 2012-04-01 02:42:45 UTC (rev 5185) @@ -18,7 +18,8 @@ echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple accounts and periods') . '</div><br />'; -echo '<form method="POST" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /*Dates in SQL format for the last day of last month*/ @@ -28,22 +29,22 @@ echo '<table> <tr> <td>'._('Selected Accounts') . ':</td> - <td><select name="Account[]" multiple>'; + <td><select name="Account[]" size="12" multiple="multiple">'; $sql = "SELECT accountcode, accountname FROM chartmaster ORDER BY accountcode"; $AccountsResult = DB_query($sql,$db); $i=0; while ($myrow=DB_fetch_array($AccountsResult,$db)){ if(isset($_POST['Account'][$i]) AND $myrow['accountcode'] == $_POST['Account'][$i]){ - echo '<option selected="selected" value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' ' . $myrow['accountname'] . '</option>'; + echo '<option selected="selected" value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8') . '</option>'; $i++; } else { - echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' ' . $myrow['accountname'] . '</option>'; + echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8') . '</option>'; } } echo '</select></td>'; echo '<td>'._('For Period range').':</td> - <td><select name="Period[]" multiple>'; + <td><select name="Period[]" size="12" multiple="multiple">'; $sql = "SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno DESC"; $Periods = DB_query($sql,$db); $id=0; @@ -67,7 +68,7 @@ ORDER BY tagref"; $result=DB_query($SQL,$db); -echo '<option value="0">0 - '._('All tags'); +echo '<option value="0">0 - ' . _('All tags') . '</option>'; while ($myrow=DB_fetch_array($result)){ if (isset($_POST['tag']) and $_POST['tag']==$myrow['tagref']){ echo '<option selected="selected" value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; @@ -78,8 +79,9 @@ echo '</select></td></tr>'; // End select tag -echo '</table><p> +echo '</table><br /> <div class="centre"><input type="submit" name="MakeCSV" value="'._('Make CSV File').'" /></div> + </div> </form>'; /* End of the Form rest of script is what happens if the show button is hit*/ Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2012-03-31 14:49:04 UTC (rev 5184) +++ trunk/GLAccountInquiry.php 2012-04-01 02:42:45 UTC (rev 5185) @@ -23,7 +23,8 @@ echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple periods') . '</div><br />'; -echo '<form method="POST" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /*Dates in SQL format for the last day of last month*/ @@ -35,9 +36,9 @@ $Account = DB_query($sql,$db); while ($myrow=DB_fetch_array($Account,$db)){ if($myrow['accountcode'] == $SelectedAccount){ - echo '<option selected="selected" value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' ' . $myrow['accountname']; + echo '<option selected="selected" value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8') . '</option>'; } else { - echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' ' . $myrow['accountname']; + echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8') . '</option>'; } } echo '</select></td></tr>'; @@ -51,30 +52,32 @@ ORDER BY tagref"; $result=DB_query($SQL,$db); -echo '<option value="0">0 - '._('All tags'); +echo '<option value="0">0 - '._('All tags') . '</option>'; while ($myrow=DB_fetch_array($result)){ if (isset($_POST['tag']) and $_POST['tag']==$myrow['tagref']){ - echo '<option selected="selected" value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription']; + echo '<option selected="selected" value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } else { - echo '<option value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription']; + echo '<option value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } } echo '</select></td></tr>'; // End select tag -echo '<tr> <td>'._('For Period range').':</td><td><select name=Period[] multiple>'; +echo '<tr> <td>'._('For Period range').':</td><td><select name="Period[]" size="12" multiple="multiple">'; $sql = "SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno DESC"; $Periods = DB_query($sql,$db); $id=0; while ($myrow=DB_fetch_array($Periods,$db)){ if(isset($SelectedPeriod[$id]) and $myrow['periodno'] == $SelectedPeriod[$id]){ - echo '<option selected="selected" value="' . $myrow['periodno'] . '">' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])); + echo '<option selected="selected" value="' . $myrow['periodno'] . '">' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])) . '</option>'; $id++; } else { - echo '<option value="' . $myrow['periodno'] . '">' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])); + echo '<option value="' . $myrow['periodno'] . '">' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])) . '</option>'; } } -echo '</select></td></tr><table>'; -echo '<p><div class="centre"><input type="submit" name="Show" value="'._('Show Account Transactions').'" /></div></form>'; +echo '</select></td></tr></table>'; +echo '<br /><div class="centre"><input type="submit" name="Show" value="'._('Show Account Transactions').'" /></div> + </div> + </form>'; /* End of the Form rest of script is what happens if the show button is hit*/ Modified: trunk/GLAccountReport.php =================================================================== --- trunk/GLAccountReport.php 2012-03-31 14:49:04 UTC (rev 5184) +++ trunk/GLAccountReport.php 2012-04-01 02:42:45 UTC (rev 5185) @@ -221,7 +221,7 @@ echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple accounts and periods') . '</div><br />'; - echo '<form method="POST" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /*Dates in SQL format for the last day of last month*/ @@ -231,7 +231,7 @@ echo '<table> <tr> <td>'._('Selected Accounts') . ':</td> - <td><select name="Account[]" multiple>'; + <td><select name="Account[]" multiple="multiple">'; $sql = "SELECT accountcode, accountname FROM chartmaster ORDER BY accountcode"; $AccountsResult = DB_query($sql,$db); $i=0; @@ -246,7 +246,7 @@ echo '</select></td>'; echo '<td>'._('For Period range').':</td> - <td><select Name=Period[] multiple>'; + <td><select Name=Period[] multiple="multiple">'; $sql = "SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno DESC"; $Periods = DB_query($sql,$db); $id=0; Modified: trunk/GLAccounts.php =================================================================== --- trunk/GLAccounts.php 2012-03-31 14:49:04 UTC (rev 5184) +++ trunk/GLAccounts.php 2012-04-01 02:42:45 UTC (rev 5185) @@ -207,7 +207,8 @@ if (!isset($_GET['delete'])) { - echo '<form method="post" name="GLAccounts" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<form method="post" id="GLAccounts" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedAccount)) { @@ -240,7 +241,7 @@ $sql = 'SELECT groupname FROM accountgroups ORDER BY sequenceintb'; $result = DB_query($sql, $db); - echo '<tr><td>' . _('Account Group') . ':</td><td><select name=Group>'; + echo '<tr><td>' . _('Account Group') . ':</td><td><select name="Group">'; while ($myrow = DB_fetch_array($result)){ if (isset($_POST['Group']) and $myrow[0]==$_POST['Group']){ @@ -250,17 +251,16 @@ } echo $myrow[0] . '">' . $myrow[0] . '</option>'; } + echo '</select></td></tr></table>'; if (!isset($_GET['SelectedAccount']) or $_GET['SelectedAccount']=='') { - echo '<script>defaultControl(document.GLAccounts.AccountCode);</script>'; + echo '<script type="text/javascript">defaultControl(document.GLAccounts.AccountCode);</script>'; } else { - echo '<script>defaultControl(document.GLAccounts.AccountName);</script>'; + echo '<script type="text/javascript">defaultControl(document.GLAccounts.AccountName);</script>'; } - echo '</select></td></tr></table>'; - echo '<br /><div class="centre"><input type="submit" name="submit" value="'. _('Enter Information') . '" /></div>'; - + echo '</div>'; echo '</form>'; } //end if record deleted no point displaying form to add record @@ -309,11 +309,11 @@ <td>%s</td> <td>%s</td> <td>%s</td> - <td><a href=\"%s&SelectedAccount=%s\">" . _('Edit') . "</td> - <td><a href=\"%s&SelectedAccount=%s&delete=1\" onclick=\"return confirm('" . _('Are you sure you wish to delete this account? Additional checks will be performed in any event to ensure data integrity is not compromised.') . "');\">" . _('Delete') . "</td> + <td><a href=\"%s&SelectedAccount=%s\">" . _('Edit') . "</a></td> + <td><a href=\"%s&SelectedAccount=%s&delete=1\" onclick=\"return confirm('" . _('Are you sure you wish to delete this account? Additional checks will be performed in any event to ensure data integrity is not compromised.') . "');\">" . _('Delete') . "</a></td> </tr>", $myrow[0], - $myrow[1], + htmlspecialchars($myrow[1],ENT_QUOTES,'UTF-8'), $myrow[2], $myrow[3], htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', @@ -328,13 +328,11 @@ //end of ifs and buts! -echo '<p>'; +echo '<br />'; if (isset($SelectedAccount)) { echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Show All Accounts') . '</a></div>'; } -echo '<p />'; - include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/GLBalanceSheet.php =================================================================== --- trunk/GLBalanceSheet.php 2012-03-31 14:49:04 UTC (rev 5184) +++ trunk/GLBalanceSheet.php 2012-04-01 02:42:45 UTC (rev 5185) @@ -367,16 +367,16 @@ <table class="selection"> <tr> <th colspan="6"> - <div class="centre"><font size="4" color="blue"><b>' . - _('Balance Sheet as at') . ' ' . $BalanceDate .'</b></font> + <div class="centre"><h1>' . + _('Balance Sheet as at') . ' ' . $BalanceDate .'</h1> </div> </th> </tr>'; if ($_POST['Detail']=='Detailed'){ $TableHeader = '<tr> - <th>'._('Account').'</td> - <th>'._('Account Name').'</td> + <th>'._('Account').'</th> + <th>'._('Account Name').'</th> <th colspan="2">' . $BalanceDate . '</th> <th colspan="2">'._('Last Year').'</th> </tr>'; @@ -428,10 +428,11 @@ <td></td> </tr>'; } - printf('<td colspan="2"><I>%s</I></td> - <td class="number">%s</td> - <td></td> - <td class="number">%s</td> + printf('<tr> + <td colspan="2"><I>%s</I></td> + <td class="number">%s</td> + <td></td> + <td class="number">%s</td> </tr>', $ParentGroups[$Level], locale_number_format($GroupTotal[$Level],$_SESSION['CompanyRecord']['decimalplaces']), @@ -453,10 +454,11 @@ </tr>'; } - printf('<td colspan="2">%s</td> - <td class="number">%s</td> - <td></td> - <td class="number">%s</td> + printf('<tr> + <td colspan="2">%s</td> + <td class="number">%s</td> + <td></td> + <td class="number">%s</td> </tr>', $ParentGroups[$Level], locale_number_format($GroupTotal[$Level],$_SESSION['CompanyRecord']['decimalplaces']), @@ -489,7 +491,7 @@ } printf('<tr> - <td colspan="3"><font size="4">%s</font></td> + <td colspan="3"><h2>%s</h2></td> <td class="number">%s</td> <td></td> <td class="number">%s</td> @@ -506,7 +508,7 @@ if ($_POST['Detail']=='Detailed'){ printf('<tr> - <td colspan="6"><font size="4" color="blue"><b>%s</b></font></td> + <td colspan="6"><h1>%s</h1></td> </tr>', $Sections[$myrow['sectioninaccounts']]); } @@ -521,7 +523,7 @@ if ($_POST['Detail']=='Detailed'){ $ActGrp = $myrow['groupname']; printf('<tr> - <td colspan="6"><font size="2" color="blue"><b>%s</b></font></td> + <td colspan="6"><h3>%s</h3></td> </tr>', $myrow['groupname']); echo $TableHeader; @@ -546,14 +548,14 @@ if ($_POST['Detail']=='Detailed'){ if ($k==1){ - echo '<tr class="EvenTableRows">'; + echo '<tr class="OddTableRows">'; $k=0; } else { echo '<tr class="EvenTableRows">'; $k++; } - $ActEnquiryURL = '<a href="' . $rootpath . '/GLAccountInquiry.php?Period=' . $_POST['BalancePeriodEnd'] . '&Account=' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . '</a>'; + $ActEnquiryURL = '<a href="' . $rootpath . '/GLAccountInquiry.php?Period=' . $_POST['BalancePeriodEnd'] . '&Account=' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . '</a>'; printf('<td>%s</td> <td>%s</td> @@ -563,7 +565,7 @@ <td></td> </tr>', $ActEnquiryURL, - $myrow['accountname'], + htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8'), locale_number_format($AccountBalance,$_SESSION['CompanyRecord']['decimalplaces']), locale_number_format($LYAccountBalance,$_SESSION['CompanyRecord']['decimalplaces'])); $j++; @@ -581,10 +583,11 @@ <td></td> </tr>'; } - printf('<td colspan="2"><I>%s</I></td> - <td class="number">%s</td> - <td></td> - <td class="number">%s</td> + printf('<tr> + <td colspan="2"><I>%s</I></td> + <td class="number">%s</td> + <td></td> + <td class="number">%s</td> </tr>', $ParentGroups[$Level], locale_number_format($GroupTotal[$Level],$_SESSION['CompanyRecord']['decimalplaces']), @@ -602,11 +605,12 @@ </tr>'; } - printf('<td colspan="2">%s</td> - <td class="number">%s</td> - <td></td> - <td class="number">%s</td> - </tr>', + printf('<tr> + <td colspan="2">%s</td> + <td class="number">%s</td> + <td></td> + <td class="number">%s</td> + </tr>', $ParentGroups[$Level], locale_number_format($GroupTotal[$Level],$_SESSION['CompanyRecord']['decimalplaces']), locale_number_format($LYGroupTotal[$Level],$_SESSION['CompanyRecord']['decimalplaces']) @@ -630,7 +634,7 @@ } printf('<tr> - <td colspan="3">%s</td> + <td colspan="3"><h2>%s</h2></td> <td class="number">%s</td> <td></td> <td class="number">%s</td> @@ -643,7 +647,7 @@ if (isset($myrow['sectioninaccounts']) and $_POST['Detail']=='Detailed'){ printf('<tr> - <td colspan="6"><font size="4" color="blue"><b>%s</b></font></td> + <td colspan="6"><h1>%s</h1></td> </tr>', $Sections[$myrow['sectioninaccounts']]); } @@ -656,7 +660,7 @@ </tr>'; printf('<tr> - <td colspan="3">'._('Check Total').'</font></td> + <td colspan="3"><h2>'._('Check Total').'</h2></td> <td class="number">%s</td> <td></td> <td class="number">%s</td> @@ -672,6 +676,7 @@ </tr>'; echo '</table>'; + echo '</div>'; echo '<br /><div class="centre"><input type="submit" name="SelectADifferentPeriod" value="'._('Select A Different Balance Date').'" /></div>'; echo '</div></form>'; } Modified: trunk/GLBudgets.php =================================================================== --- trunk/GLBudgets.php 2012-03-31 14:49:04 UTC (rev 5184) +++ trunk/GLBudgets.php 2012-04-01 02:42:45 UTC (rev 5185) @@ -28,11 +28,11 @@ echo '<p class="page_title_text"> <img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.' </p>'; -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" name="selectaccount">'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" id="selectaccount">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<table>'; - -echo '<br /> +echo '<br />'; +echo '<table> <tr> <td>'. _('Select GL Account'). ':</td> <td><select name="SelectedAccount" onchange="ReloadForm(selectaccount.Select)">'; @@ -49,7 +49,7 @@ prnMsg(_('No General ledger accounts have been set up yet') . ' - ' . _('budgets cannot be allocated until the GL accounts are set up'),'warn'); } else { while ($myrow=DB_fetch_array($result)){ - $Account = $myrow['accountcode'] . ' - ' . $myrow['accountname']; + $Account = $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8'); if (isset($SelectedAccount) AND isset($LastCode) AND $SelectedAccount==$myrow['accountcode']){ echo '<option selected="selected" value="' . $myrow['accountcode'] . '">' . $Account . '</option>'; $PrevCode=$LastCode; @@ -68,9 +68,10 @@ if (!isset($PrevCode)) {$PrevCode='';} if (!isset($NextCode)) {$NextCode='';} +echo '</table>'; echo '<input type="hidden" name="PrevAccount" value="'.$PrevCode.'" />'; echo '<input type="hidden" name="NextAccount" value="'.$NextCode.'" />'; -echo '</table>'; + echo '<br /> <table> <tr> @@ -80,6 +81,7 @@ </tr> </table> <br /> + </div> </form>'; // End of account selection @@ -157,7 +159,8 @@ // Table Headers - echo '<form name="form" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<form id="form" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br /> <table class="selection"> @@ -217,8 +220,8 @@ <tr> <td colspan="2">'._('Annual Budget').'</td> <td><input class="number" type="text" size="14" name="AnnualAmountLY" value="0.00" /></td> - </td><td> <td></td> + <td></td> <td><input class="number" type="text" size="14" name="AnnualAmountTY" value="0.00" /></td> <td></td> <td><input onchange="numberFormat(this,2)" class="number" type="text" size="14" name="AnnualAmount" value="0.00" /></td> @@ -228,12 +231,12 @@ echo '<input type="hidden" name="SelectedAccount" value="'.$SelectedAccount.'" />'; - echo '<script>defaultControl(document.form.1next);</script>'; + echo '<script type="text/javascript">defaultControl(document.form.1next);</script>'; echo '<br /> <div class="centre"> - <input type="submit" name=update value="' . _('Update') . '" /> + <input type="submit" name="update" value="' . _('Update') . '" /> </div> - + </div> </form>'; $SQL="SELECT MIN(periodno) FROM periods"; Modified: trunk/GLCodesInquiry.php =================================================================== --- trunk/GLCodesInquiry.php 2012-03-31 14:49:04 UTC (rev 5184) +++ trunk/GLCodesInquiry.php 2012-04-01 02:42:45 UTC (rev 5185) @@ -20,11 +20,11 @@ /*show a table of the orders returned by the SQL */ -echo '<table cellpadding="2" colspan="2"> +echo '<table cellpadding="2"> <tr> - <th>' . _('Group') . '</font></th> - <th>' . _('Code') . '</font></th> - <th>' . _('Account Name') . '</font></th> + <th><h3>' . _('Group') . '</h3></th> + <th><h3>' . _('Code') . '</h3></th> + <th><h3>' . _('Account Name') . '</h3></th> </tr>'; $j = 1; @@ -42,20 +42,20 @@ if ($myrow['group_']== $ActGrp){ printf('<td></td> - <td><font size="2">%s</font></td> - <td><font size="2">%s</font></td> - </tr>', - $myrow['accountcode'], - $myrow['accountname']); + <td>%s</td> + <td>%s</td> + </tr>', + $myrow['accountcode'], + htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8')); } else { $ActGrp = $myrow['group_']; - printf('<td><font size="2">%s</font></td> - <td><font size="2">%s</font></td> - <td><font size="2">%s</font></td> - </tr>', - $myrow['group_'], - $myrow['accountcode'], - $myrow['accountname']); + printf('<td><b>%s</b></td> + <td>%s</td> + <td>%s</td> + </tr>', + $myrow['group_'], + $myrow['accountcode'], + htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8')); } } //end of while loop Modified: trunk/GLJournal.php =================================================================== --- trunk/GLJournal.php 2012-03-31 14:49:04 UTC (rev 5184) +++ trunk/GLJournal.php 2012-04-01 02:42:45 UTC (rev 5185) @@ -239,7 +239,8 @@ } -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" name="form">'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" id="form">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"> @@ -254,8 +255,8 @@ } echo '<table> - <tr> - <td colspan="5"><table class="selection"> + <tr> + <td colspan="5"><table class="selection"> <tr> <td>'._('Date to Process Journal') . ':</td> <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="JournalProcessDate" maxlength="10" size="11" value="' . $_SESSION['JournalDetail']->JnlDate . '" /></td> @@ -281,7 +282,7 @@ echo '<tr> <th colspan="3"> - <div class="centre"><font size="3" color="blue"><b>' . _('Journal Line Entry') . '</b></font></div> + <div class="centre"><h2>' . _('Journal Line Entry') . '</h2></div> </th> </tr>'; @@ -350,11 +351,11 @@ echo '</tr> <tr> <th>' . _('Debit') . '</th> - <td><input type="text" class="number" name = "Debit" onchange="eitherOr(this, '.'Credit'.')" maxlength="12" size="10" value="' . locale_number_format($_POST['Debit'],$_SESSION['CompanyRecord']['decimalplaces']) . '" /></td> + <td><input type="text" class="number" name="Debit" onchange="eitherOr(this, '.'Credit'.')" maxlength="12" size="10" value="' . locale_number_format($_POST['Debit'],$_SESSION['CompanyRecord']['decimalplaces']) . '" /></td> </tr> <tr> <th>' . _('Credit') . '</th> - <td><input type="text" class="number" Name = "Credit" onchange="eitherOr(this, '.'Debit'.')" maxlength="12" size="10" value="' . locale_number_format($_POST['Credit'],$_SESSION['CompanyRecord']['decimalplaces']) . '" /></td> + <td><input type="text" class="number" name="Credit" onchange="eitherOr(this, '.'Debit'.')" maxlength="12" size="10" value="' . locale_number_format($_POST['Credit'],$_SESSION['CompanyRecord']['decimalplaces']) . '" /></td> </tr> <tr> <td></td> @@ -376,7 +377,7 @@ echo '<table class="selection" width="85%"> <tr> - <th colspan="6"><div class="centre"><font size="3" color="blue"><b>' . _('Journal Summary') . '</b></font></div></th> + <th colspan="6"><div class="centre"><h2>' . _('Journal Summary') . '</h2></div></th> </tr> <tr> <th>'._('GL Tag').'</th> @@ -432,7 +433,7 @@ <td class="number"><b>' . locale_number_format($CreditTotal,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td> </tr>'; if ($DebitTotal!=$CreditTotal) { - echo '<td align="center" style="background-color: #fddbdb"><b>' . _('Required to balance') .' - </b>' . + echo '<tr><td align="center" style="background-color: #fddbdb"><b>' . _('Required to balance') .' - </b>' . locale_number_format(abs($DebitTotal-$CreditTotal),$_SESSION['CompanyRecord']['decimalplaces']); } if ($DebitTotal>$CreditTotal) { @@ -440,7 +441,10 @@ } else if ($DebitTotal<$CreditTotal) { echo ' ' . _('Debit') . '</td></tr>'; } -echo '</table>'; +echo '</table> + </td> + </tr> + </table>'; if (abs($_SESSION['JournalDetail']->JournalTotal)<0.001 AND $_SESSION['JournalDetail']->GLItemCounter > 0){ echo '<br /> @@ -455,11 +459,11 @@ } if (!isset($_GET['NewJournal']) or $_GET['NewJournal']=='') { - echo '<script>defaultControl(document.form.GLManualCode);</script>'; + echo '<script type="text/javascript">defaultControl(document.form.GLManualCode);</script>'; } else { - echo '<script>defaultControl(document.form.JournalProcessDate);</script>'; + echo '<script type="text/javascript">defaultControl(document.form.JournalProcessDate);</script>'; } - +echo '</div>'; echo '</form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/GLProfit_Loss.php =================================================================== --- trunk/GLProfit_Loss.php 2012-03-31 14:49:04 UTC (rev 5184) +++ trunk/GLProfit_Loss.php 2012-04-01 02:42:45 UTC (rev 5185) @@ -21,13 +21,14 @@ echo '<p class="page_title_text"> <img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . _('Print Profit and Loss Report') . ' </p>'; - echo '<div class="page_help_text">' . _('Profit and loss statement (P&L), also called an Income Statment, or Statement of Operations, this is the statement that indicates how the revenue (money received from the sale of products and services before expenses are taken out, also known as the "top line") is transformed into the net income (the result after all revenues and expenses have been accounted for, also known as the "bottom line").') . + echo '<div class="page_help_text">' . _('Profit and loss statement (P&L), also called an Income Statment, or Statement of Operations, this is the statement that indicates how the revenue (money received from the sale of products and services before expenses are taken out, also known as the "top line") is transformed into the net income (the result after all revenues and expenses have been accounted for, also known as the "bottom line").') . '<br />' . _('The purpose of the income statement is to show whether the company made or lost money during the period being reported.') . '<br />' - . _('The P&L represents a period of time. This contrasts with the Balance Sheet, which represents a single moment in time.') . '<br />' + . _('The P&L represents a period of time. This contrasts with the Balance Sheet, which represents a single moment in time.') . '<br />' . _('webERP is an "accrual" based system (not a "cash based" system). Accrual systems include items when they are invoiced to the customer, and when expenses are owed based on the supplier invoice date.') . '</div>'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (Date('m') > $_SESSION['YearEnd']){ @@ -41,7 +42,7 @@ $period=GetPeriod($FromDate, $db); /*Show a form to allow input of criteria for profit and loss to show */ - echo '<p><table class="selection"> + echo '<br /><table class="selection"> <tr><td>' . _('Select Period From') . ':</td> <td><select name="FromPeriod">'; @@ -92,7 +93,7 @@ if($myrow['periodno']==$DefaultToPeriod){ echo '<option selected="selected" value="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } else { - echo '<option value =' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; + echo '<option value="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } echo '</select></td></tr>'; @@ -550,6 +551,7 @@ include('includes/header.inc'); echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <input type="hidden" name="FromPeriod" value="' . $_POST['FromPeriod'] . '" /> <input type="hidden" name="ToPeriod" value="' . $_POST['ToPeriod'] . '" />'; @@ -661,7 +663,7 @@ } if ($Section ==1){ /*Income */ printf('<tr> - <td colspan="2"><font size="2"><i>%s</i></font></td> + <td colspan="2"><h4><i>%s</i></h4></td> <td></td> <td class="number">%s</td> <td></td> @@ -675,7 +677,7 @@ locale_number_format(-$GrpPrdLY[$Level],$_SESSION['CompanyRecord']['decimalplaces'])); } else { /*Costs */ printf('<tr> - <td colspan="2"><font size="2"><i>%s </i></font></td> + <td colspan="2"><h4><i>%s </i></h4></td> <td class="number">%s</td> <td></td> <td class="number">%s</td> @@ -707,7 +709,7 @@ if ($Section ==1){ /*Income */ printf('<tr> - <td colspan="2"><font size="2"><i>%s </i></font></td> + <td colspan="2"><h4><i>%s </i></h4></td> <td></td> <td class="number">%s</td> <td></td> @@ -721,7 +723,7 @@ locale_number_format(-$GrpPrdLY[$Level],$_SESSION['CompanyRecord']['decimalplaces'])); } else { /*Costs */ printf('<tr> - <td colspan="2"><font size="2"><i>%s </i></font></td> + <td colspan="2"><h4><i>%s </i></h4></td> <td class="number">%s</td> <td></td> <td class="number">%s</td> @@ -782,7 +784,7 @@ <td><hr /></td> </tr>'; printf('<tr> - <td colspan="2"><font size="4">%s</font></td> + <td colspan="2"><h2>%s</h2></td> <td></td> <td class="number">%s</td> <td></td> @@ -801,7 +803,7 @@ <td colspan="6"><hr /></td> </tr>'; printf('<tr> - <td colspan="2"><font size="4">'._('Gross Profit').'</font></td> + <td colspan="2"><h2>'._('Gross Profit').'</h2></td> <td></td> <td class="number">%s</td> <td></td> @@ -833,7 +835,7 @@ <td colspan="6"><hr /></td> </tr>'; printf('<tr> - <td colspan="2"><font size="2"><i>'._('Gross Profit Percent').'</i></font></td> + <td colspan="2"><h4><i>'._('Gross Profit Percent').'</i></h4></td> <td></td> <td class="number"><i>%s</i></td> <td></td> @@ -855,7 +857,7 @@ if ($_POST['Detail']=='Detailed'){ printf('<tr> - <td colspan="6"><font size="4" color=BLUE><b>%s</b></font></td> + <td colspan="6"><h2><b>%s</b></h2></td> </tr>', $Sections[$myrow['sectioninaccounts']]); } @@ -911,7 +913,7 @@ $k++; } - $ActEnquiryURL = '<a href="' . $rootpath . '/GLAccountInquiry.php?Period=' . $_POST['ToPeriod'] . '&Account=' . $myrow['accountcode'] . '&Show=Yes">' . $myrow['accountcode'] . '</a>'; + $ActEnquiryURL = '<a href="' . $rootpath . '/GLAccountInquiry.php?Period=' . $_POST['ToPeriod'] . '&Account=' . $myrow['accountcode'] . '&Show=Yes">' . $myrow['accountcode'] . '</a>'; if ($Section ==1){ printf('<td>%s</td> @@ -924,7 +926,7 @@ <td class="number">%s</td> </tr>', $ActEnquiryURL, - $myrow['accountname'], + htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8'), locale_number_format(-$AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']), locale_number_format(-$AccountPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces']), locale_number_format(-$AccountPeriodLY,$_SESSION['CompanyRecord']['decimalplaces'])); @@ -939,7 +941,7 @@ <td></td> </tr>', $ActEnquiryURL, - $myrow['accountname'], + htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8'), locale_number_format($AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']), locale_number_format($AccountPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces']), locale_number_format($AccountPeriodLY,$_SESSION['CompanyRecord']['decimalplaces'])); @@ -965,7 +967,7 @@ } if ($Section ==1){ /*Income */ printf('<tr> - <td colspan="2"><font size="2"><i>%s </i></font></td> + <td colspan="2"><h4><i>%s </i></h4></td> <td></td> <td class="number">%s</td> <td></td> @@ -979,7 +981,7 @@ locale_number_format(-$GrpPrdLY[$Level]),$_SESSION['CompanyRecord']['decimalplaces']); } else { /*Costs */ printf('<tr> - <td colspan="2"><font size="2"><i>%s </i></font></td> + <td colspan="2"><h4><i>%s </i></h4></td> <td class="number">%s</td> <td></td> <td class="number">%s</td> @@ -1011,7 +1013,7 @@ if ($Section ==1){ /*Income */ printf('<tr> - <td colspan="2"><font size="2"><i>%s </i></font></td> + <td colspan="2"><h4><i>%s </i></h4></td> <td></td> <td class="number">%s</td> <td></td> @@ -1025,7 +1027,7 @@ locale_number_format(-$GrpPrdLY[$Level],$_SESSION['CompanyRecord']['decimalplaces'])); } else { /*Costs */ printf('<tr> - <td colspan="2"><font size="2"><i>%s </i></font></td> + <td colspan="2"><h4><i>%s </i></h4></td> <td class="number">%s</td> <td></td> <td class="number">%s</td> @@ -1060,7 +1062,7 @@ </tr>'; printf('<tr> - <td colspan="2"><font size="4">%s</font></td> + <td colspan="2"><h2>%s</h2></td> <td></td> <td class="number">%s</td> <td></td> @@ -1085,7 +1087,7 @@ <td><hr /></td> </tr>'; printf('<tr> - <td colspan="2"><font size="4">%s</font></td> + <td colspan="2"><h2>%s</h2></td> <td></td> <td class="number">%s</td> <td></td> @@ -1104,7 +1106,7 @@ <td colspan="6"><hr /></td> </tr>'; printf('<tr> - <td colspan="2"><font size="4">'._('Gross Profit').'</font></td> + <td colspan="2"><h2>'._('Gross Profit').'</h2></td> <td></td> <td class="number">%s</td> <td></td> @@ -1136,7 +1138,7 @@ <td colspan="6"><hr /></td> </tr>'; printf('<tr> - <td colspan="2"><font size="2"><i>'._('Gross Profit Percent').'</i></font></td> + <td colspan="2"><h4><i>'._('Gross Profit Percent').'</i></h4></td> <td></td> <td class="number"><i>%s</i></td> <td></td> @@ -1158,7 +1160,7 @@ if ($_POST['Detail']=='Detailed' and isset($Sections[$myrow['sectioninaccounts']])){ printf('<tr> - <td colspan="6"><font size="4" color=BLUE><b>%s</b></font></td> + <td colspan="6"><h2><b>%s</b></h2></td> </tr>', $Sections[$myrow['sectioninaccounts']]); } @@ -1172,7 +1174,7 @@ </tr>'; printf('<tr style="background-color:#ffffff"> - <td colspan="2"><font size="4" color="blue"><b>'._('Profit').' - '._('Loss').'</b></font></td> + <td colspan="2"><h2><b>'._('Profit').' - '._('Loss').'</b></h2></td> <td></td> <td class="number">%s</td> <td></td> @@ -1205,7 +1207,7 @@ </tr>'; printf('<tr> - <td colspan="2"><font size="2"><i>'._('Net Profit Percent').'</i></font></td> + <td colspan="2"><h4><i>'._('Net Profit Percent').'</i></h4></td> <td></td> <td class="number"><i>%s</i></td> <td></td> @@ -1226,6 +1228,7 @@ echo '</table>'; echo '<br /><div class="centre"><input type="submit" name="SelectADifferentPeriod" value="' . _('Select A Different Period') . '" /></div>'; } +echo '</div>'; echo '</form>'; include('includes/footer.inc'); Modified: trunk/GLTagProfit_Loss.php =================================================================== --- trunk/GLTagProfit_Loss.php 2012-03-31 14:49:04 UTC (rev 5184) +++ trunk/GLTagProfit_Loss.php 2012-04-01 02:42:45 UTC (rev 5185) @@ -17,6 +17,7 @@ include('includes/header.inc'); echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; 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="" />' . ' ' . $title . ' @@ -85,7 +86,7 @@ if($myrow['periodno']==$DefaultToPeriod){ echo '<option selected="selected" value="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } else { - echo '<option value =' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; + echo '<option value="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } echo '</select></td></tr>'; @@ -108,7 +109,7 @@ echo '<option value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } } - echo '</select></td>'; + echo '</select></td></tr>'; // End select tag echo '<tr> @@ -464,6 +465,7 @@ include('includes/header.inc'); echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <input type="hidden" name="FromPeriod" value="' . $_POST['FromPeriod'] . '" /> <input type="hidden" name="ToPeriod" value="' . $_POST['ToPeriod'] . '" />'; @@ -522,7 +524,7 @@ echo '<tr> <th colspan="9"> <div class="centre"> - <font size="3" color="blue"><b>' . _('Statement of Income and Expenditure for Tag'). ' ' . $myrow[0]._('during the'). ' ' . $NumberOfMonths . ' ' . _('months to'). ' ' . $PeriodToDate . '</b></font> + <h2><b>' . _('Statement of Income and Expenditure for Tag'). ' ' . $myrow[0]._('during the'). ' ' . $NumberOfMonths . ' ' . _('months to'). ' ' . $PeriodToDate . '</b></h2> </div> </th> </tr>'; @@ -581,7 +583,7 @@ if ($Section ==3){ /*Income */ printf('<tr> - <td colspan="2"><font size="2"><i>%s </i></font></td> + <td colspan="2"><h4><i>%s </i></h4></td> <td></td> <td class="number">%s</td> </tr>', @@ -589,7 +591,7 @@ locale_number_format($GrpPrdActual[$Level],$_SESSION['CompanyRecord']['decimalplaces'])); } else { /*Costs */ printf('<tr> - <td colspan="2"><font size="2"><i>%s </i></font></td> + <td colspan="2"><h4><i>%s </i></h4></td> <td class="number">%s</td> <td></td> </tr>', @@ -615,7 +617,7 @@ if ($Section ==4){ /*Income */ printf('<tr> - <td colspan="2"><font size="2"><i>%s </i></font></td> + <td colspan="2"><h4><i>%s </i></h4></td> <td></td> <td class="number">%s</td> </tr>', @@ -623,7 +625,7 @@ locale_number_format(-$GrpPrdActual[$Level],$_SESSION['CompanyRecord']['decimalplaces'])); } else { /*Costs */ printf('<tr> - <td colspan="2"><font size="2"><i>%s</i></font></td> + <td colspan="2"><h4><i>%s</i></h4></td> <td class="number">%s</td> <td></td> </tr>', @@ -649,7 +651,7 @@ </tr>'; printf('<tr> - <td colspan="2"><font size="4">%s</font></td> + <td colspan="2"><h2>%s</h2></td> <td></td> <td class="number">%s</td> </tr>', @@ -662,7 +664,7 @@ <td colspan="2"><hr /></td> </tr>'; printf('<tr> - <td colspan="2"><font size="4">%s</font></td> + <td colspan="2"><h2>%s</h2></td> <td></td> <td class="number">%s</td> </tr>', @@ -679,7 +681,7 @@ <td colspan="5"><hr /></td> </tr>'; printf('<tr> - <td colspan="2"><font size="4">'._('Gross Profit').'</font></td> + <td colspan="2"><h2>'._('Gross Profit').'</h2></td> <td></td> <td class="number">%s</td> </tr>', @@ -695,7 +697,7 @@ <td colspan="6"><hr /></td> </tr>'; printf('<tr> - <td colspan="2"><font size="2"><i>'._('Gross Profit Percent').'</i></font></td> + <td colspan="2"><h4><i>'._('Gross Profit Percent').'</i></h4></td> <td></td> <td class="number"><i>%s</i></td> </tr><tr><td colspan="6"> </td></tr>', @@ -709,7 +711,7 @@ if ($_POST['Detail']=='Detailed'){ printf('<tr> - <td colspan="6"><font size="4" color="blue"><b>%s</b></font></td> + <td colspan="6"><h2><b>%s</b></h2></td> </tr>', $Sections[$myrow['sectioninaccounts']]); } @@ -727,7 +729,7 @@ $ActGrp = $myrow['groupname']; if ($_POST['Detail']=='Detailed'){ printf('<tr> - <td colspan="6"><font size="2" color="blue"><b>%s</b></font></td> + <td colspan="6"><h4><b>%s</b></h4></td> </tr>', $myrow['groupname']); @@ -758,7 +760,7 @@ $k++; } - $ActEnquiryURL = '<a href="' . $rootpath . '/GLAccountInquiry.php?Period=' . $_POST['ToPeriod'] . '&Account=' . $myrow['account'] . '&Show=Yes">' . $myrow['account'] . '</a>'; + $ActEnquiryURL = '<a href="' . $rootpath . '/GLAccountInquiry.php?Period=' . $_POST['ToPeriod'] . '&Account=' . $myrow['account'] . '&Show=Yes">' . $myrow['account'] . '</a>'; if ($Section ==4){ printf('<td>%s</td> @@ -767,7 +769,7 @@ <td class="number">%s</td> </tr>', $ActEnquiryURL, - $myrow['accountname'], + htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8'), locale_number_format(-$AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces'])); } else { printf('<td>%s</td> @@ -775,7 +777,7 @@ <td class="number">%s</td> </tr>', $ActEnquiryURL, - $myrow['accountname'], + htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8'), locale_number_format(-$AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces'])); } @@ -799,13 +801,13 @@ } if ($Section ==4){ /*Income */ echo '<tr> - <td colspan="2"><font size="2"><i>' . $ActGrpLabel . '</i></font></td> + <td colspan="2"><h4><i>' . $ActGrpLabel . '</i></h4></td> <td></td> <td class="number">' . locale_number_format(-$GrpPrdActual[$Level],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> </tr>'; } else { /*Costs */ echo '<tr> - <td colspan="2"><font size="2"><i>' . $ActGrpLabel . '</i></font></td> + <td colspan="2"><h4><i>' . $ActGrpLabel . '</i></h4></td> <td class="number">' . locale_number_format($GrpPrdActual[$Level],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> </tr>'; } @@ -826,7 +828,7 @@ if ($Section ==4){ /*Income */ printf('<tr> - <td colspan="2"><font size="2"><i>%s</i></font></td> + <td colspan="2"><h4><i>%s</i></h4></td> <td></td> <td class="number">%s</td> </tr>', @@ -834,7 +836,7 @@ locale_number_format(-$GrpPrdActual[$Level],$_SESSION['CompanyRecord']['decimalplaces'])); } else { /*Costs */ printf('<tr> - <td colspan="2"><font size="2"><i>%s </i></font></td> + <td colspan="2"><h4><i>%s </i></h4></td> <td class="number">%s</td> <td></td> </tr>', @@ -856,7 +858,7 @@ <td colspan="2"><hr /></td> </tr> <tr> - <td colspan="2"><font size="4">' . $Sections[$Section] . '</font></td> + <td colspan="2"><h2>' . $Sections[$Section] . '</h2></td> <td></td> <td class="number">' . locale_number_format($SectionPrdActual,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> </tr>'; @@ -867,7 +869,7 @@ <td colspan="2"><hr /></td> </tr> <tr> - <td colspan="2"><font size="4">' . $Sections[$Section] . '</font></td> + <td colspan="2"><h2>' . $Sections[$Section] . '</h2></td> <td></td> <td class="number">' . locale_number_format(-$SectionPrdActual,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> </tr>'; @@ -878,7 +880,7 @@ <td colspan="2"><hr /></td> </tr> <tr> - <td colspan="2"><font size="4">'._('Gross Profit').'</font></td> + <td colspan="2"><h2>'._('Gross Profit').'</h2></td> <td></td> <td class="number">' . locale_number_format($TotalIncome - $SectionPrdActual,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> </tr>'; @@ -893,7 +895,7 @@ <td colspan="2"><hr /></td> </tr> <tr> - <td colspan="2"><font size="2"><i>'._('Gross Profit Percent').'</i></font></td> + <td colspan="2"><h4><i>'._('Gross Profit Percent').'</i></h4></td> <td></td> <td class="number"><i>' . locale_number_format($PrdGPPercent,1) . '%</i></td> <td></td> @@ -908,7 +910,7 @@ if ($_POST['Detail']=='Detailed' AND isset($Sections[$myrow['sectioninaccounts']])){ echo '<tr> - <td colspan="6"><font size="4" color="blue"><b>' . $Sections[$myrow['sectioninaccounts']] . '</b></font></td> + <td colspan="6"><h2><b>' . $Sections[$myrow['sectioninaccounts']] . '</b></h2></td> </tr>'; } $j++; @@ -921,7 +923,7 @@ </tr>'; printf('<tr style="background-color:#ffffff"> - <td colspan="2"><font size="4" color="blue"><b>'._('Surplus').' - '._('Deficit').'</b></font></td> + <td colspan="2"><h2><b>'._('Surplus').' - '._('Deficit').'</b></h2></td> <td></td> <td class="number">%s</td> </tr>', @@ -936,6 +938,7 @@ <input type="submit" name="SelectADifferentPeriod" value="'._('Select A Different Period').'" /> </div>'; } +echo '</div>'; echo '</form>'; include('includes/footer.inc'); Modified: trunk/GLTags.php =================================================================== --- trunk/GLTags.php 2012-03-31 14:49:04 UTC (rev 5184) +++ trunk/GLTags.php 2012-04-01 02:42:45 UTC (rev 5185) @@ -51,7 +51,8 @@ _('Print') . '" alt="" />' . ' ' . $title . ' </p>'; -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" name="form">'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" id="form">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br /> <table> @@ -69,7 +70,8 @@ echo '</td> </tr> </table> - <p /> + <br /> + </div> </form> <table class="selection"> <tr> @@ -88,14 +90,14 @@ echo '<tr> <td>' . $myrow['tagref'] . '</td> <td>' . $myrow['tagdescription'] . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedTag=' . $myrow['tagref'] . '&Action=edit">' . _('Edit') . '</a></td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedTag=' . $myrow['tagref'] . '&Action=delete" onclick="return confirm(\'' . _('Are you sure you wish to delete this GL tag?') . '\');">' . _('Delete') . '</a></td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedTag=' . $myrow['tagref'] . '&Action=edit">' . _('Edit') . '</a></td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedTag=' . $myrow['tagref'] . '&Action=delete" onclick="return confirm(\'' . _('Are you sure you wish to delete this GL tag?') . '\');">' . _('Delete') . '</a></td> </tr>'; } echo '</table>'; -echo '<script>defaultControl(document.form.Description);</script>'; +echo '<script type="text/javascript">defaultControl(document.form.Description);</script>'; include('includes/footer.inc'); Modified: trunk/GLTransInquiry.php =================================================================== --- trunk/GLTransInquiry.php 2012-03-31 14:49:04 UTC (rev 5184) +++ trunk/GLTransInquiry.php 2012-04-01 02:42:45 UTC (rev 5185) @@ -6,7 +6,7 @@ $title = _('General Ledger Transaction Inquiry'); include('includes/header.inc'); -$MenuURL = '<a href="'. $rootpath . '/index.php?&Application=GL">' . _('General Ledger Menu') . '</a></div>'; +$MenuURL = '<div><a href="'. $rootpath . '/index.php?&Application=GL">' . _('General Ledger Menu') . '</a></div>'; if ( !isset($_GET['TypeID']) OR !isset($_GET['TransNo']) ) { prnMsg(_('This page requires a valid transaction type and number'),'warn'); @@ -36,7 +36,7 @@ . _('Print') . '" alt="" />' . ' ' . $title . '</p>'; echo '<table class="selection">'; //Main table echo '<tr> - <th colspan="7"><font size="3" color="blue"><b>' . $TransName . ' ' . $_GET['TransNo'] . '</b></font></th> + <th colspan="7"><h2><b>' . $TransName . ' ' . $_GET['TransNo'] . '</b></h2></th> </tr> <tr> <th>' . _('Date') . '</th> @@ -76,18 +76,18 @@ if ( $TransRow['amount'] > 0) { $DebitAmount = locale_number_format($TransRow['amount'],$_SESSION['CompanyRecord']['decimalplaces']); $DebitTotal += $TransRow['amount']; - $CreditAmount = ' '; + $CreditAmount = ' '; } else { $CreditAmount = locale_number_format(-$TransRow['amount'],$_SESSION['CompanyRecord']['decimalplaces']); $CreditTotal += $TransRow['amount']; - $DebitAmount = ' '; + $DebitAmount = ' '; } if ( $TransRow['posted']==0 ){ $Posted = _('No'); } if ( $TransRow['account'] == $_SESSION['CompanyRecord']['debtorsact'] ) { $URL = $rootpath . '/CustomerInquiry.php?CustomerID='; - $date = '&TransAfterDate=' . $TranDate; + $date = '&TransAfterDate=' . $TranDate; $DetailSQL = "SELECT debtortrans.debtorno, debtortrans.ovamount, @@ -101,7 +101,7 @@ $DetailResult = DB_query($DetailSQL,$db); } elseif ( $TransRow['account'] == $_SESSION['CompanyRecord']['creditorsact'] ) { $URL = $rootpath . '/SupplierInquiry.php?SupplierID='; - $date = '&FromDate=' . $TranDate; + $date = '&FromDate=' . $TranDate; $DetailSQL = "SELECT supptrans.supplierno, supptrans.ovamount, @@ -117,7 +117,7 @@ $URL = $rootpath . '/GLAccountInquiry.php?Account=' . $TransRow['account']; if( mb_strlen($TransRow['narrative'])==0 ) { - $TransRow['narrative'] = ' '; + $TransRow['narrative'] = ' '; } if ($j==1) { @@ -142,18 +142,18 @@ if ( $TransRow['amount'] > 0){ if ($TransRow['account'] == $_SESSION['CompanyRecord']['debtorsact']) { $Debit = locale_number_format(($DetailRow[1] + $DetailRow[2]) / $DetailRow[3],$_SESSION['CompanyRecord']['decimalplaces']); - $Credit = ' '; + $Credit = ' '; } else { $Debit = locale_number_format((-$DetailRow[1] - $DetailRow[2]) / $DetailRow[3],$_SESSION['CompanyRecord']['decimalplaces']); - $Credit = ' '; + $Credit = ' '; } } else { if ($TransRow['account'] == $_SESSION['CompanyRecord']['debtorsact']) { $Credit = locale_number_format(-($DetailRow[1] + $DetailRow[2]) / $DetailRow[3],$_SESSION['CompanyRecord']['decimalplaces']); - $Debit = ' '; + $Debit = ' '; } else { $Credit = locale_number_format(($DetailRow[1] + $DetailRow[2]) / $DetailRow[3],$_SESSION['CompanyRecord']['decimalplaces']); - $Debit = ' '; + $Debit = ' '; } } @@ -182,17 +182,14 @@ <td class="number" colspan="3"><b>' . _('Total') . '</b></td> <td class="number">' . locale_number_format(($DebitTotal),$_SESSION['CompanyRecord']['decimalplaces']) . '</td> <td class="number">' . locale_number_format((-$CreditTotal),$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td colspan="2"> </td> + <td colspan="2"> </td> </tr>'; - echo '</table><p>'; + echo '</table>'; } } -echo '</td> - </tr> - </table>'; - + include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2012-03-31 14:49:04 UTC (rev 5184) +++ trunk/GLTrialBalance.php 2012-04-01 02:42:45 UTC (rev 5185) @@ -29,7 +29,8 @@ echo '<p class="page_title_text"> <img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Trial Balance') . '" alt="" />' . ' ' . $title . ' </p>'; - echo '<form method="POST" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (Date('m') > $_SESSION['YearEnd']){ @@ -47,7 +48,7 @@ echo '<table class="selection"> <tr> <td>' . _('Select Period From:') . '</td> - <td><select Name="FromPeriod">'; + <td><select name="FromPeriod">'; $NextYear = date('Y-m-d',strtotime('+1 Year')); $sql = "SELECT periodno, lastdate_in_period @@ -83,7 +84,7 @@ echo '<tr> <td>' . _('Select Period To:') .'</td> - <td><select Name="ToPeriod">'; + <td><select name="ToPeriod">'; $RetResult = DB_data_seek($Periods,0); @@ -101,7 +102,7 @@ <br />'; echo '<div class="centre"> - <input type="submit" Name="ShowTB" value="' . _('Show Trial Balance') .'" /> + <input type="submit" name="ShowTB" value="' . _('Show Trial Balance') .'" /> <input type="submit" name="PrintPDF" value="'._('PrintPDF').'" /> </div>'; @@ -383,7 +384,8 @@ } else { include('includes/header.inc'); - echo '<form method="POST" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="FromPeriod" value="' . $_POST['FromPeriod'] . '" /> <input type="hidden" name="ToPeriod" value="' . $_POST['ToPeriod'] . '" />'; @@ -482,11 +484,11 @@ $ParentGroups[$Level]=''; } elseif ($ParentGroups[$Level]==$myrow['parentgroupname']) { printf('<tr> - <td colspan="2"><I>%s ' . _('Total') . ' </I></td> - <td class="number"><I>%s</I></td> - <td class="number"><I>%s</I></td> - <td class="number"><I>%s</I></td> - <td class="number"><I>%s</I></td> + <td colspan="2"><i>%s ' . _('Total') . ' </i></td> + <td class="number"><i>%s</i></td> + <td class="number"><i>%s</i></td> + <td class="number"><i>%s</i></td> + <td class="number"><i>%s</i></td> </tr>', $ParentGroups[$Level], locale_number_format($GrpActual[$Level],$_SESSION['CompanyRecord']['decimalplaces']), @@ -502,11 +504,11 @@ } else { do { printf('<tr> - <td colspan="2"><I>%s ' . _('Total') . ' </I></td> - <td class="number"><I>%s</I></td> - <td class="number"><I>%s</I></td> - <td class="number"><I>%s</I></td> - <td class="number"><I>%s</I></td> + <td colspan="2"><i>%s ' . _('Total') . ' </i></td> + <td class="number"><i>%s</i></td> + <td class="number"><i>%s</i></td> + <td class="number"><i>%s</i></td> + <td class="number"><i>%s</i></td> </tr>', $ParentGroups[$Level], locale_number_format($GrpActual[$Level],$_SESSION['CompanyRecord']['decimalplaces']), @@ -526,11 +528,11 @@ if ($Level>0){ printf('<tr> - <td colspan="2"><I>%s ' . _('Total') . ' </I></td> - <td class="number"><I>%s</I></td> - <td class="number"><I>%s</I></td> - <td class="number"><I>%s</I></td> - <td class="number"><I>%s</I></td> + <td colspan="2"><i>%s ' . _('Total') . ' </i></td> + <td class="number"><i>%s</i></td> + <td class="number"><i>%s</i></td> + <td class="number"><i>%s</i></td> + <td class="number"><i>%s</i></td> </tr>', $ParentGroups[$Level], locale_number_format($GrpActual[$Level],$_SESSION['CompanyRecord']['decimalplaces']), @@ -551,7 +553,7 @@ $ParentGroups[$Level]=$myrow['groupname']; $ActGrp = $myrow['groupname']; printf('<tr> - <td colspan="6"><font size="4" color="blue"><b>%s</b></font></td> + <td colspan="6"><h2>%s</h2></td> </tr>', $myrow['groupname']); echo $TableHeader; @@ -611,7 +613,7 @@ $CheckPeriodActual += $AccountPeriodActual; $CheckPeriodBudget += $AccountPeriodBudget; - $ActEnquiryURL = '<a href="'. $rootpath . '/GLAccountInquiry.php?Period=' . $_POST['ToPeriod'] . '&Account=' . $myrow['accountcode'] . '&Show=Yes">' . $myrow['accountcode'] . '<a>'; + $ActEnquiryURL = '<a href="'. $rootpath . '/GLAccountInquiry.php?Period=' . $_POST['ToPeriod'] . '&Account=' . $myrow['accountcode'] . '&Show=Yes">' . $myrow['accountcode'] . '</a>'; printf('<td>%s</td> <td>%s</td> @@ -621,7 +623,7 @@ <td class="number">%s</td> </tr>', $ActEnquiryURL, - $myrow['accountname'], + htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8'), locale_number_format($myrow['monthactual'],$_SESSION['CompanyRecord']['decimalplaces']), locale_number_format($myrow['monthbudget'],$_SESSION['CompanyRecord']['decimalplaces']), locale_number_format($AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']), @@ -638,11 +640,11 @@ $ParentGroups[$Level]=$myrow['groupname']; } elseif ($ParentGroups[$Level]==$myrow['parentgroupname']) { printf('<tr> - <td colspan="2"><I>%s ' . _('Total') . ' </I></td> - <td class="number"><I>%s</I></td> - <td class="number"><I>%s</I></td> - <td class="number"><I>%s</I></td> - <td class="number"><I>%s</I></td> + <td colspan="2"><i>%s ' . _('Total') . ' </i></td> + <td class="number"><i>%s</i></td> + <td class="number"><i>%s</i></td> + <td class="number"><i>%s</i></td> + <td class="number"><i>%s</i></td> </tr>', $ParentGroups[$Level], locale_number_format($GrpActual[$Level],$_SESSION['CompanyRecord']['decimalplaces']), @@ -658,11 +660,11 @@ } else { do { printf('<tr> - <td colspan="2"><I>%s ' . _('Total') . ' </I></td> - <td class="number"><I>%s</I></td> - <td class="number"><I>%s</I></... [truncated message content] |
From: <vv...@us...> - 2012-04-01 17:56:47
|
Revision: 5193 http://web-erp.svn.sourceforge.net/web-erp/?rev=5193&view=rev Author: vvs2012 Date: 2012-04-01 17:56:40 +0000 (Sun, 01 Apr 2012) Log Message: ----------- xhtml Modified Paths: -------------- trunk/CopyBOM.php trunk/InternalStockRequest.php trunk/InternalStockRequestAuthorisation.php trunk/InternalStockRequestFulfill.php trunk/InventoryPlanning.php trunk/InventoryPlanningPrefSupplier.php trunk/InventoryQuantities.php trunk/InventoryValuation.php trunk/includes/header.inc Modified: trunk/CopyBOM.php =================================================================== --- trunk/CopyBOM.php 2012-04-01 16:54:04 UTC (rev 5192) +++ trunk/CopyBOM.php 2012-04-01 17:56:40 UTC (rev 5193) @@ -6,10 +6,10 @@ */ /* $Id$*/ +include('includes/session.inc'); + $title = _('Copy a BOM to New Item Code'); -include('includes/session.inc'); - include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); @@ -149,6 +149,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Contract') . '" alt="" />' . ' ' . $title . '</p>'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $sql = "SELECT stockid, @@ -168,8 +169,8 @@ echo '</select></td> </tr>'; echo '<tr> - <td><input type="radio" name="type" value="N" checked="" />' . _(' To New Stock ID') . '</td></td><td>'; - echo '<input type="text" maxlength="20" name="tostkid" /></td></tr>'; + <td><input type="radio" name="type" value="N" />' . _(' To New Stock ID') . '</td>'; + echo '<td><input type="text" maxlength="20" name="tostkid" /></td></tr>'; $sql = "SELECT stockid, description @@ -185,10 +186,12 @@ while($row = DB_fetch_row($result)) { echo '<option value="'.$row[0].'">'.$row[0].' -- '.$row[1].'</option>'; } - echo '</select>'; + echo '</select></td></tr>'; } echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="Submit" value="Submit" /></div></form>'; + echo '<br /><div class="centre"><input type="submit" name="Submit" value="Submit" /></div> + </div> + </form>'; include('includes/footer.inc'); } Modified: trunk/InternalStockRequest.php =================================================================== --- trunk/InternalStockRequest.php 2012-04-01 16:54:04 UTC (rev 5192) +++ trunk/InternalStockRequest.php 2012-04-01 17:56:40 UTC (rev 5193) @@ -118,10 +118,11 @@ if (isset($_GET['Edit'])) { echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; echo '<tr> - <th colspan="2"><font size="2" color="navy">' . _('Edit the Request Line') . '</font></th> + <th colspan="2"><h4>' . _('Edit the Request Line') . '</h4></th> </tr>'; echo '<tr> <td>' . _('Line number') . '</td> @@ -149,17 +150,19 @@ echo '<div class="centre"> <input type="submit" name="Edit" value="' . _('Update Line') . '" /> </div> + </div> </form>'; include('includes/footer.inc'); exit; } echo '<form action="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; echo '<tr> - <th colspan="2"><font color="navy" size="2">' . _('Internal Stock Request Details') . '</font></th> + <th colspan="2"><h4>' . _('Internal Stock Request Details') . '</h4></th> </tr> <tr> <td>' . _('Department') . ':</td>'; @@ -202,11 +205,12 @@ </tr> <tr> <td>' . _('Date when required') . ':</td>'; -echo '<td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="DispatchDate" maxlength="10" size="11" value="' . $_SESSION['Request']->DispatchDate . '" /></td>'; +echo '<td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="DispatchDate" maxlength="10" size="11" value="' . $_SESSION['Request']->DispatchDate . '" /></td> + </tr>'; echo '<tr> <td>' . _('Narrative') . ':</td> - <td><textarea name="Narrative" cols="30">'.$_SESSION['Request']->Narrative.'</textarea></td> + <td><textarea name="Narrative" cols="30" rows="5">'.$_SESSION['Request']->Narrative.'</textarea></td> </tr> </table> <br />'; @@ -214,6 +218,7 @@ echo '<div class="centre"> <input type="submit" name="Update" value="' . _('Update') . '" /> </div> + </div> </form>'; if (!isset($_SESSION['Request']->Location)) { @@ -224,11 +229,12 @@ //****************MUESTRO LA TABLA CON LOS REGISTROS DE LA TRANSFERENCIA************************************* $i = 0; //Line Item Array pointer echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br /> <table class="selection"> <tr> - <th colspan="7"><font size="2" color="navy">' . _('Details of Items Requested') . '</font></th> + <th colspan="7"><h4>' . _('Details of Items Requested') . '</h4></th> </tr> <tr> <th>'. _('Line Number') . '</th> @@ -264,9 +270,12 @@ <div class="centre"> <input type="submit" name="Submit" value="' . _('Submit') . '" /> </div> - <br />'; + <br /> + </div> + </form>'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<div>'; 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="" />' . ' ' . _('Search for Inventory Items'). '</p>'; @@ -276,7 +285,7 @@ ORDER BY categorydescription"; $result1 = DB_query($SQL, $db); if (DB_num_rows($result1) == 0) { - echo '<p><font size="4" color="red">' . _('Problem Report') . ':</font><br />' . _('There are no stock categories currently defined please use the link below to set them up').'</p>'; + echo '<p class="bad">' . _('Problem Report') . ':<br />' . _('There are no stock categories currently defined please use the link below to set them up').'</p>'; echo '<br /> <a href="' . $rootpath . '/StockCategories.php">' . _('Define Stock Categories') . '</a>'; exit; @@ -310,7 +319,7 @@ echo '</tr> <tr> <td></td> - <td><font size="3"><b>' . _('OR') . ' ' . '</b></font>' . _('Enter partial') . ' <b>' . _('Stock Code') . '</b>:</td>'; + <td><h3>' . _('OR') . ' ' . '</h3>' . _('Enter partial') . ' <b>' . _('Stock Code') . '</b>:</td>'; if (isset($_POST['StockCode'])) { echo '<td><input type="text" name="StockCode" value="' . $_POST['StockCode'] . '" size="15" maxlength="18" /></td>'; @@ -325,6 +334,7 @@ </div> <br />'; echo '<script type="text/javascript">defaultControl(document.forms[0].StockCode);</script>'; +echo '</div>'; echo '</form>'; if (isset($_POST['Search']) or isset($_POST['Next']) or isset($_POST['Prev'])){ @@ -459,6 +469,7 @@ /* display list if there is more than one record */ if (isset($searchresult) AND !isset($_POST['Select'])) { echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $ListCount = DB_num_rows($searchresult); if ($ListCount > 0) { @@ -527,7 +538,7 @@ $qoh = locale_number_format($myrow['qoh'], $myrow['decimalplaces']); } if ($myrow['discontinued']==1){ - $ItemStatus = '<font class="bad">' . _('Obsolete') . '</font>'; + $ItemStatus = '<p class="bad">' . _('Obsolete') . '</p>'; } else { $ItemStatus =''; } @@ -542,7 +553,10 @@ //end of page full new headings if } //end of while loop - echo '</table></form><br />'; + echo '</table> + </div> + </form> + <br />'; } } /* end display list if there is more than one record */ @@ -552,7 +566,8 @@ echo '<div class="page_help_text">' . _('Select an item by entering the quantity required. Click Order when ready.') . '</div>'; echo '<br />'; $j = 1; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post" name="orderform">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post" id="orderform">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="table1">'; echo '<tr><td> @@ -659,14 +674,14 @@ } $OnOrder = $PurchQty + $WoQty; $Available = $QOH - $DemandQty + $OnOrder; - echo '<td>'.$myrow['stockid'].'</font></td> + echo '<td>'.$myrow['stockid'].'</td> <td>'.$myrow['description'].'</td> <td>'.$myrow['stockunits'].'</td> <td class="number">'.locale_number_format($QOH,$DecimalPlaces).'</td> <td class="number">'.locale_number_format($DemandQty,$DecimalPlaces).'</td> <td class="number">'.locale_number_format($OnOrder, $DecimalPlaces).'</td> <td class="number">'.locale_number_format($Available,$DecimalPlaces).'</td> - <td><font size="1"><input class="number" tabindex="'.($j+7).'" type="text" size="6" name="Quantity'.$i.'" value="0" /> + <td><input class="number" tabindex="'.($j+7).'" type="text" size="6" name="Quantity'.$i.'" value="0" /> <input type="hidden" name="StockID'.$i.'" value="'.$myrow['stockid'].'" /> </td> </tr>'; @@ -686,7 +701,9 @@ <input tabindex="'.($j+8).'" type="submit" value="'._('Add to Requisition').'" /></td>'; echo '<td><input type="hidden" name="NextList" value="'.($Offset+1).'" /> <input tabindex="'.($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td><tr/>'; - echo '</table></form>'; + echo '</table> + </div> + </form>'; echo $jsCall; }#end if SearchResults to show Modified: trunk/InternalStockRequestAuthorisation.php =================================================================== --- trunk/InternalStockRequestAuthorisation.php 2012-04-01 16:54:04 UTC (rev 5192) +++ trunk/InternalStockRequestAuthorisation.php 2012-04-01 17:56:40 UTC (rev 5193) @@ -1,106 +1,109 @@ -<?php - -/* $Id: InternalStockRequestAuthorisation.php 4576 2011-05-27 10:59:20Z daintree $*/ - -include('includes/session.inc'); - -$title = _('Authorise Internal Stock Requests'); - -include('includes/header.inc'); - -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' . $title . '</p>'; - -if (isset($_POST['UpdateAll'])) { - foreach ($_POST as $key => $value) { - if (mb_substr($key,0,6)=='status') { - $RequestNo=mb_substr($key,6); - $sql="UPDATE stockrequest - SET authorised='1' - WHERE dispatchid='".$RequestNo."'"; - $result=DB_query($sql, $db); - } - } -} - -/* Retrieve the requisition header information - */ -$sql="SELECT stockrequest.dispatchid, - locations.locationname, - stockrequest.despatchdate, - stockrequest.narrative, - departments.description, - www_users.realname, - www_users.email - FROM stockrequest INNER JOIN departments - ON stockrequest.departmentid=departments.departmentid - INNER JOIN locations - ON stockrequest.loccode=locations.loccode - INNER JOIN www_users - ON www_users.userid=departments.authoriser - WHERE stockrequest.authorised=0 - AND stockrequest.closed=0 - AND www_users.userid='".$_SESSION['UserID']."'"; -$result=DB_query($sql, $db); - -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; -echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<table class="selection">'; - -/* Create the table for the purchase order header */ -echo '<tr> - <th>' . _('Request Number') . '</th> - <th>' . _('Department') . '</th> - <th>' . _('Location Of Stock') . '</th> - <th>' . _('Requested Date') . '</th> - <th>' . _('Narrative') . '</th> - <th>' . _('Authorise') . '</th> - </tr>'; - -while ($myrow=DB_fetch_array($result)) { - - echo '<tr> - <td>' . $myrow['dispatchid'] . '</td> - <td>' . $myrow['description'] . '</td> - <td>' . $myrow['locationname'] . '</td> - <td>' . ConvertSQLDate($myrow['despatchdate']) . '</td> - <td>' . $myrow['narrative'] . '</td> - <td><input type="checkbox" name="status'.$myrow['dispatchid'].'" /></td> - </tr>'; - $linesql="SELECT stockrequestitems.dispatchitemsid, - stockrequestitems.stockid, - stockrequestitems.decimalplaces, - stockrequestitems.uom, - stockmaster.description, - stockrequestitems.quantity - FROM stockrequestitems - INNER JOIN stockmaster - ON stockmaster.stockid=stockrequestitems.stockid - WHERE dispatchid='".$myrow['dispatchid'] . "'"; - $lineresult=DB_query($linesql, $db); - - echo '<tr> - <td></td> - <td colspan="5" align="left"> - <table class="selection" align="left"> - <tr> - <th>'._('Product').'</th> - <th>'._('Quantity Required').'</th> - <th>'._('Units').'</th> - </tr>'; - - while ($linerow=DB_fetch_array($lineresult)) { - echo '<tr> - <td>'.$linerow['description'].'</td> - <td class="number">'.locale_number_format($linerow['quantity'],$linerow['decimalplaces']).'</td> - <td>'.$linerow['uom'].'</td> - </tr>'; - } // end while order line detail - echo '</table> - </td> - </tr>'; -} //end while header loop -echo '</table>'; -echo '<br /><div class="centre"><input type="submit" name="UpdateAll" value="' . _('Update'). '" /></form>'; - -include('includes/footer.inc'); +<?php + +/* $Id: InternalStockRequestAuthorisation.php 4576 2011-05-27 10:59:20Z daintree $*/ + +include('includes/session.inc'); + +$title = _('Authorise Internal Stock Requests'); + +include('includes/header.inc'); + +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' . $title . '</p>'; + +if (isset($_POST['UpdateAll'])) { + foreach ($_POST as $key => $value) { + if (mb_substr($key,0,6)=='status') { + $RequestNo=mb_substr($key,6); + $sql="UPDATE stockrequest + SET authorised='1' + WHERE dispatchid='".$RequestNo."'"; + $result=DB_query($sql, $db); + } + } +} + +/* Retrieve the requisition header information + */ +$sql="SELECT stockrequest.dispatchid, + locations.locationname, + stockrequest.despatchdate, + stockrequest.narrative, + departments.description, + www_users.realname, + www_users.email + FROM stockrequest INNER JOIN departments + ON stockrequest.departmentid=departments.departmentid + INNER JOIN locations + ON stockrequest.loccode=locations.loccode + INNER JOIN www_users + ON www_users.userid=departments.authoriser + WHERE stockrequest.authorised=0 + AND stockrequest.closed=0 + AND www_users.userid='".$_SESSION['UserID']."'"; +$result=DB_query($sql, $db); + +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; +echo '<div>'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<table class="selection">'; + +/* Create the table for the purchase order header */ +echo '<tr> + <th>' . _('Request Number') . '</th> + <th>' . _('Department') . '</th> + <th>' . _('Location Of Stock') . '</th> + <th>' . _('Requested Date') . '</th> + <th>' . _('Narrative') . '</th> + <th>' . _('Authorise') . '</th> + </tr>'; + +while ($myrow=DB_fetch_array($result)) { + + echo '<tr> + <td>' . $myrow['dispatchid'] . '</td> + <td>' . $myrow['description'] . '</td> + <td>' . $myrow['locationname'] . '</td> + <td>' . ConvertSQLDate($myrow['despatchdate']) . '</td> + <td>' . $myrow['narrative'] . '</td> + <td><input type="checkbox" name="status'.$myrow['dispatchid'].'" /></td> + </tr>'; + $linesql="SELECT stockrequestitems.dispatchitemsid, + stockrequestitems.stockid, + stockrequestitems.decimalplaces, + stockrequestitems.uom, + stockmaster.description, + stockrequestitems.quantity + FROM stockrequestitems + INNER JOIN stockmaster + ON stockmaster.stockid=stockrequestitems.stockid + WHERE dispatchid='".$myrow['dispatchid'] . "'"; + $lineresult=DB_query($linesql, $db); + + echo '<tr> + <td></td> + <td colspan="5" align="left"> + <table class="selection" align="left"> + <tr> + <th>'._('Product').'</th> + <th>'._('Quantity Required').'</th> + <th>'._('Units').'</th> + </tr>'; + + while ($linerow=DB_fetch_array($lineresult)) { + echo '<tr> + <td>'.$linerow['description'].'</td> + <td class="number">'.locale_number_format($linerow['quantity'],$linerow['decimalplaces']).'</td> + <td>'.$linerow['uom'].'</td> + </tr>'; + } // end while order line detail + echo '</table> + </td> + </tr>'; +} //end while header loop +echo '</table>'; +echo '<br /><div class="centre"><input type="submit" name="UpdateAll" value="' . _('Update'). '" /></div> + </div> + </form>'; + +include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/InternalStockRequestFulfill.php =================================================================== --- trunk/InternalStockRequestFulfill.php 2012-04-01 16:54:04 UTC (rev 5192) +++ trunk/InternalStockRequestFulfill.php 2012-04-01 17:56:40 UTC (rev 5193) @@ -1,343 +1,349 @@ -<?php - -$PageSecurity=1; - -include('includes/session.inc'); - -$title = _('Fulfill Stock Requests'); - -include('includes/header.inc'); -include('includes/SQL_CommonFunctions.inc'); - -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Contract') . '" alt="" />' . _('Fulfill Stock Requests') . '</p>'; - -if (isset($_POST['UpdateAll'])) { - foreach ($_POST as $key => $value) { - if (mb_strpos($key,'Qty')) { - $RequestID = mb_substr($key,0, mb_strpos($key,'Qty')); - $LineID = mb_substr($key,mb_strpos($key,'Qty')+3); - $Quantity = $_POST[$RequestID.'Qty'.$LineID]; - $StockID = $_POST[$RequestID.'StockID'.$LineID]; - $Location = $_POST[$RequestID.'Location'.$LineID]; - $Tag = $_POST[$RequestID.'Tag'.$LineID]; - $RequestedQuantity = $_POST[$RequestID.'RequestedQuantity'.$LineID]; - if (isset($_POST[$RequestID.'Completed'.$LineID])) { - $Completed=True; - } else { - $Completed=False; - } - - $sql="SELECT materialcost, labourcost, overheadcost FROM stockmaster WHERE stockid='".$StockID."'"; - $result=DB_query($sql, $db); - $myrow=DB_fetch_array($result); - $StandardCost=$myrow['materialcost']+$myrow['labourcost']+$myrow['overheadcost']; - - $Narrative = _('Issue') . ' ' . $Quantity . ' ' . _('of') . ' '. $StockID . ' ' . _('to department'); - - $AdjustmentNumber = GetNextTransNo(17,$db); - $PeriodNo = GetPeriod (Date($_SESSION['DefaultDateFormat']), $db); - $SQLAdjustmentDate = FormatDateForSQL(Date($_SESSION['DefaultDateFormat'])); - - $Result = DB_Txn_Begin($db); - - // Need to get the current location quantity will need it later for the stock movement - $SQL="SELECT locstock.quantity - FROM locstock - WHERE locstock.stockid='" . $StockID . "' - AND loccode= '" . $Location . "'"; - $Result = DB_query($SQL, $db); - if (DB_num_rows($Result)==1){ - $LocQtyRow = DB_fetch_row($Result); - $QtyOnHandPrior = $LocQtyRow[0]; - } else { - // There must actually be some error this should never happen - $QtyOnHandPrior = 0; - } - - if ($_SESSION['ProhibitNegativeStock']==0 or ($_SESSION['ProhibitNegativeStock']==1 and $QtyOnHandPrior>=$Quantity)) { - - $SQL = "INSERT INTO stockmoves ( - stockid, - type, - transno, - loccode, - trandate, - prd, - reference, - qty, - newqoh) - VALUES ( - '" . $StockID . "', - 17, - '" . $AdjustmentNumber . "', - '" . $Location . "', - '" . $SQLAdjustmentDate . "', - '" . $PeriodNo . "', - '" . $Narrative ."', - '" . -$Quantity . "', - '" . ($QtyOnHandPrior - $Quantity) . "' - )"; - - - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock movement record cannot be inserted because'); - $DbgMsg = _('The following SQL to insert the stock movement record was used'); - $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); - - - /*Get the ID of the StockMove... */ - $StkMoveNo = DB_Last_Insert_ID($db,'stockmoves','stkmoveno'); - - $SQL="UPDATE stockrequestitems - SET qtydelivered=qtydelivered+".$Quantity." - WHERE dispatchid='".$RequestID."' - AND dispatchitemsid='".$LineID."'"; - - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' ._('The location stock record could not be updated because'); - $DbgMsg = _('The following SQL to update the stock record was used'); - $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg,true); - - $SQL = "UPDATE locstock SET quantity = quantity - '" . $Quantity . "' - WHERE stockid='" . $StockID . "' - AND loccode='" . $Location . "'"; - - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' ._('The location stock record could not be updated because'); - $DbgMsg = _('The following SQL to update the stock record was used'); - - $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); - - if ($_SESSION['CompanyRecord']['gllink_stock']==1 AND $StandardCost > 0){ - - $StockGLCodes = GetStockGLCode($StockID,$db); - - $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - amount, - narrative, - tag) - VALUES (17, - '" .$AdjustmentNumber . "', - '" . $SQLAdjustmentDate . "', - '" . $PeriodNo . "', - '" . $StockGLCodes['issueglact'] . "', - '" . $StandardCost * -($Quantity) . "', - '" . $Narrative . "', - '" . $Tag . "' - )"; - - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction entries could not be added because'); - $DbgMsg = _('The following SQL to insert the GL entries was used'); - $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg, true); - - $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - amount, - narrative, - tag) - VALUES (17, - '" . $AdjustmentNumber . "', - '" . $SQLAdjustmentDate . "', - '" . $PeriodNo . "', - '" . $StockGLCodes['stockact'] . "', - '" . $StandardCost * $Quantity . "', - '" . $Narrative . "', - '" . $Tag . "' - )"; - - $Errmsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction entries could not be added because'); - $DbgMsg = _('The following SQL to insert the GL entries was used'); - $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg,true); - } - - if (($Quantity>=$RequestedQuantity) or $Completed==True) { - $SQL="UPDATE stockrequestitems - SET completed=1 - WHERE dispatchid='".$RequestID."' - AND dispatchitemsid='".$LineID."'"; - $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg,true); - } - - $Result = DB_Txn_Commit($db); - - $ConfirmationText = _('A stock issue for'). ' ' . $StockID . ' ' . _('has been created from location').' ' . $Location .' '. _('for a quantity of') . ' ' . $Quantity ; - prnMsg( $ConfirmationText,'success'); - - if ($_SESSION['InventoryManagerEmail']!=''){ - $ConfirmationText = $ConfirmationText . ' ' . _('by user') . ' ' . $_SESSION['UserID'] . ' ' . _('at') . ' ' . Date('Y-m-d H:i:s'); - $EmailSubject = _('Stock adjustment for'). ' ' . $StockID; - mail($_SESSION['InventoryManagerEmail'],$EmailSubject,$ConfirmationText); - } - } else { - $ConfirmationText = _('A stock issue for'). ' ' . $StockID . ' ' . _('from location').' ' . $Location .' '. _('for a quantity of') . ' ' . $Quantity . ' ' . _('cannot be created as there is insufficient stock and your system is configured to not allow negative stocks'); - prnMsg( $ConfirmationText,'warn'); - } - } - } -} - -// Check if request can be closed and close if done. -if (isset($RequestID)) { - $SQL="SELECT dispatchid - FROM stockrequestitems - WHERE dispatchid='".$RequestID."' - AND completed=0"; - $Result=DB_query($SQL, $db); - if (DB_num_rows($Result)==0) { - $SQL="UPDATE stockrequest - SET closed=1 - WHERE dispatchid='".$RequestID."'"; - $Result=DB_query($SQL, $db); - } -} - -if (!isset($_POST['Location'])) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection"><tr>'; - echo '<td>' . _('Choose a location to issue requests from') . '</td> - <td><select name="Location">'; - $sql = "SELECT loccode, locationname FROM locations"; - $resultStkLocs = DB_query($sql,$db); - while ($myrow=DB_fetch_array($resultStkLocs)){ - if (isset($_SESSION['Adjustment']->StockLocation)){ - if ($myrow['loccode'] == $_SESSION['Adjustment']->StockLocation){ - echo '<option selected="True" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; - } else { - echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; - } - } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ - echo '<option selected="True" 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 />'; - echo '<div class="centre"><input type="submit" name="EnterAdjustment" value="'. _('Show Requests'). '" /></div>'; - include('includes/footer.inc'); - exit; -} - -/* Retrieve the requisition header information - */ -if (isset($_POST['Location'])) { - $sql="SELECT stockrequest.dispatchid, - locations.locationname, - stockrequest.despatchdate, - stockrequest.narrative, - departments.description, - www_users.realname, - www_users.email - FROM stockrequest - LEFT JOIN departments - ON stockrequest.departmentid=departments.departmentid - LEFT JOIN locations - ON stockrequest.loccode=locations.loccode - LEFT JOIN www_users - ON www_users.userid=departments.authoriser - WHERE stockrequest.authorised=1 - AND stockrequest.closed=0 - AND stockrequest.loccode='".$_POST['Location']."'"; - $result=DB_query($sql, $db); - - if (DB_num_rows($result)==0) { - prnMsg( _('There are no outstanding authorised requests for this location'), 'info'); - echo '<br />'; - echo '<div class="centre"><a href="' . htmlspecialchars($_SESSION['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Select another location') . '</a></div>'; - include('includes/footer.inc'); - exit; - } - - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection"><tr>'; - - /* Create the table for the purchase order header */ - echo '<th>'._('Request Number').'</th>'; - echo '<th>'._('Department').'</th>'; - echo '<th>'._('Location Of Stock').'</th>'; - echo '<th>'._('Requested Date').'</th>'; - echo '<th>'._('Narrative').'</th>'; - echo '</tr>'; - - while ($myrow=DB_fetch_array($result)) { - - echo '<tr>'; - echo '<td>'.$myrow['dispatchid'].'</td>'; - echo '<td>'.$myrow['description'].'</td>'; - echo '<td>'.$myrow['locationname'].'</td>'; - echo '<td>'.ConvertSQLDate($myrow['despatchdate']).'</td>'; - echo '<td>'.$myrow['narrative'].'</td>'; - echo '</tr>'; - $linesql="SELECT stockrequestitems.dispatchitemsid, - stockrequestitems.dispatchid, - stockrequestitems.stockid, - stockrequestitems.decimalplaces, - stockrequestitems.uom, - stockmaster.description, - stockrequestitems.quantity, - stockrequestitems.qtydelivered - FROM stockrequestitems - LEFT JOIN stockmaster - ON stockmaster.stockid=stockrequestitems.stockid - WHERE dispatchid='".$myrow['dispatchid'] . "' - AND completed=0"; - $lineresult=DB_query($linesql, $db); - - echo '<tr><td></td><td colspan="5" align="left"><table class="selection" align="left">'; - echo '<th>'._('Product').'</th>'; - echo '<th>'._('Quantity') . '<br />' . _('Required').'</th>'; - echo '<th>'._('Quantity') . '<br />' . _('Delivered').'</th>'; - echo '<th>'._('Units').'</th>'; - echo '<th>'._('Completed').'</th>'; - echo '<th>'._('Tag').'</th>'; - echo '</tr>'; - - while ($linerow=DB_fetch_array($lineresult)) { - echo '<tr>'; - echo '<td>'.$linerow['description'].'</td>'; - echo '<td class="number">'.locale_number_format($linerow['quantity']-$linerow['qtydelivered'],$linerow['decimalplaces']).'</td>'; - echo '<td class="number"> - <input type="text" class="number" name="'. $linerow['dispatchid'] . 'Qty'. $linerow['dispatchitemsid'] . '" value="'.locale_number_format($linerow['quantity']-$linerow['qtydelivered'],$linerow['decimalplaces']).'" /> - </td>'; - echo '<td>'.$linerow['uom'].'</td>'; - echo '<td><input type="checkbox" name="'. $linerow['dispatchid'] . 'Completed'. $linerow['dispatchitemsid'] . '" /></td>'; - //Select the tag - echo '<td><select name="'. $linerow['dispatchid'] . 'Tag'. $linerow['dispatchitemsid'] . '">'; - - $SQL = "SELECT tagref, - tagdescription - FROM tags - ORDER BY tagref"; - - $TagResult=DB_query($SQL,$db); - echo '<option value=0>0 - None</option>'; - while ($mytagrow=DB_fetch_array($TagResult)){ - if (isset($_SESSION['Adjustment']->tag) and $_SESSION['Adjustment']->tag==$mytagrow['tagref']){ - echo '<option selected="True" value="' . $mytagrow['tagref'] . '">' . $mytagrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; - } else { - echo '<option value="' . $mytagrow['tagref'] . '">' . $mytagrow['tagref'].' - ' .$mytagrow['tagdescription'] . '</option>'; - } - } - echo '</select></td>'; -// End select tag - echo '</tr>'; - echo '<input type="hidden" class="number" name="'. $linerow['dispatchid'] . 'StockID'. $linerow['dispatchitemsid'] . '" value="'.$linerow['stockid'].'" />'; - echo '<input type="hidden" class="number" name="'. $linerow['dispatchid'] . 'Location'. $linerow['dispatchitemsid'] . '" value="'.$_POST['Location'].'" />'; - echo '<input type="hidden" class="number" name="'. $linerow['dispatchid'] . 'RequestedQuantity'. $linerow['dispatchitemsid'] . '" value="'.locale_number_format($linerow['quantity']-$linerow['qtydelivered'],$linerow['decimalplaces']).'" />'; - } // end while order line detail - echo '</table></td></tr>'; - } //end while header loop - echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="UpdateAll" value="' . _('Update'). '" /></form>'; -} - -include('includes/footer.inc'); - -?> +<?php + +$PageSecurity=1; + +include('includes/session.inc'); + +$title = _('Fulfill Stock Requests'); + +include('includes/header.inc'); +include('includes/SQL_CommonFunctions.inc'); + +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Contract') . '" alt="" />' . _('Fulfill Stock Requests') . '</p>'; + +if (isset($_POST['UpdateAll'])) { + foreach ($_POST as $key => $value) { + if (mb_strpos($key,'Qty')) { + $RequestID = mb_substr($key,0, mb_strpos($key,'Qty')); + $LineID = mb_substr($key,mb_strpos($key,'Qty')+3); + $Quantity = $_POST[$RequestID.'Qty'.$LineID]; + $StockID = $_POST[$RequestID.'StockID'.$LineID]; + $Location = $_POST[$RequestID.'Location'.$LineID]; + $Tag = $_POST[$RequestID.'Tag'.$LineID]; + $RequestedQuantity = $_POST[$RequestID.'RequestedQuantity'.$LineID]; + if (isset($_POST[$RequestID.'Completed'.$LineID])) { + $Completed=True; + } else { + $Completed=False; + } + + $sql="SELECT materialcost, labourcost, overheadcost FROM stockmaster WHERE stockid='".$StockID."'"; + $result=DB_query($sql, $db); + $myrow=DB_fetch_array($result); + $StandardCost=$myrow['materialcost']+$myrow['labourcost']+$myrow['overheadcost']; + + $Narrative = _('Issue') . ' ' . $Quantity . ' ' . _('of') . ' '. $StockID . ' ' . _('to department'); + + $AdjustmentNumber = GetNextTransNo(17,$db); + $PeriodNo = GetPeriod (Date($_SESSION['DefaultDateFormat']), $db); + $SQLAdjustmentDate = FormatDateForSQL(Date($_SESSION['DefaultDateFormat'])); + + $Result = DB_Txn_Begin($db); + + // Need to get the current location quantity will need it later for the stock movement + $SQL="SELECT locstock.quantity + FROM locstock + WHERE locstock.stockid='" . $StockID . "' + AND loccode= '" . $Location . "'"; + $Result = DB_query($SQL, $db); + if (DB_num_rows($Result)==1){ + $LocQtyRow = DB_fetch_row($Result); + $QtyOnHandPrior = $LocQtyRow[0]; + } else { + // There must actually be some error this should never happen + $QtyOnHandPrior = 0; + } + + if ($_SESSION['ProhibitNegativeStock']==0 or ($_SESSION['ProhibitNegativeStock']==1 and $QtyOnHandPrior>=$Quantity)) { + + $SQL = "INSERT INTO stockmoves ( + stockid, + type, + transno, + loccode, + trandate, + prd, + reference, + qty, + newqoh) + VALUES ( + '" . $StockID . "', + 17, + '" . $AdjustmentNumber . "', + '" . $Location . "', + '" . $SQLAdjustmentDate . "', + '" . $PeriodNo . "', + '" . $Narrative ."', + '" . -$Quantity . "', + '" . ($QtyOnHandPrior - $Quantity) . "' + )"; + + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock movement record cannot be inserted because'); + $DbgMsg = _('The following SQL to insert the stock movement record was used'); + $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); + + + /*Get the ID of the StockMove... */ + $StkMoveNo = DB_Last_Insert_ID($db,'stockmoves','stkmoveno'); + + $SQL="UPDATE stockrequestitems + SET qtydelivered=qtydelivered+".$Quantity." + WHERE dispatchid='".$RequestID."' + AND dispatchitemsid='".$LineID."'"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' ._('The location stock record could not be updated because'); + $DbgMsg = _('The following SQL to update the stock record was used'); + $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg,true); + + $SQL = "UPDATE locstock SET quantity = quantity - '" . $Quantity . "' + WHERE stockid='" . $StockID . "' + AND loccode='" . $Location . "'"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' ._('The location stock record could not be updated because'); + $DbgMsg = _('The following SQL to update the stock record was used'); + + $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); + + if ($_SESSION['CompanyRecord']['gllink_stock']==1 AND $StandardCost > 0){ + + $StockGLCodes = GetStockGLCode($StockID,$db); + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + amount, + narrative, + tag) + VALUES (17, + '" .$AdjustmentNumber . "', + '" . $SQLAdjustmentDate . "', + '" . $PeriodNo . "', + '" . $StockGLCodes['issueglact'] . "', + '" . $StandardCost * -($Quantity) . "', + '" . $Narrative . "', + '" . $Tag . "' + )"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction entries could not be added because'); + $DbgMsg = _('The following SQL to insert the GL entries was used'); + $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg, true); + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + amount, + narrative, + tag) + VALUES (17, + '" . $AdjustmentNumber . "', + '" . $SQLAdjustmentDate . "', + '" . $PeriodNo . "', + '" . $StockGLCodes['stockact'] . "', + '" . $StandardCost * $Quantity . "', + '" . $Narrative . "', + '" . $Tag . "' + )"; + + $Errmsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction entries could not be added because'); + $DbgMsg = _('The following SQL to insert the GL entries was used'); + $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg,true); + } + + if (($Quantity>=$RequestedQuantity) or $Completed==True) { + $SQL="UPDATE stockrequestitems + SET completed=1 + WHERE dispatchid='".$RequestID."' + AND dispatchitemsid='".$LineID."'"; + $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg,true); + } + + $Result = DB_Txn_Commit($db); + + $ConfirmationText = _('A stock issue for'). ' ' . $StockID . ' ' . _('has been created from location').' ' . $Location .' '. _('for a quantity of') . ' ' . $Quantity ; + prnMsg( $ConfirmationText,'success'); + + if ($_SESSION['InventoryManagerEmail']!=''){ + $ConfirmationText = $ConfirmationText . ' ' . _('by user') . ' ' . $_SESSION['UserID'] . ' ' . _('at') . ' ' . Date('Y-m-d H:i:s'); + $EmailSubject = _('Stock adjustment for'). ' ' . $StockID; + mail($_SESSION['InventoryManagerEmail'],$EmailSubject,$ConfirmationText); + } + } else { + $ConfirmationText = _('A stock issue for'). ' ' . $StockID . ' ' . _('from location').' ' . $Location .' '. _('for a quantity of') . ' ' . $Quantity . ' ' . _('cannot be created as there is insufficient stock and your system is configured to not allow negative stocks'); + prnMsg( $ConfirmationText,'warn'); + } + } + } +} + +// Check if request can be closed and close if done. +if (isset($RequestID)) { + $SQL="SELECT dispatchid + FROM stockrequestitems + WHERE dispatchid='".$RequestID."' + AND completed=0"; + $Result=DB_query($SQL, $db); + if (DB_num_rows($Result)==0) { + $SQL="UPDATE stockrequest + SET closed=1 + WHERE dispatchid='".$RequestID."'"; + $Result=DB_query($SQL, $db); + } +} + +if (!isset($_POST['Location'])) { + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection"><tr>'; + echo '<td>' . _('Choose a location to issue requests from') . '</td> + <td><select name="Location">'; + $sql = "SELECT loccode, locationname FROM locations"; + $resultStkLocs = DB_query($sql,$db); + while ($myrow=DB_fetch_array($resultStkLocs)){ + if (isset($_SESSION['Adjustment']->StockLocation)){ + if ($myrow['loccode'] == $_SESSION['Adjustment']->StockLocation){ + echo '<option selected="selected" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } else { + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } + } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ + echo '<option selected="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 />'; + echo '<div class="centre"><input type="submit" name="EnterAdjustment" value="'. _('Show Requests'). '" /></div>'; + echo '</div> + </form>'; + include('includes/footer.inc'); + exit; +} + +/* Retrieve the requisition header information + */ +if (isset($_POST['Location'])) { + $sql="SELECT stockrequest.dispatchid, + locations.locationname, + stockrequest.despatchdate, + stockrequest.narrative, + departments.description, + www_users.realname, + www_users.email + FROM stockrequest + LEFT JOIN departments + ON stockrequest.departmentid=departments.departmentid + LEFT JOIN locations + ON stockrequest.loccode=locations.loccode + LEFT JOIN www_users + ON www_users.userid=departments.authoriser + WHERE stockrequest.authorised=1 + AND stockrequest.closed=0 + AND stockrequest.loccode='".$_POST['Location']."'"; + $result=DB_query($sql, $db); + + if (DB_num_rows($result)==0) { + prnMsg( _('There are no outstanding authorised requests for this location'), 'info'); + echo '<br />'; + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Select another location') . '</a></div>'; + include('includes/footer.inc'); + exit; + } + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection"><tr>'; + + /* Create the table for the purchase order header */ + echo '<th>'._('Request Number').'</th>'; + echo '<th>'._('Department').'</th>'; + echo '<th>'._('Location Of Stock').'</th>'; + echo '<th>'._('Requested Date').'</th>'; + echo '<th>'._('Narrative').'</th>'; + echo '</tr>'; + + while ($myrow=DB_fetch_array($result)) { + + echo '<tr>'; + echo '<td>'.$myrow['dispatchid'].'</td>'; + echo '<td>'.$myrow['description'].'</td>'; + echo '<td>'.$myrow['locationname'].'</td>'; + echo '<td>'.ConvertSQLDate($myrow['despatchdate']).'</td>'; + echo '<td>'.$myrow['narrative'].'</td>'; + echo '</tr>'; + $linesql="SELECT stockrequestitems.dispatchitemsid, + stockrequestitems.dispatchid, + stockrequestitems.stockid, + stockrequestitems.decimalplaces, + stockrequestitems.uom, + stockmaster.description, + stockrequestitems.quantity, + stockrequestitems.qtydelivered + FROM stockrequestitems + LEFT JOIN stockmaster + ON stockmaster.stockid=stockrequestitems.stockid + WHERE dispatchid='".$myrow['dispatchid'] . "' + AND completed=0"; + $lineresult=DB_query($linesql, $db); + + echo '<tr><td></td><td colspan="5" align="left"><table class="selection" align="left">'; + echo '<th>'._('Product').'</th>'; + echo '<th>'._('Quantity') . '<br />' . _('Required').'</th>'; + echo '<th>'._('Quantity') . '<br />' . _('Delivered').'</th>'; + echo '<th>'._('Units').'</th>'; + echo '<th>'._('Completed').'</th>'; + echo '<th>'._('Tag').'</th>'; + echo '</tr>'; + + while ($linerow=DB_fetch_array($lineresult)) { + echo '<tr>'; + echo '<td>'.$linerow['description'].'</td>'; + echo '<td class="number">'.locale_number_format($linerow['quantity']-$linerow['qtydelivered'],$linerow['decimalplaces']).'</td>'; + echo '<td class="number"> + <input type="text" class="number" name="'. $linerow['dispatchid'] . 'Qty'. $linerow['dispatchitemsid'] . '" value="'.locale_number_format($linerow['quantity']-$linerow['qtydelivered'],$linerow['decimalplaces']).'" /> + </td>'; + echo '<td>'.$linerow['uom'].'</td>'; + echo '<td><input type="checkbox" name="'. $linerow['dispatchid'] . 'Completed'. $linerow['dispatchitemsid'] . '" /></td>'; + //Select the tag + echo '<td><select name="'. $linerow['dispatchid'] . 'Tag'. $linerow['dispatchitemsid'] . '">'; + + $SQL = "SELECT tagref, + tagdescription + FROM tags + ORDER BY tagref"; + + $TagResult=DB_query($SQL,$db); + echo '<option value=0>0 - None</option>'; + while ($mytagrow=DB_fetch_array($TagResult)){ + if (isset($_SESSION['Adjustment']->tag) and $_SESSION['Adjustment']->tag==$mytagrow['tagref']){ + echo '<option selected="selected" value="' . $mytagrow['tagref'] . '">' . $mytagrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; + } else { + echo '<option value="' . $mytagrow['tagref'] . '">' . $mytagrow['tagref'].' - ' .$mytagrow['tagdescription'] . '</option>'; + } + } + echo '</select></td>'; +// End select tag + echo '</tr>'; + echo '<input type="hidden" class="number" name="'. $linerow['dispatchid'] . 'StockID'. $linerow['dispatchitemsid'] . '" value="'.$linerow['stockid'].'" />'; + echo '<input type="hidden" class="number" name="'. $linerow['dispatchid'] . 'Location'. $linerow['dispatchitemsid'] . '" value="'.$_POST['Location'].'" />'; + echo '<input type="hidden" class="number" name="'. $linerow['dispatchid'] . 'RequestedQuantity'. $linerow['dispatchitemsid'] . '" value="'.locale_number_format($linerow['quantity']-$linerow['qtydelivered'],$linerow['decimalplaces']).'" />'; + } // end while order line detail + echo '</table></td></tr>'; + } //end while header loop + echo '</table>'; + echo '<br /><div class="centre"><input type="submit" name="UpdateAll" value="' . _('Update'). '" /></div> + </div> + </form>'; +} + +include('includes/footer.inc'); + +?> Modified: trunk/InventoryPlanning.php =================================================================== --- trunk/InventoryPlanning.php 2012-04-01 16:54:04 UTC (rev 5192) +++ trunk/InventoryPlanning.php 2012-04-01 17:56:40 UTC (rev 5193) @@ -377,9 +377,10 @@ /*if $FromCriteria is not set then show a form to allow input */ - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> - <table class="selection">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; echo '<tr> <td>' . _('From Inventory Category Code') . ':</td> @@ -444,6 +445,7 @@ <div class="centre"> <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> </div> + </div> </form>'; } include('includes/footer.inc'); Modified: trunk/InventoryPlanningPrefSupplier.php =================================================================== --- trunk/InventoryPlanningPrefSupplier.php 2012-04-01 16:54:04 UTC (rev 5192) +++ trunk/InventoryPlanningPrefSupplier.php 2012-04-01 17:56:40 UTC (rev 5193) @@ -466,9 +466,10 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> - <table class="selection">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; echo '<tr><td>' . _('For Inventory in Location') . ':</td> <td><select name="Location">'; @@ -515,6 +516,8 @@ <div class="centre"> <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> </div>'; + echo '</div> + </form>'; include('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/InventoryQuantities.php =================================================================== --- trunk/InventoryQuantities.php 2012-04-01 16:54:04 UTC (rev 5192) +++ trunk/InventoryQuantities.php 2012-04-01 17:56:40 UTC (rev 5193) @@ -159,6 +159,7 @@ echo '<br /> <br /> <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <table class="selection"> <tr> @@ -208,7 +209,8 @@ <div class="centre"> <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> </div>'; - + echo '</div> + </form>'; include('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2012-04-01 16:54:04 UTC (rev 5192) +++ trunk/InventoryValuation.php 2012-04-01 17:56:40 UTC (rev 5193) @@ -206,8 +206,9 @@ </p>'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <table class="selection"> - <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <tr> <td>' . _('From Inventory Category Code') . ':</td> <td><select name="FromCriteria">'; @@ -267,6 +268,8 @@ <div class="centre"> <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> </div>'; + echo '</div> + </form>'; } include('includes/footer.inc'); Modified: trunk/includes/header.inc =================================================================== --- trunk/includes/header.inc 2012-04-01 16:54:04 UTC (rev 5192) +++ trunk/includes/header.inc 2012-04-01 17:56:40 UTC (rev 5193) @@ -34,6 +34,7 @@ echo '</head>'; echo '<body>'; + echo '<div id="canvas">'; echo '<table class="callout_main" cellpadding="0" cellspacing="0">'; echo '<tr>'; echo '<td colspan="2" rowspan="2">'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-04-01 17:56:47
|
Revision: 5193 http://web-erp.svn.sourceforge.net/web-erp/?rev=5193&view=rev Author: vvs2012 Date: 2012-04-01 17:56:40 +0000 (Sun, 01 Apr 2012) Log Message: ----------- xhtml Modified Paths: -------------- trunk/CopyBOM.php trunk/InternalStockRequest.php trunk/InternalStockRequestAuthorisation.php trunk/InternalStockRequestFulfill.php trunk/InventoryPlanning.php trunk/InventoryPlanningPrefSupplier.php trunk/InventoryQuantities.php trunk/InventoryValuation.php trunk/includes/header.inc Modified: trunk/CopyBOM.php =================================================================== --- trunk/CopyBOM.php 2012-04-01 16:54:04 UTC (rev 5192) +++ trunk/CopyBOM.php 2012-04-01 17:56:40 UTC (rev 5193) @@ -6,10 +6,10 @@ */ /* $Id$*/ +include('includes/session.inc'); + $title = _('Copy a BOM to New Item Code'); -include('includes/session.inc'); - include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); @@ -149,6 +149,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Contract') . '" alt="" />' . ' ' . $title . '</p>'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $sql = "SELECT stockid, @@ -168,8 +169,8 @@ echo '</select></td> </tr>'; echo '<tr> - <td><input type="radio" name="type" value="N" checked="" />' . _(' To New Stock ID') . '</td></td><td>'; - echo '<input type="text" maxlength="20" name="tostkid" /></td></tr>'; + <td><input type="radio" name="type" value="N" />' . _(' To New Stock ID') . '</td>'; + echo '<td><input type="text" maxlength="20" name="tostkid" /></td></tr>'; $sql = "SELECT stockid, description @@ -185,10 +186,12 @@ while($row = DB_fetch_row($result)) { echo '<option value="'.$row[0].'">'.$row[0].' -- '.$row[1].'</option>'; } - echo '</select>'; + echo '</select></td></tr>'; } echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="Submit" value="Submit" /></div></form>'; + echo '<br /><div class="centre"><input type="submit" name="Submit" value="Submit" /></div> + </div> + </form>'; include('includes/footer.inc'); } Modified: trunk/InternalStockRequest.php =================================================================== --- trunk/InternalStockRequest.php 2012-04-01 16:54:04 UTC (rev 5192) +++ trunk/InternalStockRequest.php 2012-04-01 17:56:40 UTC (rev 5193) @@ -118,10 +118,11 @@ if (isset($_GET['Edit'])) { echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; echo '<tr> - <th colspan="2"><font size="2" color="navy">' . _('Edit the Request Line') . '</font></th> + <th colspan="2"><h4>' . _('Edit the Request Line') . '</h4></th> </tr>'; echo '<tr> <td>' . _('Line number') . '</td> @@ -149,17 +150,19 @@ echo '<div class="centre"> <input type="submit" name="Edit" value="' . _('Update Line') . '" /> </div> + </div> </form>'; include('includes/footer.inc'); exit; } echo '<form action="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; echo '<tr> - <th colspan="2"><font color="navy" size="2">' . _('Internal Stock Request Details') . '</font></th> + <th colspan="2"><h4>' . _('Internal Stock Request Details') . '</h4></th> </tr> <tr> <td>' . _('Department') . ':</td>'; @@ -202,11 +205,12 @@ </tr> <tr> <td>' . _('Date when required') . ':</td>'; -echo '<td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="DispatchDate" maxlength="10" size="11" value="' . $_SESSION['Request']->DispatchDate . '" /></td>'; +echo '<td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="DispatchDate" maxlength="10" size="11" value="' . $_SESSION['Request']->DispatchDate . '" /></td> + </tr>'; echo '<tr> <td>' . _('Narrative') . ':</td> - <td><textarea name="Narrative" cols="30">'.$_SESSION['Request']->Narrative.'</textarea></td> + <td><textarea name="Narrative" cols="30" rows="5">'.$_SESSION['Request']->Narrative.'</textarea></td> </tr> </table> <br />'; @@ -214,6 +218,7 @@ echo '<div class="centre"> <input type="submit" name="Update" value="' . _('Update') . '" /> </div> + </div> </form>'; if (!isset($_SESSION['Request']->Location)) { @@ -224,11 +229,12 @@ //****************MUESTRO LA TABLA CON LOS REGISTROS DE LA TRANSFERENCIA************************************* $i = 0; //Line Item Array pointer echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br /> <table class="selection"> <tr> - <th colspan="7"><font size="2" color="navy">' . _('Details of Items Requested') . '</font></th> + <th colspan="7"><h4>' . _('Details of Items Requested') . '</h4></th> </tr> <tr> <th>'. _('Line Number') . '</th> @@ -264,9 +270,12 @@ <div class="centre"> <input type="submit" name="Submit" value="' . _('Submit') . '" /> </div> - <br />'; + <br /> + </div> + </form>'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<div>'; 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="" />' . ' ' . _('Search for Inventory Items'). '</p>'; @@ -276,7 +285,7 @@ ORDER BY categorydescription"; $result1 = DB_query($SQL, $db); if (DB_num_rows($result1) == 0) { - echo '<p><font size="4" color="red">' . _('Problem Report') . ':</font><br />' . _('There are no stock categories currently defined please use the link below to set them up').'</p>'; + echo '<p class="bad">' . _('Problem Report') . ':<br />' . _('There are no stock categories currently defined please use the link below to set them up').'</p>'; echo '<br /> <a href="' . $rootpath . '/StockCategories.php">' . _('Define Stock Categories') . '</a>'; exit; @@ -310,7 +319,7 @@ echo '</tr> <tr> <td></td> - <td><font size="3"><b>' . _('OR') . ' ' . '</b></font>' . _('Enter partial') . ' <b>' . _('Stock Code') . '</b>:</td>'; + <td><h3>' . _('OR') . ' ' . '</h3>' . _('Enter partial') . ' <b>' . _('Stock Code') . '</b>:</td>'; if (isset($_POST['StockCode'])) { echo '<td><input type="text" name="StockCode" value="' . $_POST['StockCode'] . '" size="15" maxlength="18" /></td>'; @@ -325,6 +334,7 @@ </div> <br />'; echo '<script type="text/javascript">defaultControl(document.forms[0].StockCode);</script>'; +echo '</div>'; echo '</form>'; if (isset($_POST['Search']) or isset($_POST['Next']) or isset($_POST['Prev'])){ @@ -459,6 +469,7 @@ /* display list if there is more than one record */ if (isset($searchresult) AND !isset($_POST['Select'])) { echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $ListCount = DB_num_rows($searchresult); if ($ListCount > 0) { @@ -527,7 +538,7 @@ $qoh = locale_number_format($myrow['qoh'], $myrow['decimalplaces']); } if ($myrow['discontinued']==1){ - $ItemStatus = '<font class="bad">' . _('Obsolete') . '</font>'; + $ItemStatus = '<p class="bad">' . _('Obsolete') . '</p>'; } else { $ItemStatus =''; } @@ -542,7 +553,10 @@ //end of page full new headings if } //end of while loop - echo '</table></form><br />'; + echo '</table> + </div> + </form> + <br />'; } } /* end display list if there is more than one record */ @@ -552,7 +566,8 @@ echo '<div class="page_help_text">' . _('Select an item by entering the quantity required. Click Order when ready.') . '</div>'; echo '<br />'; $j = 1; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post" name="orderform">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post" id="orderform">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="table1">'; echo '<tr><td> @@ -659,14 +674,14 @@ } $OnOrder = $PurchQty + $WoQty; $Available = $QOH - $DemandQty + $OnOrder; - echo '<td>'.$myrow['stockid'].'</font></td> + echo '<td>'.$myrow['stockid'].'</td> <td>'.$myrow['description'].'</td> <td>'.$myrow['stockunits'].'</td> <td class="number">'.locale_number_format($QOH,$DecimalPlaces).'</td> <td class="number">'.locale_number_format($DemandQty,$DecimalPlaces).'</td> <td class="number">'.locale_number_format($OnOrder, $DecimalPlaces).'</td> <td class="number">'.locale_number_format($Available,$DecimalPlaces).'</td> - <td><font size="1"><input class="number" tabindex="'.($j+7).'" type="text" size="6" name="Quantity'.$i.'" value="0" /> + <td><input class="number" tabindex="'.($j+7).'" type="text" size="6" name="Quantity'.$i.'" value="0" /> <input type="hidden" name="StockID'.$i.'" value="'.$myrow['stockid'].'" /> </td> </tr>'; @@ -686,7 +701,9 @@ <input tabindex="'.($j+8).'" type="submit" value="'._('Add to Requisition').'" /></td>'; echo '<td><input type="hidden" name="NextList" value="'.($Offset+1).'" /> <input tabindex="'.($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td><tr/>'; - echo '</table></form>'; + echo '</table> + </div> + </form>'; echo $jsCall; }#end if SearchResults to show Modified: trunk/InternalStockRequestAuthorisation.php =================================================================== --- trunk/InternalStockRequestAuthorisation.php 2012-04-01 16:54:04 UTC (rev 5192) +++ trunk/InternalStockRequestAuthorisation.php 2012-04-01 17:56:40 UTC (rev 5193) @@ -1,106 +1,109 @@ -<?php - -/* $Id: InternalStockRequestAuthorisation.php 4576 2011-05-27 10:59:20Z daintree $*/ - -include('includes/session.inc'); - -$title = _('Authorise Internal Stock Requests'); - -include('includes/header.inc'); - -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' . $title . '</p>'; - -if (isset($_POST['UpdateAll'])) { - foreach ($_POST as $key => $value) { - if (mb_substr($key,0,6)=='status') { - $RequestNo=mb_substr($key,6); - $sql="UPDATE stockrequest - SET authorised='1' - WHERE dispatchid='".$RequestNo."'"; - $result=DB_query($sql, $db); - } - } -} - -/* Retrieve the requisition header information - */ -$sql="SELECT stockrequest.dispatchid, - locations.locationname, - stockrequest.despatchdate, - stockrequest.narrative, - departments.description, - www_users.realname, - www_users.email - FROM stockrequest INNER JOIN departments - ON stockrequest.departmentid=departments.departmentid - INNER JOIN locations - ON stockrequest.loccode=locations.loccode - INNER JOIN www_users - ON www_users.userid=departments.authoriser - WHERE stockrequest.authorised=0 - AND stockrequest.closed=0 - AND www_users.userid='".$_SESSION['UserID']."'"; -$result=DB_query($sql, $db); - -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; -echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<table class="selection">'; - -/* Create the table for the purchase order header */ -echo '<tr> - <th>' . _('Request Number') . '</th> - <th>' . _('Department') . '</th> - <th>' . _('Location Of Stock') . '</th> - <th>' . _('Requested Date') . '</th> - <th>' . _('Narrative') . '</th> - <th>' . _('Authorise') . '</th> - </tr>'; - -while ($myrow=DB_fetch_array($result)) { - - echo '<tr> - <td>' . $myrow['dispatchid'] . '</td> - <td>' . $myrow['description'] . '</td> - <td>' . $myrow['locationname'] . '</td> - <td>' . ConvertSQLDate($myrow['despatchdate']) . '</td> - <td>' . $myrow['narrative'] . '</td> - <td><input type="checkbox" name="status'.$myrow['dispatchid'].'" /></td> - </tr>'; - $linesql="SELECT stockrequestitems.dispatchitemsid, - stockrequestitems.stockid, - stockrequestitems.decimalplaces, - stockrequestitems.uom, - stockmaster.description, - stockrequestitems.quantity - FROM stockrequestitems - INNER JOIN stockmaster - ON stockmaster.stockid=stockrequestitems.stockid - WHERE dispatchid='".$myrow['dispatchid'] . "'"; - $lineresult=DB_query($linesql, $db); - - echo '<tr> - <td></td> - <td colspan="5" align="left"> - <table class="selection" align="left"> - <tr> - <th>'._('Product').'</th> - <th>'._('Quantity Required').'</th> - <th>'._('Units').'</th> - </tr>'; - - while ($linerow=DB_fetch_array($lineresult)) { - echo '<tr> - <td>'.$linerow['description'].'</td> - <td class="number">'.locale_number_format($linerow['quantity'],$linerow['decimalplaces']).'</td> - <td>'.$linerow['uom'].'</td> - </tr>'; - } // end while order line detail - echo '</table> - </td> - </tr>'; -} //end while header loop -echo '</table>'; -echo '<br /><div class="centre"><input type="submit" name="UpdateAll" value="' . _('Update'). '" /></form>'; - -include('includes/footer.inc'); +<?php + +/* $Id: InternalStockRequestAuthorisation.php 4576 2011-05-27 10:59:20Z daintree $*/ + +include('includes/session.inc'); + +$title = _('Authorise Internal Stock Requests'); + +include('includes/header.inc'); + +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' . $title . '</p>'; + +if (isset($_POST['UpdateAll'])) { + foreach ($_POST as $key => $value) { + if (mb_substr($key,0,6)=='status') { + $RequestNo=mb_substr($key,6); + $sql="UPDATE stockrequest + SET authorised='1' + WHERE dispatchid='".$RequestNo."'"; + $result=DB_query($sql, $db); + } + } +} + +/* Retrieve the requisition header information + */ +$sql="SELECT stockrequest.dispatchid, + locations.locationname, + stockrequest.despatchdate, + stockrequest.narrative, + departments.description, + www_users.realname, + www_users.email + FROM stockrequest INNER JOIN departments + ON stockrequest.departmentid=departments.departmentid + INNER JOIN locations + ON stockrequest.loccode=locations.loccode + INNER JOIN www_users + ON www_users.userid=departments.authoriser + WHERE stockrequest.authorised=0 + AND stockrequest.closed=0 + AND www_users.userid='".$_SESSION['UserID']."'"; +$result=DB_query($sql, $db); + +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; +echo '<div>'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<table class="selection">'; + +/* Create the table for the purchase order header */ +echo '<tr> + <th>' . _('Request Number') . '</th> + <th>' . _('Department') . '</th> + <th>' . _('Location Of Stock') . '</th> + <th>' . _('Requested Date') . '</th> + <th>' . _('Narrative') . '</th> + <th>' . _('Authorise') . '</th> + </tr>'; + +while ($myrow=DB_fetch_array($result)) { + + echo '<tr> + <td>' . $myrow['dispatchid'] . '</td> + <td>' . $myrow['description'] . '</td> + <td>' . $myrow['locationname'] . '</td> + <td>' . ConvertSQLDate($myrow['despatchdate']) . '</td> + <td>' . $myrow['narrative'] . '</td> + <td><input type="checkbox" name="status'.$myrow['dispatchid'].'" /></td> + </tr>'; + $linesql="SELECT stockrequestitems.dispatchitemsid, + stockrequestitems.stockid, + stockrequestitems.decimalplaces, + stockrequestitems.uom, + stockmaster.description, + stockrequestitems.quantity + FROM stockrequestitems + INNER JOIN stockmaster + ON stockmaster.stockid=stockrequestitems.stockid + WHERE dispatchid='".$myrow['dispatchid'] . "'"; + $lineresult=DB_query($linesql, $db); + + echo '<tr> + <td></td> + <td colspan="5" align="left"> + <table class="selection" align="left"> + <tr> + <th>'._('Product').'</th> + <th>'._('Quantity Required').'</th> + <th>'._('Units').'</th> + </tr>'; + + while ($linerow=DB_fetch_array($lineresult)) { + echo '<tr> + <td>'.$linerow['description'].'</td> + <td class="number">'.locale_number_format($linerow['quantity'],$linerow['decimalplaces']).'</td> + <td>'.$linerow['uom'].'</td> + </tr>'; + } // end while order line detail + echo '</table> + </td> + </tr>'; +} //end while header loop +echo '</table>'; +echo '<br /><div class="centre"><input type="submit" name="UpdateAll" value="' . _('Update'). '" /></div> + </div> + </form>'; + +include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/InternalStockRequestFulfill.php =================================================================== --- trunk/InternalStockRequestFulfill.php 2012-04-01 16:54:04 UTC (rev 5192) +++ trunk/InternalStockRequestFulfill.php 2012-04-01 17:56:40 UTC (rev 5193) @@ -1,343 +1,349 @@ -<?php - -$PageSecurity=1; - -include('includes/session.inc'); - -$title = _('Fulfill Stock Requests'); - -include('includes/header.inc'); -include('includes/SQL_CommonFunctions.inc'); - -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Contract') . '" alt="" />' . _('Fulfill Stock Requests') . '</p>'; - -if (isset($_POST['UpdateAll'])) { - foreach ($_POST as $key => $value) { - if (mb_strpos($key,'Qty')) { - $RequestID = mb_substr($key,0, mb_strpos($key,'Qty')); - $LineID = mb_substr($key,mb_strpos($key,'Qty')+3); - $Quantity = $_POST[$RequestID.'Qty'.$LineID]; - $StockID = $_POST[$RequestID.'StockID'.$LineID]; - $Location = $_POST[$RequestID.'Location'.$LineID]; - $Tag = $_POST[$RequestID.'Tag'.$LineID]; - $RequestedQuantity = $_POST[$RequestID.'RequestedQuantity'.$LineID]; - if (isset($_POST[$RequestID.'Completed'.$LineID])) { - $Completed=True; - } else { - $Completed=False; - } - - $sql="SELECT materialcost, labourcost, overheadcost FROM stockmaster WHERE stockid='".$StockID."'"; - $result=DB_query($sql, $db); - $myrow=DB_fetch_array($result); - $StandardCost=$myrow['materialcost']+$myrow['labourcost']+$myrow['overheadcost']; - - $Narrative = _('Issue') . ' ' . $Quantity . ' ' . _('of') . ' '. $StockID . ' ' . _('to department'); - - $AdjustmentNumber = GetNextTransNo(17,$db); - $PeriodNo = GetPeriod (Date($_SESSION['DefaultDateFormat']), $db); - $SQLAdjustmentDate = FormatDateForSQL(Date($_SESSION['DefaultDateFormat'])); - - $Result = DB_Txn_Begin($db); - - // Need to get the current location quantity will need it later for the stock movement - $SQL="SELECT locstock.quantity - FROM locstock - WHERE locstock.stockid='" . $StockID . "' - AND loccode= '" . $Location . "'"; - $Result = DB_query($SQL, $db); - if (DB_num_rows($Result)==1){ - $LocQtyRow = DB_fetch_row($Result); - $QtyOnHandPrior = $LocQtyRow[0]; - } else { - // There must actually be some error this should never happen - $QtyOnHandPrior = 0; - } - - if ($_SESSION['ProhibitNegativeStock']==0 or ($_SESSION['ProhibitNegativeStock']==1 and $QtyOnHandPrior>=$Quantity)) { - - $SQL = "INSERT INTO stockmoves ( - stockid, - type, - transno, - loccode, - trandate, - prd, - reference, - qty, - newqoh) - VALUES ( - '" . $StockID . "', - 17, - '" . $AdjustmentNumber . "', - '" . $Location . "', - '" . $SQLAdjustmentDate . "', - '" . $PeriodNo . "', - '" . $Narrative ."', - '" . -$Quantity . "', - '" . ($QtyOnHandPrior - $Quantity) . "' - )"; - - - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock movement record cannot be inserted because'); - $DbgMsg = _('The following SQL to insert the stock movement record was used'); - $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); - - - /*Get the ID of the StockMove... */ - $StkMoveNo = DB_Last_Insert_ID($db,'stockmoves','stkmoveno'); - - $SQL="UPDATE stockrequestitems - SET qtydelivered=qtydelivered+".$Quantity." - WHERE dispatchid='".$RequestID."' - AND dispatchitemsid='".$LineID."'"; - - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' ._('The location stock record could not be updated because'); - $DbgMsg = _('The following SQL to update the stock record was used'); - $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg,true); - - $SQL = "UPDATE locstock SET quantity = quantity - '" . $Quantity . "' - WHERE stockid='" . $StockID . "' - AND loccode='" . $Location . "'"; - - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' ._('The location stock record could not be updated because'); - $DbgMsg = _('The following SQL to update the stock record was used'); - - $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); - - if ($_SESSION['CompanyRecord']['gllink_stock']==1 AND $StandardCost > 0){ - - $StockGLCodes = GetStockGLCode($StockID,$db); - - $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - amount, - narrative, - tag) - VALUES (17, - '" .$AdjustmentNumber . "', - '" . $SQLAdjustmentDate . "', - '" . $PeriodNo . "', - '" . $StockGLCodes['issueglact'] . "', - '" . $StandardCost * -($Quantity) . "', - '" . $Narrative . "', - '" . $Tag . "' - )"; - - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction entries could not be added because'); - $DbgMsg = _('The following SQL to insert the GL entries was used'); - $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg, true); - - $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - amount, - narrative, - tag) - VALUES (17, - '" . $AdjustmentNumber . "', - '" . $SQLAdjustmentDate . "', - '" . $PeriodNo . "', - '" . $StockGLCodes['stockact'] . "', - '" . $StandardCost * $Quantity . "', - '" . $Narrative . "', - '" . $Tag . "' - )"; - - $Errmsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction entries could not be added because'); - $DbgMsg = _('The following SQL to insert the GL entries was used'); - $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg,true); - } - - if (($Quantity>=$RequestedQuantity) or $Completed==True) { - $SQL="UPDATE stockrequestitems - SET completed=1 - WHERE dispatchid='".$RequestID."' - AND dispatchitemsid='".$LineID."'"; - $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg,true); - } - - $Result = DB_Txn_Commit($db); - - $ConfirmationText = _('A stock issue for'). ' ' . $StockID . ' ' . _('has been created from location').' ' . $Location .' '. _('for a quantity of') . ' ' . $Quantity ; - prnMsg( $ConfirmationText,'success'); - - if ($_SESSION['InventoryManagerEmail']!=''){ - $ConfirmationText = $ConfirmationText . ' ' . _('by user') . ' ' . $_SESSION['UserID'] . ' ' . _('at') . ' ' . Date('Y-m-d H:i:s'); - $EmailSubject = _('Stock adjustment for'). ' ' . $StockID; - mail($_SESSION['InventoryManagerEmail'],$EmailSubject,$ConfirmationText); - } - } else { - $ConfirmationText = _('A stock issue for'). ' ' . $StockID . ' ' . _('from location').' ' . $Location .' '. _('for a quantity of') . ' ' . $Quantity . ' ' . _('cannot be created as there is insufficient stock and your system is configured to not allow negative stocks'); - prnMsg( $ConfirmationText,'warn'); - } - } - } -} - -// Check if request can be closed and close if done. -if (isset($RequestID)) { - $SQL="SELECT dispatchid - FROM stockrequestitems - WHERE dispatchid='".$RequestID."' - AND completed=0"; - $Result=DB_query($SQL, $db); - if (DB_num_rows($Result)==0) { - $SQL="UPDATE stockrequest - SET closed=1 - WHERE dispatchid='".$RequestID."'"; - $Result=DB_query($SQL, $db); - } -} - -if (!isset($_POST['Location'])) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection"><tr>'; - echo '<td>' . _('Choose a location to issue requests from') . '</td> - <td><select name="Location">'; - $sql = "SELECT loccode, locationname FROM locations"; - $resultStkLocs = DB_query($sql,$db); - while ($myrow=DB_fetch_array($resultStkLocs)){ - if (isset($_SESSION['Adjustment']->StockLocation)){ - if ($myrow['loccode'] == $_SESSION['Adjustment']->StockLocation){ - echo '<option selected="True" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; - } else { - echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; - } - } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ - echo '<option selected="True" 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 />'; - echo '<div class="centre"><input type="submit" name="EnterAdjustment" value="'. _('Show Requests'). '" /></div>'; - include('includes/footer.inc'); - exit; -} - -/* Retrieve the requisition header information - */ -if (isset($_POST['Location'])) { - $sql="SELECT stockrequest.dispatchid, - locations.locationname, - stockrequest.despatchdate, - stockrequest.narrative, - departments.description, - www_users.realname, - www_users.email - FROM stockrequest - LEFT JOIN departments - ON stockrequest.departmentid=departments.departmentid - LEFT JOIN locations - ON stockrequest.loccode=locations.loccode - LEFT JOIN www_users - ON www_users.userid=departments.authoriser - WHERE stockrequest.authorised=1 - AND stockrequest.closed=0 - AND stockrequest.loccode='".$_POST['Location']."'"; - $result=DB_query($sql, $db); - - if (DB_num_rows($result)==0) { - prnMsg( _('There are no outstanding authorised requests for this location'), 'info'); - echo '<br />'; - echo '<div class="centre"><a href="' . htmlspecialchars($_SESSION['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Select another location') . '</a></div>'; - include('includes/footer.inc'); - exit; - } - - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection"><tr>'; - - /* Create the table for the purchase order header */ - echo '<th>'._('Request Number').'</th>'; - echo '<th>'._('Department').'</th>'; - echo '<th>'._('Location Of Stock').'</th>'; - echo '<th>'._('Requested Date').'</th>'; - echo '<th>'._('Narrative').'</th>'; - echo '</tr>'; - - while ($myrow=DB_fetch_array($result)) { - - echo '<tr>'; - echo '<td>'.$myrow['dispatchid'].'</td>'; - echo '<td>'.$myrow['description'].'</td>'; - echo '<td>'.$myrow['locationname'].'</td>'; - echo '<td>'.ConvertSQLDate($myrow['despatchdate']).'</td>'; - echo '<td>'.$myrow['narrative'].'</td>'; - echo '</tr>'; - $linesql="SELECT stockrequestitems.dispatchitemsid, - stockrequestitems.dispatchid, - stockrequestitems.stockid, - stockrequestitems.decimalplaces, - stockrequestitems.uom, - stockmaster.description, - stockrequestitems.quantity, - stockrequestitems.qtydelivered - FROM stockrequestitems - LEFT JOIN stockmaster - ON stockmaster.stockid=stockrequestitems.stockid - WHERE dispatchid='".$myrow['dispatchid'] . "' - AND completed=0"; - $lineresult=DB_query($linesql, $db); - - echo '<tr><td></td><td colspan="5" align="left"><table class="selection" align="left">'; - echo '<th>'._('Product').'</th>'; - echo '<th>'._('Quantity') . '<br />' . _('Required').'</th>'; - echo '<th>'._('Quantity') . '<br />' . _('Delivered').'</th>'; - echo '<th>'._('Units').'</th>'; - echo '<th>'._('Completed').'</th>'; - echo '<th>'._('Tag').'</th>'; - echo '</tr>'; - - while ($linerow=DB_fetch_array($lineresult)) { - echo '<tr>'; - echo '<td>'.$linerow['description'].'</td>'; - echo '<td class="number">'.locale_number_format($linerow['quantity']-$linerow['qtydelivered'],$linerow['decimalplaces']).'</td>'; - echo '<td class="number"> - <input type="text" class="number" name="'. $linerow['dispatchid'] . 'Qty'. $linerow['dispatchitemsid'] . '" value="'.locale_number_format($linerow['quantity']-$linerow['qtydelivered'],$linerow['decimalplaces']).'" /> - </td>'; - echo '<td>'.$linerow['uom'].'</td>'; - echo '<td><input type="checkbox" name="'. $linerow['dispatchid'] . 'Completed'. $linerow['dispatchitemsid'] . '" /></td>'; - //Select the tag - echo '<td><select name="'. $linerow['dispatchid'] . 'Tag'. $linerow['dispatchitemsid'] . '">'; - - $SQL = "SELECT tagref, - tagdescription - FROM tags - ORDER BY tagref"; - - $TagResult=DB_query($SQL,$db); - echo '<option value=0>0 - None</option>'; - while ($mytagrow=DB_fetch_array($TagResult)){ - if (isset($_SESSION['Adjustment']->tag) and $_SESSION['Adjustment']->tag==$mytagrow['tagref']){ - echo '<option selected="True" value="' . $mytagrow['tagref'] . '">' . $mytagrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; - } else { - echo '<option value="' . $mytagrow['tagref'] . '">' . $mytagrow['tagref'].' - ' .$mytagrow['tagdescription'] . '</option>'; - } - } - echo '</select></td>'; -// End select tag - echo '</tr>'; - echo '<input type="hidden" class="number" name="'. $linerow['dispatchid'] . 'StockID'. $linerow['dispatchitemsid'] . '" value="'.$linerow['stockid'].'" />'; - echo '<input type="hidden" class="number" name="'. $linerow['dispatchid'] . 'Location'. $linerow['dispatchitemsid'] . '" value="'.$_POST['Location'].'" />'; - echo '<input type="hidden" class="number" name="'. $linerow['dispatchid'] . 'RequestedQuantity'. $linerow['dispatchitemsid'] . '" value="'.locale_number_format($linerow['quantity']-$linerow['qtydelivered'],$linerow['decimalplaces']).'" />'; - } // end while order line detail - echo '</table></td></tr>'; - } //end while header loop - echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="UpdateAll" value="' . _('Update'). '" /></form>'; -} - -include('includes/footer.inc'); - -?> +<?php + +$PageSecurity=1; + +include('includes/session.inc'); + +$title = _('Fulfill Stock Requests'); + +include('includes/header.inc'); +include('includes/SQL_CommonFunctions.inc'); + +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Contract') . '" alt="" />' . _('Fulfill Stock Requests') . '</p>'; + +if (isset($_POST['UpdateAll'])) { + foreach ($_POST as $key => $value) { + if (mb_strpos($key,'Qty')) { + $RequestID = mb_substr($key,0, mb_strpos($key,'Qty')); + $LineID = mb_substr($key,mb_strpos($key,'Qty')+3); + $Quantity = $_POST[$RequestID.'Qty'.$LineID]; + $StockID = $_POST[$RequestID.'StockID'.$LineID]; + $Location = $_POST[$RequestID.'Location'.$LineID]; + $Tag = $_POST[$RequestID.'Tag'.$LineID]; + $RequestedQuantity = $_POST[$RequestID.'RequestedQuantity'.$LineID]; + if (isset($_POST[$RequestID.'Completed'.$LineID])) { + $Completed=True; + } else { + $Completed=False; + } + + $sql="SELECT materialcost, labourcost, overheadcost FROM stockmaster WHERE stockid='".$StockID."'"; + $result=DB_query($sql, $db); + $myrow=DB_fetch_array($result); + $StandardCost=$myrow['materialcost']+$myrow['labourcost']+$myrow['overheadcost']; + + $Narrative = _('Issue') . ' ' . $Quantity . ' ' . _('of') . ' '. $StockID . ' ' . _('to department'); + + $AdjustmentNumber = GetNextTransNo(17,$db); + $PeriodNo = GetPeriod (Date($_SESSION['DefaultDateFormat']), $db); + $SQLAdjustmentDate = FormatDateForSQL(Date($_SESSION['DefaultDateFormat'])); + + $Result = DB_Txn_Begin($db); + + // Need to get the current location quantity will need it later for the stock movement + $SQL="SELECT locstock.quantity + FROM locstock + WHERE locstock.stockid='" . $StockID . "' + AND loccode= '" . $Location . "'"; + $Result = DB_query($SQL, $db); + if (DB_num_rows($Result)==1){ + $LocQtyRow = DB_fetch_row($Result); + $QtyOnHandPrior = $LocQtyRow[0]; + } else { + // There must actually be some error this should never happen + $QtyOnHandPrior = 0; + } + + if ($_SESSION['ProhibitNegativeStock']==0 or ($_SESSION['ProhibitNegativeStock']==1 and $QtyOnHandPrior>=$Quantity)) { + + $SQL = "INSERT INTO stockmoves ( + stockid, + type, + transno, + loccode, + trandate, + prd, + reference, + qty, + newqoh) + VALUES ( + '" . $StockID . "', + 17, + '" . $AdjustmentNumber . "', + '" . $Location . "', + '" . $SQLAdjustmentDate . "', + '" . $PeriodNo . "', + '" . $Narrative ."', + '" . -$Quantity . "', + '" . ($QtyOnHandPrior - $Quantity) . "' + )"; + + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock movement record cannot be inserted because'); + $DbgMsg = _('The following SQL to insert the stock movement record was used'); + $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); + + + /*Get the ID of the StockMove... */ + $StkMoveNo = DB_Last_Insert_ID($db,'stockmoves','stkmoveno'); + + $SQL="UPDATE stockrequestitems + SET qtydelivered=qtydelivered+".$Quantity." + WHERE dispatchid='".$RequestID."' + AND dispatchitemsid='".$LineID."'"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' ._('The location stock record could not be updated because'); + $DbgMsg = _('The following SQL to update the stock record was used'); + $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg,true); + + $SQL = "UPDATE locstock SET quantity = quantity - '" . $Quantity . "' + WHERE stockid='" . $StockID . "' + AND loccode='" . $Location . "'"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' ._('The location stock record could not be updated because'); + $DbgMsg = _('The following SQL to update the stock record was used'); + + $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); + + if ($_SESSION['CompanyRecord']['gllink_stock']==1 AND $StandardCost > 0){ + + $StockGLCodes = GetStockGLCode($StockID,$db); + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + amount, + narrative, + tag) + VALUES (17, + '" .$AdjustmentNumber . "', + '" . $SQLAdjustmentDate . "', + '" . $PeriodNo . "', + '" . $StockGLCodes['issueglact'] . "', + '" . $StandardCost * -($Quantity) . "', + '" . $Narrative . "', + '" . $Tag . "' + )"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction entries could not be added because'); + $DbgMsg = _('The following SQL to insert the GL entries was used'); + $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg, true); + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + amount, + narrative, + tag) + VALUES (17, + '" . $AdjustmentNumber . "', + '" . $SQLAdjustmentDate . "', + '" . $PeriodNo . "', + '" . $StockGLCodes['stockact'] . "', + '" . $StandardCost * $Quantity . "', + '" . $Narrative . "', + '" . $Tag . "' + )"; + + $Errmsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction entries could not be added because'); + $DbgMsg = _('The following SQL to insert the GL entries was used'); + $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg,true); + } + + if (($Quantity>=$RequestedQuantity) or $Completed==True) { + $SQL="UPDATE stockrequestitems + SET completed=1 + WHERE dispatchid='".$RequestID."' + AND dispatchitemsid='".$LineID."'"; + $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg,true); + } + + $Result = DB_Txn_Commit($db); + + $ConfirmationText = _('A stock issue for'). ' ' . $StockID . ' ' . _('has been created from location').' ' . $Location .' '. _('for a quantity of') . ' ' . $Quantity ; + prnMsg( $ConfirmationText,'success'); + + if ($_SESSION['InventoryManagerEmail']!=''){ + $ConfirmationText = $ConfirmationText . ' ' . _('by user') . ' ' . $_SESSION['UserID'] . ' ' . _('at') . ' ' . Date('Y-m-d H:i:s'); + $EmailSubject = _('Stock adjustment for'). ' ' . $StockID; + mail($_SESSION['InventoryManagerEmail'],$EmailSubject,$ConfirmationText); + } + } else { + $ConfirmationText = _('A stock issue for'). ' ' . $StockID . ' ' . _('from location').' ' . $Location .' '. _('for a quantity of') . ' ' . $Quantity . ' ' . _('cannot be created as there is insufficient stock and your system is configured to not allow negative stocks'); + prnMsg( $ConfirmationText,'warn'); + } + } + } +} + +// Check if request can be closed and close if done. +if (isset($RequestID)) { + $SQL="SELECT dispatchid + FROM stockrequestitems + WHERE dispatchid='".$RequestID."' + AND completed=0"; + $Result=DB_query($SQL, $db); + if (DB_num_rows($Result)==0) { + $SQL="UPDATE stockrequest + SET closed=1 + WHERE dispatchid='".$RequestID."'"; + $Result=DB_query($SQL, $db); + } +} + +if (!isset($_POST['Location'])) { + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection"><tr>'; + echo '<td>' . _('Choose a location to issue requests from') . '</td> + <td><select name="Location">'; + $sql = "SELECT loccode, locationname FROM locations"; + $resultStkLocs = DB_query($sql,$db); + while ($myrow=DB_fetch_array($resultStkLocs)){ + if (isset($_SESSION['Adjustment']->StockLocation)){ + if ($myrow['loccode'] == $_SESSION['Adjustment']->StockLocation){ + echo '<option selected="selected" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } else { + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } + } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ + echo '<option selected="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 />'; + echo '<div class="centre"><input type="submit" name="EnterAdjustment" value="'. _('Show Requests'). '" /></div>'; + echo '</div> + </form>'; + include('includes/footer.inc'); + exit; +} + +/* Retrieve the requisition header information + */ +if (isset($_POST['Location'])) { + $sql="SELECT stockrequest.dispatchid, + locations.locationname, + stockrequest.despatchdate, + stockrequest.narrative, + departments.description, + www_users.realname, + www_users.email + FROM stockrequest + LEFT JOIN departments + ON stockrequest.departmentid=departments.departmentid + LEFT JOIN locations + ON stockrequest.loccode=locations.loccode + LEFT JOIN www_users + ON www_users.userid=departments.authoriser + WHERE stockrequest.authorised=1 + AND stockrequest.closed=0 + AND stockrequest.loccode='".$_POST['Location']."'"; + $result=DB_query($sql, $db); + + if (DB_num_rows($result)==0) { + prnMsg( _('There are no outstanding authorised requests for this location'), 'info'); + echo '<br />'; + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Select another location') . '</a></div>'; + include('includes/footer.inc'); + exit; + } + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection"><tr>'; + + /* Create the table for the purchase order header */ + echo '<th>'._('Request Number').'</th>'; + echo '<th>'._('Department').'</th>'; + echo '<th>'._('Location Of Stock').'</th>'; + echo '<th>'._('Requested Date').'</th>'; + echo '<th>'._('Narrative').'</th>'; + echo '</tr>'; + + while ($myrow=DB_fetch_array($result)) { + + echo '<tr>'; + echo '<td>'.$myrow['dispatchid'].'</td>'; + echo '<td>'.$myrow['description'].'</td>'; + echo '<td>'.$myrow['locationname'].'</td>'; + echo '<td>'.ConvertSQLDate($myrow['despatchdate']).'</td>'; + echo '<td>'.$myrow['narrative'].'</td>'; + echo '</tr>'; + $linesql="SELECT stockrequestitems.dispatchitemsid, + stockrequestitems.dispatchid, + stockrequestitems.stockid, + stockrequestitems.decimalplaces, + stockrequestitems.uom, + stockmaster.description, + stockrequestitems.quantity, + stockrequestitems.qtydelivered + FROM stockrequestitems + LEFT JOIN stockmaster + ON stockmaster.stockid=stockrequestitems.stockid + WHERE dispatchid='".$myrow['dispatchid'] . "' + AND completed=0"; + $lineresult=DB_query($linesql, $db); + + echo '<tr><td></td><td colspan="5" align="left"><table class="selection" align="left">'; + echo '<th>'._('Product').'</th>'; + echo '<th>'._('Quantity') . '<br />' . _('Required').'</th>'; + echo '<th>'._('Quantity') . '<br />' . _('Delivered').'</th>'; + echo '<th>'._('Units').'</th>'; + echo '<th>'._('Completed').'</th>'; + echo '<th>'._('Tag').'</th>'; + echo '</tr>'; + + while ($linerow=DB_fetch_array($lineresult)) { + echo '<tr>'; + echo '<td>'.$linerow['description'].'</td>'; + echo '<td class="number">'.locale_number_format($linerow['quantity']-$linerow['qtydelivered'],$linerow['decimalplaces']).'</td>'; + echo '<td class="number"> + <input type="text" class="number" name="'. $linerow['dispatchid'] . 'Qty'. $linerow['dispatchitemsid'] . '" value="'.locale_number_format($linerow['quantity']-$linerow['qtydelivered'],$linerow['decimalplaces']).'" /> + </td>'; + echo '<td>'.$linerow['uom'].'</td>'; + echo '<td><input type="checkbox" name="'. $linerow['dispatchid'] . 'Completed'. $linerow['dispatchitemsid'] . '" /></td>'; + //Select the tag + echo '<td><select name="'. $linerow['dispatchid'] . 'Tag'. $linerow['dispatchitemsid'] . '">'; + + $SQL = "SELECT tagref, + tagdescription + FROM tags + ORDER BY tagref"; + + $TagResult=DB_query($SQL,$db); + echo '<option value=0>0 - None</option>'; + while ($mytagrow=DB_fetch_array($TagResult)){ + if (isset($_SESSION['Adjustment']->tag) and $_SESSION['Adjustment']->tag==$mytagrow['tagref']){ + echo '<option selected="selected" value="' . $mytagrow['tagref'] . '">' . $mytagrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; + } else { + echo '<option value="' . $mytagrow['tagref'] . '">' . $mytagrow['tagref'].' - ' .$mytagrow['tagdescription'] . '</option>'; + } + } + echo '</select></td>'; +// End select tag + echo '</tr>'; + echo '<input type="hidden" class="number" name="'. $linerow['dispatchid'] . 'StockID'. $linerow['dispatchitemsid'] . '" value="'.$linerow['stockid'].'" />'; + echo '<input type="hidden" class="number" name="'. $linerow['dispatchid'] . 'Location'. $linerow['dispatchitemsid'] . '" value="'.$_POST['Location'].'" />'; + echo '<input type="hidden" class="number" name="'. $linerow['dispatchid'] . 'RequestedQuantity'. $linerow['dispatchitemsid'] . '" value="'.locale_number_format($linerow['quantity']-$linerow['qtydelivered'],$linerow['decimalplaces']).'" />'; + } // end while order line detail + echo '</table></td></tr>'; + } //end while header loop + echo '</table>'; + echo '<br /><div class="centre"><input type="submit" name="UpdateAll" value="' . _('Update'). '" /></div> + </div> + </form>'; +} + +include('includes/footer.inc'); + +?> Modified: trunk/InventoryPlanning.php =================================================================== --- trunk/InventoryPlanning.php 2012-04-01 16:54:04 UTC (rev 5192) +++ trunk/InventoryPlanning.php 2012-04-01 17:56:40 UTC (rev 5193) @@ -377,9 +377,10 @@ /*if $FromCriteria is not set then show a form to allow input */ - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> - <table class="selection">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; echo '<tr> <td>' . _('From Inventory Category Code') . ':</td> @@ -444,6 +445,7 @@ <div class="centre"> <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> </div> + </div> </form>'; } include('includes/footer.inc'); Modified: trunk/InventoryPlanningPrefSupplier.php =================================================================== --- trunk/InventoryPlanningPrefSupplier.php 2012-04-01 16:54:04 UTC (rev 5192) +++ trunk/InventoryPlanningPrefSupplier.php 2012-04-01 17:56:40 UTC (rev 5193) @@ -466,9 +466,10 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> - <table class="selection">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; echo '<tr><td>' . _('For Inventory in Location') . ':</td> <td><select name="Location">'; @@ -515,6 +516,8 @@ <div class="centre"> <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> </div>'; + echo '</div> + </form>'; include('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/InventoryQuantities.php =================================================================== --- trunk/InventoryQuantities.php 2012-04-01 16:54:04 UTC (rev 5192) +++ trunk/InventoryQuantities.php 2012-04-01 17:56:40 UTC (rev 5193) @@ -159,6 +159,7 @@ echo '<br /> <br /> <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <table class="selection"> <tr> @@ -208,7 +209,8 @@ <div class="centre"> <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> </div>'; - + echo '</div> + </form>'; include('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2012-04-01 16:54:04 UTC (rev 5192) +++ trunk/InventoryValuation.php 2012-04-01 17:56:40 UTC (rev 5193) @@ -206,8 +206,9 @@ </p>'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <table class="selection"> - <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <tr> <td>' . _('From Inventory Category Code') . ':</td> <td><select name="FromCriteria">'; @@ -267,6 +268,8 @@ <div class="centre"> <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> </div>'; + echo '</div> + </form>'; } include('includes/footer.inc'); Modified: trunk/includes/header.inc =================================================================== --- trunk/includes/header.inc 2012-04-01 16:54:04 UTC (rev 5192) +++ trunk/includes/header.inc 2012-04-01 17:56:40 UTC (rev 5193) @@ -34,6 +34,7 @@ echo '</head>'; echo '<body>'; + echo '<div id="canvas">'; echo '<table class="callout_main" cellpadding="0" cellspacing="0">'; echo '<tr>'; echo '<td colspan="2" rowspan="2">'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-04-01 21:33:50
|
Revision: 5194 http://web-erp.svn.sourceforge.net/web-erp/?rev=5194&view=rev Author: vvs2012 Date: 2012-04-01 21:33:43 +0000 (Sun, 01 Apr 2012) Log Message: ----------- xhtml Modified Paths: -------------- trunk/Labels.php trunk/Locations.php trunk/MRP.php trunk/MRPCalendar.php trunk/MRPCreateDemands.php trunk/MRPDemandTypes.php trunk/MRPDemands.php trunk/MRPPlannedPurchaseOrders.php trunk/MRPPlannedWorkOrders.php trunk/MRPReport.php trunk/MRPReschedules.php trunk/MRPShortages.php Modified: trunk/Labels.php =================================================================== --- trunk/Labels.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/Labels.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -271,22 +271,25 @@ echo '<br /> <form action="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'" method="post"> + <div> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <div class="centre"> <table border="2" cellspacing="4" class="selection"> <tbody> <tr> - <td align="center"><img src="'.$rootpath.'/css/paramsLabel.png" align="top" border="0" /></td> + <td align="center"><img src="'.$rootpath.'/css/paramsLabel.png" alt="" /></td> <td>'.$TableGD.'</td> </tr> <tr> - <td align="center"><IMG src="'.$rootpath.'/css/labelsDim.png" align="top" border="0" /></td> + <td align="center"><img src="'.$rootpath.'/css/labelsDim.png" alt="" /></td> <td>'.$TableLines.'</td> </tr> </tbody> </table> <br /><input type="submit" name="'.$name.'" value="'.$value.'" /> <input type="submit" name="Cancel" value="'.$vCancel.'" /> + </div> + </div> </form>'; } @@ -308,7 +311,7 @@ if ($tag['type']=='s') { $input ='<select name="'. $iTag . '">'; foreach ($tag['values'] as $i=>$val) { - $xSel = ($vDat==$i)?' selected' : ''; + $xSel = ($vDat==$i)?' selected="selected"' : ''; $input .= ' <option value="'. $i .'"'. $xSel .'>'.$val.'</option>'; } @@ -317,8 +320,8 @@ } else { $ro=''; if ($ReadOnly AND $specialTag==$iTag) - $ro='readonly '; - $input = '<input type="text" name="'. $iTag .'" value="'. $vDat .'" size="'. $tag['sz'] .'" maxlength="'. $tag['maxsz'] .'"'. $ro .' />'; + $ro='readonly="readonly"'; + $input = '<input type="text" name="'. $iTag .'" value="'. $vDat .'" size="'. $tag['sz'] .'" maxlength="'. $tag['maxsz'] .'" '. $ro .' />'; } if (!$iCol++) // when zero begins a line $html .= ' @@ -377,7 +380,7 @@ if ($tag['type']=='s') { $input ='<select name="'. $iTag . '[]">'; foreach ($tag['values'] as $kI=>$kVal) { - $xSel = ($vDat==$kI) ? ' selected':''; + $xSel = ($vDat==$kI) ? ' selected="selected"':''; $input .= ' <option value="'. $kI .'"'. $xSel .'>'.$kVal.'</option>'; } @@ -422,10 +425,12 @@ } } </script> - <form action="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'" method="post" id="form1" target="_self"> + <form action="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'" method="post" id="form1"> + <div> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <input type="hidden" name="action" id="action" value="" /> <input type="hidden" name="labelID" id="labelID" value="" /> + </div> </form> <div class="centre"> <table class="selection"> Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/Locations.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -388,8 +388,8 @@ printf('<td>%s</td> <td>%s</td> <td>%s</td> - <td><a href="%sSelectedLocation=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedLocation=%s&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this inventory location?') . '\');">' . _('Delete') . '</td> + <td><a href="%sSelectedLocation=%s">' . _('Edit') . '</a></td> + <td><a href="%sSelectedLocation=%s&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this inventory location?') . '\');">' . _('Delete') . '</a></td> </tr>', $myrow['loccode'], $myrow['locationname'], @@ -415,6 +415,7 @@ if (!isset($_GET['delete'])) { echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedLocation)) { @@ -478,7 +479,7 @@ } echo '<table class="selection"> <tr> - <th colspan="2"><font size="3" color="blue">'._('New Location details').'</font></th> + <th colspan="2"><h3>'._('New Location details').'</h3></th> </tr>'; echo '<tr> <td>' . _('Location Code') . ':</td> @@ -605,6 +606,7 @@ <div class="centre"> <input type="submit" name="submit" value="' . _('Enter Information') . '" /> </div> + </div> </form>'; } //end if record deleted no point displaying form to add record Modified: trunk/MRP.php =================================================================== --- trunk/MRP.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/MRP.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -542,7 +542,7 @@ } echo '<table class="selection"> <tr> - <th colspan="3"><font color="blue" size="3">'._('Last Run Details').'</font></th> + <th colspan="3"><h3>'._('Last Run Details').'</h3></th> </tr> <tr> <td>' . _('Last Run Time') . ':</td><td>' . $myrow['runtime'] . '</td> @@ -573,11 +573,12 @@ </tr> </table>'; } - echo '<p><form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<br /><form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> - <th colspan="3"><font color="blue" size="3">'._('This Run Details').'</font></th> + <th colspan="3"><h3>'._('This Run Details').'</h3></th> </tr> <tr> <td>' . _('Location') . '</td> @@ -598,23 +599,23 @@ echo '<tr> <td>' . _('Days Leeway') . ':</td> - <td><input type="text" name="Leeway" class="number" size="4" value="' . $leeway . '" /> + <td><input type="text" name="Leeway" class="number" size="4" value="' . $leeway . '" /></td> </tr> <tr> <td>' ._('Use MRP Demands?') . ':</td> - <td><input type="checkbox" name="usemrpdemands" value="y" checked /></td> + <td><input type="checkbox" name="usemrpdemands" value="y" checked="checked" /></td> </tr> <tr> <td>' ._('Use EOQ?') . ':</td> - <td><input type="checkbox" name="eoqflag" value="y" checked /></td> + <td><input type="checkbox" name="eoqflag" value="y" checked="checked" /></td> </tr> <tr> <td>' ._('Use Pan Size?') . ':</td> - <td><input type="checkbox" name="pansizeflag" value="y" checked /></td> + <td><input type="checkbox" name="pansizeflag" value="y" checked="checked" /></td> </tr> <tr> <td>' ._('Use Shrinkage?') . ':</td> - <td><input type="checkbox" name="shrinkageflag" value="y" checked /></td> + <td><input type="checkbox" name="shrinkageflag" value="y" checked="checked" /></td> </tr> </table> <div class="centre"> @@ -622,6 +623,7 @@ <br /> <input type="submit" name="submit" value="' . _('Run MRP') . '" /> </div> + </div> </form>'; } // End of Main program logic ------------------------------------------------------- Modified: trunk/MRPCalendar.php =================================================================== --- trunk/MRPCalendar.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/MRPCalendar.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -215,7 +215,7 @@ echo '<br /> <table class="selection"> - <tr bgcolor ="#800000"> + <tr> <th>' . _('Date') . '</th> <th>' . _('Manufacturing Date') . '</th> </tr>'; @@ -253,6 +253,7 @@ $_POST['ToDate']=date($_SESSION['DefaultDateFormat']); } echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> <br /> <br />'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -262,7 +263,7 @@ 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> + <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> @@ -316,6 +317,7 @@ </table> <br /> <br /> + </div> </form>'; } // End of function display() Modified: trunk/MRPCreateDemands.php =================================================================== --- trunk/MRPCreateDemands.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/MRPCreateDemands.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -194,6 +194,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . $title . '</p>'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> @@ -260,7 +261,8 @@ </tr> <tr> <td>' . _('Exclude Total Quantity Less Than') . ':</td> - <td><input type ="text" class="number" name="ExcludeQuantity" size="4" value="1" /> + <td><input type ="text" class="number" name="ExcludeQuantity" size="4" value="1" /></td> + </tr> <tr> <td>' . _('Exclude Total Dollars Less Than') . ':</td> <td><input type ="text" class="number" name="ExcludeAmount" size="8" value="0" /></td> @@ -277,6 +279,8 @@ <div class="centre"> <input type="submit" name="submit" value="' . _('Submit') . '" /> </div>'; +echo '</div> + </form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/MRPDemandTypes.php =================================================================== --- trunk/MRPDemandTypes.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/MRPDemandTypes.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -117,8 +117,8 @@ printf('<tr><td>%s</td> <td>%s</td> - <td><a href="%sSelectedDT=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedDT=%s&delete=yes">' . _('Delete') .'</td> + <td><a href="%sSelectedDT=%s">' . _('Edit') . '</a></td> + <td><a href="%sSelectedDT=%s&delete=yes">' . _('Delete') .'</a></td> </tr>', $myrow[0], $myrow[1], @@ -137,7 +137,8 @@ echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Show all Demand Types') . '</a></div>'; } -echo '<p><form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">'; +echo '<br /><form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedDT) and !isset($_GET['delete'])) { @@ -186,6 +187,7 @@ <div class="centre"> <input type="submit" name="submit" value="' . _('Enter Information') . '" /> </div> + </div> </form>'; include('includes/footer.inc'); Modified: trunk/MRPDemands.php =================================================================== --- trunk/MRPDemands.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/MRPDemands.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -85,8 +85,9 @@ // If the SELECT found records, display them if (DB_num_rows($result) > 0) { echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table cellpadding="2" colspan="7" class="selection">'; + echo '<table cellpadding="2" class="selection">'; $TableHeader = '<tr><th>' . _('Code') . '</th> <th>' . _('Description') . '</th> </tr>'; @@ -103,13 +104,14 @@ $k++; } $tabindex=$j+4; - echo '<td><input tabindex="' . $tabindex . '" type="submit" name="StockID" value="' . $myrow['stockid'] .'"</td> + echo '<td><input tabindex="' . $tabindex . '" type="submit" name="StockID" value="' . $myrow['stockid'] .'" /></td> <td>' . $myrow['description'] . '</td> </tr>'; $j++; } //end of while loop echo '</table>'; + echo '</div>'; echo '</form>'; } else { @@ -263,6 +265,7 @@ // demandtype echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $where = " "; if ($DemandType) { @@ -287,7 +290,7 @@ $result = DB_query($sql,$db,$ErrMsg); echo '<table class="selection"> - <tr bgcolor =#800000> + <tr> <th>' . _('Part Number') . '</th> <th>' . _('Description') . '</th> <th>' . _('Demand Type') . '</th> @@ -303,8 +306,8 @@ <td>' . $myrow['mrpdemandtype'] . '</td> <td>' . locale_number_format($myrow['quantity'],$myrow['decimalplaces']) . '</td> <td>' . $displaydate . '</td> - <td><a href="' .htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'?DemandID=' . $myrow['demandid'] . '&StockID=' . $myrow['stockid'] . '">' . _('Edit') . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?DemandID=' . $myrow['demandid'] . '&StockID=' . $myrow['stockid'].'&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this demand?') . '\');">' . _('Delete') .'</td> + <td><a href="' .htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'?DemandID=' . $myrow['demandid'] . '&StockID=' . $myrow['stockid'] . '">' . _('Edit') . '</a></td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?DemandID=' . $myrow['demandid'] . '&StockID=' . $myrow['stockid'].'&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this demand?') . '\');">' . _('Delete') .'</a></td> </tr>'; } @@ -312,6 +315,7 @@ echo '<tr><td>' . _('Number of Records') . '</td> <td>' . $ctr . '</td></tr>'; echo '</table>'; + echo '</div>'; echo '</form><br/><br/><br/><br/>'; unset ($StockID); display($db,$StockID,$DemandID); @@ -325,16 +329,17 @@ // the page is called, and is also invoked at the end of all of the other functions. // echo "<br/>DISPLAY - DemandID = $DemandID<br/>"; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (!isset($StockID)) { - echo'</font><table cellpadding="3" colspan="4" class="selection"><tr> - <td><font size="1">' . _('Enter text extracts in the') . ' <b>' . _('description') . '</b>:</font></td> + echo'<table cellpadding="3" class="selection"><tr> + <td>' . _('Enter text extracts in the') . ' <b>' . _('description') . '</b>:</td> <td><input tabindex="1" type="text" name="Keywords" size="20" maxlength="25" /></td> - <td><font size="3"><b>' . _('OR') . '</b></font></td> - <td><font size="1">' . _('Enter extract of the') . ' <b>' . _('Stock Code') . '</b>:</font></td> + <td><b>' . _('OR') . '</b></td> + <td>' . _('Enter extract of the') . ' <b>' . _('Stock Code') . '</b>:</td> <td><input tabindex="2" type="text" name="StockCode" size="15" maxlength="20" /></td> - <td><font size="3"><b>' . _('OR') . '</b></font></td> - <td><a href="'. htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?listall=yes"><font size="3">' . _('List All Demands') .'</font></a></td></tr> + <td><b>' . _('OR') . '</b></td> + <td><a href="'. htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?listall=yes">' . _('List All Demands') .'</a></td></tr> <tr><td colspan="7"><div class="centre"><input tabindex="3" type="submit" name="Search" value="' . _('Search Now') . '" /></div></td></tr></table>'; } else { @@ -416,13 +421,14 @@ </table> <br /> <div class="centre"> - <input type="submit" name="submit" value="' . _('Enter Information') . '" />   - <input type="submit" name="listsome" value="' . _('List Selection') . '" />   + <input type="submit" name="submit" value="' . _('Enter Information') . '" /> + <input type="submit" name="listsome" value="' . _('List Selection') . '" /> <input type="submit" name="deletesome" value="' . _('Delete Demand Type') . '" />'; // If mrpdemand record exists, display option to delete it if ((isset($DemandID)) AND (DB_num_rows($result) > 0)) { - echo '<br/><br/><a href=" ' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?delete=yes&StockID='.$StockID.'&DemandID=' . $DemandID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this demand?') . '\');">' . _('Or Delete Record') ; + echo '<br/><br/><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?delete=yes&StockID='.$StockID.'&DemandID=' . $DemandID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this demand?') . '\');">' . _('Or Delete Record') . '</a>'; } + echo '</div>'; } echo '</div> </form>'; Modified: trunk/MRPPlannedPurchaseOrders.php =================================================================== --- trunk/MRPPlannedPurchaseOrders.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/MRPPlannedPurchaseOrders.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -264,20 +264,24 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . $title . '</p>'; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"><table class="selection">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; echo '<tr><td>' . _('Consolidation') . ':</td><td><select name="Consolidation">'; echo '<option selected="selected" value="None">' . _('None') . '</option>'; echo '<option value="Weekly">' . _('Weekly') . '</option>'; echo '<option value="Monthly">' . _('Monthly') . '</option>'; echo '</select></td></tr>'; echo '<tr><td>' . _('Print Option') . ':</td><td><select name="Fill">'; - echo '<option selected="selected" value="yes">' . _('Print With Alternating Highlighted Lines'); - echo '<option value="no">' . _('Plain Print'); + echo '<option selected="selected" value="yes">' . _('Print With Alternating Highlighted Lines') . '</option>'; + echo '<option value="no">' . _('Plain Print') . '</option>'; echo '</select></td></tr>'; - echo '<tr><td>' . _('Cut Off Date') . ':</td><td><input type ="text" class=date alt="'.$_SESSION['DefaultDateFormat'] . + echo '<tr><td>' . _('Cut Off Date') . ':</td><td><input type ="text" class="date" alt="'.$_SESSION['DefaultDateFormat'] . '" name="cutoffdate" size="10" value="'.date($_SESSION['DefaultDateFormat']).'" /></td></tr>'; - echo '</table><p><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div></form>'; + echo '</table><br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div> + </div> + </form>'; include('includes/footer.inc'); Modified: trunk/MRPPlannedWorkOrders.php =================================================================== --- trunk/MRPPlannedWorkOrders.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/MRPPlannedWorkOrders.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -159,7 +159,7 @@ } // Print information on part break - if ($PartCounter > 0 & $HoldPart != $myrow['part']) { + if ($PartCounter > 0 AND $HoldPart != $myrow['part']) { $pdf->addTextWrap(50,$YPos,130,$FontSize,$HoldDescription,'',0,$fill); $pdf->addTextWrap(180,$YPos,40,$FontSize,_('Unit Cost: '),'center',0,$fill); $pdf->addTextWrap(220,$YPos,40,$FontSize,locale_number_format($HoldCost,$_SESSION['CompanyRecord']['decimalplaces']),'right',0,$fill); @@ -247,10 +247,11 @@ <img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . $title . '</p>'; echo '<form action="MRPConvertWorkOrders.php" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; - echo '<tr><th colspan="9"><font size="3" color="blue">' . _('Consolidation') . ': ' . $_POST['Consolidation'] . - " " . _('Cutoff Date') . ': ' . $_POST['cutoffdate'] . '</font></th></tr>'; + echo '<tr><th colspan="9"><h3>' . _('Consolidation') . ': ' . $_POST['Consolidation'] . + " " . _('Cutoff Date') . ': ' . $_POST['cutoffdate'] . '</h3></th></tr>'; echo '<tr> <th></th> <th>' . _('Code') . '</th> @@ -279,7 +280,7 @@ $k++; } - echo '<td><a href="' . $rootpath . '/WorkOrderEntry.php?NewItem=' . $myrow['part'] . '&ReqQty=' . $myrow['supplyquantity'] . '&ReqDate=' . $myrow['duedate'] . '">' . _('Convert') . '</a></td> + echo '<td><a href="' . $rootpath . '/WorkOrderEntry.php?NewItem=' . $myrow['part'] . '&ReqQty=' . $myrow['supplyquantity'] . '&ReqDate=' . $myrow['duedate'] . '">' . _('Convert') . '</a></td> <td>' . $myrow['part'] . ' <input type="hidden" name="' . $j . '_part" value="' . $myrow['part']. '" /></td> <td>' . $myrow['description'] . '</td> <td>' . ConvertSQLDate($myrow['mrpdate']) . '</td> @@ -304,6 +305,8 @@ <td colspan="4" class="number">' . _('Total Extended Cost') . ': ' . locale_number_format($Total_ExtCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> </tr> </table>'; + echo '</div> + </form>'; echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; include('includes/footer.inc'); @@ -317,9 +320,10 @@ echo '<p class="page_title_text"> <img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . $title . '</p>'; - echo '<br /><br /><form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"><table class="selection">'; + echo '<br /><br /><form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - + echo '<table class="selection">'; echo '<tr><td>' . _('Consolidation') . ':</td><td><select name="Consolidation">'; echo '<option selected="selected" value="None">' . _('None') . '</option>'; echo '<option value="Weekly">' . _('Weekly') . '</option>'; @@ -335,6 +339,8 @@ <td><input type ="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" name="cutoffdate" size="10" value="' .date($_SESSION['DefaultDateFormat']).'" /></td> </tr>'; echo '</table><div class="centre"><input type="submit" name="Review" value="' . _('Review') . '" /> <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div>'; + echo '</div> + </form>'; include('includes/footer.inc'); Modified: trunk/MRPReport.php =================================================================== --- trunk/MRPReport.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/MRPReport.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -505,12 +505,13 @@ ORDER BY categorydescription"; $result1 = DB_query($SQL, $db); if (DB_num_rows($result1) == 0) { - echo '<p><font size="4" color=red>' . _('Problem Report') . ':</font><br />' . _('There are no stock categories currently defined please use the link below to set them up'); + echo '<p class="bad">' . _('Problem Report') . ':<br />' . _('There are no stock categories currently defined please use the link below to set them up'); echo '<br /><a href="' . $rootpath . '/StockCategories.php">' . _('Define Stock Categories') . '</a>'; exit; } echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; 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="" />' . ' ' . _('Search for Inventory Items').'</p>'; echo '<table class="selection"><tr>'; @@ -531,7 +532,7 @@ echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } } - echo '</select>'; + echo '</select></td>'; echo '<td>' . _('Enter partial') . '<b> ' . _('Description') . '</b>:</td><td>'; if (isset($_POST['Keywords'])) { echo '<input type="text" name="Keywords" value="' . $_POST['Keywords'] . '" size="20" maxlength="25" />'; @@ -539,7 +540,7 @@ echo '<input type="text" name="Keywords" size="20" maxlength="25" />'; } echo '</td></tr><tr><td></td>'; - echo '<td><font size 3><b>' . _('OR') . ' ' . '</b></font>' . _('Enter partial') . ' <b>' . _('Stock Code') . '</b>:</td>'; + echo '<td><h3><b>' . _('OR') . ' ' . '</b></h3>' . _('Enter partial') . ' <b>' . _('Stock Code') . '</b>:</td>'; echo '<td>'; if (isset($_POST['StockCode'])) { echo '<input type="text" name="StockCode" value="' . $_POST['StockCode'] . '" size="15" maxlength="18" />'; @@ -553,10 +554,10 @@ <div class="centre"> <input type="submit" name="Search" value="' . _('Search Now') . '" /> </div> - <br /> - </form>'; + <br />'; echo '<script type="text/javascript">defaultControl(document.forms[0].StockCode);</script>'; + echo '</div>'; echo '</form>'; if (!isset($_POST['Search'])) { include('includes/footer.inc'); @@ -701,6 +702,7 @@ /* display list if there is more than one record */ if (isset($searchresult) AND !isset($_POST['Select'])) { echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $ListCount = DB_num_rows($searchresult); if ($ListCount > 0) { @@ -785,6 +787,7 @@ } //end of while loop echo '</table> + </div> </form> <br />'; } Modified: trunk/MRPReschedules.php =================================================================== --- trunk/MRPReschedules.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/MRPReschedules.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -129,8 +129,9 @@ echo '<br /> <br /> <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <table class="selection"> - <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <tr> <td>' . _('Print Option') . ':</td> <td><select name="Fill"> @@ -150,7 +151,9 @@ <br /> <div class="centre"> <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> - </div>'; + </div> + </div> + </form>'; include('includes/footer.inc'); Modified: trunk/MRPShortages.php =================================================================== --- trunk/MRPShortages.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/MRPShortages.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -261,9 +261,9 @@ . _('Stock') . '" alt="" />' . ' ' . $title . '</p>'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; - echo '</select></td></tr>'; echo '<tr><td>' . _('Inventory Category') . ':</td><td><select name="CategoryID">'; echo '<option selected="selected" value="All">' . _('All Stock Categories') .'</option>'; $sql = "SELECT categoryid, @@ -273,6 +273,7 @@ while ($myrow = DB_fetch_array($result)) { echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' .$myrow['categorydescription'] . '</option>'; } //end while loop + echo '</select></td></tr>'; echo '<tr><td>' . _('Sort') . ':</td> <td><select name="Sort"> <option selected="selected" value="extcost">' . _('Extended Shortage Dollars').'</option> @@ -300,7 +301,9 @@ <br /> <div class="centre"> <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> - </div>'; + </div> + </div> + </form>'; include('includes/footer.inc'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-04-01 21:33:50
|
Revision: 5194 http://web-erp.svn.sourceforge.net/web-erp/?rev=5194&view=rev Author: vvs2012 Date: 2012-04-01 21:33:43 +0000 (Sun, 01 Apr 2012) Log Message: ----------- xhtml Modified Paths: -------------- trunk/Labels.php trunk/Locations.php trunk/MRP.php trunk/MRPCalendar.php trunk/MRPCreateDemands.php trunk/MRPDemandTypes.php trunk/MRPDemands.php trunk/MRPPlannedPurchaseOrders.php trunk/MRPPlannedWorkOrders.php trunk/MRPReport.php trunk/MRPReschedules.php trunk/MRPShortages.php Modified: trunk/Labels.php =================================================================== --- trunk/Labels.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/Labels.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -271,22 +271,25 @@ echo '<br /> <form action="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'" method="post"> + <div> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <div class="centre"> <table border="2" cellspacing="4" class="selection"> <tbody> <tr> - <td align="center"><img src="'.$rootpath.'/css/paramsLabel.png" align="top" border="0" /></td> + <td align="center"><img src="'.$rootpath.'/css/paramsLabel.png" alt="" /></td> <td>'.$TableGD.'</td> </tr> <tr> - <td align="center"><IMG src="'.$rootpath.'/css/labelsDim.png" align="top" border="0" /></td> + <td align="center"><img src="'.$rootpath.'/css/labelsDim.png" alt="" /></td> <td>'.$TableLines.'</td> </tr> </tbody> </table> <br /><input type="submit" name="'.$name.'" value="'.$value.'" /> <input type="submit" name="Cancel" value="'.$vCancel.'" /> + </div> + </div> </form>'; } @@ -308,7 +311,7 @@ if ($tag['type']=='s') { $input ='<select name="'. $iTag . '">'; foreach ($tag['values'] as $i=>$val) { - $xSel = ($vDat==$i)?' selected' : ''; + $xSel = ($vDat==$i)?' selected="selected"' : ''; $input .= ' <option value="'. $i .'"'. $xSel .'>'.$val.'</option>'; } @@ -317,8 +320,8 @@ } else { $ro=''; if ($ReadOnly AND $specialTag==$iTag) - $ro='readonly '; - $input = '<input type="text" name="'. $iTag .'" value="'. $vDat .'" size="'. $tag['sz'] .'" maxlength="'. $tag['maxsz'] .'"'. $ro .' />'; + $ro='readonly="readonly"'; + $input = '<input type="text" name="'. $iTag .'" value="'. $vDat .'" size="'. $tag['sz'] .'" maxlength="'. $tag['maxsz'] .'" '. $ro .' />'; } if (!$iCol++) // when zero begins a line $html .= ' @@ -377,7 +380,7 @@ if ($tag['type']=='s') { $input ='<select name="'. $iTag . '[]">'; foreach ($tag['values'] as $kI=>$kVal) { - $xSel = ($vDat==$kI) ? ' selected':''; + $xSel = ($vDat==$kI) ? ' selected="selected"':''; $input .= ' <option value="'. $kI .'"'. $xSel .'>'.$kVal.'</option>'; } @@ -422,10 +425,12 @@ } } </script> - <form action="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'" method="post" id="form1" target="_self"> + <form action="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'" method="post" id="form1"> + <div> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <input type="hidden" name="action" id="action" value="" /> <input type="hidden" name="labelID" id="labelID" value="" /> + </div> </form> <div class="centre"> <table class="selection"> Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/Locations.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -388,8 +388,8 @@ printf('<td>%s</td> <td>%s</td> <td>%s</td> - <td><a href="%sSelectedLocation=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedLocation=%s&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this inventory location?') . '\');">' . _('Delete') . '</td> + <td><a href="%sSelectedLocation=%s">' . _('Edit') . '</a></td> + <td><a href="%sSelectedLocation=%s&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this inventory location?') . '\');">' . _('Delete') . '</a></td> </tr>', $myrow['loccode'], $myrow['locationname'], @@ -415,6 +415,7 @@ if (!isset($_GET['delete'])) { echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedLocation)) { @@ -478,7 +479,7 @@ } echo '<table class="selection"> <tr> - <th colspan="2"><font size="3" color="blue">'._('New Location details').'</font></th> + <th colspan="2"><h3>'._('New Location details').'</h3></th> </tr>'; echo '<tr> <td>' . _('Location Code') . ':</td> @@ -605,6 +606,7 @@ <div class="centre"> <input type="submit" name="submit" value="' . _('Enter Information') . '" /> </div> + </div> </form>'; } //end if record deleted no point displaying form to add record Modified: trunk/MRP.php =================================================================== --- trunk/MRP.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/MRP.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -542,7 +542,7 @@ } echo '<table class="selection"> <tr> - <th colspan="3"><font color="blue" size="3">'._('Last Run Details').'</font></th> + <th colspan="3"><h3>'._('Last Run Details').'</h3></th> </tr> <tr> <td>' . _('Last Run Time') . ':</td><td>' . $myrow['runtime'] . '</td> @@ -573,11 +573,12 @@ </tr> </table>'; } - echo '<p><form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<br /><form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> - <th colspan="3"><font color="blue" size="3">'._('This Run Details').'</font></th> + <th colspan="3"><h3>'._('This Run Details').'</h3></th> </tr> <tr> <td>' . _('Location') . '</td> @@ -598,23 +599,23 @@ echo '<tr> <td>' . _('Days Leeway') . ':</td> - <td><input type="text" name="Leeway" class="number" size="4" value="' . $leeway . '" /> + <td><input type="text" name="Leeway" class="number" size="4" value="' . $leeway . '" /></td> </tr> <tr> <td>' ._('Use MRP Demands?') . ':</td> - <td><input type="checkbox" name="usemrpdemands" value="y" checked /></td> + <td><input type="checkbox" name="usemrpdemands" value="y" checked="checked" /></td> </tr> <tr> <td>' ._('Use EOQ?') . ':</td> - <td><input type="checkbox" name="eoqflag" value="y" checked /></td> + <td><input type="checkbox" name="eoqflag" value="y" checked="checked" /></td> </tr> <tr> <td>' ._('Use Pan Size?') . ':</td> - <td><input type="checkbox" name="pansizeflag" value="y" checked /></td> + <td><input type="checkbox" name="pansizeflag" value="y" checked="checked" /></td> </tr> <tr> <td>' ._('Use Shrinkage?') . ':</td> - <td><input type="checkbox" name="shrinkageflag" value="y" checked /></td> + <td><input type="checkbox" name="shrinkageflag" value="y" checked="checked" /></td> </tr> </table> <div class="centre"> @@ -622,6 +623,7 @@ <br /> <input type="submit" name="submit" value="' . _('Run MRP') . '" /> </div> + </div> </form>'; } // End of Main program logic ------------------------------------------------------- Modified: trunk/MRPCalendar.php =================================================================== --- trunk/MRPCalendar.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/MRPCalendar.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -215,7 +215,7 @@ echo '<br /> <table class="selection"> - <tr bgcolor ="#800000"> + <tr> <th>' . _('Date') . '</th> <th>' . _('Manufacturing Date') . '</th> </tr>'; @@ -253,6 +253,7 @@ $_POST['ToDate']=date($_SESSION['DefaultDateFormat']); } echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> <br /> <br />'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -262,7 +263,7 @@ 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> + <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> @@ -316,6 +317,7 @@ </table> <br /> <br /> + </div> </form>'; } // End of function display() Modified: trunk/MRPCreateDemands.php =================================================================== --- trunk/MRPCreateDemands.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/MRPCreateDemands.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -194,6 +194,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . $title . '</p>'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> @@ -260,7 +261,8 @@ </tr> <tr> <td>' . _('Exclude Total Quantity Less Than') . ':</td> - <td><input type ="text" class="number" name="ExcludeQuantity" size="4" value="1" /> + <td><input type ="text" class="number" name="ExcludeQuantity" size="4" value="1" /></td> + </tr> <tr> <td>' . _('Exclude Total Dollars Less Than') . ':</td> <td><input type ="text" class="number" name="ExcludeAmount" size="8" value="0" /></td> @@ -277,6 +279,8 @@ <div class="centre"> <input type="submit" name="submit" value="' . _('Submit') . '" /> </div>'; +echo '</div> + </form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/MRPDemandTypes.php =================================================================== --- trunk/MRPDemandTypes.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/MRPDemandTypes.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -117,8 +117,8 @@ printf('<tr><td>%s</td> <td>%s</td> - <td><a href="%sSelectedDT=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedDT=%s&delete=yes">' . _('Delete') .'</td> + <td><a href="%sSelectedDT=%s">' . _('Edit') . '</a></td> + <td><a href="%sSelectedDT=%s&delete=yes">' . _('Delete') .'</a></td> </tr>', $myrow[0], $myrow[1], @@ -137,7 +137,8 @@ echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Show all Demand Types') . '</a></div>'; } -echo '<p><form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">'; +echo '<br /><form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedDT) and !isset($_GET['delete'])) { @@ -186,6 +187,7 @@ <div class="centre"> <input type="submit" name="submit" value="' . _('Enter Information') . '" /> </div> + </div> </form>'; include('includes/footer.inc'); Modified: trunk/MRPDemands.php =================================================================== --- trunk/MRPDemands.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/MRPDemands.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -85,8 +85,9 @@ // If the SELECT found records, display them if (DB_num_rows($result) > 0) { echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table cellpadding="2" colspan="7" class="selection">'; + echo '<table cellpadding="2" class="selection">'; $TableHeader = '<tr><th>' . _('Code') . '</th> <th>' . _('Description') . '</th> </tr>'; @@ -103,13 +104,14 @@ $k++; } $tabindex=$j+4; - echo '<td><input tabindex="' . $tabindex . '" type="submit" name="StockID" value="' . $myrow['stockid'] .'"</td> + echo '<td><input tabindex="' . $tabindex . '" type="submit" name="StockID" value="' . $myrow['stockid'] .'" /></td> <td>' . $myrow['description'] . '</td> </tr>'; $j++; } //end of while loop echo '</table>'; + echo '</div>'; echo '</form>'; } else { @@ -263,6 +265,7 @@ // demandtype echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $where = " "; if ($DemandType) { @@ -287,7 +290,7 @@ $result = DB_query($sql,$db,$ErrMsg); echo '<table class="selection"> - <tr bgcolor =#800000> + <tr> <th>' . _('Part Number') . '</th> <th>' . _('Description') . '</th> <th>' . _('Demand Type') . '</th> @@ -303,8 +306,8 @@ <td>' . $myrow['mrpdemandtype'] . '</td> <td>' . locale_number_format($myrow['quantity'],$myrow['decimalplaces']) . '</td> <td>' . $displaydate . '</td> - <td><a href="' .htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'?DemandID=' . $myrow['demandid'] . '&StockID=' . $myrow['stockid'] . '">' . _('Edit') . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?DemandID=' . $myrow['demandid'] . '&StockID=' . $myrow['stockid'].'&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this demand?') . '\');">' . _('Delete') .'</td> + <td><a href="' .htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'?DemandID=' . $myrow['demandid'] . '&StockID=' . $myrow['stockid'] . '">' . _('Edit') . '</a></td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?DemandID=' . $myrow['demandid'] . '&StockID=' . $myrow['stockid'].'&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this demand?') . '\');">' . _('Delete') .'</a></td> </tr>'; } @@ -312,6 +315,7 @@ echo '<tr><td>' . _('Number of Records') . '</td> <td>' . $ctr . '</td></tr>'; echo '</table>'; + echo '</div>'; echo '</form><br/><br/><br/><br/>'; unset ($StockID); display($db,$StockID,$DemandID); @@ -325,16 +329,17 @@ // the page is called, and is also invoked at the end of all of the other functions. // echo "<br/>DISPLAY - DemandID = $DemandID<br/>"; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (!isset($StockID)) { - echo'</font><table cellpadding="3" colspan="4" class="selection"><tr> - <td><font size="1">' . _('Enter text extracts in the') . ' <b>' . _('description') . '</b>:</font></td> + echo'<table cellpadding="3" class="selection"><tr> + <td>' . _('Enter text extracts in the') . ' <b>' . _('description') . '</b>:</td> <td><input tabindex="1" type="text" name="Keywords" size="20" maxlength="25" /></td> - <td><font size="3"><b>' . _('OR') . '</b></font></td> - <td><font size="1">' . _('Enter extract of the') . ' <b>' . _('Stock Code') . '</b>:</font></td> + <td><b>' . _('OR') . '</b></td> + <td>' . _('Enter extract of the') . ' <b>' . _('Stock Code') . '</b>:</td> <td><input tabindex="2" type="text" name="StockCode" size="15" maxlength="20" /></td> - <td><font size="3"><b>' . _('OR') . '</b></font></td> - <td><a href="'. htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?listall=yes"><font size="3">' . _('List All Demands') .'</font></a></td></tr> + <td><b>' . _('OR') . '</b></td> + <td><a href="'. htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?listall=yes">' . _('List All Demands') .'</a></td></tr> <tr><td colspan="7"><div class="centre"><input tabindex="3" type="submit" name="Search" value="' . _('Search Now') . '" /></div></td></tr></table>'; } else { @@ -416,13 +421,14 @@ </table> <br /> <div class="centre"> - <input type="submit" name="submit" value="' . _('Enter Information') . '" />   - <input type="submit" name="listsome" value="' . _('List Selection') . '" />   + <input type="submit" name="submit" value="' . _('Enter Information') . '" /> + <input type="submit" name="listsome" value="' . _('List Selection') . '" /> <input type="submit" name="deletesome" value="' . _('Delete Demand Type') . '" />'; // If mrpdemand record exists, display option to delete it if ((isset($DemandID)) AND (DB_num_rows($result) > 0)) { - echo '<br/><br/><a href=" ' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?delete=yes&StockID='.$StockID.'&DemandID=' . $DemandID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this demand?') . '\');">' . _('Or Delete Record') ; + echo '<br/><br/><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?delete=yes&StockID='.$StockID.'&DemandID=' . $DemandID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this demand?') . '\');">' . _('Or Delete Record') . '</a>'; } + echo '</div>'; } echo '</div> </form>'; Modified: trunk/MRPPlannedPurchaseOrders.php =================================================================== --- trunk/MRPPlannedPurchaseOrders.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/MRPPlannedPurchaseOrders.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -264,20 +264,24 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . $title . '</p>'; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"><table class="selection">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; echo '<tr><td>' . _('Consolidation') . ':</td><td><select name="Consolidation">'; echo '<option selected="selected" value="None">' . _('None') . '</option>'; echo '<option value="Weekly">' . _('Weekly') . '</option>'; echo '<option value="Monthly">' . _('Monthly') . '</option>'; echo '</select></td></tr>'; echo '<tr><td>' . _('Print Option') . ':</td><td><select name="Fill">'; - echo '<option selected="selected" value="yes">' . _('Print With Alternating Highlighted Lines'); - echo '<option value="no">' . _('Plain Print'); + echo '<option selected="selected" value="yes">' . _('Print With Alternating Highlighted Lines') . '</option>'; + echo '<option value="no">' . _('Plain Print') . '</option>'; echo '</select></td></tr>'; - echo '<tr><td>' . _('Cut Off Date') . ':</td><td><input type ="text" class=date alt="'.$_SESSION['DefaultDateFormat'] . + echo '<tr><td>' . _('Cut Off Date') . ':</td><td><input type ="text" class="date" alt="'.$_SESSION['DefaultDateFormat'] . '" name="cutoffdate" size="10" value="'.date($_SESSION['DefaultDateFormat']).'" /></td></tr>'; - echo '</table><p><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div></form>'; + echo '</table><br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div> + </div> + </form>'; include('includes/footer.inc'); Modified: trunk/MRPPlannedWorkOrders.php =================================================================== --- trunk/MRPPlannedWorkOrders.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/MRPPlannedWorkOrders.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -159,7 +159,7 @@ } // Print information on part break - if ($PartCounter > 0 & $HoldPart != $myrow['part']) { + if ($PartCounter > 0 AND $HoldPart != $myrow['part']) { $pdf->addTextWrap(50,$YPos,130,$FontSize,$HoldDescription,'',0,$fill); $pdf->addTextWrap(180,$YPos,40,$FontSize,_('Unit Cost: '),'center',0,$fill); $pdf->addTextWrap(220,$YPos,40,$FontSize,locale_number_format($HoldCost,$_SESSION['CompanyRecord']['decimalplaces']),'right',0,$fill); @@ -247,10 +247,11 @@ <img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . $title . '</p>'; echo '<form action="MRPConvertWorkOrders.php" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; - echo '<tr><th colspan="9"><font size="3" color="blue">' . _('Consolidation') . ': ' . $_POST['Consolidation'] . - " " . _('Cutoff Date') . ': ' . $_POST['cutoffdate'] . '</font></th></tr>'; + echo '<tr><th colspan="9"><h3>' . _('Consolidation') . ': ' . $_POST['Consolidation'] . + " " . _('Cutoff Date') . ': ' . $_POST['cutoffdate'] . '</h3></th></tr>'; echo '<tr> <th></th> <th>' . _('Code') . '</th> @@ -279,7 +280,7 @@ $k++; } - echo '<td><a href="' . $rootpath . '/WorkOrderEntry.php?NewItem=' . $myrow['part'] . '&ReqQty=' . $myrow['supplyquantity'] . '&ReqDate=' . $myrow['duedate'] . '">' . _('Convert') . '</a></td> + echo '<td><a href="' . $rootpath . '/WorkOrderEntry.php?NewItem=' . $myrow['part'] . '&ReqQty=' . $myrow['supplyquantity'] . '&ReqDate=' . $myrow['duedate'] . '">' . _('Convert') . '</a></td> <td>' . $myrow['part'] . ' <input type="hidden" name="' . $j . '_part" value="' . $myrow['part']. '" /></td> <td>' . $myrow['description'] . '</td> <td>' . ConvertSQLDate($myrow['mrpdate']) . '</td> @@ -304,6 +305,8 @@ <td colspan="4" class="number">' . _('Total Extended Cost') . ': ' . locale_number_format($Total_ExtCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> </tr> </table>'; + echo '</div> + </form>'; echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; include('includes/footer.inc'); @@ -317,9 +320,10 @@ echo '<p class="page_title_text"> <img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . $title . '</p>'; - echo '<br /><br /><form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"><table class="selection">'; + echo '<br /><br /><form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - + echo '<table class="selection">'; echo '<tr><td>' . _('Consolidation') . ':</td><td><select name="Consolidation">'; echo '<option selected="selected" value="None">' . _('None') . '</option>'; echo '<option value="Weekly">' . _('Weekly') . '</option>'; @@ -335,6 +339,8 @@ <td><input type ="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" name="cutoffdate" size="10" value="' .date($_SESSION['DefaultDateFormat']).'" /></td> </tr>'; echo '</table><div class="centre"><input type="submit" name="Review" value="' . _('Review') . '" /> <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div>'; + echo '</div> + </form>'; include('includes/footer.inc'); Modified: trunk/MRPReport.php =================================================================== --- trunk/MRPReport.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/MRPReport.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -505,12 +505,13 @@ ORDER BY categorydescription"; $result1 = DB_query($SQL, $db); if (DB_num_rows($result1) == 0) { - echo '<p><font size="4" color=red>' . _('Problem Report') . ':</font><br />' . _('There are no stock categories currently defined please use the link below to set them up'); + echo '<p class="bad">' . _('Problem Report') . ':<br />' . _('There are no stock categories currently defined please use the link below to set them up'); echo '<br /><a href="' . $rootpath . '/StockCategories.php">' . _('Define Stock Categories') . '</a>'; exit; } echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; 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="" />' . ' ' . _('Search for Inventory Items').'</p>'; echo '<table class="selection"><tr>'; @@ -531,7 +532,7 @@ echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } } - echo '</select>'; + echo '</select></td>'; echo '<td>' . _('Enter partial') . '<b> ' . _('Description') . '</b>:</td><td>'; if (isset($_POST['Keywords'])) { echo '<input type="text" name="Keywords" value="' . $_POST['Keywords'] . '" size="20" maxlength="25" />'; @@ -539,7 +540,7 @@ echo '<input type="text" name="Keywords" size="20" maxlength="25" />'; } echo '</td></tr><tr><td></td>'; - echo '<td><font size 3><b>' . _('OR') . ' ' . '</b></font>' . _('Enter partial') . ' <b>' . _('Stock Code') . '</b>:</td>'; + echo '<td><h3><b>' . _('OR') . ' ' . '</b></h3>' . _('Enter partial') . ' <b>' . _('Stock Code') . '</b>:</td>'; echo '<td>'; if (isset($_POST['StockCode'])) { echo '<input type="text" name="StockCode" value="' . $_POST['StockCode'] . '" size="15" maxlength="18" />'; @@ -553,10 +554,10 @@ <div class="centre"> <input type="submit" name="Search" value="' . _('Search Now') . '" /> </div> - <br /> - </form>'; + <br />'; echo '<script type="text/javascript">defaultControl(document.forms[0].StockCode);</script>'; + echo '</div>'; echo '</form>'; if (!isset($_POST['Search'])) { include('includes/footer.inc'); @@ -701,6 +702,7 @@ /* display list if there is more than one record */ if (isset($searchresult) AND !isset($_POST['Select'])) { echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $ListCount = DB_num_rows($searchresult); if ($ListCount > 0) { @@ -785,6 +787,7 @@ } //end of while loop echo '</table> + </div> </form> <br />'; } Modified: trunk/MRPReschedules.php =================================================================== --- trunk/MRPReschedules.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/MRPReschedules.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -129,8 +129,9 @@ echo '<br /> <br /> <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <table class="selection"> - <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <tr> <td>' . _('Print Option') . ':</td> <td><select name="Fill"> @@ -150,7 +151,9 @@ <br /> <div class="centre"> <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> - </div>'; + </div> + </div> + </form>'; include('includes/footer.inc'); Modified: trunk/MRPShortages.php =================================================================== --- trunk/MRPShortages.php 2012-04-01 17:56:40 UTC (rev 5193) +++ trunk/MRPShortages.php 2012-04-01 21:33:43 UTC (rev 5194) @@ -261,9 +261,9 @@ . _('Stock') . '" alt="" />' . ' ' . $title . '</p>'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; - echo '</select></td></tr>'; echo '<tr><td>' . _('Inventory Category') . ':</td><td><select name="CategoryID">'; echo '<option selected="selected" value="All">' . _('All Stock Categories') .'</option>'; $sql = "SELECT categoryid, @@ -273,6 +273,7 @@ while ($myrow = DB_fetch_array($result)) { echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' .$myrow['categorydescription'] . '</option>'; } //end while loop + echo '</select></td></tr>'; echo '<tr><td>' . _('Sort') . ':</td> <td><select name="Sort"> <option selected="selected" value="extcost">' . _('Extended Shortage Dollars').'</option> @@ -300,7 +301,9 @@ <br /> <div class="centre"> <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> - </div>'; + </div> + </div> + </form>'; include('includes/footer.inc'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-04-02 03:37:21
|
Revision: 5202 http://web-erp.svn.sourceforge.net/web-erp/?rev=5202&view=rev Author: vvs2012 Date: 2012-04-02 03:37:13 +0000 (Mon, 02 Apr 2012) Log Message: ----------- xhtml Modified Paths: -------------- trunk/OffersReceived.php trunk/OrderDetails.php trunk/OutstandingGRNs.php trunk/PageSecurity.php trunk/PaymentAllocations.php trunk/PaymentMethods.php trunk/PaymentTerms.php trunk/Payments.php Modified: trunk/OffersReceived.php =================================================================== --- trunk/OffersReceived.php 2012-04-02 02:54:14 UTC (rev 5201) +++ trunk/OffersReceived.php 2012-04-02 03:37:13 UTC (rev 5202) @@ -1,277 +1,281 @@ -<?php - -/*$Id: OffersReceived.php 4500 2011-02-27 09:18:42Z daintree $ */ - -include('includes/session.inc'); -$title = _('Supplier Offers'); -include('includes/header.inc'); -include('includes/SQL_CommonFunctions.inc'); - -if (isset($_POST['supplierid'])) { - $sql="SELECT suppname, - email, - currcode, - paymentterms - FROM suppliers - WHERE supplierid='".$_POST['supplierid']."'"; - $result = DB_query($sql, $db); - $myrow=DB_fetch_array($result); - $SupplierName=$myrow['suppname']; - $Email=$myrow['email']; - $CurrCode=$myrow['currcode']; - $PaymentTerms=$myrow['paymentterms']; -} - -if (!isset($_POST['supplierid'])) { - $sql="SELECT DISTINCT - offers.supplierid, - suppliers.suppname - FROM offers - LEFT JOIN purchorderauth - ON offers.currcode=purchorderauth.currabrev - LEFT JOIN suppliers - ON suppliers.supplierid=offers.supplierid - WHERE purchorderauth.userid='".$_SESSION['UserID']."' - AND offers.expirydate>'".date('Y-m-d')."' - AND purchorderauth.cancreate=0"; - $result=DB_query($sql, $db); - if (DB_num_rows($result)==0) { - prnMsg(_('There are no offers outstanding that you are authorised to deal with'), 'information'); - } else { - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Select Supplier') . '" alt="" /> - ' . ' ' . _('Select Supplier') . '</p>'; - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection"> - <tr> - <td>'._('Select Supplier').'</td> - <td><select name=supplierid>'; - while ($myrow=DB_fetch_array($result)) { - echo '<option value="'.$myrow['supplierid'].'">'.$myrow['suppname'].'</option>'; - } - echo '</select></td> - </tr> - <tr><td colspan="12"> - <div class="centre"> - <input type="submit" name="select" value="' . _('Enter Information') . '" /> - </div> - </td> - </tr> - </table> - </form>'; - } -} - -if (!isset($_POST['submit']) and isset($_POST['supplierid'])) { - $sql = "SELECT offers.offerid, - offers.tenderid, - offers.supplierid, - suppliers.suppname, - offers.stockid, - stockmaster.description, - offers.quantity, - offers.uom, - offers.price, - offers.expirydate, - offers.currcode, - stockmaster.decimalplaces, - currencies.decimalplaces AS currdecimalplaces - FROM offers INNER JOIN purchorderauth - ON offers.currcode=purchorderauth.currabrev - INNER JOIN suppliers - ON suppliers.supplierid=offers.supplierid - INNER JOIN currencies - ON suppliers.currcode=currencies.currabrev - LEFT JOIN stockmaster - ON stockmaster.stockid=offers.stockid - WHERE purchorderauth.userid='" . $_SESSION['UserID'] . "' - AND offers.expirydate>'" . date('Y-m-d') . "' - AND offers.supplierid='" . $_POST['supplierid'] . "' - ORDER BY offerid"; - $result=DB_query($sql, $db); - - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - - echo '<p class="page_title_text"> - <img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Supplier Offers') . '" alt="" />' . ' ' . _('Supplier Offers') . ' - </p>'; - - echo '<table class="selection"> - <tr> - <th>'._('Offer ID').'</th> - <th>'._('Supplier').'</th> - <th>'._('Stock Item').'</th> - <th>'._('Quantity').'</th> - <th>'._('Units').'</th> - <th>'._('Price').'</th> - <th>'._('Total').'</th> - <th>'._('Currency').'</th> - <th>'._('Offer Expires').'</th> - <th>'._('Accept').'</th> - <th>'._('Reject').'</th> - <th>'._('Defer').'</th> - </tr>'; - $k=0; - - while ($myrow=DB_fetch_array($result)) { - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k++; - } - echo '<td>'.$myrow['offerid'].'</td> - <td>'.$myrow['suppname'].'</td> - <td>'.$myrow['description'].'</td> - <td class="number">'.locale_number_format($myrow['quantity'],$myrow['decimalplaces']).'</td> - <td>'.$myrow['uom'].'</td> - <td class="number">'.locale_number_format($myrow['price'],$myrow['currdecimalplaces']).'</td> - <td class="number">'.locale_number_format($myrow['price']*$myrow['quantity'],$myrow['currdecimalplaces']).'</td> - <td>'.$myrow['currcode'].'</td> - <td>'.$myrow['expirydate'].'</td> - <td><input type="radio" name="action'.$myrow['offerid'].'" value="1" /></td> - <td><input type="radio" name="action'.$myrow['offerid'].'" value="2" /></td> - <td><input type="radio" checked name="action'.$myrow['offerid'].'" value="3" /></td> - <td><input type="hidden" name="supplierid" value="'.$myrow['supplierid'].'" /></td> - </tr>'; - } - echo '<tr> - <td colspan="12"> - <div class="centre"> - <input type="submit" name="submit" value="' . _('Enter Information') . '" /> - </div> - </td> - </tr> - </form> - </table>'; -} else if(isset($_POST['submit']) and isset($_POST['supplierid'])) { - include ('includes/htmlMimeMail.php'); - $accepts=array(); - $rejects=array(); - $defers=array(); - foreach ($_POST as $key => $value) { - if(mb_substr($key,0,6)=='action') { - $OfferID=mb_substr($key,6); - switch ($value) { - case 1: - $accepts[]=$OfferID; - break; - case 2: - $rejects[]=$OfferID; - break; - case 3: - $defers[]=$OfferID; - break; - } - } - } - if (sizeOf($accepts)>0){ - $MailText=_('This email has been automatically generated by the webERP installation at').' '. - $_SESSION['CompanyRecord']['coyname']."\n"; - $MailText.=_('The following offers you made have been accepted')."\n"; - $MailText.=_('An official order will be sent to you in due course')."\n\n"; - $sql="SELECT rate FROM currencies where currabrev='" . $CurrCode ."'"; - $result=DB_query($sql, $db); - $myrow=DB_fetch_array($result); - $Rate=$myrow['rate']; - $OrderNo = GetNextTransNo(18, $db); - $sql="INSERT INTO purchorders ( - orderno, - supplierno, - orddate, - rate, - initiator, - intostocklocation, - deliverydate, - status, - stat_comment, - paymentterms) - VALUES ( - '".$OrderNo."', - '".$_POST['supplierid']."', - '".date('Y-m-d')."', - '".$Rate."', - '".$_SESSION['UserID']."', - '".$_SESSION['DefaultFactoryLocation']."', - '".date('Y-m-d')."', - '"._('Pending')."', - '"._('Automatically generated from tendering system')."', - '".$PaymentTerms."')"; - DB_query($sql, $db); - foreach ($accepts as $AcceptID) { - $sql="SELECT offers.quantity, - offers.price, - offers.uom, - stockmaster.description, - stockmaster.stockid - FROM offers - LEFT JOIN stockmaster - ON offers.stockid=stockmaster.stockid - WHERE offerid='".$AcceptID."'"; - $result= DB_query($sql, $db); - $myrow=DB_fetch_array($result); - $MailText.=$myrow['description']."\t"._('Quantity').' '.$myrow['quantity']."\t"._('Price').' '. - locale_number_format($myrow['price'])."\n"; - $sql="INSERT INTO purchorderdetails (orderno, - itemcode, - deliverydate, - itemdescription, - unitprice, - actprice, - quantityord, - suppliersunit) - VALUES ('".$OrderNo."', - '".$myrow['stockid']."', - '".date('Y-m-d')."', - '".$myrow['description']."', - '".$myrow['price']."', - '".$myrow['price']."', - '".$myrow['quantity']."', - '".$myrow['uom']."')"; - $result=DB_query($sql, $db); - $sql="DELETE FROM offers WHERE offerid='".$AcceptID."'"; - $result=DB_query($sql, $db); - } - $mail = new htmlMimeMail(); - $mail->setSubject(_('Your offer to').' '.$_SESSION['CompanyRecord']['coyname'].' '._('has been accepted')); - $mail->setText($MailText); - $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>'); - $result = $mail->send(array($Email), 'smtp'); - prnMsg(_('The accepted offers from').' '.$SupplierName.' '._('have been converted to purchase orders and an email sent to') - .' '.$Email."\n"._('Please review the order contents').' '.'<a href="'.$rootpath . - '/PO_Header.php?ModifyOrderNumber=' . $OrderNo.'">'._('here').'</a>', 'success'); - } - if (sizeOf($rejects)>0){ - $MailText=_('This email has been automatically generated by the webERP installation at').' '. - $_SESSION['CompanyRecord']['coyname']."\n"; - $MailText.=_('The following offers you made have been rejected')."\n\n"; - foreach ($rejects as $RejectID) { - $sql="SELECT offers.quantity, - offers.price, - stockmaster.description - FROM offers - LEFT JOIN stockmaster - ON offers.stockid=stockmaster.stockid - WHERE offerid='".$RejectID."'"; - $result= DB_query($sql, $db); - $myrow=DB_fetch_array($result); - $MailText.=$myrow['description']."\t"._('Quantity').' '.$myrow['quantity']."\t"._('Price').' '. - locale_number_format($myrow['price'])."\n"; - $sql="DELETE FROM offers WHERE offerid='".$RejectID."'"; - $result=DB_query($sql, $db); - } - $mail = new htmlMimeMail(); - $mail->setSubject(_('Your offer to').' '.$_SESSION['CompanyRecord']['coyname'].' '._('has been rejected')); - $mail->setText($MailText); - $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>'); - $result = $mail->send(array($Email), 'smtp'); - prnMsg(_('The rejected offers from').' '.$SupplierName.' '._('have been removed from the system and an email sent to') - .' '.$Email, 'success'); - } - prnMsg(_('All offers have been processed, and emails sent where appropriate'), 'success'); -} -include('includes/footer.inc'); - +<?php + +/*$Id: OffersReceived.php 4500 2011-02-27 09:18:42Z daintree $ */ + +include('includes/session.inc'); +$title = _('Supplier Offers'); +include('includes/header.inc'); +include('includes/SQL_CommonFunctions.inc'); + +if (isset($_POST['supplierid'])) { + $sql="SELECT suppname, + email, + currcode, + paymentterms + FROM suppliers + WHERE supplierid='".$_POST['supplierid']."'"; + $result = DB_query($sql, $db); + $myrow=DB_fetch_array($result); + $SupplierName=$myrow['suppname']; + $Email=$myrow['email']; + $CurrCode=$myrow['currcode']; + $PaymentTerms=$myrow['paymentterms']; +} + +if (!isset($_POST['supplierid'])) { + $sql="SELECT DISTINCT + offers.supplierid, + suppliers.suppname + FROM offers + LEFT JOIN purchorderauth + ON offers.currcode=purchorderauth.currabrev + LEFT JOIN suppliers + ON suppliers.supplierid=offers.supplierid + WHERE purchorderauth.userid='".$_SESSION['UserID']."' + AND offers.expirydate>'".date('Y-m-d')."' + AND purchorderauth.cancreate=0"; + $result=DB_query($sql, $db); + if (DB_num_rows($result)==0) { + prnMsg(_('There are no offers outstanding that you are authorised to deal with'), 'information'); + } else { + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Select Supplier') . '" alt="" /> + ' . ' ' . _('Select Supplier') . '</p>'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection"> + <tr> + <td>'._('Select Supplier').'</td> + <td><select name=supplierid>'; + while ($myrow=DB_fetch_array($result)) { + echo '<option value="'.$myrow['supplierid'].'">'.$myrow['suppname'].'</option>'; + } + echo '</select></td> + </tr> + <tr><td colspan="12"> + <div class="centre"> + <input type="submit" name="select" value="' . _('Enter Information') . '" /> + </div> + </td> + </tr> + </table> + </div> + </form>'; + } +} + +if (!isset($_POST['submit']) and isset($_POST['supplierid'])) { + $sql = "SELECT offers.offerid, + offers.tenderid, + offers.supplierid, + suppliers.suppname, + offers.stockid, + stockmaster.description, + offers.quantity, + offers.uom, + offers.price, + offers.expirydate, + offers.currcode, + stockmaster.decimalplaces, + currencies.decimalplaces AS currdecimalplaces + FROM offers INNER JOIN purchorderauth + ON offers.currcode=purchorderauth.currabrev + INNER JOIN suppliers + ON suppliers.supplierid=offers.supplierid + INNER JOIN currencies + ON suppliers.currcode=currencies.currabrev + LEFT JOIN stockmaster + ON stockmaster.stockid=offers.stockid + WHERE purchorderauth.userid='" . $_SESSION['UserID'] . "' + AND offers.expirydate>'" . date('Y-m-d') . "' + AND offers.supplierid='" . $_POST['supplierid'] . "' + ORDER BY offerid"; + $result=DB_query($sql, $db); + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + + echo '<p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Supplier Offers') . '" alt="" />' . ' ' . _('Supplier Offers') . ' + </p>'; + + echo '<table class="selection"> + <tr> + <th>'._('Offer ID').'</th> + <th>'._('Supplier').'</th> + <th>'._('Stock Item').'</th> + <th>'._('Quantity').'</th> + <th>'._('Units').'</th> + <th>'._('Price').'</th> + <th>'._('Total').'</th> + <th>'._('Currency').'</th> + <th>'._('Offer Expires').'</th> + <th>'._('Accept').'</th> + <th>'._('Reject').'</th> + <th>'._('Defer').'</th> + </tr>'; + $k=0; + + while ($myrow=DB_fetch_array($result)) { + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + echo '<td>'.$myrow['offerid'].'</td> + <td>'.$myrow['suppname'].'</td> + <td>'.$myrow['description'].'</td> + <td class="number">'.locale_number_format($myrow['quantity'],$myrow['decimalplaces']).'</td> + <td>'.$myrow['uom'].'</td> + <td class="number">'.locale_number_format($myrow['price'],$myrow['currdecimalplaces']).'</td> + <td class="number">'.locale_number_format($myrow['price']*$myrow['quantity'],$myrow['currdecimalplaces']).'</td> + <td>'.$myrow['currcode'].'</td> + <td>'.$myrow['expirydate'].'</td> + <td><input type="radio" name="action'.$myrow['offerid'].'" value="1" /></td> + <td><input type="radio" name="action'.$myrow['offerid'].'" value="2" /></td> + <td><input type="radio" checked name="action'.$myrow['offerid'].'" value="3" /></td> + <td><input type="hidden" name="supplierid" value="'.$myrow['supplierid'].'" /></td> + </tr>'; + } + echo '<tr> + <td colspan="12"> + <div class="centre"> + <input type="submit" name="submit" value="' . _('Enter Information') . '" /> + </div> + </td> + </tr> + </table> + </div> + </form>'; +} else if(isset($_POST['submit']) and isset($_POST['supplierid'])) { + include ('includes/htmlMimeMail.php'); + $accepts=array(); + $rejects=array(); + $defers=array(); + foreach ($_POST as $key => $value) { + if(mb_substr($key,0,6)=='action') { + $OfferID=mb_substr($key,6); + switch ($value) { + case 1: + $accepts[]=$OfferID; + break; + case 2: + $rejects[]=$OfferID; + break; + case 3: + $defers[]=$OfferID; + break; + } + } + } + if (sizeOf($accepts)>0){ + $MailText=_('This email has been automatically generated by the webERP installation at').' '. + $_SESSION['CompanyRecord']['coyname']."\n"; + $MailText.=_('The following offers you made have been accepted')."\n"; + $MailText.=_('An official order will be sent to you in due course')."\n\n"; + $sql="SELECT rate FROM currencies where currabrev='" . $CurrCode ."'"; + $result=DB_query($sql, $db); + $myrow=DB_fetch_array($result); + $Rate=$myrow['rate']; + $OrderNo = GetNextTransNo(18, $db); + $sql="INSERT INTO purchorders ( + orderno, + supplierno, + orddate, + rate, + initiator, + intostocklocation, + deliverydate, + status, + stat_comment, + paymentterms) + VALUES ( + '".$OrderNo."', + '".$_POST['supplierid']."', + '".date('Y-m-d')."', + '".$Rate."', + '".$_SESSION['UserID']."', + '".$_SESSION['DefaultFactoryLocation']."', + '".date('Y-m-d')."', + '"._('Pending')."', + '"._('Automatically generated from tendering system')."', + '".$PaymentTerms."')"; + DB_query($sql, $db); + foreach ($accepts as $AcceptID) { + $sql="SELECT offers.quantity, + offers.price, + offers.uom, + stockmaster.description, + stockmaster.stockid + FROM offers + LEFT JOIN stockmaster + ON offers.stockid=stockmaster.stockid + WHERE offerid='".$AcceptID."'"; + $result= DB_query($sql, $db); + $myrow=DB_fetch_array($result); + $MailText.=$myrow['description']."\t"._('Quantity').' '.$myrow['quantity']."\t"._('Price').' '. + locale_number_format($myrow['price'])."\n"; + $sql="INSERT INTO purchorderdetails (orderno, + itemcode, + deliverydate, + itemdescription, + unitprice, + actprice, + quantityord, + suppliersunit) + VALUES ('".$OrderNo."', + '".$myrow['stockid']."', + '".date('Y-m-d')."', + '".$myrow['description']."', + '".$myrow['price']."', + '".$myrow['price']."', + '".$myrow['quantity']."', + '".$myrow['uom']."')"; + $result=DB_query($sql, $db); + $sql="DELETE FROM offers WHERE offerid='".$AcceptID."'"; + $result=DB_query($sql, $db); + } + $mail = new htmlMimeMail(); + $mail->setSubject(_('Your offer to').' '.$_SESSION['CompanyRecord']['coyname'].' '._('has been accepted')); + $mail->setText($MailText); + $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>'); + $result = $mail->send(array($Email), 'smtp'); + prnMsg(_('The accepted offers from').' '.$SupplierName.' '._('have been converted to purchase orders and an email sent to') + .' '.$Email."\n"._('Please review the order contents').' '.'<a href="'.$rootpath . + '/PO_Header.php?ModifyOrderNumber=' . $OrderNo.'">'._('here').'</a>', 'success'); + } + if (sizeOf($rejects)>0){ + $MailText=_('This email has been automatically generated by the webERP installation at').' '. + $_SESSION['CompanyRecord']['coyname']."\n"; + $MailText.=_('The following offers you made have been rejected')."\n\n"; + foreach ($rejects as $RejectID) { + $sql="SELECT offers.quantity, + offers.price, + stockmaster.description + FROM offers + LEFT JOIN stockmaster + ON offers.stockid=stockmaster.stockid + WHERE offerid='".$RejectID."'"; + $result= DB_query($sql, $db); + $myrow=DB_fetch_array($result); + $MailText.=$myrow['description']."\t"._('Quantity').' '.$myrow['quantity']."\t"._('Price').' '. + locale_number_format($myrow['price'])."\n"; + $sql="DELETE FROM offers WHERE offerid='".$RejectID."'"; + $result=DB_query($sql, $db); + } + $mail = new htmlMimeMail(); + $mail->setSubject(_('Your offer to').' '.$_SESSION['CompanyRecord']['coyname'].' '._('has been rejected')); + $mail->setText($MailText); + $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>'); + $result = $mail->send(array($Email), 'smtp'); + prnMsg(_('The rejected offers from').' '.$SupplierName.' '._('have been removed from the system and an email sent to') + .' '.$Email, 'success'); + } + prnMsg(_('All offers have been processed, and emails sent where appropriate'), 'success'); +} +include('includes/footer.inc'); + ?> \ No newline at end of file Modified: trunk/OrderDetails.php =================================================================== --- trunk/OrderDetails.php 2012-04-02 02:54:14 UTC (rev 5201) +++ trunk/OrderDetails.php 2012-04-02 03:37:13 UTC (rev 5202) @@ -61,7 +61,7 @@ echo '<table class="selection"> <tr> - <th colspan="4"><font color="blue">'._('Order Header Details For Order No').' '.$_GET['OrderNumber'].'</font></th> + <th colspan="4"><h3>'._('Order Header Details For Order No').' '.$_GET['OrderNumber'].'</h3></th> </tr> <tr> <th style="text-align: left">' . _('Customer Code') . ':</th> @@ -88,7 +88,7 @@ <td class="OddTableRows">' . $myrow['deladd2'] . '</td> </tr> <tr> - <th style="text-align: left"h>' . _('Order Currency') . ':</th> + <th style="text-align: left">' . _('Order Currency') . ':</th> <td class="OddTableRows">' . $myrow['currcode'] . '</td> <th style="text-align: left">' . _('Delivery Address 3') . ':</th> <td class="OddTableRows">' . $myrow['deladd3'] . '</td> @@ -156,7 +156,7 @@ echo '<br /> <table class="selection"> <tr> - <th colspan="9"><font color="blue">'._('Order Line Details For Order No').' '.$_GET['OrderNumber'].'</font></th> + <th colspan="9"><h3>'._('Order Line Details For Order No').' '.$_GET['OrderNumber'].'</h3></th> </tr> <tr> <th>' . _('Item Code') . '</th> Modified: trunk/OutstandingGRNs.php =================================================================== --- trunk/OutstandingGRNs.php 2012-04-02 02:54:14 UTC (rev 5201) +++ trunk/OutstandingGRNs.php 2012-04-02 03:37:13 UTC (rev 5202) @@ -161,8 +161,9 @@ '" alt="" />' . ' ' . $title . '</p>'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> - <table class="selection">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + <div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; echo '<tr> <td>' . _('From Supplier Code') . ':</td> @@ -175,8 +176,10 @@ </table> <br /> <div class="centre"> - <input type="submit" Name="PrintPDF" value="' . _('Print PDF') . '" /> - </div>'; + <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> + </div> + </div> + </form>'; include('includes/footer.inc'); Modified: trunk/PageSecurity.php =================================================================== --- trunk/PageSecurity.php 2012-04-02 02:54:14 UTC (rev 5201) +++ trunk/PageSecurity.php 2012-04-02 03:37:13 UTC (rev 5202) @@ -1,61 +1,63 @@ -<?php - -/*$Id: PageSecurity.php 4500 2011-02-27 09:18:42Z daintree $ */ - -include('includes/session.inc'); -$title = _('Page Security Levels'); -include('includes/header.inc'); - -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/security.png" title="' . _('Page Security Levels') . '" alt="" />' . ' ' . $title.'</p><br />'; - -if (isset($_POST['Update'])) { - foreach ($_POST as $ScriptName => $PageSecurityValue) { - if ($ScriptName!='Update' and $ScriptName!='FormID') { - $ScriptName = mb_substr($ScriptName, 0, mb_strlen($ScriptName)-4).'.php'; - $sql="UPDATE scripts SET pagesecurity='". $PageSecurityValue . "' WHERE script='" . $ScriptName . "'"; - $UpdateResult=DB_query($sql, $db,_('Could not update the page security value for the script because')); - } - } -} - -$sql="SELECT script, - pagesecurity, - description - FROM scripts"; - -$result=DB_query($sql, $db); - -echo '<br /><form method="post" id="PageSecurity" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; -echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - -echo '<table class="selection">'; - -$TokenSql="SELECT tokenid, - tokenname - FROM securitytokens"; -$TokenResult=DB_query($TokenSql, $db); - -while ($myrow=DB_fetch_array($result)) { - echo '<tr><td>'.$myrow['script'].'</td>'; - echo '<td><select name="'.$myrow['script'].'">'; - while ($mytokenrow=DB_fetch_array($TokenResult)) { - if ($mytokenrow['tokenid']==$myrow['pagesecurity']) { - echo '<option selected="selected" value="'.$mytokenrow['tokenid'].'">'.$mytokenrow['tokenname'].'</option>'; - } else { - echo '<option value="'.$mytokenrow['tokenid'].'">'.$mytokenrow['tokenname'].'</option>'; - } - } - echo '</select></td></tr>'; - DB_data_seek($TokenResult, 0); -} - -echo '</table><br />'; - -echo '<div class="centre"> - <input type="submit" name="Update" value="'._('Update Security Levels').'" /> - </div> - <br /> - </form>'; - -include('includes/footer.inc'); +<?php + +/*$Id: PageSecurity.php 4500 2011-02-27 09:18:42Z daintree $ */ + +include('includes/session.inc'); +$title = _('Page Security Levels'); +include('includes/header.inc'); + +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/security.png" title="' . _('Page Security Levels') . '" alt="" />' . ' ' . $title.'</p><br />'; + +if (isset($_POST['Update'])) { + foreach ($_POST as $ScriptName => $PageSecurityValue) { + if ($ScriptName!='Update' and $ScriptName!='FormID') { + $ScriptName = mb_substr($ScriptName, 0, mb_strlen($ScriptName)-4).'.php'; + $sql="UPDATE scripts SET pagesecurity='". $PageSecurityValue . "' WHERE script='" . $ScriptName . "'"; + $UpdateResult=DB_query($sql, $db,_('Could not update the page security value for the script because')); + } + } +} + +$sql="SELECT script, + pagesecurity, + description + FROM scripts"; + +$result=DB_query($sql, $db); + +echo '<br /><form method="post" id="PageSecurity" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; +echo '<div>'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + +echo '<table class="selection">'; + +$TokenSql="SELECT tokenid, + tokenname + FROM securitytokens"; +$TokenResult=DB_query($TokenSql, $db); + +while ($myrow=DB_fetch_array($result)) { + echo '<tr><td>'.$myrow['script'].'</td>'; + echo '<td><select name="'.$myrow['script'].'">'; + while ($mytokenrow=DB_fetch_array($TokenResult)) { + if ($mytokenrow['tokenid']==$myrow['pagesecurity']) { + echo '<option selected="selected" value="'.$mytokenrow['tokenid'].'">'.$mytokenrow['tokenname'].'</option>'; + } else { + echo '<option value="'.$mytokenrow['tokenid'].'">'.$mytokenrow['tokenname'].'</option>'; + } + } + echo '</select></td></tr>'; + DB_data_seek($TokenResult, 0); +} + +echo '</table><br />'; + +echo '<div class="centre"> + <input type="submit" name="Update" value="'._('Update Security Levels').'" /> + </div> + <br /> + </div> + </form>'; + +include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/PaymentAllocations.php =================================================================== --- trunk/PaymentAllocations.php 2012-04-02 02:54:14 UTC (rev 5201) +++ trunk/PaymentAllocations.php 2012-04-02 03:37:13 UTC (rev 5202) @@ -31,7 +31,7 @@ <img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Payments') . '" alt="" />' . ' ' . _('Payment Allocation for Supplier') . ': ' . $SuppID . _(' and') . ' ' . _('Invoice') . ': ' . $InvID . '</p>'; echo '<div class="page_help_text">' . - _('This shows how the payment to the supplier was allocated') . '<a href="SupplierInquiry.php?&SupplierID=' . $SuppID . '">' . _('Back to supplier inquiry') . '</a> + _('This shows how the payment to the supplier was allocated') . '<a href="SupplierInquiry.php?&SupplierID=' . $SuppID . '">' . _('Back to supplier inquiry') . '</a> </div> <br />'; Modified: trunk/PaymentMethods.php =================================================================== --- trunk/PaymentMethods.php 2012-04-02 02:54:14 UTC (rev 5201) +++ trunk/PaymentMethods.php 2012-04-02 03:37:13 UTC (rev 5202) @@ -198,23 +198,24 @@ <td>' . ($myrow['receipttype'] ? _('Yes') : _('No')) . '</td> <td>' . ($myrow['usepreprintedstationery'] ? _('Yes') : _('No')) . '</td> <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedPaymentID=' . $myrow['paymentid'] . '">' . _('Edit') . '</a></td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedPaymentID=' . $myrow['paymentid'] . '&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this payment method?') . '\');">' . _('Delete') .'</a></td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedPaymentID=' . $myrow['paymentid'] . '&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this payment method?') . '\');">' . _('Delete') .'</a></td> </tr>'; } //END WHILE LIST LOOP - echo '</table><p>'; + echo '</table><br />'; } //end of ifs and buts! if (isset($SelectedPaymentID)) { - echo '<div class="centre"><a href=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?' . SID .'>' . _('Review Payment Methods') . '</a></div>'; + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?' . SID .'">' . _('Review Payment Methods') . '</a></div>'; } -echo '<p>'; +echo '<br />'; if (! isset($_GET['delete'])) { echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedPaymentID)) { @@ -259,28 +260,29 @@ 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> + <option' . ($_POST['ForPayment'] ? ' selected="selected"' : '') .' value="1">' . _('Yes') . '</option> + <option' . ($_POST['ForPayment'] ? '' : ' selected="selected"') .' value="0">' . _('No') . '</option> + </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> + <option' . ($_POST['ForReceipt'] ? ' selected="selected"' : '') .' value="1">' . _('Yes') . '</option> + <option' . ($_POST['ForReceipt'] ? '' : ' selected="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> + <option' . ($_POST['UsePrePrintedStationery'] ? ' selected="selected"': '' ) .' value="1">' . _('Yes') . '</option> + <option' . ($_POST['UsePrePrintedStationery']==1 ? '' : ' selected="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 '</div>'; echo '</form>'; } //end if record deleted no point displaying form to add record Modified: trunk/PaymentTerms.php =================================================================== --- trunk/PaymentTerms.php 2012-04-02 02:54:14 UTC (rev 5201) +++ trunk/PaymentTerms.php 2012-04-02 03:37:13 UTC (rev 5202) @@ -175,7 +175,7 @@ echo '<table class="selection">'; echo '<tr> - <th colspan="6"><font color="blue" size="3">'._('Payment Terms.').'</font></th> + <th colspan="6"><h3>'._('Payment Terms.').'</h3></th> </tr>'; echo '<tr> <th>' . _('Term Code') . '</th> @@ -203,7 +203,7 @@ <td>%s</td> <td>%s</td> <td><a href="%s?SelectedTerms=%s">' . _('Edit') . '</a></td> - <td><a href="%s?SelectedTerms=%s&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this payment term?') . '\');">' . _('Delete') . '</a></td> + <td><a href="%s?SelectedTerms=%s&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this payment term?') . '\');">' . _('Delete') . '</a></td> </tr>', $myrow['termsindicator'], $myrow['terms'], @@ -215,7 +215,7 @@ $myrow[0]); } //END WHILE LIST LOOP - echo '</table><p>'; + echo '</table><br />'; } //end of ifs and buts! if (isset($SelectedTerms)) { @@ -227,6 +227,7 @@ if (!isset($_GET['delete'])) { echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedTerms)) { @@ -252,7 +253,7 @@ echo '<br /> <table class="selection">'; echo '<tr> - <th colspan="6"><font color="blue" size="3">'._('Update Payment Terms.').'</font></th> + <th colspan="6"><h3>'._('Update Payment Terms.').'</h3></th> </tr>'; echo '<tr> <td>' . _('Term Code') . ':</td> @@ -272,7 +273,7 @@ echo '<table class="selection">'; echo '<tr> - <th colspan="6"><font color=blue size="3">'._('New Payment Terms.').'</font></th> + <th colspan="6"><h3>'._('New Payment Terms.').'</h3></th> </tr>'; echo '<tr> <td>' . _('Term Code') . ':</td> @@ -307,8 +308,9 @@ <br /> <div class="centre"> <input type="submit" name="submit" value="'._('Enter Information').'" /> - </form> </div>'; + echo '</div> + </form>'; } //end if record deleted no point displaying form to add record include('includes/footer.inc'); Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2012-04-02 02:54:14 UTC (rev 5201) +++ trunk/Payments.php 2012-04-02 03:37:13 UTC (rev 5202) @@ -48,8 +48,7 @@ . '" alt="" />' . ' ' . _('Payment Entry') . ' </p>'; echo '<div class="page_help_text">' . _('Use this screen to enter payments FROM your bank account. <br />Note: To enter a payment FROM a supplier, first select the Supplier, click Enter a Payment to, or Receipt from the Supplier, and use a negative Payment amount on this form.') . '</div> - <br /> - <div class="centre">'; + <br />'; if (isset($_GET['SupplierID'])){ /*The page was called with a supplierID check it is valid and default the inputs for Supplier Name and currency of payment */ @@ -278,11 +277,12 @@ // it is a supplier payment by cheque and haven't printed yet so print cheque echo '<br /> - <a href="' . $rootpath . '/PrintCheque.php?ChequeNum=' . $_POST['ChequeNum'] . '&identifier=' . $identifier . '">' . _('Print Cheque using pre-printed stationery') . '</a> + <a href="' . $rootpath . '/PrintCheque.php?ChequeNum=' . $_POST['ChequeNum'] . '&identifier=' . $identifier . '">' . _('Print Cheque using pre-printed stationery') . '</a> <br /> <br />'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'] . '?identifier=' . $identifier) . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo _('Has the cheque been printed') . '? <br /> @@ -293,6 +293,8 @@ <input type="submit" name="PaymentCancelled" value="' . _('No / Cancel Payment') . '" />'; echo '<br />Payment amount = ' . $_SESSION['PaymentDetail' . $identifier]->Amount; + echo '</div> + </form>'; } else { @@ -728,11 +730,12 @@ } echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'] . '?identifier=' . $identifier) . '" method="post">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<p><table class="selection">'; +echo '<br /><table class="selection">'; -echo '<tr><th colspan="4"><font size="3" color="blue">' . _('Payment'); +echo '<tr><th colspan="4"><h3>' . _('Payment'); if ($_SESSION['PaymentDetail' . $identifier]->SupplierID!=''){ echo ' ' . _('to') . ' ' . $_SESSION['PaymentDetail' . $identifier]->SuppName; @@ -742,7 +745,7 @@ echo ' ' . _('from the') . ' ' . $_SESSION['PaymentDetail' . $identifier]->BankAccountName; } -echo ' ' . _('on') . ' ' . $_SESSION['PaymentDetail' . $identifier]->DatePaid . '</font></th></tr>'; +echo ' ' . _('on') . ' ' . $_SESSION['PaymentDetail' . $identifier]->DatePaid . '</h3></th></tr>'; $SQL = "SELECT bankaccountname, bankaccounts.accountcode, @@ -809,11 +812,11 @@ </tr>'; } } else { /*its a supplier payment so it must be in the suppliers currency */ - echo '<tr> - <td>' . _('Supplier Currency') . ':</td> + echo '<tr>'; + echo '<td><input type="hidden" name="Currency" value="' . $_SESSION['PaymentDetail' . $identifier]->Currency . '" /> + ' . _('Supplier Currency') . ':</td> <td>' . $_SESSION['PaymentDetail' . $identifier]->Currency . '</td> </tr>'; - echo '<input type="hidden" name="Currency" value="' . $_SESSION['PaymentDetail' . $identifier]->Currency . '" />'; /*get the default rate from the currency table if it has not been set */ if (!isset($_POST['ExRate']) OR $_POST['ExRate']==''){ $SQL = "SELECT rate FROM currencies WHERE currabrev='" . $_SESSION['PaymentDetail' . $identifier]->Currency ."'"; @@ -906,7 +909,7 @@ echo '<td><input type="hidden" name="SuggestedExRate1" value="'.$SuggestedExRate.'" /></td>'; } echo ' - <td colspan="3"><div class="centre"><input type="submit" name="UpdateHeader" value="' . _('Update'). '" /></td> + <td colspan="3"><div class="centre"><input type="submit" name="UpdateHeader" value="' . _('Update'). '" /></div></td> </tr>'; @@ -917,7 +920,7 @@ /* Set upthe form for the transaction entry for a GL Payment Analysis item */ echo '<br /><table class="selection">'; - echo '<tr><th colspan="2"><font size="3" color="blue">' . _('General Ledger Payment Analysis Entry') . '</font></th></tr>'; + echo '<tr><th colspan="2"><h3>' . _('General Ledger Payment Analysis Entry') . '</h3></th></tr>'; //Select the Tag echo '<tr> @@ -951,7 +954,7 @@ } else { echo '<tr> <td>' . _('Enter GL Account Manually') . ':</td> - <td><input type="text" class="number" Name="GLManualCode" maxlength="12" size="12" onchange="return inArray(this, GLCode.options,'. "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')" /></td></tr>'; + <td><input type="text" class="number" name="GLManualCode" maxlength="12" size="12" onchange="return inArray(this, GLCode.options,'. "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')" /></td></tr>'; } echo '<tr> @@ -1007,9 +1010,9 @@ echo '<option value=""></option>'; while ($myrow=DB_fetch_array($result)){ if (isset($_POST['GLCode']) AND $_POST['GLCode']==$myrow['accountcode']){ - echo '<option selected="selected" value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; + echo '<option selected="selected" value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8') . '</option>'; } else { - echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; + echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8') . '</option>'; } } echo '</select></td></tr>'; @@ -1077,7 +1080,7 @@ <td>' . $PaymentItem->GLCode . ' - ' . $PaymentItem->GLActName . '</td> <td>' . stripslashes($PaymentItem->Narrative) . '</td> <td>' . $PaymentItem->Tag . ' - ' . $TagName . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'] . '?identifier=' . $identifier) . '&Delete=' . $PaymentItem->ID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this payment analysis item?') . '\');">' . _('Delete') . '</a></td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'] . '?identifier=' . $identifier) . '&Delete=' . $PaymentItem->ID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this payment analysis item?') . '\');">' . _('Delete') . '</a></td> </tr>'; $PaymentTotal += $PaymentItem->Amount; } @@ -1090,7 +1093,7 @@ </tr> </table> <br />'; - echo '<input type="submit" name="CommitBatch" value="' . _('Accept and Process Payment') . '" />'; + echo '<div class="centre"><input type="submit" name="CommitBatch" value="' . _('Accept and Process Payment') . '" /></div>'; } } else { @@ -1104,17 +1107,18 @@ </tr>'; if (isset($_SESSION['PaymentDetail' . $identifier]->SupplierID)){ /*So it is a supplier payment so show the discount entry item */ - echo '<tr> - <td>' . _('Amount of Discount') . ':</td> + echo '<tr>'; + echo '<td><input type="hidden" name="SuppName" value="' . $_SESSION['PaymentDetail' . $identifier]->SuppName . '" /> + ' . _('Amount of Discount') . ':</td> <td><input class="number" type="text" name="Discount" maxlength="12" size="13" value="' . $_SESSION['PaymentDetail' . $identifier]->Discount . '" /></td> </tr>'; - echo '<input type="hidden" name="SuppName" value="' . $_SESSION['PaymentDetail' . $identifier]->SuppName . '" />'; } else { echo '<input type="hidden" name="Discount" value="0" />'; } echo '</table><br />'; - echo '<input type="submit" name="CommitBatch" value="' . _('Accept and Process Payment') . '" />'; + echo '<div class="centre"><input type="submit" name="CommitBatch" value="' . _('Accept and Process Payment') . '" /></div>'; } +echo '</div>'; echo '</form>'; include('includes/footer.inc'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-04-02 03:37:20
|
Revision: 5202 http://web-erp.svn.sourceforge.net/web-erp/?rev=5202&view=rev Author: vvs2012 Date: 2012-04-02 03:37:13 +0000 (Mon, 02 Apr 2012) Log Message: ----------- xhtml Modified Paths: -------------- trunk/OffersReceived.php trunk/OrderDetails.php trunk/OutstandingGRNs.php trunk/PageSecurity.php trunk/PaymentAllocations.php trunk/PaymentMethods.php trunk/PaymentTerms.php trunk/Payments.php Modified: trunk/OffersReceived.php =================================================================== --- trunk/OffersReceived.php 2012-04-02 02:54:14 UTC (rev 5201) +++ trunk/OffersReceived.php 2012-04-02 03:37:13 UTC (rev 5202) @@ -1,277 +1,281 @@ -<?php - -/*$Id: OffersReceived.php 4500 2011-02-27 09:18:42Z daintree $ */ - -include('includes/session.inc'); -$title = _('Supplier Offers'); -include('includes/header.inc'); -include('includes/SQL_CommonFunctions.inc'); - -if (isset($_POST['supplierid'])) { - $sql="SELECT suppname, - email, - currcode, - paymentterms - FROM suppliers - WHERE supplierid='".$_POST['supplierid']."'"; - $result = DB_query($sql, $db); - $myrow=DB_fetch_array($result); - $SupplierName=$myrow['suppname']; - $Email=$myrow['email']; - $CurrCode=$myrow['currcode']; - $PaymentTerms=$myrow['paymentterms']; -} - -if (!isset($_POST['supplierid'])) { - $sql="SELECT DISTINCT - offers.supplierid, - suppliers.suppname - FROM offers - LEFT JOIN purchorderauth - ON offers.currcode=purchorderauth.currabrev - LEFT JOIN suppliers - ON suppliers.supplierid=offers.supplierid - WHERE purchorderauth.userid='".$_SESSION['UserID']."' - AND offers.expirydate>'".date('Y-m-d')."' - AND purchorderauth.cancreate=0"; - $result=DB_query($sql, $db); - if (DB_num_rows($result)==0) { - prnMsg(_('There are no offers outstanding that you are authorised to deal with'), 'information'); - } else { - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Select Supplier') . '" alt="" /> - ' . ' ' . _('Select Supplier') . '</p>'; - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection"> - <tr> - <td>'._('Select Supplier').'</td> - <td><select name=supplierid>'; - while ($myrow=DB_fetch_array($result)) { - echo '<option value="'.$myrow['supplierid'].'">'.$myrow['suppname'].'</option>'; - } - echo '</select></td> - </tr> - <tr><td colspan="12"> - <div class="centre"> - <input type="submit" name="select" value="' . _('Enter Information') . '" /> - </div> - </td> - </tr> - </table> - </form>'; - } -} - -if (!isset($_POST['submit']) and isset($_POST['supplierid'])) { - $sql = "SELECT offers.offerid, - offers.tenderid, - offers.supplierid, - suppliers.suppname, - offers.stockid, - stockmaster.description, - offers.quantity, - offers.uom, - offers.price, - offers.expirydate, - offers.currcode, - stockmaster.decimalplaces, - currencies.decimalplaces AS currdecimalplaces - FROM offers INNER JOIN purchorderauth - ON offers.currcode=purchorderauth.currabrev - INNER JOIN suppliers - ON suppliers.supplierid=offers.supplierid - INNER JOIN currencies - ON suppliers.currcode=currencies.currabrev - LEFT JOIN stockmaster - ON stockmaster.stockid=offers.stockid - WHERE purchorderauth.userid='" . $_SESSION['UserID'] . "' - AND offers.expirydate>'" . date('Y-m-d') . "' - AND offers.supplierid='" . $_POST['supplierid'] . "' - ORDER BY offerid"; - $result=DB_query($sql, $db); - - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - - echo '<p class="page_title_text"> - <img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Supplier Offers') . '" alt="" />' . ' ' . _('Supplier Offers') . ' - </p>'; - - echo '<table class="selection"> - <tr> - <th>'._('Offer ID').'</th> - <th>'._('Supplier').'</th> - <th>'._('Stock Item').'</th> - <th>'._('Quantity').'</th> - <th>'._('Units').'</th> - <th>'._('Price').'</th> - <th>'._('Total').'</th> - <th>'._('Currency').'</th> - <th>'._('Offer Expires').'</th> - <th>'._('Accept').'</th> - <th>'._('Reject').'</th> - <th>'._('Defer').'</th> - </tr>'; - $k=0; - - while ($myrow=DB_fetch_array($result)) { - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k++; - } - echo '<td>'.$myrow['offerid'].'</td> - <td>'.$myrow['suppname'].'</td> - <td>'.$myrow['description'].'</td> - <td class="number">'.locale_number_format($myrow['quantity'],$myrow['decimalplaces']).'</td> - <td>'.$myrow['uom'].'</td> - <td class="number">'.locale_number_format($myrow['price'],$myrow['currdecimalplaces']).'</td> - <td class="number">'.locale_number_format($myrow['price']*$myrow['quantity'],$myrow['currdecimalplaces']).'</td> - <td>'.$myrow['currcode'].'</td> - <td>'.$myrow['expirydate'].'</td> - <td><input type="radio" name="action'.$myrow['offerid'].'" value="1" /></td> - <td><input type="radio" name="action'.$myrow['offerid'].'" value="2" /></td> - <td><input type="radio" checked name="action'.$myrow['offerid'].'" value="3" /></td> - <td><input type="hidden" name="supplierid" value="'.$myrow['supplierid'].'" /></td> - </tr>'; - } - echo '<tr> - <td colspan="12"> - <div class="centre"> - <input type="submit" name="submit" value="' . _('Enter Information') . '" /> - </div> - </td> - </tr> - </form> - </table>'; -} else if(isset($_POST['submit']) and isset($_POST['supplierid'])) { - include ('includes/htmlMimeMail.php'); - $accepts=array(); - $rejects=array(); - $defers=array(); - foreach ($_POST as $key => $value) { - if(mb_substr($key,0,6)=='action') { - $OfferID=mb_substr($key,6); - switch ($value) { - case 1: - $accepts[]=$OfferID; - break; - case 2: - $rejects[]=$OfferID; - break; - case 3: - $defers[]=$OfferID; - break; - } - } - } - if (sizeOf($accepts)>0){ - $MailText=_('This email has been automatically generated by the webERP installation at').' '. - $_SESSION['CompanyRecord']['coyname']."\n"; - $MailText.=_('The following offers you made have been accepted')."\n"; - $MailText.=_('An official order will be sent to you in due course')."\n\n"; - $sql="SELECT rate FROM currencies where currabrev='" . $CurrCode ."'"; - $result=DB_query($sql, $db); - $myrow=DB_fetch_array($result); - $Rate=$myrow['rate']; - $OrderNo = GetNextTransNo(18, $db); - $sql="INSERT INTO purchorders ( - orderno, - supplierno, - orddate, - rate, - initiator, - intostocklocation, - deliverydate, - status, - stat_comment, - paymentterms) - VALUES ( - '".$OrderNo."', - '".$_POST['supplierid']."', - '".date('Y-m-d')."', - '".$Rate."', - '".$_SESSION['UserID']."', - '".$_SESSION['DefaultFactoryLocation']."', - '".date('Y-m-d')."', - '"._('Pending')."', - '"._('Automatically generated from tendering system')."', - '".$PaymentTerms."')"; - DB_query($sql, $db); - foreach ($accepts as $AcceptID) { - $sql="SELECT offers.quantity, - offers.price, - offers.uom, - stockmaster.description, - stockmaster.stockid - FROM offers - LEFT JOIN stockmaster - ON offers.stockid=stockmaster.stockid - WHERE offerid='".$AcceptID."'"; - $result= DB_query($sql, $db); - $myrow=DB_fetch_array($result); - $MailText.=$myrow['description']."\t"._('Quantity').' '.$myrow['quantity']."\t"._('Price').' '. - locale_number_format($myrow['price'])."\n"; - $sql="INSERT INTO purchorderdetails (orderno, - itemcode, - deliverydate, - itemdescription, - unitprice, - actprice, - quantityord, - suppliersunit) - VALUES ('".$OrderNo."', - '".$myrow['stockid']."', - '".date('Y-m-d')."', - '".$myrow['description']."', - '".$myrow['price']."', - '".$myrow['price']."', - '".$myrow['quantity']."', - '".$myrow['uom']."')"; - $result=DB_query($sql, $db); - $sql="DELETE FROM offers WHERE offerid='".$AcceptID."'"; - $result=DB_query($sql, $db); - } - $mail = new htmlMimeMail(); - $mail->setSubject(_('Your offer to').' '.$_SESSION['CompanyRecord']['coyname'].' '._('has been accepted')); - $mail->setText($MailText); - $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>'); - $result = $mail->send(array($Email), 'smtp'); - prnMsg(_('The accepted offers from').' '.$SupplierName.' '._('have been converted to purchase orders and an email sent to') - .' '.$Email."\n"._('Please review the order contents').' '.'<a href="'.$rootpath . - '/PO_Header.php?ModifyOrderNumber=' . $OrderNo.'">'._('here').'</a>', 'success'); - } - if (sizeOf($rejects)>0){ - $MailText=_('This email has been automatically generated by the webERP installation at').' '. - $_SESSION['CompanyRecord']['coyname']."\n"; - $MailText.=_('The following offers you made have been rejected')."\n\n"; - foreach ($rejects as $RejectID) { - $sql="SELECT offers.quantity, - offers.price, - stockmaster.description - FROM offers - LEFT JOIN stockmaster - ON offers.stockid=stockmaster.stockid - WHERE offerid='".$RejectID."'"; - $result= DB_query($sql, $db); - $myrow=DB_fetch_array($result); - $MailText.=$myrow['description']."\t"._('Quantity').' '.$myrow['quantity']."\t"._('Price').' '. - locale_number_format($myrow['price'])."\n"; - $sql="DELETE FROM offers WHERE offerid='".$RejectID."'"; - $result=DB_query($sql, $db); - } - $mail = new htmlMimeMail(); - $mail->setSubject(_('Your offer to').' '.$_SESSION['CompanyRecord']['coyname'].' '._('has been rejected')); - $mail->setText($MailText); - $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>'); - $result = $mail->send(array($Email), 'smtp'); - prnMsg(_('The rejected offers from').' '.$SupplierName.' '._('have been removed from the system and an email sent to') - .' '.$Email, 'success'); - } - prnMsg(_('All offers have been processed, and emails sent where appropriate'), 'success'); -} -include('includes/footer.inc'); - +<?php + +/*$Id: OffersReceived.php 4500 2011-02-27 09:18:42Z daintree $ */ + +include('includes/session.inc'); +$title = _('Supplier Offers'); +include('includes/header.inc'); +include('includes/SQL_CommonFunctions.inc'); + +if (isset($_POST['supplierid'])) { + $sql="SELECT suppname, + email, + currcode, + paymentterms + FROM suppliers + WHERE supplierid='".$_POST['supplierid']."'"; + $result = DB_query($sql, $db); + $myrow=DB_fetch_array($result); + $SupplierName=$myrow['suppname']; + $Email=$myrow['email']; + $CurrCode=$myrow['currcode']; + $PaymentTerms=$myrow['paymentterms']; +} + +if (!isset($_POST['supplierid'])) { + $sql="SELECT DISTINCT + offers.supplierid, + suppliers.suppname + FROM offers + LEFT JOIN purchorderauth + ON offers.currcode=purchorderauth.currabrev + LEFT JOIN suppliers + ON suppliers.supplierid=offers.supplierid + WHERE purchorderauth.userid='".$_SESSION['UserID']."' + AND offers.expirydate>'".date('Y-m-d')."' + AND purchorderauth.cancreate=0"; + $result=DB_query($sql, $db); + if (DB_num_rows($result)==0) { + prnMsg(_('There are no offers outstanding that you are authorised to deal with'), 'information'); + } else { + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Select Supplier') . '" alt="" /> + ' . ' ' . _('Select Supplier') . '</p>'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection"> + <tr> + <td>'._('Select Supplier').'</td> + <td><select name=supplierid>'; + while ($myrow=DB_fetch_array($result)) { + echo '<option value="'.$myrow['supplierid'].'">'.$myrow['suppname'].'</option>'; + } + echo '</select></td> + </tr> + <tr><td colspan="12"> + <div class="centre"> + <input type="submit" name="select" value="' . _('Enter Information') . '" /> + </div> + </td> + </tr> + </table> + </div> + </form>'; + } +} + +if (!isset($_POST['submit']) and isset($_POST['supplierid'])) { + $sql = "SELECT offers.offerid, + offers.tenderid, + offers.supplierid, + suppliers.suppname, + offers.stockid, + stockmaster.description, + offers.quantity, + offers.uom, + offers.price, + offers.expirydate, + offers.currcode, + stockmaster.decimalplaces, + currencies.decimalplaces AS currdecimalplaces + FROM offers INNER JOIN purchorderauth + ON offers.currcode=purchorderauth.currabrev + INNER JOIN suppliers + ON suppliers.supplierid=offers.supplierid + INNER JOIN currencies + ON suppliers.currcode=currencies.currabrev + LEFT JOIN stockmaster + ON stockmaster.stockid=offers.stockid + WHERE purchorderauth.userid='" . $_SESSION['UserID'] . "' + AND offers.expirydate>'" . date('Y-m-d') . "' + AND offers.supplierid='" . $_POST['supplierid'] . "' + ORDER BY offerid"; + $result=DB_query($sql, $db); + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + + echo '<p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Supplier Offers') . '" alt="" />' . ' ' . _('Supplier Offers') . ' + </p>'; + + echo '<table class="selection"> + <tr> + <th>'._('Offer ID').'</th> + <th>'._('Supplier').'</th> + <th>'._('Stock Item').'</th> + <th>'._('Quantity').'</th> + <th>'._('Units').'</th> + <th>'._('Price').'</th> + <th>'._('Total').'</th> + <th>'._('Currency').'</th> + <th>'._('Offer Expires').'</th> + <th>'._('Accept').'</th> + <th>'._('Reject').'</th> + <th>'._('Defer').'</th> + </tr>'; + $k=0; + + while ($myrow=DB_fetch_array($result)) { + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + echo '<td>'.$myrow['offerid'].'</td> + <td>'.$myrow['suppname'].'</td> + <td>'.$myrow['description'].'</td> + <td class="number">'.locale_number_format($myrow['quantity'],$myrow['decimalplaces']).'</td> + <td>'.$myrow['uom'].'</td> + <td class="number">'.locale_number_format($myrow['price'],$myrow['currdecimalplaces']).'</td> + <td class="number">'.locale_number_format($myrow['price']*$myrow['quantity'],$myrow['currdecimalplaces']).'</td> + <td>'.$myrow['currcode'].'</td> + <td>'.$myrow['expirydate'].'</td> + <td><input type="radio" name="action'.$myrow['offerid'].'" value="1" /></td> + <td><input type="radio" name="action'.$myrow['offerid'].'" value="2" /></td> + <td><input type="radio" checked name="action'.$myrow['offerid'].'" value="3" /></td> + <td><input type="hidden" name="supplierid" value="'.$myrow['supplierid'].'" /></td> + </tr>'; + } + echo '<tr> + <td colspan="12"> + <div class="centre"> + <input type="submit" name="submit" value="' . _('Enter Information') . '" /> + </div> + </td> + </tr> + </table> + </div> + </form>'; +} else if(isset($_POST['submit']) and isset($_POST['supplierid'])) { + include ('includes/htmlMimeMail.php'); + $accepts=array(); + $rejects=array(); + $defers=array(); + foreach ($_POST as $key => $value) { + if(mb_substr($key,0,6)=='action') { + $OfferID=mb_substr($key,6); + switch ($value) { + case 1: + $accepts[]=$OfferID; + break; + case 2: + $rejects[]=$OfferID; + break; + case 3: + $defers[]=$OfferID; + break; + } + } + } + if (sizeOf($accepts)>0){ + $MailText=_('This email has been automatically generated by the webERP installation at').' '. + $_SESSION['CompanyRecord']['coyname']."\n"; + $MailText.=_('The following offers you made have been accepted')."\n"; + $MailText.=_('An official order will be sent to you in due course')."\n\n"; + $sql="SELECT rate FROM currencies where currabrev='" . $CurrCode ."'"; + $result=DB_query($sql, $db); + $myrow=DB_fetch_array($result); + $Rate=$myrow['rate']; + $OrderNo = GetNextTransNo(18, $db); + $sql="INSERT INTO purchorders ( + orderno, + supplierno, + orddate, + rate, + initiator, + intostocklocation, + deliverydate, + status, + stat_comment, + paymentterms) + VALUES ( + '".$OrderNo."', + '".$_POST['supplierid']."', + '".date('Y-m-d')."', + '".$Rate."', + '".$_SESSION['UserID']."', + '".$_SESSION['DefaultFactoryLocation']."', + '".date('Y-m-d')."', + '"._('Pending')."', + '"._('Automatically generated from tendering system')."', + '".$PaymentTerms."')"; + DB_query($sql, $db); + foreach ($accepts as $AcceptID) { + $sql="SELECT offers.quantity, + offers.price, + offers.uom, + stockmaster.description, + stockmaster.stockid + FROM offers + LEFT JOIN stockmaster + ON offers.stockid=stockmaster.stockid + WHERE offerid='".$AcceptID."'"; + $result= DB_query($sql, $db); + $myrow=DB_fetch_array($result); + $MailText.=$myrow['description']."\t"._('Quantity').' '.$myrow['quantity']."\t"._('Price').' '. + locale_number_format($myrow['price'])."\n"; + $sql="INSERT INTO purchorderdetails (orderno, + itemcode, + deliverydate, + itemdescription, + unitprice, + actprice, + quantityord, + suppliersunit) + VALUES ('".$OrderNo."', + '".$myrow['stockid']."', + '".date('Y-m-d')."', + '".$myrow['description']."', + '".$myrow['price']."', + '".$myrow['price']."', + '".$myrow['quantity']."', + '".$myrow['uom']."')"; + $result=DB_query($sql, $db); + $sql="DELETE FROM offers WHERE offerid='".$AcceptID."'"; + $result=DB_query($sql, $db); + } + $mail = new htmlMimeMail(); + $mail->setSubject(_('Your offer to').' '.$_SESSION['CompanyRecord']['coyname'].' '._('has been accepted')); + $mail->setText($MailText); + $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>'); + $result = $mail->send(array($Email), 'smtp'); + prnMsg(_('The accepted offers from').' '.$SupplierName.' '._('have been converted to purchase orders and an email sent to') + .' '.$Email."\n"._('Please review the order contents').' '.'<a href="'.$rootpath . + '/PO_Header.php?ModifyOrderNumber=' . $OrderNo.'">'._('here').'</a>', 'success'); + } + if (sizeOf($rejects)>0){ + $MailText=_('This email has been automatically generated by the webERP installation at').' '. + $_SESSION['CompanyRecord']['coyname']."\n"; + $MailText.=_('The following offers you made have been rejected')."\n\n"; + foreach ($rejects as $RejectID) { + $sql="SELECT offers.quantity, + offers.price, + stockmaster.description + FROM offers + LEFT JOIN stockmaster + ON offers.stockid=stockmaster.stockid + WHERE offerid='".$RejectID."'"; + $result= DB_query($sql, $db); + $myrow=DB_fetch_array($result); + $MailText.=$myrow['description']."\t"._('Quantity').' '.$myrow['quantity']."\t"._('Price').' '. + locale_number_format($myrow['price'])."\n"; + $sql="DELETE FROM offers WHERE offerid='".$RejectID."'"; + $result=DB_query($sql, $db); + } + $mail = new htmlMimeMail(); + $mail->setSubject(_('Your offer to').' '.$_SESSION['CompanyRecord']['coyname'].' '._('has been rejected')); + $mail->setText($MailText); + $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>'); + $result = $mail->send(array($Email), 'smtp'); + prnMsg(_('The rejected offers from').' '.$SupplierName.' '._('have been removed from the system and an email sent to') + .' '.$Email, 'success'); + } + prnMsg(_('All offers have been processed, and emails sent where appropriate'), 'success'); +} +include('includes/footer.inc'); + ?> \ No newline at end of file Modified: trunk/OrderDetails.php =================================================================== --- trunk/OrderDetails.php 2012-04-02 02:54:14 UTC (rev 5201) +++ trunk/OrderDetails.php 2012-04-02 03:37:13 UTC (rev 5202) @@ -61,7 +61,7 @@ echo '<table class="selection"> <tr> - <th colspan="4"><font color="blue">'._('Order Header Details For Order No').' '.$_GET['OrderNumber'].'</font></th> + <th colspan="4"><h3>'._('Order Header Details For Order No').' '.$_GET['OrderNumber'].'</h3></th> </tr> <tr> <th style="text-align: left">' . _('Customer Code') . ':</th> @@ -88,7 +88,7 @@ <td class="OddTableRows">' . $myrow['deladd2'] . '</td> </tr> <tr> - <th style="text-align: left"h>' . _('Order Currency') . ':</th> + <th style="text-align: left">' . _('Order Currency') . ':</th> <td class="OddTableRows">' . $myrow['currcode'] . '</td> <th style="text-align: left">' . _('Delivery Address 3') . ':</th> <td class="OddTableRows">' . $myrow['deladd3'] . '</td> @@ -156,7 +156,7 @@ echo '<br /> <table class="selection"> <tr> - <th colspan="9"><font color="blue">'._('Order Line Details For Order No').' '.$_GET['OrderNumber'].'</font></th> + <th colspan="9"><h3>'._('Order Line Details For Order No').' '.$_GET['OrderNumber'].'</h3></th> </tr> <tr> <th>' . _('Item Code') . '</th> Modified: trunk/OutstandingGRNs.php =================================================================== --- trunk/OutstandingGRNs.php 2012-04-02 02:54:14 UTC (rev 5201) +++ trunk/OutstandingGRNs.php 2012-04-02 03:37:13 UTC (rev 5202) @@ -161,8 +161,9 @@ '" alt="" />' . ' ' . $title . '</p>'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> - <table class="selection">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + <div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; echo '<tr> <td>' . _('From Supplier Code') . ':</td> @@ -175,8 +176,10 @@ </table> <br /> <div class="centre"> - <input type="submit" Name="PrintPDF" value="' . _('Print PDF') . '" /> - </div>'; + <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> + </div> + </div> + </form>'; include('includes/footer.inc'); Modified: trunk/PageSecurity.php =================================================================== --- trunk/PageSecurity.php 2012-04-02 02:54:14 UTC (rev 5201) +++ trunk/PageSecurity.php 2012-04-02 03:37:13 UTC (rev 5202) @@ -1,61 +1,63 @@ -<?php - -/*$Id: PageSecurity.php 4500 2011-02-27 09:18:42Z daintree $ */ - -include('includes/session.inc'); -$title = _('Page Security Levels'); -include('includes/header.inc'); - -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/security.png" title="' . _('Page Security Levels') . '" alt="" />' . ' ' . $title.'</p><br />'; - -if (isset($_POST['Update'])) { - foreach ($_POST as $ScriptName => $PageSecurityValue) { - if ($ScriptName!='Update' and $ScriptName!='FormID') { - $ScriptName = mb_substr($ScriptName, 0, mb_strlen($ScriptName)-4).'.php'; - $sql="UPDATE scripts SET pagesecurity='". $PageSecurityValue . "' WHERE script='" . $ScriptName . "'"; - $UpdateResult=DB_query($sql, $db,_('Could not update the page security value for the script because')); - } - } -} - -$sql="SELECT script, - pagesecurity, - description - FROM scripts"; - -$result=DB_query($sql, $db); - -echo '<br /><form method="post" id="PageSecurity" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; -echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - -echo '<table class="selection">'; - -$TokenSql="SELECT tokenid, - tokenname - FROM securitytokens"; -$TokenResult=DB_query($TokenSql, $db); - -while ($myrow=DB_fetch_array($result)) { - echo '<tr><td>'.$myrow['script'].'</td>'; - echo '<td><select name="'.$myrow['script'].'">'; - while ($mytokenrow=DB_fetch_array($TokenResult)) { - if ($mytokenrow['tokenid']==$myrow['pagesecurity']) { - echo '<option selected="selected" value="'.$mytokenrow['tokenid'].'">'.$mytokenrow['tokenname'].'</option>'; - } else { - echo '<option value="'.$mytokenrow['tokenid'].'">'.$mytokenrow['tokenname'].'</option>'; - } - } - echo '</select></td></tr>'; - DB_data_seek($TokenResult, 0); -} - -echo '</table><br />'; - -echo '<div class="centre"> - <input type="submit" name="Update" value="'._('Update Security Levels').'" /> - </div> - <br /> - </form>'; - -include('includes/footer.inc'); +<?php + +/*$Id: PageSecurity.php 4500 2011-02-27 09:18:42Z daintree $ */ + +include('includes/session.inc'); +$title = _('Page Security Levels'); +include('includes/header.inc'); + +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/security.png" title="' . _('Page Security Levels') . '" alt="" />' . ' ' . $title.'</p><br />'; + +if (isset($_POST['Update'])) { + foreach ($_POST as $ScriptName => $PageSecurityValue) { + if ($ScriptName!='Update' and $ScriptName!='FormID') { + $ScriptName = mb_substr($ScriptName, 0, mb_strlen($ScriptName)-4).'.php'; + $sql="UPDATE scripts SET pagesecurity='". $PageSecurityValue . "' WHERE script='" . $ScriptName . "'"; + $UpdateResult=DB_query($sql, $db,_('Could not update the page security value for the script because')); + } + } +} + +$sql="SELECT script, + pagesecurity, + description + FROM scripts"; + +$result=DB_query($sql, $db); + +echo '<br /><form method="post" id="PageSecurity" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; +echo '<div>'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + +echo '<table class="selection">'; + +$TokenSql="SELECT tokenid, + tokenname + FROM securitytokens"; +$TokenResult=DB_query($TokenSql, $db); + +while ($myrow=DB_fetch_array($result)) { + echo '<tr><td>'.$myrow['script'].'</td>'; + echo '<td><select name="'.$myrow['script'].'">'; + while ($mytokenrow=DB_fetch_array($TokenResult)) { + if ($mytokenrow['tokenid']==$myrow['pagesecurity']) { + echo '<option selected="selected" value="'.$mytokenrow['tokenid'].'">'.$mytokenrow['tokenname'].'</option>'; + } else { + echo '<option value="'.$mytokenrow['tokenid'].'">'.$mytokenrow['tokenname'].'</option>'; + } + } + echo '</select></td></tr>'; + DB_data_seek($TokenResult, 0); +} + +echo '</table><br />'; + +echo '<div class="centre"> + <input type="submit" name="Update" value="'._('Update Security Levels').'" /> + </div> + <br /> + </div> + </form>'; + +include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/PaymentAllocations.php =================================================================== --- trunk/PaymentAllocations.php 2012-04-02 02:54:14 UTC (rev 5201) +++ trunk/PaymentAllocations.php 2012-04-02 03:37:13 UTC (rev 5202) @@ -31,7 +31,7 @@ <img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Payments') . '" alt="" />' . ' ' . _('Payment Allocation for Supplier') . ': ' . $SuppID . _(' and') . ' ' . _('Invoice') . ': ' . $InvID . '</p>'; echo '<div class="page_help_text">' . - _('This shows how the payment to the supplier was allocated') . '<a href="SupplierInquiry.php?&SupplierID=' . $SuppID . '">' . _('Back to supplier inquiry') . '</a> + _('This shows how the payment to the supplier was allocated') . '<a href="SupplierInquiry.php?&SupplierID=' . $SuppID . '">' . _('Back to supplier inquiry') . '</a> </div> <br />'; Modified: trunk/PaymentMethods.php =================================================================== --- trunk/PaymentMethods.php 2012-04-02 02:54:14 UTC (rev 5201) +++ trunk/PaymentMethods.php 2012-04-02 03:37:13 UTC (rev 5202) @@ -198,23 +198,24 @@ <td>' . ($myrow['receipttype'] ? _('Yes') : _('No')) . '</td> <td>' . ($myrow['usepreprintedstationery'] ? _('Yes') : _('No')) . '</td> <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedPaymentID=' . $myrow['paymentid'] . '">' . _('Edit') . '</a></td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedPaymentID=' . $myrow['paymentid'] . '&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this payment method?') . '\');">' . _('Delete') .'</a></td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedPaymentID=' . $myrow['paymentid'] . '&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this payment method?') . '\');">' . _('Delete') .'</a></td> </tr>'; } //END WHILE LIST LOOP - echo '</table><p>'; + echo '</table><br />'; } //end of ifs and buts! if (isset($SelectedPaymentID)) { - echo '<div class="centre"><a href=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?' . SID .'>' . _('Review Payment Methods') . '</a></div>'; + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?' . SID .'">' . _('Review Payment Methods') . '</a></div>'; } -echo '<p>'; +echo '<br />'; if (! isset($_GET['delete'])) { echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedPaymentID)) { @@ -259,28 +260,29 @@ 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> + <option' . ($_POST['ForPayment'] ? ' selected="selected"' : '') .' value="1">' . _('Yes') . '</option> + <option' . ($_POST['ForPayment'] ? '' : ' selected="selected"') .' value="0">' . _('No') . '</option> + </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> + <option' . ($_POST['ForReceipt'] ? ' selected="selected"' : '') .' value="1">' . _('Yes') . '</option> + <option' . ($_POST['ForReceipt'] ? '' : ' selected="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> + <option' . ($_POST['UsePrePrintedStationery'] ? ' selected="selected"': '' ) .' value="1">' . _('Yes') . '</option> + <option' . ($_POST['UsePrePrintedStationery']==1 ? '' : ' selected="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 '</div>'; echo '</form>'; } //end if record deleted no point displaying form to add record Modified: trunk/PaymentTerms.php =================================================================== --- trunk/PaymentTerms.php 2012-04-02 02:54:14 UTC (rev 5201) +++ trunk/PaymentTerms.php 2012-04-02 03:37:13 UTC (rev 5202) @@ -175,7 +175,7 @@ echo '<table class="selection">'; echo '<tr> - <th colspan="6"><font color="blue" size="3">'._('Payment Terms.').'</font></th> + <th colspan="6"><h3>'._('Payment Terms.').'</h3></th> </tr>'; echo '<tr> <th>' . _('Term Code') . '</th> @@ -203,7 +203,7 @@ <td>%s</td> <td>%s</td> <td><a href="%s?SelectedTerms=%s">' . _('Edit') . '</a></td> - <td><a href="%s?SelectedTerms=%s&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this payment term?') . '\');">' . _('Delete') . '</a></td> + <td><a href="%s?SelectedTerms=%s&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this payment term?') . '\');">' . _('Delete') . '</a></td> </tr>', $myrow['termsindicator'], $myrow['terms'], @@ -215,7 +215,7 @@ $myrow[0]); } //END WHILE LIST LOOP - echo '</table><p>'; + echo '</table><br />'; } //end of ifs and buts! if (isset($SelectedTerms)) { @@ -227,6 +227,7 @@ if (!isset($_GET['delete'])) { echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedTerms)) { @@ -252,7 +253,7 @@ echo '<br /> <table class="selection">'; echo '<tr> - <th colspan="6"><font color="blue" size="3">'._('Update Payment Terms.').'</font></th> + <th colspan="6"><h3>'._('Update Payment Terms.').'</h3></th> </tr>'; echo '<tr> <td>' . _('Term Code') . ':</td> @@ -272,7 +273,7 @@ echo '<table class="selection">'; echo '<tr> - <th colspan="6"><font color=blue size="3">'._('New Payment Terms.').'</font></th> + <th colspan="6"><h3>'._('New Payment Terms.').'</h3></th> </tr>'; echo '<tr> <td>' . _('Term Code') . ':</td> @@ -307,8 +308,9 @@ <br /> <div class="centre"> <input type="submit" name="submit" value="'._('Enter Information').'" /> - </form> </div>'; + echo '</div> + </form>'; } //end if record deleted no point displaying form to add record include('includes/footer.inc'); Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2012-04-02 02:54:14 UTC (rev 5201) +++ trunk/Payments.php 2012-04-02 03:37:13 UTC (rev 5202) @@ -48,8 +48,7 @@ . '" alt="" />' . ' ' . _('Payment Entry') . ' </p>'; echo '<div class="page_help_text">' . _('Use this screen to enter payments FROM your bank account. <br />Note: To enter a payment FROM a supplier, first select the Supplier, click Enter a Payment to, or Receipt from the Supplier, and use a negative Payment amount on this form.') . '</div> - <br /> - <div class="centre">'; + <br />'; if (isset($_GET['SupplierID'])){ /*The page was called with a supplierID check it is valid and default the inputs for Supplier Name and currency of payment */ @@ -278,11 +277,12 @@ // it is a supplier payment by cheque and haven't printed yet so print cheque echo '<br /> - <a href="' . $rootpath . '/PrintCheque.php?ChequeNum=' . $_POST['ChequeNum'] . '&identifier=' . $identifier . '">' . _('Print Cheque using pre-printed stationery') . '</a> + <a href="' . $rootpath . '/PrintCheque.php?ChequeNum=' . $_POST['ChequeNum'] . '&identifier=' . $identifier . '">' . _('Print Cheque using pre-printed stationery') . '</a> <br /> <br />'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'] . '?identifier=' . $identifier) . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo _('Has the cheque been printed') . '? <br /> @@ -293,6 +293,8 @@ <input type="submit" name="PaymentCancelled" value="' . _('No / Cancel Payment') . '" />'; echo '<br />Payment amount = ' . $_SESSION['PaymentDetail' . $identifier]->Amount; + echo '</div> + </form>'; } else { @@ -728,11 +730,12 @@ } echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'] . '?identifier=' . $identifier) . '" method="post">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<p><table class="selection">'; +echo '<br /><table class="selection">'; -echo '<tr><th colspan="4"><font size="3" color="blue">' . _('Payment'); +echo '<tr><th colspan="4"><h3>' . _('Payment'); if ($_SESSION['PaymentDetail' . $identifier]->SupplierID!=''){ echo ' ' . _('to') . ' ' . $_SESSION['PaymentDetail' . $identifier]->SuppName; @@ -742,7 +745,7 @@ echo ' ' . _('from the') . ' ' . $_SESSION['PaymentDetail' . $identifier]->BankAccountName; } -echo ' ' . _('on') . ' ' . $_SESSION['PaymentDetail' . $identifier]->DatePaid . '</font></th></tr>'; +echo ' ' . _('on') . ' ' . $_SESSION['PaymentDetail' . $identifier]->DatePaid . '</h3></th></tr>'; $SQL = "SELECT bankaccountname, bankaccounts.accountcode, @@ -809,11 +812,11 @@ </tr>'; } } else { /*its a supplier payment so it must be in the suppliers currency */ - echo '<tr> - <td>' . _('Supplier Currency') . ':</td> + echo '<tr>'; + echo '<td><input type="hidden" name="Currency" value="' . $_SESSION['PaymentDetail' . $identifier]->Currency . '" /> + ' . _('Supplier Currency') . ':</td> <td>' . $_SESSION['PaymentDetail' . $identifier]->Currency . '</td> </tr>'; - echo '<input type="hidden" name="Currency" value="' . $_SESSION['PaymentDetail' . $identifier]->Currency . '" />'; /*get the default rate from the currency table if it has not been set */ if (!isset($_POST['ExRate']) OR $_POST['ExRate']==''){ $SQL = "SELECT rate FROM currencies WHERE currabrev='" . $_SESSION['PaymentDetail' . $identifier]->Currency ."'"; @@ -906,7 +909,7 @@ echo '<td><input type="hidden" name="SuggestedExRate1" value="'.$SuggestedExRate.'" /></td>'; } echo ' - <td colspan="3"><div class="centre"><input type="submit" name="UpdateHeader" value="' . _('Update'). '" /></td> + <td colspan="3"><div class="centre"><input type="submit" name="UpdateHeader" value="' . _('Update'). '" /></div></td> </tr>'; @@ -917,7 +920,7 @@ /* Set upthe form for the transaction entry for a GL Payment Analysis item */ echo '<br /><table class="selection">'; - echo '<tr><th colspan="2"><font size="3" color="blue">' . _('General Ledger Payment Analysis Entry') . '</font></th></tr>'; + echo '<tr><th colspan="2"><h3>' . _('General Ledger Payment Analysis Entry') . '</h3></th></tr>'; //Select the Tag echo '<tr> @@ -951,7 +954,7 @@ } else { echo '<tr> <td>' . _('Enter GL Account Manually') . ':</td> - <td><input type="text" class="number" Name="GLManualCode" maxlength="12" size="12" onchange="return inArray(this, GLCode.options,'. "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')" /></td></tr>'; + <td><input type="text" class="number" name="GLManualCode" maxlength="12" size="12" onchange="return inArray(this, GLCode.options,'. "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')" /></td></tr>'; } echo '<tr> @@ -1007,9 +1010,9 @@ echo '<option value=""></option>'; while ($myrow=DB_fetch_array($result)){ if (isset($_POST['GLCode']) AND $_POST['GLCode']==$myrow['accountcode']){ - echo '<option selected="selected" value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; + echo '<option selected="selected" value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8') . '</option>'; } else { - echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; + echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8') . '</option>'; } } echo '</select></td></tr>'; @@ -1077,7 +1080,7 @@ <td>' . $PaymentItem->GLCode . ' - ' . $PaymentItem->GLActName . '</td> <td>' . stripslashes($PaymentItem->Narrative) . '</td> <td>' . $PaymentItem->Tag . ' - ' . $TagName . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'] . '?identifier=' . $identifier) . '&Delete=' . $PaymentItem->ID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this payment analysis item?') . '\');">' . _('Delete') . '</a></td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'] . '?identifier=' . $identifier) . '&Delete=' . $PaymentItem->ID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this payment analysis item?') . '\');">' . _('Delete') . '</a></td> </tr>'; $PaymentTotal += $PaymentItem->Amount; } @@ -1090,7 +1093,7 @@ </tr> </table> <br />'; - echo '<input type="submit" name="CommitBatch" value="' . _('Accept and Process Payment') . '" />'; + echo '<div class="centre"><input type="submit" name="CommitBatch" value="' . _('Accept and Process Payment') . '" /></div>'; } } else { @@ -1104,17 +1107,18 @@ </tr>'; if (isset($_SESSION['PaymentDetail' . $identifier]->SupplierID)){ /*So it is a supplier payment so show the discount entry item */ - echo '<tr> - <td>' . _('Amount of Discount') . ':</td> + echo '<tr>'; + echo '<td><input type="hidden" name="SuppName" value="' . $_SESSION['PaymentDetail' . $identifier]->SuppName . '" /> + ' . _('Amount of Discount') . ':</td> <td><input class="number" type="text" name="Discount" maxlength="12" size="13" value="' . $_SESSION['PaymentDetail' . $identifier]->Discount . '" /></td> </tr>'; - echo '<input type="hidden" name="SuppName" value="' . $_SESSION['PaymentDetail' . $identifier]->SuppName . '" />'; } else { echo '<input type="hidden" name="Discount" value="0" />'; } echo '</table><br />'; - echo '<input type="submit" name="CommitBatch" value="' . _('Accept and Process Payment') . '" />'; + echo '<div class="centre"><input type="submit" name="CommitBatch" value="' . _('Accept and Process Payment') . '" /></div>'; } +echo '</div>'; echo '</form>'; include('includes/footer.inc'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-04-02 18:19:49
|
Revision: 5210 http://web-erp.svn.sourceforge.net/web-erp/?rev=5210&view=rev Author: vvs2012 Date: 2012-04-02 18:19:39 +0000 (Mon, 02 Apr 2012) Log Message: ----------- BOMs delete function requires Location and WorkCentre to be set Modified Paths: -------------- trunk/BOMs.php trunk/doc/Change.log Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2012-04-02 15:52:54 UTC (rev 5209) +++ trunk/BOMs.php 2012-04-02 18:19:39 UTC (rev 5210) @@ -195,6 +195,20 @@ $SelectedComponent = $_POST['SelectedComponent']; } +/* delete function requires Location to be set */ +if (isset($_GET['Location'])){ + $Location = $_GET['Location']; +} elseif (isset($_POST['Location'])){ + $Location = $_POST['Location']; +} + +/* delete function requires WorkCentre to be set */ +if (isset($_GET['WorkCentre'])){ + $WorkCentre = $_GET['WorkCentre']; +} elseif (isset($_POST['WorkCentre'])){ + $WorkCentre = $_POST['WorkCentre']; +} + if (isset($_GET['Select'])){ $Select = $_GET['Select']; } elseif (isset($_POST['Select'])){ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-04-02 15:52:54 UTC (rev 5209) +++ trunk/doc/Change.log 2012-04-02 18:19:39 UTC (rev 5210) @@ -1,9 +1,10 @@ webERP Change Log +2/4/2012 Vitaly: BOMs delete function requires Location and WorkCentre to be set 2/4/2012 Billy Chang,劉世琪: add Chinese Traditional TW locale 2/4/2012 Exson: fixed CopyBOM.php sql errors and header already sent error. 31/3/2012 Exson: Fixed for PcAuthorizeExpenses.php cannot authorized expenses due to no applying gettext function to 'Update' 31/3/2012: PakRichard: Fixed problem that on PCAssignCashToTab.php it should be used the decimal places of the currency of the tab, not the decimal places of the functional currency.The same in PcClaimExpensesFromTab.php -31/3/2012 Kunshan-Ouhai\xA1G Fixed bug in PDFStockCheckComparision.php when selecting Report and Close the Inventory Comparison, there will be seriously sql errors. Reported and fixed by Kunshan-Ouhai from webERP Chinese community QQ group. +31/3/2012 Kunshan-Ouhai?G Fixed bug in PDFStockCheckComparision.php when selecting Report and Close the Inventory Comparison, there will be seriously sql errors. Reported and fixed by Kunshan-Ouhai from webERP Chinese community QQ group. 31/3/2012 Dafydd Crosby: Revise scripts Add_SerialItemsOut.php and OutputSerialItems.php fixes a problem that occurs when receiving a bulk inventory transfer. There was a hard-coded loop that prevented adding bundles that were greater than 10. 30/3/2012 Richard Andreu Modified security role to order by role name instead of by roleid to make it more user friendly in WWW_Access.php and WWW_Users.php 29/3/2012Exson:Fixed href typo error which lead to Select another location link does not work in InternalStockRequestFulfill.php This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-04-02 18:19:51
|
Revision: 5210 http://web-erp.svn.sourceforge.net/web-erp/?rev=5210&view=rev Author: vvs2012 Date: 2012-04-02 18:19:39 +0000 (Mon, 02 Apr 2012) Log Message: ----------- BOMs delete function requires Location and WorkCentre to be set Modified Paths: -------------- trunk/BOMs.php trunk/doc/Change.log Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2012-04-02 15:52:54 UTC (rev 5209) +++ trunk/BOMs.php 2012-04-02 18:19:39 UTC (rev 5210) @@ -195,6 +195,20 @@ $SelectedComponent = $_POST['SelectedComponent']; } +/* delete function requires Location to be set */ +if (isset($_GET['Location'])){ + $Location = $_GET['Location']; +} elseif (isset($_POST['Location'])){ + $Location = $_POST['Location']; +} + +/* delete function requires WorkCentre to be set */ +if (isset($_GET['WorkCentre'])){ + $WorkCentre = $_GET['WorkCentre']; +} elseif (isset($_POST['WorkCentre'])){ + $WorkCentre = $_POST['WorkCentre']; +} + if (isset($_GET['Select'])){ $Select = $_GET['Select']; } elseif (isset($_POST['Select'])){ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-04-02 15:52:54 UTC (rev 5209) +++ trunk/doc/Change.log 2012-04-02 18:19:39 UTC (rev 5210) @@ -1,9 +1,10 @@ webERP Change Log +2/4/2012 Vitaly: BOMs delete function requires Location and WorkCentre to be set 2/4/2012 Billy Chang,劉世琪: add Chinese Traditional TW locale 2/4/2012 Exson: fixed CopyBOM.php sql errors and header already sent error. 31/3/2012 Exson: Fixed for PcAuthorizeExpenses.php cannot authorized expenses due to no applying gettext function to 'Update' 31/3/2012: PakRichard: Fixed problem that on PCAssignCashToTab.php it should be used the decimal places of the currency of the tab, not the decimal places of the functional currency.The same in PcClaimExpensesFromTab.php -31/3/2012 Kunshan-Ouhai\xA1G Fixed bug in PDFStockCheckComparision.php when selecting Report and Close the Inventory Comparison, there will be seriously sql errors. Reported and fixed by Kunshan-Ouhai from webERP Chinese community QQ group. +31/3/2012 Kunshan-Ouhai?G Fixed bug in PDFStockCheckComparision.php when selecting Report and Close the Inventory Comparison, there will be seriously sql errors. Reported and fixed by Kunshan-Ouhai from webERP Chinese community QQ group. 31/3/2012 Dafydd Crosby: Revise scripts Add_SerialItemsOut.php and OutputSerialItems.php fixes a problem that occurs when receiving a bulk inventory transfer. There was a hard-coded loop that prevented adding bundles that were greater than 10. 30/3/2012 Richard Andreu Modified security role to order by role name instead of by roleid to make it more user friendly in WWW_Access.php and WWW_Users.php 29/3/2012Exson:Fixed href typo error which lead to Select another location link does not work in InternalStockRequestFulfill.php This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-04-03 09:50:27
|
Revision: 5215 http://web-erp.svn.sourceforge.net/web-erp/?rev=5215&view=rev Author: tim_schofield Date: 2012-04-03 09:50:15 +0000 (Tue, 03 Apr 2012) Log Message: ----------- New script for easy entry of supplier price list Modified Paths: -------------- trunk/includes/MainMenuLinksArray.php trunk/sql/mysql/upgrade4.07-4.08.sql Added Paths: ----------- trunk/SupplierPriceList.php trunk/css/aguapop/images/tick.png trunk/css/default/images/tick.png trunk/css/fresh/images/tick.png trunk/css/gel/images/tick.png trunk/css/jelly/images/tick.png trunk/css/professional/images/tick.png trunk/css/professional-rtl/images/tick.png trunk/css/silverwolf/images/tick.png Added: trunk/SupplierPriceList.php =================================================================== --- trunk/SupplierPriceList.php (rev 0) +++ trunk/SupplierPriceList.php 2012-04-03 09:50:15 UTC (rev 5215) @@ -0,0 +1,584 @@ +<?php + +include ('includes/session.inc'); + +$title = _('Supplier Purchasing Data'); + +include ('includes/header.inc'); + +if (isset($_POST['StockSearch'])) { + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<input type="hidden" value="' . $_POST['SupplierID'] . '" name="SupplierID" />'; + + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for Inventory Items'). '</p>'; + echo '<table class="selection"><tr>'; + echo '<td>' . _('In Stock Category') . ':'; + echo '<select name="StockCat">'; + if (!isset($_POST['StockCat'])) { + $_POST['StockCat'] = ''; + } + if ($_POST['StockCat'] == 'All') { + echo '<option selected="True" value="All">' . _('All').'</option>'; + } else { + echo '<option value="All">' . _('All').'</option>'; + } + $SQL = "SELECT categoryid, + categorydescription + FROM stockcategory + ORDER BY categorydescription"; + $result1 = DB_query($SQL, $db); + while ($myrow1 = DB_fetch_array($result1)) { + if ($myrow1['categoryid'] == $_POST['StockCat']) { + echo '<option selected="True" value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'].'</option>'; + } else { + echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'].'</option>'; + } + } + echo '</select></td>'; + echo '<td>' . _('Enter partial') . '<b> ' . _('Description') . '</b>:</td><td>'; + if (isset($_POST['Keywords'])) { + echo '<input type="search" name="Keywords" value="' . $_POST['Keywords'] . '" size="34" maxlength="25" />'; + } else { + echo '<input type="search" name="Keywords" size="34" maxlength="25" placeholder="Enter part of the item description" />'; + } + echo '</td></tr><tr><td></td>'; + echo '<td><font size="3"><b>' . _('OR') . ' ' . '</b></font>' . _('Enter partial') . ' <b>' . _('Stock Code') . '</b>:</td>'; + echo '<td>'; + if (isset($_POST['StockCode'])) { + echo '<input type="text" name="StockCode" value="' . $_POST['StockCode'] . '" size="15" maxlength="18" />'; + } else { + echo '<input type="text" name="StockCode" size="15" maxlength="18" />'; + } + echo '</td></tr></table><br />'; + echo '<div class="centre"><input type="submit" name="Search" value="' . _('Search Now') . '" /></div><br />'; + echo '<script type="text/javascript">defaultControl(document.forms[0].StockCode);</script>'; + echo '</form>'; + include('includes/footer.inc'); + exit; +} + +if (isset($_POST['Search']) OR isset($_POST['Go']) OR isset($_POST['Next']) OR isset($_POST['Previous'])) { + if (!isset($_POST['Go']) AND !isset($_POST['Next']) AND !isset($_POST['Previous'])) { + // if Search then set to first page + $_POST['PageOffset'] = 1; + } + if ($_POST['Keywords'] AND $_POST['StockCode']) { + prnMsg (_('Stock description keywords have been used in preference to the Stock code extract entered'), 'info'); + } + if ($_POST['Keywords']) { + //insert wildcard characters in spaces + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); + $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; + if ($_POST['StockCat'] == 'All') { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + SUM(locstock.quantity) AS qoh, + stockmaster.units, + stockmaster.mbflag, + stockmaster.discontinued, + stockmaster.decimalplaces + FROM stockmaster + LEFT JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid, + locstock + WHERE stockmaster.stockid=locstock.stockid + AND stockmaster.description " . LIKE . " '$SearchString' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units, + stockmaster.mbflag, + stockmaster.discontinued, + stockmaster.decimalplaces + ORDER BY stockmaster.stockid"; + } else { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + SUM(locstock.quantity) AS qoh, + stockmaster.units, + stockmaster.mbflag, + stockmaster.discontinued, + stockmaster.decimalplaces + FROM stockmaster, + locstock + WHERE stockmaster.stockid=locstock.stockid + AND description " . LIKE . " '$SearchString' + AND categoryid='" . $_POST['StockCat'] . "' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units, + stockmaster.mbflag, + stockmaster.discontinued, + stockmaster.decimalplaces + ORDER BY stockmaster.stockid"; + } + } elseif (isset($_POST['StockCode'])) { + $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); + if ($_POST['StockCat'] == 'All') { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.mbflag, + stockmaster.discontinued, + SUM(locstock.quantity) AS qoh, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster + INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid, + locstock + WHERE stockmaster.stockid=locstock.stockid + AND stockmaster.stockid " . LIKE . " '%" . $_POST['StockCode'] . "%' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units, + stockmaster.mbflag, + stockmaster.discontinued, + stockmaster.decimalplaces + ORDER BY stockmaster.stockid"; + } else { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.mbflag, + stockmaster.discontinued, + sum(locstock.quantity) as qoh, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster, + locstock + WHERE stockmaster.stockid=locstock.stockid + AND stockmaster.stockid " . LIKE . " '%" . $_POST['StockCode'] . "%' + AND categoryid='" . $_POST['StockCat'] . "' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units, + stockmaster.mbflag, + stockmaster.discontinued, + stockmaster.decimalplaces + ORDER BY stockmaster.stockid"; + } + } elseif (!isset($_POST['StockCode']) AND !isset($_POST['Keywords'])) { + if ($_POST['StockCat'] == 'All') { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.mbflag, + stockmaster.discontinued, + SUM(locstock.quantity) AS qoh, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster + LEFT JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid, + locstock + WHERE stockmaster.stockid=locstock.stockid + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units, + stockmaster.mbflag, + stockmaster.discontinued, + stockmaster.decimalplaces + ORDER BY stockmaster.stockid"; + } else { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.mbflag, + stockmaster.discontinued, + SUM(locstock.quantity) AS qoh, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster, + locstock + WHERE stockmaster.stockid=locstock.stockid + AND categoryid='" . $_POST['StockCat'] . "' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units, + stockmaster.mbflag, + stockmaster.discontinued, + stockmaster.decimalplaces + ORDER BY stockmaster.stockid"; + } + } + $ErrMsg = _('No stock items were returned by the SQL because'); + $DbgMsg = _('The SQL that returned an error was'); + $searchresult = DB_query($SQL, $db, $ErrMsg, $DbgMsg); + if (DB_num_rows($searchresult) == 0) { + prnMsg(_('No stock items were returned by this search please re-enter alternative criteria to try again'), 'info'); + } + unset($_POST['Search']); +} +/* end query for list of records */ +/* display list if there is more than one record */ +if (isset($searchresult) AND !isset($_POST['Select'])) { + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for Inventory Items'). '</p>'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<input type="hidden" value="' . $_POST['SupplierID'] . '" name="SupplierID" />'; + $ListCount = DB_num_rows($searchresult); + if ($ListCount > 0) { + // If the user hit the search button and there is more than one item to show + $ListPageMax = ceil($ListCount / $_SESSION['DisplayRecordsMax']); + if (isset($_POST['Next'])) { + if ($_POST['PageOffset'] < $ListPageMax) { + $_POST['PageOffset'] = $_POST['PageOffset'] + 1; + } + } + if (isset($_POST['Previous'])) { + if ($_POST['PageOffset'] > 1) { + $_POST['PageOffset'] = $_POST['PageOffset'] - 1; + } + } + if ($_POST['PageOffset'] > $ListPageMax) { + $_POST['PageOffset'] = $ListPageMax; + } + if ($ListPageMax > 1) { + echo '<div class="centre"><br /> ' . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $ListPageMax . ' ' . _('pages') . '. ' . _('Go to Page') . ': '; + echo '<select name="PageOffset">'; + $ListPage = 1; + while ($ListPage <= $ListPageMax) { + if ($ListPage == $_POST['PageOffset']) { + echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; + } else { + echo '<option value=' . $ListPage . '>' . $ListPage . '</option>'; + } + $ListPage++; + } + echo '</select> + <input type="submit" name="Go" value="' . _('Go') . '" /> + <input type="submit" name="Previous" value="' . _('Previous') . '" /> + <input type="submit" name="Next" value="' . _('Next') . '" />'; + echo '<input type="hidden" name=Keywords value="'.$_POST['Keywords'].'" />'; + echo '<input type="hidden" name=StockCat value="'.$_POST['StockCat'].'" />'; + echo '<input type="hidden" name=StockCode value="'.$_POST['StockCode'].'" />'; +// echo '<input type="hidden" name=Search value="Search" />'; + echo '<br /></div>'; + } + echo '<table class="selection">'; + echo'<tr> + <th>' . _('Code') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Units') . '</th> + </tr>'; + $j = 1; + $k = 0; //row counter to determine background colour + $RowIndex = 0; + if (DB_num_rows($searchresult) <> 0) { + DB_data_seek($searchresult, ($_POST['PageOffset'] - 1) * $_SESSION['DisplayRecordsMax']); + } + while (($myrow = DB_fetch_array($searchresult)) AND ($RowIndex <> $_SESSION['DisplayRecordsMax'])) { + if ($k == 1) { + echo '<tr class="EvenTableRows">'; + $k = 0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + + echo '<td><input type="submit" name="Select" value="' . $myrow['stockid'] . '" /></td> + <td>' . $myrow['description'] . '</td> + <td>' . $myrow['units'] . '</td> + </tr>'; + $RowIndex = $RowIndex + 1; + //end of page full new headings if + } + //end of while loop + echo '</table></form><br />'; + include('includes/footer.inc'); + exit; + } +} + +foreach ($_POST as $key=>$value) { + if (mb_substr($key,0,6)=='Update') { + $Index = mb_substr($key,6,mb_strlen($key)-6); + $StockID=$_POST['StockID'.$Index]; + $Price=$_POST['Price'.$Index]; + $SuppUOM=$_POST['SuppUOM'.$Index]; + $ConversionFactor=$_POST['ConversionFactor'.$Index]; + $SupplierDescription=$_POST['SupplierDescription'.$Index]; + $LeadTime=$_POST['LeadTime'.$Index]; + if (isset($_POST['Preferred'.$Index])) { + $Preferred=1; + $PreferredSQL="UPDATE purchdata SET preferred=0 + WHERE stockid='" . $StockID . "'"; + $PreferredResult=DB_query($PreferredSQL, $db); + } else { + $Preferred=0; + } + $EffectiveFrom=$_POST['EffectiveFrom'.$Index]; + $SupplierPartNo=$_POST['SupplierPartNo'.$Index]; + $MinOrderQty=$_POST['MinOrderQty'.$Index]; + $sql="UPDATE purchdata SET price='" . $Price . "', + suppliersuom='" . $SuppUOM . "', + conversionfactor='" . $ConversionFactor . "', + supplierdescription='" . $SupplierDescription . "', + leadtime='" . $LeadTime . "', + preferred='" . $Preferred . "', + effectivefrom='" . FormatDateForSQL($EffectiveFrom) . "', + suppliers_partno='" . $SupplierPartNo . "', + minorderqty='" . $MinOrderQty . "' + WHERE supplierno='" . $_POST['SupplierID'] . "' + AND stockid='" . $StockID . "'"; + $result=DB_query($sql, $db); + } + if (mb_substr($key,0,6)=='Insert') { + if (isset($_POST['Preferred0'])) { + $Preferred=1; + } else { + $Preferred=0; + } + $sql="INSERT INTO purchdata (stockid, + supplierno, + price, + suppliersuom, + conversionfactor, + supplierdescription, + leadtime, + preferred, + effectivefrom, + suppliers_partno, + minorderqty + ) VALUES ( + '" . $_POST['StockID0'] . "', + '" . $_POST['SupplierID'] . "', + '" . $_POST['Price0'] . "', + '" . $_POST['SuppUOM0'] . "', + '" . $_POST['ConversionFactor0'] . "', + '" . $_POST['SupplierDescription0'] . "', + '" . $_POST['LeadTime0'] . "', + '" . $Preferred . "', + '" . FormatDateForSQL($_POST['EffectiveFrom0']) . "', + '" . $_POST['SupplierPartNo0'] . "', + '" . $_POST['MinOrderQty0'] . "' + )"; + $result=DB_query($sql, $db); + } +} + +if (isset($_GET['SupplierID'])) { + $SupplierID = trim(mb_strtoupper($_GET['SupplierID'])); +} elseif (isset($_POST['SupplierID'])) { + $SupplierID = trim(mb_strtoupper($_POST['SupplierID'])); +} + +if (isset($SupplierID) AND $SupplierID != '' AND !isset($_POST['SearchSupplier'])) { /*NOT EDITING AN EXISTING BUT SUPPLIER selected OR ENTERED*/ + $sql = "SELECT suppliers.suppname, suppliers.currcode FROM suppliers WHERE supplierid='".$SupplierID."'"; + $ErrMsg = _('The supplier details for the selected supplier could not be retrieved because'); + $DbgMsg = _('The SQL that failed was'); + $SuppSelResult = DB_query($sql, $db, $ErrMsg, $DbgMsg); + if (DB_num_rows($SuppSelResult) == 1) { + $myrow = DB_fetch_array($SuppSelResult); + $SuppName = $myrow['suppname']; + $CurrCode = $myrow['currcode']; + } else { + prnMsg(_('The supplier code') . ' ' . $SupplierID . ' ' . _('is not an existing supplier in the database') . '. ' . _('You must enter an alternative supplier code or select a supplier using the search facility below'), 'error'); + unset($SupplierID); + } +} else { + if ($NoPurchasingData=0) { + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . + $title . ' ' . _('For Stock Code') . ' - ' . $StockID . '</p><br />'; + } + if (!isset($_POST['SearchSupplier'])) { + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/supplier.png" title="' . _('Search') . '" alt="" />' . _('Search for a supplier') . '</p><br />'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"> + <table cellpadding="3" class="selection"><tr>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<td>' . _('Text in the Supplier') . ' <b>' . _('NAME') . '</b>:</font></td>'; + echo '<td><input type="text" name="Keywords" size="20" maxlength="25" /></td>'; + echo '<td><font size="3"><b>' . _('OR') . '</b></font></td>'; + echo '<td>' . _('Text in Supplier') . ' <b>' . _('CODE') . '</b>:</font></td>'; + echo '<td><input type="text" name="SupplierCode" size="15" maxlength="18" /></td>'; + echo '</tr></table><br />'; + echo '<div class="centre"><input type="submit" name="SearchSupplier" value="' . _('Find Suppliers Now') . '" /></div></form>'; + include ('includes/footer.inc'); + exit; + }; +} + +if (isset($_POST['SearchSupplier'])) { + if ($_POST['Keywords'] == '' AND $_POST['SupplierCode'] == '') { + $_POST['Keywords'] = ' '; + } + if (mb_strlen($_POST['Keywords']) > 0) { + //insert wildcard characters in spaces + $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; + + $SQL = "SELECT suppliers.supplierid, + suppliers.suppname, + suppliers.currcode, + suppliers.address1, + suppliers.address2, + suppliers.address3 + FROM suppliers WHERE suppliers.suppname " . LIKE . " '".$SearchString."'"; + } elseif (mb_strlen($_POST['SupplierCode']) > 0) { + $SQL = "SELECT suppliers.supplierid, + suppliers.suppname, + suppliers.currcode, + suppliers.address1, + suppliers.address2, + suppliers.address3 + FROM suppliers + WHERE suppliers.supplierid " . LIKE . " '%" . $_POST['SupplierCode'] . "%'"; + } //one of keywords or SupplierCode was more than a zero length string + $ErrMsg = _('The suppliers matching the criteria entered could not be retrieved because'); + $DbgMsg = _('The SQL to retrieve supplier details that failed was'); + $SuppliersResult = DB_query($SQL, $db, $ErrMsg, $DbgMsg); +} //end of if search + +if (isset($SuppliersResult)) { + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/supplier.png" title="' . _('Search') . '" alt="" />' . _('Select a supplier') . '</p><br />'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"> + <table cellpadding="2" class="selection">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + $TableHeader = '<tr><th>' . _('Code') . '</th> + <th>' . _('Supplier Name') . '</th> + <th>' . _('Currency') . '</th> + <th>' . _('Address 1') . '</th> + <th>' . _('Address 2') . '</th> + <th>' . _('Address 3') . '</th> + </tr>'; + echo $TableHeader; + $k = 0; + while ($myrow = DB_fetch_array($SuppliersResult)) { + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + printf('<td><font size="1"><input type="submit" name="SupplierID" value="%s" /></font></td> + <td><font size="1">%s</font></td> + <td><font size="1">%s</font></td> + <td><font size="1">%s</font></td> + <td><font size="1">%s</font></td> + <td><font size="1">%s</font></td> + </tr>', + $myrow['supplierid'], + $myrow['suppname'], + $myrow['currcode'], + $myrow['address1'], + $myrow['address2'], + $myrow['address3'] + ); + + } + //end of while loop + echo '</table><br/></form>'; + include('includes/footer.inc'); + exit; +} +//end if results to show + +if (isset($_POST['SupplierID'])) { + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/supplier.png" title="' . _('Search') . '" alt="" />' . _('Supplier Purchasing Data') . '</p><br />'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + $SQL="SELECT purchdata.stockid, + stockmaster.description, + price, + suppliersuom, + conversionfactor, + supplierdescription, + leadtime, + preferred, + effectivefrom, + suppliers_partno, + minorderqty + FROM purchdata + INNER JOIN stockmaster + ON purchdata.stockid=stockmaster.stockid + WHERE supplierno='".$_POST['SupplierID']."'"; + + $result=DB_query($SQL, $db); + + $UOMSQL = "SELECT unitid, + unitname + FROM unitsofmeasure"; + $UOMResult = DB_query($UOMSQL, $db); + echo '<input type="hidden" value="' . $_POST['SupplierID'] . '" name="SupplierID" />'; + echo '<table class="selection">'; + echo '<tr><th colspan="8" style="text-align: left"><font color="navy" size="3">' . _('Supplier purchasing data for') . ' ' . $_POST['SupplierID'] . '</font></th>'; + echo '<th colspan="5" style="text-align: right"><font color="navy" size="2">' . _('Find new Item Code') . '</font> + <button type="submit" name="StockSearch"><img width="15px" src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" /></button></th></tr>'; + echo '<tr> + <th>' . _('StockID') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Price') . '</th> + <th>' . _('Suppliers UOM') . '</th> + <th>' . _('Conversion Factor') . '</th> + <th>' . _('Suppliers Description') . '</th> + <th>' . _('Lead Time') . '</th> + <th>' . _('Preferred') . '</th> + <th>' . _('Effective From') . '</th> + <th>' . _('Suppliers Item Code') . '</th> + <th>' . _('Min Order Qty') . '</th> + </tr>'; + + if (isset($_POST['Select'])) { + $StockSQL="SELECT description, units FROM stockmaster WHERE stockid='" . $_POST['Select'] . "'"; + $StockResult=DB_query($StockSQL, $db); + $StockRow=DB_fetch_array($StockResult); + echo '<tr bgcolor="#847F7F"> + <td><input type="hidden" value="' . $_POST['Select'] . '" name="StockID0" />' . $_POST['Select'] . '</td> + <td>' . $StockRow['description'] . '</td> + <td><input type="text" class="number" size="11" value="0.0000" name="Price0" /></td> + <td><select name="SuppUOM0">'; + while ($UOMRow=DB_fetch_array($UOMResult)) { + if ($UOMRow['unitid']==$StRowoc['units']) { + echo '<option selected="selected" value="'.$UOMRow['unitid'].'">' . $UOMRow['unitname'] . '</option>'; + } else { + echo '<option value="'.$UOMRow['unitid'].'">' . $UOMRow['unitname'] . '</option>'; + } + } + DB_data_seek($UOMResult, 0); + echo '</select></td> + <td><input type="text" class="number" size="11" value="1" name="ConversionFactor0" /></td> + <td><input type="text" size="30" maxlength="50" value="" name="SupplierDescription0" /></td> + <td><input type="text" class="number" size="11" value="1" name="LeadTime0" /></td>'; + echo '<td><input type="checkbox" name="Preferred0" /></td>'; + echo '<td><input type="text" class="date" size="11" value="' . date( $_SESSION['DefaultDateFormat']) . '" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveFrom0" /></td> + <td><input type="text" size="20" maxlength="50" value="" name="SupplierPartNo0" /></td> + <td><input type="text" class="number" size="11" value="1" name="MinOrderQty0" /></td> + <td><button type="submit" style="width:100%;text-align:left" name="Insert"><img width="15px" src="' . $rootpath . '/css/' . $theme . '/images/tick.png" /></button></td> + </tr>'; + } + + $RowCounter=1; + while ($myrow=DB_fetch_array($result)) { + echo '<tr> + <td><input type="hidden" value="' . $myrow['stockid'] . '" name="StockID'.$RowCounter.'" />' . $myrow['stockid'] . '</td> + <td>' . $myrow['description'] . '</td> + <td><input type="text" class="number" size="11" value="' . $myrow['price'] . '" name="Price'.$RowCounter.'" /></td> + <td><select name="SuppUOM'.$RowCounter.'">'; + DB_data_seek($UOMResult, 0); + while ($UOMRow=DB_fetch_array($UOMResult)) { + if ($UOMRow['unitid']==$myrow['suppliersuom']) { + echo '<option selected="selected" value="'.$UOMRow['unitid'].'">' . $UOMRow['unitname'] . '</option>'; + } else { + echo '<option value="'.$UOMRow['unitid'].'">' . $UOMRow['unitname'] . '</option>'; + } + } + echo '</select></td> + <td><input type="text" class="number" size="11" value="' . $myrow['conversionfactor'] . '" name="ConversionFactor'.$RowCounter.'" /></td> + <td><input type="text" size="30" maxlength="50" value="' . $myrow['supplierdescription'] . '" name="SupplierDescription'.$RowCounter.'" /></td> + <td><input type="text" class="number" size="11" value="' . $myrow['leadtime'] . '" name="LeadTime'.$RowCounter.'" /></td>'; + if ($myrow['preferred']==1) { + echo '<td><input type="checkbox" checked="checked" name="Preferred'.$RowCounter.'" /></td>'; + } else { + echo '<td><input type="checkbox" name="Preferred'.$RowCounter.'" /></td>'; + } + echo '<td><input type="text" class="date" size="11" value="' . ConvertSQLDate($myrow['effectivefrom']) . '" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveFrom'.$RowCounter.'" /></td> + <td><input type="text" size="20" maxlength="50" value="' . $myrow['suppliers_partno'] . '" name="SupplierPartNo'.$RowCounter.'" /></td> + <td><input type="text" class="number" size="11" value="' . $myrow['minorderqty'] . '" name="MinOrderQty'.$RowCounter.'" /></td> + <td><button type="submit" style="width:100%;text-align:left" name="Update'.$RowCounter.'"><img width="15px" src="' . $rootpath . '/css/' . $theme . '/images/tick.png" /></button></td> + </tr>'; + $RowCounter++; + } + echo '</table>'; + echo '</form>'; + include('includes/footer.inc'); + exit; +} + +?> \ No newline at end of file Added: trunk/css/aguapop/images/tick.png =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/tick.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/default/images/tick.png =================================================================== (Binary files differ) Property changes on: trunk/css/default/images/tick.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/fresh/images/tick.png =================================================================== (Binary files differ) Property changes on: trunk/css/fresh/images/tick.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/gel/images/tick.png =================================================================== (Binary files differ) Property changes on: trunk/css/gel/images/tick.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/jelly/images/tick.png =================================================================== (Binary files differ) Property changes on: trunk/css/jelly/images/tick.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/professional/images/tick.png =================================================================== (Binary files differ) Property changes on: trunk/css/professional/images/tick.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/professional-rtl/images/tick.png =================================================================== (Binary files differ) Property changes on: trunk/css/professional-rtl/images/tick.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/silverwolf/images/tick.png =================================================================== (Binary files differ) Property changes on: trunk/css/silverwolf/images/tick.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2012-04-03 02:56:56 UTC (rev 5214) +++ trunk/includes/MainMenuLinksArray.php 2012-04-03 09:50:15 UTC (rev 5215) @@ -108,7 +108,7 @@ } else { $PrintInvoicesOrCreditNotesScript = '/PrintCustTransPortrait.php'; } - + $MenuItems['AR']['Reports']['URL'] = array ('/CustWhereAlloc.php', $PrintInvoicesOrCreditNotesScript, '/PrintCustStatements.php', @@ -189,9 +189,9 @@ '/SuppPriceList.php' ); -$MenuItems['PO']['Maintenance']['Caption'] = array ( +$MenuItems['PO']['Maintenance']['Caption'] = array (_('Maintain Supplier Price Lists') ); -$MenuItems['PO']['Maintenance']['URL'] = array ( +$MenuItems['PO']['Maintenance']['URL'] = array ('/SupplierPriceList.php' ); $MenuItems['stock']['Transactions']['Caption'] = array (_('Receive Purchase Orders'), _('Bulk Inventory Transfer') . ' - ' . _('Dispatch'), Modified: trunk/sql/mysql/upgrade4.07-4.08.sql =================================================================== --- trunk/sql/mysql/upgrade4.07-4.08.sql 2012-04-03 02:56:56 UTC (rev 5214) +++ trunk/sql/mysql/upgrade4.07-4.08.sql 2012-04-03 09:50:15 UTC (rev 5215) @@ -46,3 +46,5 @@ UPDATE `www_users` SET `modulesallowed` = CONCAT(`modulesallowed`,'0,') WHERE modulesallowed LIKE '_,_,_,_,_,_,_,_,_,_,'; INSERT INTO `config` VALUES ('ShowStockidOnImages','0'); UPDATE config SET confvalue='4.08' WHERE confname='VersionNumber'; + +INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description`) VALUES ('SupplierPriceList.php', '4', 'Maintain Supplier Price Lists'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-04-03 09:50:27
|
Revision: 5215 http://web-erp.svn.sourceforge.net/web-erp/?rev=5215&view=rev Author: tim_schofield Date: 2012-04-03 09:50:15 +0000 (Tue, 03 Apr 2012) Log Message: ----------- New script for easy entry of supplier price list Modified Paths: -------------- trunk/includes/MainMenuLinksArray.php trunk/sql/mysql/upgrade4.07-4.08.sql Added Paths: ----------- trunk/SupplierPriceList.php trunk/css/aguapop/images/tick.png trunk/css/default/images/tick.png trunk/css/fresh/images/tick.png trunk/css/gel/images/tick.png trunk/css/jelly/images/tick.png trunk/css/professional/images/tick.png trunk/css/professional-rtl/images/tick.png trunk/css/silverwolf/images/tick.png Added: trunk/SupplierPriceList.php =================================================================== --- trunk/SupplierPriceList.php (rev 0) +++ trunk/SupplierPriceList.php 2012-04-03 09:50:15 UTC (rev 5215) @@ -0,0 +1,584 @@ +<?php + +include ('includes/session.inc'); + +$title = _('Supplier Purchasing Data'); + +include ('includes/header.inc'); + +if (isset($_POST['StockSearch'])) { + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<input type="hidden" value="' . $_POST['SupplierID'] . '" name="SupplierID" />'; + + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for Inventory Items'). '</p>'; + echo '<table class="selection"><tr>'; + echo '<td>' . _('In Stock Category') . ':'; + echo '<select name="StockCat">'; + if (!isset($_POST['StockCat'])) { + $_POST['StockCat'] = ''; + } + if ($_POST['StockCat'] == 'All') { + echo '<option selected="True" value="All">' . _('All').'</option>'; + } else { + echo '<option value="All">' . _('All').'</option>'; + } + $SQL = "SELECT categoryid, + categorydescription + FROM stockcategory + ORDER BY categorydescription"; + $result1 = DB_query($SQL, $db); + while ($myrow1 = DB_fetch_array($result1)) { + if ($myrow1['categoryid'] == $_POST['StockCat']) { + echo '<option selected="True" value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'].'</option>'; + } else { + echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'].'</option>'; + } + } + echo '</select></td>'; + echo '<td>' . _('Enter partial') . '<b> ' . _('Description') . '</b>:</td><td>'; + if (isset($_POST['Keywords'])) { + echo '<input type="search" name="Keywords" value="' . $_POST['Keywords'] . '" size="34" maxlength="25" />'; + } else { + echo '<input type="search" name="Keywords" size="34" maxlength="25" placeholder="Enter part of the item description" />'; + } + echo '</td></tr><tr><td></td>'; + echo '<td><font size="3"><b>' . _('OR') . ' ' . '</b></font>' . _('Enter partial') . ' <b>' . _('Stock Code') . '</b>:</td>'; + echo '<td>'; + if (isset($_POST['StockCode'])) { + echo '<input type="text" name="StockCode" value="' . $_POST['StockCode'] . '" size="15" maxlength="18" />'; + } else { + echo '<input type="text" name="StockCode" size="15" maxlength="18" />'; + } + echo '</td></tr></table><br />'; + echo '<div class="centre"><input type="submit" name="Search" value="' . _('Search Now') . '" /></div><br />'; + echo '<script type="text/javascript">defaultControl(document.forms[0].StockCode);</script>'; + echo '</form>'; + include('includes/footer.inc'); + exit; +} + +if (isset($_POST['Search']) OR isset($_POST['Go']) OR isset($_POST['Next']) OR isset($_POST['Previous'])) { + if (!isset($_POST['Go']) AND !isset($_POST['Next']) AND !isset($_POST['Previous'])) { + // if Search then set to first page + $_POST['PageOffset'] = 1; + } + if ($_POST['Keywords'] AND $_POST['StockCode']) { + prnMsg (_('Stock description keywords have been used in preference to the Stock code extract entered'), 'info'); + } + if ($_POST['Keywords']) { + //insert wildcard characters in spaces + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); + $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; + if ($_POST['StockCat'] == 'All') { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + SUM(locstock.quantity) AS qoh, + stockmaster.units, + stockmaster.mbflag, + stockmaster.discontinued, + stockmaster.decimalplaces + FROM stockmaster + LEFT JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid, + locstock + WHERE stockmaster.stockid=locstock.stockid + AND stockmaster.description " . LIKE . " '$SearchString' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units, + stockmaster.mbflag, + stockmaster.discontinued, + stockmaster.decimalplaces + ORDER BY stockmaster.stockid"; + } else { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + SUM(locstock.quantity) AS qoh, + stockmaster.units, + stockmaster.mbflag, + stockmaster.discontinued, + stockmaster.decimalplaces + FROM stockmaster, + locstock + WHERE stockmaster.stockid=locstock.stockid + AND description " . LIKE . " '$SearchString' + AND categoryid='" . $_POST['StockCat'] . "' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units, + stockmaster.mbflag, + stockmaster.discontinued, + stockmaster.decimalplaces + ORDER BY stockmaster.stockid"; + } + } elseif (isset($_POST['StockCode'])) { + $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); + if ($_POST['StockCat'] == 'All') { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.mbflag, + stockmaster.discontinued, + SUM(locstock.quantity) AS qoh, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster + INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid, + locstock + WHERE stockmaster.stockid=locstock.stockid + AND stockmaster.stockid " . LIKE . " '%" . $_POST['StockCode'] . "%' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units, + stockmaster.mbflag, + stockmaster.discontinued, + stockmaster.decimalplaces + ORDER BY stockmaster.stockid"; + } else { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.mbflag, + stockmaster.discontinued, + sum(locstock.quantity) as qoh, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster, + locstock + WHERE stockmaster.stockid=locstock.stockid + AND stockmaster.stockid " . LIKE . " '%" . $_POST['StockCode'] . "%' + AND categoryid='" . $_POST['StockCat'] . "' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units, + stockmaster.mbflag, + stockmaster.discontinued, + stockmaster.decimalplaces + ORDER BY stockmaster.stockid"; + } + } elseif (!isset($_POST['StockCode']) AND !isset($_POST['Keywords'])) { + if ($_POST['StockCat'] == 'All') { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.mbflag, + stockmaster.discontinued, + SUM(locstock.quantity) AS qoh, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster + LEFT JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid, + locstock + WHERE stockmaster.stockid=locstock.stockid + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units, + stockmaster.mbflag, + stockmaster.discontinued, + stockmaster.decimalplaces + ORDER BY stockmaster.stockid"; + } else { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.mbflag, + stockmaster.discontinued, + SUM(locstock.quantity) AS qoh, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster, + locstock + WHERE stockmaster.stockid=locstock.stockid + AND categoryid='" . $_POST['StockCat'] . "' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units, + stockmaster.mbflag, + stockmaster.discontinued, + stockmaster.decimalplaces + ORDER BY stockmaster.stockid"; + } + } + $ErrMsg = _('No stock items were returned by the SQL because'); + $DbgMsg = _('The SQL that returned an error was'); + $searchresult = DB_query($SQL, $db, $ErrMsg, $DbgMsg); + if (DB_num_rows($searchresult) == 0) { + prnMsg(_('No stock items were returned by this search please re-enter alternative criteria to try again'), 'info'); + } + unset($_POST['Search']); +} +/* end query for list of records */ +/* display list if there is more than one record */ +if (isset($searchresult) AND !isset($_POST['Select'])) { + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for Inventory Items'). '</p>'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<input type="hidden" value="' . $_POST['SupplierID'] . '" name="SupplierID" />'; + $ListCount = DB_num_rows($searchresult); + if ($ListCount > 0) { + // If the user hit the search button and there is more than one item to show + $ListPageMax = ceil($ListCount / $_SESSION['DisplayRecordsMax']); + if (isset($_POST['Next'])) { + if ($_POST['PageOffset'] < $ListPageMax) { + $_POST['PageOffset'] = $_POST['PageOffset'] + 1; + } + } + if (isset($_POST['Previous'])) { + if ($_POST['PageOffset'] > 1) { + $_POST['PageOffset'] = $_POST['PageOffset'] - 1; + } + } + if ($_POST['PageOffset'] > $ListPageMax) { + $_POST['PageOffset'] = $ListPageMax; + } + if ($ListPageMax > 1) { + echo '<div class="centre"><br /> ' . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $ListPageMax . ' ' . _('pages') . '. ' . _('Go to Page') . ': '; + echo '<select name="PageOffset">'; + $ListPage = 1; + while ($ListPage <= $ListPageMax) { + if ($ListPage == $_POST['PageOffset']) { + echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; + } else { + echo '<option value=' . $ListPage . '>' . $ListPage . '</option>'; + } + $ListPage++; + } + echo '</select> + <input type="submit" name="Go" value="' . _('Go') . '" /> + <input type="submit" name="Previous" value="' . _('Previous') . '" /> + <input type="submit" name="Next" value="' . _('Next') . '" />'; + echo '<input type="hidden" name=Keywords value="'.$_POST['Keywords'].'" />'; + echo '<input type="hidden" name=StockCat value="'.$_POST['StockCat'].'" />'; + echo '<input type="hidden" name=StockCode value="'.$_POST['StockCode'].'" />'; +// echo '<input type="hidden" name=Search value="Search" />'; + echo '<br /></div>'; + } + echo '<table class="selection">'; + echo'<tr> + <th>' . _('Code') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Units') . '</th> + </tr>'; + $j = 1; + $k = 0; //row counter to determine background colour + $RowIndex = 0; + if (DB_num_rows($searchresult) <> 0) { + DB_data_seek($searchresult, ($_POST['PageOffset'] - 1) * $_SESSION['DisplayRecordsMax']); + } + while (($myrow = DB_fetch_array($searchresult)) AND ($RowIndex <> $_SESSION['DisplayRecordsMax'])) { + if ($k == 1) { + echo '<tr class="EvenTableRows">'; + $k = 0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + + echo '<td><input type="submit" name="Select" value="' . $myrow['stockid'] . '" /></td> + <td>' . $myrow['description'] . '</td> + <td>' . $myrow['units'] . '</td> + </tr>'; + $RowIndex = $RowIndex + 1; + //end of page full new headings if + } + //end of while loop + echo '</table></form><br />'; + include('includes/footer.inc'); + exit; + } +} + +foreach ($_POST as $key=>$value) { + if (mb_substr($key,0,6)=='Update') { + $Index = mb_substr($key,6,mb_strlen($key)-6); + $StockID=$_POST['StockID'.$Index]; + $Price=$_POST['Price'.$Index]; + $SuppUOM=$_POST['SuppUOM'.$Index]; + $ConversionFactor=$_POST['ConversionFactor'.$Index]; + $SupplierDescription=$_POST['SupplierDescription'.$Index]; + $LeadTime=$_POST['LeadTime'.$Index]; + if (isset($_POST['Preferred'.$Index])) { + $Preferred=1; + $PreferredSQL="UPDATE purchdata SET preferred=0 + WHERE stockid='" . $StockID . "'"; + $PreferredResult=DB_query($PreferredSQL, $db); + } else { + $Preferred=0; + } + $EffectiveFrom=$_POST['EffectiveFrom'.$Index]; + $SupplierPartNo=$_POST['SupplierPartNo'.$Index]; + $MinOrderQty=$_POST['MinOrderQty'.$Index]; + $sql="UPDATE purchdata SET price='" . $Price . "', + suppliersuom='" . $SuppUOM . "', + conversionfactor='" . $ConversionFactor . "', + supplierdescription='" . $SupplierDescription . "', + leadtime='" . $LeadTime . "', + preferred='" . $Preferred . "', + effectivefrom='" . FormatDateForSQL($EffectiveFrom) . "', + suppliers_partno='" . $SupplierPartNo . "', + minorderqty='" . $MinOrderQty . "' + WHERE supplierno='" . $_POST['SupplierID'] . "' + AND stockid='" . $StockID . "'"; + $result=DB_query($sql, $db); + } + if (mb_substr($key,0,6)=='Insert') { + if (isset($_POST['Preferred0'])) { + $Preferred=1; + } else { + $Preferred=0; + } + $sql="INSERT INTO purchdata (stockid, + supplierno, + price, + suppliersuom, + conversionfactor, + supplierdescription, + leadtime, + preferred, + effectivefrom, + suppliers_partno, + minorderqty + ) VALUES ( + '" . $_POST['StockID0'] . "', + '" . $_POST['SupplierID'] . "', + '" . $_POST['Price0'] . "', + '" . $_POST['SuppUOM0'] . "', + '" . $_POST['ConversionFactor0'] . "', + '" . $_POST['SupplierDescription0'] . "', + '" . $_POST['LeadTime0'] . "', + '" . $Preferred . "', + '" . FormatDateForSQL($_POST['EffectiveFrom0']) . "', + '" . $_POST['SupplierPartNo0'] . "', + '" . $_POST['MinOrderQty0'] . "' + )"; + $result=DB_query($sql, $db); + } +} + +if (isset($_GET['SupplierID'])) { + $SupplierID = trim(mb_strtoupper($_GET['SupplierID'])); +} elseif (isset($_POST['SupplierID'])) { + $SupplierID = trim(mb_strtoupper($_POST['SupplierID'])); +} + +if (isset($SupplierID) AND $SupplierID != '' AND !isset($_POST['SearchSupplier'])) { /*NOT EDITING AN EXISTING BUT SUPPLIER selected OR ENTERED*/ + $sql = "SELECT suppliers.suppname, suppliers.currcode FROM suppliers WHERE supplierid='".$SupplierID."'"; + $ErrMsg = _('The supplier details for the selected supplier could not be retrieved because'); + $DbgMsg = _('The SQL that failed was'); + $SuppSelResult = DB_query($sql, $db, $ErrMsg, $DbgMsg); + if (DB_num_rows($SuppSelResult) == 1) { + $myrow = DB_fetch_array($SuppSelResult); + $SuppName = $myrow['suppname']; + $CurrCode = $myrow['currcode']; + } else { + prnMsg(_('The supplier code') . ' ' . $SupplierID . ' ' . _('is not an existing supplier in the database') . '. ' . _('You must enter an alternative supplier code or select a supplier using the search facility below'), 'error'); + unset($SupplierID); + } +} else { + if ($NoPurchasingData=0) { + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . + $title . ' ' . _('For Stock Code') . ' - ' . $StockID . '</p><br />'; + } + if (!isset($_POST['SearchSupplier'])) { + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/supplier.png" title="' . _('Search') . '" alt="" />' . _('Search for a supplier') . '</p><br />'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"> + <table cellpadding="3" class="selection"><tr>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<td>' . _('Text in the Supplier') . ' <b>' . _('NAME') . '</b>:</font></td>'; + echo '<td><input type="text" name="Keywords" size="20" maxlength="25" /></td>'; + echo '<td><font size="3"><b>' . _('OR') . '</b></font></td>'; + echo '<td>' . _('Text in Supplier') . ' <b>' . _('CODE') . '</b>:</font></td>'; + echo '<td><input type="text" name="SupplierCode" size="15" maxlength="18" /></td>'; + echo '</tr></table><br />'; + echo '<div class="centre"><input type="submit" name="SearchSupplier" value="' . _('Find Suppliers Now') . '" /></div></form>'; + include ('includes/footer.inc'); + exit; + }; +} + +if (isset($_POST['SearchSupplier'])) { + if ($_POST['Keywords'] == '' AND $_POST['SupplierCode'] == '') { + $_POST['Keywords'] = ' '; + } + if (mb_strlen($_POST['Keywords']) > 0) { + //insert wildcard characters in spaces + $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; + + $SQL = "SELECT suppliers.supplierid, + suppliers.suppname, + suppliers.currcode, + suppliers.address1, + suppliers.address2, + suppliers.address3 + FROM suppliers WHERE suppliers.suppname " . LIKE . " '".$SearchString."'"; + } elseif (mb_strlen($_POST['SupplierCode']) > 0) { + $SQL = "SELECT suppliers.supplierid, + suppliers.suppname, + suppliers.currcode, + suppliers.address1, + suppliers.address2, + suppliers.address3 + FROM suppliers + WHERE suppliers.supplierid " . LIKE . " '%" . $_POST['SupplierCode'] . "%'"; + } //one of keywords or SupplierCode was more than a zero length string + $ErrMsg = _('The suppliers matching the criteria entered could not be retrieved because'); + $DbgMsg = _('The SQL to retrieve supplier details that failed was'); + $SuppliersResult = DB_query($SQL, $db, $ErrMsg, $DbgMsg); +} //end of if search + +if (isset($SuppliersResult)) { + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/supplier.png" title="' . _('Search') . '" alt="" />' . _('Select a supplier') . '</p><br />'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"> + <table cellpadding="2" class="selection">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + $TableHeader = '<tr><th>' . _('Code') . '</th> + <th>' . _('Supplier Name') . '</th> + <th>' . _('Currency') . '</th> + <th>' . _('Address 1') . '</th> + <th>' . _('Address 2') . '</th> + <th>' . _('Address 3') . '</th> + </tr>'; + echo $TableHeader; + $k = 0; + while ($myrow = DB_fetch_array($SuppliersResult)) { + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + printf('<td><font size="1"><input type="submit" name="SupplierID" value="%s" /></font></td> + <td><font size="1">%s</font></td> + <td><font size="1">%s</font></td> + <td><font size="1">%s</font></td> + <td><font size="1">%s</font></td> + <td><font size="1">%s</font></td> + </tr>', + $myrow['supplierid'], + $myrow['suppname'], + $myrow['currcode'], + $myrow['address1'], + $myrow['address2'], + $myrow['address3'] + ); + + } + //end of while loop + echo '</table><br/></form>'; + include('includes/footer.inc'); + exit; +} +//end if results to show + +if (isset($_POST['SupplierID'])) { + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/supplier.png" title="' . _('Search') . '" alt="" />' . _('Supplier Purchasing Data') . '</p><br />'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + $SQL="SELECT purchdata.stockid, + stockmaster.description, + price, + suppliersuom, + conversionfactor, + supplierdescription, + leadtime, + preferred, + effectivefrom, + suppliers_partno, + minorderqty + FROM purchdata + INNER JOIN stockmaster + ON purchdata.stockid=stockmaster.stockid + WHERE supplierno='".$_POST['SupplierID']."'"; + + $result=DB_query($SQL, $db); + + $UOMSQL = "SELECT unitid, + unitname + FROM unitsofmeasure"; + $UOMResult = DB_query($UOMSQL, $db); + echo '<input type="hidden" value="' . $_POST['SupplierID'] . '" name="SupplierID" />'; + echo '<table class="selection">'; + echo '<tr><th colspan="8" style="text-align: left"><font color="navy" size="3">' . _('Supplier purchasing data for') . ' ' . $_POST['SupplierID'] . '</font></th>'; + echo '<th colspan="5" style="text-align: right"><font color="navy" size="2">' . _('Find new Item Code') . '</font> + <button type="submit" name="StockSearch"><img width="15px" src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" /></button></th></tr>'; + echo '<tr> + <th>' . _('StockID') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Price') . '</th> + <th>' . _('Suppliers UOM') . '</th> + <th>' . _('Conversion Factor') . '</th> + <th>' . _('Suppliers Description') . '</th> + <th>' . _('Lead Time') . '</th> + <th>' . _('Preferred') . '</th> + <th>' . _('Effective From') . '</th> + <th>' . _('Suppliers Item Code') . '</th> + <th>' . _('Min Order Qty') . '</th> + </tr>'; + + if (isset($_POST['Select'])) { + $StockSQL="SELECT description, units FROM stockmaster WHERE stockid='" . $_POST['Select'] . "'"; + $StockResult=DB_query($StockSQL, $db); + $StockRow=DB_fetch_array($StockResult); + echo '<tr bgcolor="#847F7F"> + <td><input type="hidden" value="' . $_POST['Select'] . '" name="StockID0" />' . $_POST['Select'] . '</td> + <td>' . $StockRow['description'] . '</td> + <td><input type="text" class="number" size="11" value="0.0000" name="Price0" /></td> + <td><select name="SuppUOM0">'; + while ($UOMRow=DB_fetch_array($UOMResult)) { + if ($UOMRow['unitid']==$StRowoc['units']) { + echo '<option selected="selected" value="'.$UOMRow['unitid'].'">' . $UOMRow['unitname'] . '</option>'; + } else { + echo '<option value="'.$UOMRow['unitid'].'">' . $UOMRow['unitname'] . '</option>'; + } + } + DB_data_seek($UOMResult, 0); + echo '</select></td> + <td><input type="text" class="number" size="11" value="1" name="ConversionFactor0" /></td> + <td><input type="text" size="30" maxlength="50" value="" name="SupplierDescription0" /></td> + <td><input type="text" class="number" size="11" value="1" name="LeadTime0" /></td>'; + echo '<td><input type="checkbox" name="Preferred0" /></td>'; + echo '<td><input type="text" class="date" size="11" value="' . date( $_SESSION['DefaultDateFormat']) . '" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveFrom0" /></td> + <td><input type="text" size="20" maxlength="50" value="" name="SupplierPartNo0" /></td> + <td><input type="text" class="number" size="11" value="1" name="MinOrderQty0" /></td> + <td><button type="submit" style="width:100%;text-align:left" name="Insert"><img width="15px" src="' . $rootpath . '/css/' . $theme . '/images/tick.png" /></button></td> + </tr>'; + } + + $RowCounter=1; + while ($myrow=DB_fetch_array($result)) { + echo '<tr> + <td><input type="hidden" value="' . $myrow['stockid'] . '" name="StockID'.$RowCounter.'" />' . $myrow['stockid'] . '</td> + <td>' . $myrow['description'] . '</td> + <td><input type="text" class="number" size="11" value="' . $myrow['price'] . '" name="Price'.$RowCounter.'" /></td> + <td><select name="SuppUOM'.$RowCounter.'">'; + DB_data_seek($UOMResult, 0); + while ($UOMRow=DB_fetch_array($UOMResult)) { + if ($UOMRow['unitid']==$myrow['suppliersuom']) { + echo '<option selected="selected" value="'.$UOMRow['unitid'].'">' . $UOMRow['unitname'] . '</option>'; + } else { + echo '<option value="'.$UOMRow['unitid'].'">' . $UOMRow['unitname'] . '</option>'; + } + } + echo '</select></td> + <td><input type="text" class="number" size="11" value="' . $myrow['conversionfactor'] . '" name="ConversionFactor'.$RowCounter.'" /></td> + <td><input type="text" size="30" maxlength="50" value="' . $myrow['supplierdescription'] . '" name="SupplierDescription'.$RowCounter.'" /></td> + <td><input type="text" class="number" size="11" value="' . $myrow['leadtime'] . '" name="LeadTime'.$RowCounter.'" /></td>'; + if ($myrow['preferred']==1) { + echo '<td><input type="checkbox" checked="checked" name="Preferred'.$RowCounter.'" /></td>'; + } else { + echo '<td><input type="checkbox" name="Preferred'.$RowCounter.'" /></td>'; + } + echo '<td><input type="text" class="date" size="11" value="' . ConvertSQLDate($myrow['effectivefrom']) . '" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveFrom'.$RowCounter.'" /></td> + <td><input type="text" size="20" maxlength="50" value="' . $myrow['suppliers_partno'] . '" name="SupplierPartNo'.$RowCounter.'" /></td> + <td><input type="text" class="number" size="11" value="' . $myrow['minorderqty'] . '" name="MinOrderQty'.$RowCounter.'" /></td> + <td><button type="submit" style="width:100%;text-align:left" name="Update'.$RowCounter.'"><img width="15px" src="' . $rootpath . '/css/' . $theme . '/images/tick.png" /></button></td> + </tr>'; + $RowCounter++; + } + echo '</table>'; + echo '</form>'; + include('includes/footer.inc'); + exit; +} + +?> \ No newline at end of file Added: trunk/css/aguapop/images/tick.png =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/tick.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/default/images/tick.png =================================================================== (Binary files differ) Property changes on: trunk/css/default/images/tick.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/fresh/images/tick.png =================================================================== (Binary files differ) Property changes on: trunk/css/fresh/images/tick.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/gel/images/tick.png =================================================================== (Binary files differ) Property changes on: trunk/css/gel/images/tick.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/jelly/images/tick.png =================================================================== (Binary files differ) Property changes on: trunk/css/jelly/images/tick.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/professional/images/tick.png =================================================================== (Binary files differ) Property changes on: trunk/css/professional/images/tick.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/professional-rtl/images/tick.png =================================================================== (Binary files differ) Property changes on: trunk/css/professional-rtl/images/tick.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/silverwolf/images/tick.png =================================================================== (Binary files differ) Property changes on: trunk/css/silverwolf/images/tick.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2012-04-03 02:56:56 UTC (rev 5214) +++ trunk/includes/MainMenuLinksArray.php 2012-04-03 09:50:15 UTC (rev 5215) @@ -108,7 +108,7 @@ } else { $PrintInvoicesOrCreditNotesScript = '/PrintCustTransPortrait.php'; } - + $MenuItems['AR']['Reports']['URL'] = array ('/CustWhereAlloc.php', $PrintInvoicesOrCreditNotesScript, '/PrintCustStatements.php', @@ -189,9 +189,9 @@ '/SuppPriceList.php' ); -$MenuItems['PO']['Maintenance']['Caption'] = array ( +$MenuItems['PO']['Maintenance']['Caption'] = array (_('Maintain Supplier Price Lists') ); -$MenuItems['PO']['Maintenance']['URL'] = array ( +$MenuItems['PO']['Maintenance']['URL'] = array ('/SupplierPriceList.php' ); $MenuItems['stock']['Transactions']['Caption'] = array (_('Receive Purchase Orders'), _('Bulk Inventory Transfer') . ' - ' . _('Dispatch'), Modified: trunk/sql/mysql/upgrade4.07-4.08.sql =================================================================== --- trunk/sql/mysql/upgrade4.07-4.08.sql 2012-04-03 02:56:56 UTC (rev 5214) +++ trunk/sql/mysql/upgrade4.07-4.08.sql 2012-04-03 09:50:15 UTC (rev 5215) @@ -46,3 +46,5 @@ UPDATE `www_users` SET `modulesallowed` = CONCAT(`modulesallowed`,'0,') WHERE modulesallowed LIKE '_,_,_,_,_,_,_,_,_,_,'; INSERT INTO `config` VALUES ('ShowStockidOnImages','0'); UPDATE config SET confvalue='4.08' WHERE confname='VersionNumber'; + +INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description`) VALUES ('SupplierPriceList.php', '4', 'Maintain Supplier Price Lists'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-04-03 21:57:58
|
Revision: 5217 http://web-erp.svn.sourceforge.net/web-erp/?rev=5217&view=rev Author: vvs2012 Date: 2012-04-03 21:57:50 +0000 (Tue, 03 Apr 2012) Log Message: ----------- Cleaned up Petty Cash module. Fixed several errors in SQL INSERT statements. Modified Paths: -------------- trunk/PcAssignCashToTab.php trunk/PcAuthorizeExpenses.php trunk/PcClaimExpensesFromTab.php trunk/PcExpenses.php trunk/PcExpensesTypeTab.php trunk/PcReportTab.php trunk/PcTabs.php trunk/PcTypeTabs.php trunk/doc/Change.log Modified: trunk/PcAssignCashToTab.php =================================================================== --- trunk/PcAssignCashToTab.php 2012-04-03 20:28:39 UTC (rev 5216) +++ trunk/PcAssignCashToTab.php 2012-04-03 21:57:50 UTC (rev 5217) @@ -99,12 +99,12 @@ posted, notes, receipt) - VALUES ('', + VALUES (NULL, '" . $_POST['SelectedTabs'] . "', '".FormatDateForSQL($_POST['Date'])."', 'ASSIGNCASH', '" . filter_number_format($_POST['Amount']) . "', - authorized = '0000-00-00', + '0000-00-00', '0', '" . $_POST['Notes'] . "', '" . $_POST['Receipt'] . "' @@ -127,7 +127,7 @@ } elseif ( isset($_GET['delete']) ) { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . - _('Search') . '" alt="">' . ' ' . $title. '</p>'; + _('Search') . '" alt="" />' . ' ' . $title. '</p>'; $sql="DELETE FROM pcashdetails WHERE counterindex='" . $SelectedIndex . "'"; $ErrMsg = _('The assignment of cash record could not be deleted because'); @@ -146,13 +146,9 @@ _('Search') . '" alt="" />' . ' ' . $title. '</p>'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<p><table class="selection">'; //Main table - echo '<tr><td>' . _('Petty Cash Tab To Assign Cash') . ':</td> - <td><select name="SelectedTabs">'; - - DB_free_result($result); $SQL = "SELECT tabcode FROM pctabs WHERE assigner='" . $_SESSION['UserID'] . "' @@ -160,6 +156,10 @@ $result = DB_query($SQL,$db); + echo '<br /><table class="selection">'; //Main table + + echo '<tr><td>' . _('Petty Cash Tab To Assign Cash') . ':</td> + <td><select name="SelectedTabs">'; while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectTabs']) and $myrow['tabcode']==$_POST['SelectTabs']) { echo '<option selected="selected" value="'; @@ -170,13 +170,16 @@ } echo '</select></td></tr>'; - echo '</td></tr></table>'; // close main table - echo '<p> + echo '</table>'; // close main table + DB_free_result($result); + + echo '<br /> <div class="centre"> <input type="submit" name="process" value="' . _('Accept') . '" /> <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> </div>'; - echo '</form>'; + echo '</div> + </form>'; } //end of ifs and buts! @@ -186,7 +189,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $title. '</p>'; } - echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Select another tab') . '<a/></div></p>'; + echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Select another tab') . '</a></div>'; @@ -218,14 +221,15 @@ ORDER BY date, counterindex ASC"; $result = DB_query($sql,$db); - echo '<table class="selection">'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; echo '<tr><th colspan="8">' . _('Detail Of PC Tab Movements For Last') .': '; echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; echo '<input type="text" class="number" name="Days" value="' . $Days . '" maxlength="3" size="4" /> ' . _('Days'); echo '<input type="submit" name="Go" value="' . _('Go') . '" />'; - echo '</th></tr></form>'; + echo '</th></tr>'; echo '<tr> <th>' . _('Date') . '</th> <th>' . _('Expense Code') . '</th> @@ -265,12 +269,12 @@ <td>' . ConvertSQLDate($myrow['authorized']) . '</td> <td>' . $myrow['notes'] . '</td> <td>' . $myrow['receipt'] . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedIndex=' . $myrow['counterindex'] . '&SelectedTabs=' . - $SelectedTabs . '&Days=' . $Days . '&edit=yes">' . _('Edit') . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedIndex=' . $myrow['counterindex'] . '&SelectedTabs=' . - $SelectedTabs . '&Days=' . $Days . '&delete=yes" onclick="return confirm("' . - _('Are you sure you wish to delete this code and the expense it may have set up?') . '");">' . - _('Delete') . '</td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedIndex=' . $myrow['counterindex'] . '&SelectedTabs=' . + $SelectedTabs . '&Days=' . $Days . '&edit=yes">' . _('Edit') . '</a></td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedIndex=' . $myrow['counterindex'] . '&SelectedTabs=' . + $SelectedTabs . '&Days=' . $Days . '&delete=yes" onclick="return confirm(\'' . + _('Are you sure you wish to delete this code and the expense it may have set up?') . '\');">' . + _('Delete') . '</a></td> </tr>'; }else{ echo '<td>' . ConvertSQLDate($myrow['date']) . '</td> @@ -300,7 +304,8 @@ <td>' . locale_number_format($Amount['0'],$CurrDecimalPlaces) . '</td></tr>'; echo '</table>'; - + echo '</div> + </form>'; } if (! isset($_GET['delete'])) { @@ -310,13 +315,8 @@ } echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<p><table class="selection">'; //Main table - if (isset($_GET['SelectedIndex'])) { - echo '<tr><th colspan="2"><font color=blue size="3">'._('Update Cash Assignment').'</font></th></tr>'; - } else { - echo '<tr><th colspan="2"><font color=blue size="3">'._('New Cash Assignment').'</font></th></tr>'; - } if ( isset($_GET['edit'])) { $sql = "SELECT * FROM pcashdetails @@ -342,6 +342,12 @@ $_POST['Date']=Date('d/m/Y'); } + echo '<br /><table class="selection">'; //Main table + if (isset($_GET['SelectedIndex'])) { + echo '<tr><th colspan="2"><h3>'._('Update Cash Assignment').'</h3></th></tr>'; + } else { + echo '<tr><th colspan="2"><h3>'._('New Cash Assignment').'</h3></th></tr>'; + } echo '<tr><td>' . _('Cash Assignation Date') . ':</td>'; echo '<td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="Date" size="10" maxlength="10" value="' . $_POST['Date'] . '" /></td></tr>'; @@ -372,17 +378,18 @@ <td><input type="text" name="Receipt" size="50" maxlength="49" value="' . $_POST['Receipt'] . '" /></td> </tr>'; - echo '<input type="hidden" name="CurrentAmount" value="' . $Amount['0']. '" />'; - echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; - echo '<input type="hidden" name="Days" value="' .$Days. '" />'; + echo '</table>'; // close main table - echo '</td></tr></table>'; // close main table + echo '<input type="hidden" name="CurrentAmount" value="' . $Amount['0']. '" />'; + echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; + echo '<input type="hidden" name="Days" value="' .$Days. '" />'; - echo '<p><div class="centre"> + echo '<br /><div class="centre"> <input type="submit" name="submit" value="' . _('Accept') . '" /> <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; - echo '</form>'; + echo '</div> + </form>'; } // end if user wish to delete } Modified: trunk/PcAuthorizeExpenses.php =================================================================== --- trunk/PcAuthorizeExpenses.php 2012-04-03 20:28:39 UTC (rev 5216) +++ trunk/PcAuthorizeExpenses.php 2012-04-03 21:57:50 UTC (rev 5217) @@ -48,6 +48,7 @@ if (isset($_POST['Submit']) or isset($_POST['update']) OR isset($SelectedTabs) OR isset ($_POST['GO'])) { echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if(!isset ($Days)){ @@ -57,8 +58,7 @@ 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 '<input type="submit" name="Go" value="' . _('Go') . '" /></tr></th>'; - echo '</form>'; + echo '<input type="submit" name="Go" value="' . _('Go') . '" /></th></tr>'; $sql = "SELECT pcashdetails.counterindex, pcashdetails.tabcode, @@ -95,8 +95,6 @@ </tr>'; $k=0; //row colour counter - echo'<form action="PcAuthorizeExpenses.php" method="post" name="'._('update').'">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; while ($myrow=DB_fetch_array($result)) { $CurrDecimalPlaces = $myrow['decimalplaces']; @@ -117,6 +115,7 @@ $type = 2; $AccountFrom = $myrow['glaccountassignment']; $AccountTo = $myrow['glaccountpcash']; + $TagTo = 0; }else{ $type = 1; $Amount = -$Amount; @@ -251,20 +250,20 @@ <td>' . $myrow['receipt'] . '</td>'; if (isset($_POST[$myrow['counterindex']])){ - echo'<td>'.ConvertSQLDate(Date('Y-m-d')).'</td>'; + echo'<td>'.ConvertSQLDate(Date('Y-m-d')); }else{ //compare against raw SQL format date, then convert for display. if(($myrow['authorized']!='0000-00-00')){ - echo'<td>'.ConvertSQLDate($myrow['authorized']).'</td>'; + echo'<td>'.ConvertSQLDate($myrow['authorized']); }else{ - echo '<td align=right><input type="checkbox" name="'.$myrow['counterindex'].'" /></td>'; + echo '<td align="right"><input type="checkbox" name="'.$myrow['counterindex'].'" />'; } } echo '<input type="hidden" name="SelectedIndex" value="' . $myrow['counterindex']. '" />'; echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; echo '<input type="hidden" name="Days" value="' .$Days. '" />'; - echo'</tr>'; + echo '</td></tr>'; } //end of looping @@ -285,26 +284,28 @@ // Do the postings include ('includes/GLPostings.inc'); - echo'</table><br /><div class="centre"><input type="submit" name="Submit" value="' . _('Update') . '" /></div></form>'; + echo '</table><br /><div class="centre"><input type="submit" name="Submit" value="' . _('Update') . '" /></div> + </div> + </form>'; } else { /*The option to submit was not hit so display form */ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<p><table class="selection">'; //Main table +echo '<br /><table class="selection">'; //Main table -echo '<tr><td>' . _('Authorise expenses to Petty Cash Tab') . ':</td> - <td><select name="SelectedTabs">'; - - DB_free_result($result); $SQL = "SELECT tabcode FROM pctabs WHERE authorizer='" . $_SESSION['UserID'] . "'"; $result = DB_query($SQL,$db); +echo '<tr><td>' . _('Authorise expenses to Petty Cash Tab') . ':</td> + <td><select name="SelectedTabs">'; + while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectTabs']) and $myrow['tabcode']==$_POST['SelectTabs']) { echo '<option selected="selected" value="'; @@ -316,12 +317,12 @@ } //end while loop get type of tab echo '</select></td></tr>'; + echo '</table>'; // close main table + DB_free_result($result); - echo '</td></tr></table>'; // close main table - - echo '<p><div class="centre"><input type="submit" name="Process" value="' . _('Accept') . '" /> + echo '<br /><div class="centre"><input type="submit" name="Process" value="' . _('Accept') . '" /> <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; - + echo '</div>'; echo '</form>'; } /*end of else not submit */ include('includes/footer.inc'); Modified: trunk/PcClaimExpensesFromTab.php =================================================================== --- trunk/PcClaimExpensesFromTab.php 2012-04-03 20:28:39 UTC (rev 5216) +++ trunk/PcClaimExpensesFromTab.php 2012-04-03 21:57:50 UTC (rev 5217) @@ -1,403 +1,409 @@ -<?php - -/* $Id$*/ - -include('includes/session.inc'); -$title = _('Claim Petty Cash Expenses From Tab'); -include('includes/header.inc'); - - -if (isset($_POST['SelectedTabs'])){ - $SelectedTabs = mb_strtoupper($_POST['SelectedTabs']); -} elseif (isset($_GET['SelectedTabs'])){ - $SelectedTabs = mb_strtoupper($_GET['SelectedTabs']); -} - -if (isset($_POST['SelectedIndex'])){ - $SelectedIndex = $_POST['SelectedIndex']; -} elseif (isset($_GET['SelectedIndex'])){ - $SelectedIndex = $_GET['SelectedIndex']; -} - -if (isset($_POST['Days'])){ - $Days = filter_number_format($_POST['Days']); -} elseif (isset($_GET['Days'])){ - $Days = filter_number_format($_GET['Days']); -} - -if (isset($_POST['Cancel'])) { - unset($SelectedTabs); - unset($SelectedIndex); - unset($Days); - unset($_POST['Amount']); - unset($_POST['Notes']); - unset($_POST['Receipt']); -} - - -if (isset($_POST['Process'])) { - - if ($_POST['SelectedTabs']=='') { - echo prnMsg(_('You have not selected a tab to claim the expenses on'),'error'); - unset($SelectedTabs); - } -} - -if (isset($_POST['Go'])) { - if ($Days<=0) { - prnMsg(_('The number of days must be a positive number'),'error'); - $Days=30; - } -} - -if (isset($_POST['submit'])) { -//initialise no input errors assumed initially before we test - $InputError = 0; - - /* actions to take once the user has clicked the submit button - ie the page has called itself with some user input */ - - //first off validate inputs sensible - - if ($_POST['SelectedExpense']=='') { - $InputError=1; - prnMsg(_('You have not selected an expense to claim on this tab'),'error'); - } elseif ($_POST['amount']==0) { - $InputError = 1; - prnMsg( _('The Amount must be greater than 0'),'error'); - } - - if (isset($SelectedIndex) AND $InputError !=1) { - $sql = "UPDATE pcashdetails - SET date = '".FormatDateForSQL($_POST['Date'])."', - codeexpense = '" . $_POST['SelectedExpense'] . "', - amount = '" .-filter_number_format($_POST['amount']) . "', - notes = '" . $_POST['Notes'] . "', - receipt = '" . $_POST['Receipt'] . "' - WHERE counterindex = '".$SelectedIndex."'"; - - $msg = _('The Expense Claim on Tab') . ' ' . $SelectedTabs . ' ' . _('has been updated'); - - } elseif ($InputError !=1 ) { - - // First check the type is not being duplicated - // Add new record on submit - - $sql = "INSERT INTO pcashdetails (counterindex, - tabcode, - date, - codeexpense, - amount, - authorized, - posted, - notes, - receipt) - VALUES ('','" . $_POST['SelectedTabs'] . "', - '".FormatDateForSQL($_POST['Date'])."', - '" . $_POST['SelectedExpense'] . "', - '" . -filter_number_format($_POST['amount']) . "', - '', - '', - '" . $_POST['Notes'] . "', - '" . $_POST['Receipt'] . "' - )"; - - $msg = _('The Expense Claim on Tab') . ' ' . $_POST['SelectedTabs'] . ' ' . _('has been created'); - } - - if ( $InputError !=1) { - //run the SQL from either of the above possibilites - $result = DB_query($sql,$db); - prnMsg($msg,'success'); - - unset($_POST['SelectedExpense']); - unset($_POST['amount']); - unset($_POST['Date']); - unset($_POST['Notes']); - unset($_POST['Receipt']); - } - -} elseif ( isset($_GET['delete']) ) { - - $sql="DELETE FROM pcashdetails - WHERE counterindex='".$SelectedIndex."'"; - $ErrMsg = _('Petty Cash Expense record could not be deleted because'); - $result = DB_query($sql,$db,$ErrMsg); - prnMsg(_('Petty cash Expense record') . ' ' . $SelectedTabs . ' ' . _('has been deleted') ,'success'); - - unset($_GET['delete']); - -}//end of get delete - -if (!isset($SelectedTabs)){ - - /* It could still be the first time the page has been run and a record has been selected for modification - SelectedTabs will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters - then none of the above are true and the list of sales types will be displayed with - links to delete or edit each. These will call the same page again and allow update/input - or deletion of the records*/ - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry') . '" alt="" />' . ' ' . $title . '</p>'; - - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br /><table class="selection">'; //Main table - - echo '<tr><td>' . _('Petty Cash Tabs for User ') . $_SESSION['UserID'] . ':</td> - <td><select name="SelectedTabs">'; - - DB_free_result($result); - $SQL = "SELECT tabcode - FROM pctabs - WHERE usercode='" . $_SESSION['UserID'] . "'"; - - $result = DB_query($SQL,$db); - echo '<option value="">' . _('Not Yet Selected') . '</option>'; - while ($myrow = DB_fetch_array($result)) { - if (isset($_POST['SelectTabs']) and $myrow['tabcode']==$_POST['SelectTabs']) { - echo '<option selected="selected" value="'; - } else { - echo '<option value="'; - } - echo $myrow['tabcode'] . '">' . $myrow['tabcode'] . '</option>'; - - } //end while loop - - echo '</select></td></tr>'; - echo '</td></tr></table>'; // close main table - - echo '<p><div class="centre"><input type="submit" name="Process" value="' . _('Accept') . '" /><input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; - - echo '</form>'; - -} else { // isset($SelectedTabs) - - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Petty Cash Claim Entry') . '" alt="" /> - ' . ' ' . $title . '</p>'; - - echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Select another tab') . '</a></div></p>'; - - if (! isset($_GET['edit']) OR isset ($_POST['GO'])){ - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br /><table class="selection">'; - echo '<tr><th colspan="8"><font color="navy" size="3">' . _('Petty Cash Tab') . ' ' .$SelectedTabs. '</font></th></tr>'; - echo '<tr><th colspan="8">' . _('Detail Of Movements For Last ') .': '; - - - if(!isset ($Days)){ - $Days=30; - } - - /* Retrieve decimal places to display */ - $SqlDecimalPlaces="SELECT decimalplaces - FROM currencies,pctabs - WHERE currencies.currabrev = pctabs.currency - AND tabcode='" . $SelectedTabs . "'"; - $result = DB_query($SqlDecimalPlaces,$db); - $myrow=DB_fetch_array($result); - $CurrDecimalPlaces = $myrow['decimalplaces']; - - echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; - echo '<input type="text" class="number" name="Days" value="' . $Days . '" maxlength="3" size="4" /> ' ._('Days'); - echo '<input type="submit" name="Go" value="' . _('Go') . '" />'; - echo '</th></div></form>'; - - if (isset($_POST['Cancel'])) { - unset($_POST['SelectedExpense']); - unset($_POST['amount']); - unset($_POST['Date']); - unset($_POST['Notes']); - unset($_POST['Receipt']); - } - - $sql = "SELECT * FROM pcashdetails - WHERE tabcode='".$SelectedTabs."' - AND date >=DATE_SUB(CURDATE(), INTERVAL ".$Days." DAY) - ORDER BY date, counterindex ASC"; - - $result = DB_query($sql,$db); - - echo '<tr> - <th>' . _('Date Of Expense') . '</th> - <th>' . _('Expense Description') . '</th> - <th>' . _('Amount') . '</th> - <th>' . _('Authorized') . '</th> - <th>' . _('Notes') . '</th> - <th>' . _('Receipt') . '</th> - </tr>'; - - $k=0; //row colour counter - - while ($myrow = DB_fetch_row($result)) { - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k=1; - } - - $sqldes="SELECT description - FROM pcexpenses - WHERE codeexpense='". $myrow['3'] . "'"; - - $ResultDes = DB_query($sqldes,$db); - $Description=DB_fetch_array($ResultDes); - - if (!isset($Description['0'])){ - $Description['0']='ASSIGNCASH'; - } - if ($myrow['5']=='0000-00-00') { - $AuthorisedDate=_('Unauthorised'); - } else { - $AuthorisedDate=ConvertSQLDate($myrow['5']); - } - if (($myrow['5'] == '0000-00-00') and ($Description['0'] != 'ASSIGNCASH')){ - // only movements NOT authorized can be modified or deleted - printf('<td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%sSelectedIndex=%s&SelectedTabs=' . $SelectedTabs . '&Days=' . $Days . '&edit=yes">' . _('Edit') . '</td> - <td><a href="%sSelectedIndex=%s&SelectedTabs=' . $SelectedTabs . '&Days=' . $Days . '&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this code and the expenses it may have set up?') . '");\'>' . _('Delete') . '</td> - </tr>', - ConvertSQLDate($myrow['2']), - $Description['0'], - locale_number_format($myrow['4'],$CurrDecimalPlaces), - $AuthorisedDate, - $myrow['7'], - $myrow['8'], - htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['0'], - htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['0']); - } else { - printf('<td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - </tr>', - ConvertSQLDate($myrow['2']), - $Description['0'], - locale_number_format($myrow['4'],$CurrDecimalPlaces), - $AuthorisedDate, - $myrow['7'], - $myrow['8']); - - } - - } - //END WHILE LIST LOOP - - $sqlamount="SELECT sum(amount) - FROM pcashdetails - WHERE tabcode='".$SelectedTabs."'"; - - $ResultAmount = DB_query($sqlamount,$db); - $Amount=DB_fetch_array($ResultAmount); - - if (!isset($Amount['0'])) { - $Amount['0']=0; - } - - echo '<tr><td colspan="2" style="text-align:right" >' . _('Current balance') . ':</td> - <td class="number">'.locale_number_format($Amount['0'],$CurrDecimalPlaces) . '</td></tr>'; - - - echo '</table>'; - } - - if (! isset($_GET['delete'])) { - - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - - echo '<br /><table class="selection">'; //Main table - - - if ( isset($_GET['edit'])) { - $sql = "SELECT * - FROM pcashdetails - WHERE counterindex='".$SelectedIndex."'"; - - $result = DB_query($sql, $db); - $myrow = DB_fetch_array($result); - - $_POST['Date'] = ConvertSQLDate($myrow['date']); - $_POST['SelectedExpense'] = $myrow['codeexpense']; - $_POST['Amount'] = -$myrow['amount']; - $_POST['Notes'] = $myrow['notes']; - $_POST['Receipt'] = $myrow['receipt']; - - echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; - echo '<input type="hidden" name="SelectedIndex" value="' . $SelectedIndex. '" />'; - echo '<input type="hidden" name="Days" value="' .$Days. '" />'; - - }//end of Get Edit - - if (!isset($_POST['Date'])) { - $_POST['Date']=Date($_SESSION['DefaultDateFormat']); - } - - echo '<tr><td>' . _('Date Of Expense') . ':</td> - <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="Date" size="10" maxlength="10" value="' . $_POST['Date']. '" /></td></tr>'; - echo '<tr><td>' . _('Code Of Expense') . ':</td><td><select name="SelectedExpense">'; - - DB_free_result($result); - - $SQL = "SELECT pcexpenses.codeexpense, - pcexpenses.description - FROM pctabexpenses, pcexpenses, pctabs - WHERE pctabexpenses.codeexpense = pcexpenses.codeexpense - AND pctabexpenses.typetabcode = pctabs.typetabcode - AND pctabs.tabcode = '".$SelectedTabs."' - ORDER BY pcexpenses.codeexpense ASC"; - - $result = DB_query($SQL,$db); - echo '<option value="">' . _('Not Yet Selected') . '</option>'; - while ($myrow = DB_fetch_array($result)) { - if (isset($_POST['SelectedExpense']) and $myrow['codeexpense']==$_POST['SelectedExpense']) { - echo '<option selected="selected" value="'; - } else { - echo '<option value="'; - } - echo $myrow['codeexpense'] . '">' . $myrow['codeexpense'] . ' - ' . $myrow['description'] . '</option>'; - - } //end while loop - - echo '</select></td></tr>'; - - if (!isset($_POST['Amount'])) { - $_POST['Amount']=0; - } - - echo '<tr><td>' . _('Amount') . ':</td> - <td><input type="text" class="number" name="amount" size="12" maxlength="11" value="' . $_POST['Amount'] . '" /></td></tr>'; - - if (!isset($_POST['Notes'])) { - $_POST['Notes']=''; - } - - echo '<tr><td>' . _('Notes') . ':</td> - <td><input type="text" name="Notes" size="50" maxlength="49" value="' . $_POST['Notes'] . '" /></td></tr>'; - - if (!isset($_POST['Receipt'])) { - $_POST['Receipt']=''; - } - - echo '<tr><td>' . _('Receipt') . ':</td> - <td><input type="text" name="Receipt" size="50" maxlength="49" value="' . $_POST['Receipt'] . '" /></td></tr>'; - echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; - echo '<input type="hidden" name="Days" value="' .$Days. '" />'; - - 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'); +<?php + +/* $Id$*/ + +include('includes/session.inc'); +$title = _('Claim Petty Cash Expenses From Tab'); +include('includes/header.inc'); + + +if (isset($_POST['SelectedTabs'])){ + $SelectedTabs = mb_strtoupper($_POST['SelectedTabs']); +} elseif (isset($_GET['SelectedTabs'])){ + $SelectedTabs = mb_strtoupper($_GET['SelectedTabs']); +} + +if (isset($_POST['SelectedIndex'])){ + $SelectedIndex = $_POST['SelectedIndex']; +} elseif (isset($_GET['SelectedIndex'])){ + $SelectedIndex = $_GET['SelectedIndex']; +} + +if (isset($_POST['Days'])){ + $Days = filter_number_format($_POST['Days']); +} elseif (isset($_GET['Days'])){ + $Days = filter_number_format($_GET['Days']); +} + +if (isset($_POST['Cancel'])) { + unset($SelectedTabs); + unset($SelectedIndex); + unset($Days); + unset($_POST['Amount']); + unset($_POST['Notes']); + unset($_POST['Receipt']); +} + + +if (isset($_POST['Process'])) { + + if ($_POST['SelectedTabs']=='') { + echo prnMsg(_('You have not selected a tab to claim the expenses on'),'error'); + unset($SelectedTabs); + } +} + +if (isset($_POST['Go'])) { + if ($Days<=0) { + prnMsg(_('The number of days must be a positive number'),'error'); + $Days=30; + } +} + +if (isset($_POST['submit'])) { +//initialise no input errors assumed initially before we test + $InputError = 0; + + /* actions to take once the user has clicked the submit button + ie the page has called itself with some user input */ + + //first off validate inputs sensible + + if ($_POST['SelectedExpense']=='') { + $InputError=1; + prnMsg(_('You have not selected an expense to claim on this tab'),'error'); + } elseif ($_POST['amount']==0) { + $InputError = 1; + prnMsg( _('The Amount must be greater than 0'),'error'); + } + + if (isset($SelectedIndex) AND $InputError !=1) { + $sql = "UPDATE pcashdetails + SET date = '".FormatDateForSQL($_POST['Date'])."', + codeexpense = '" . $_POST['SelectedExpense'] . "', + amount = '" .-filter_number_format($_POST['amount']) . "', + notes = '" . $_POST['Notes'] . "', + receipt = '" . $_POST['Receipt'] . "' + WHERE counterindex = '".$SelectedIndex."'"; + + $msg = _('The Expense Claim on Tab') . ' ' . $SelectedTabs . ' ' . _('has been updated'); + + } elseif ($InputError !=1 ) { + + // First check the type is not being duplicated + // Add new record on submit + + $sql = "INSERT INTO pcashdetails (counterindex, + tabcode, + date, + codeexpense, + amount, + authorized, + posted, + notes, + receipt) + VALUES (NULL, + '" . $_POST['SelectedTabs'] . "', + '".FormatDateForSQL($_POST['Date'])."', + '" . $_POST['SelectedExpense'] . "', + '" . -filter_number_format($_POST['amount']) . "', + 0, + 0, + '" . $_POST['Notes'] . "', + '" . $_POST['Receipt'] . "' + )"; + + $msg = _('The Expense Claim on Tab') . ' ' . $_POST['SelectedTabs'] . ' ' . _('has been created'); + } + + if ( $InputError !=1) { + //run the SQL from either of the above possibilites + $result = DB_query($sql,$db); + prnMsg($msg,'success'); + + unset($_POST['SelectedExpense']); + unset($_POST['amount']); + unset($_POST['Date']); + unset($_POST['Notes']); + unset($_POST['Receipt']); + } + +} elseif ( isset($_GET['delete']) ) { + + $sql="DELETE FROM pcashdetails + WHERE counterindex='".$SelectedIndex."'"; + $ErrMsg = _('Petty Cash Expense record could not be deleted because'); + $result = DB_query($sql,$db,$ErrMsg); + prnMsg(_('Petty cash Expense record') . ' ' . $SelectedTabs . ' ' . _('has been deleted') ,'success'); + + unset($_GET['delete']); + +}//end of get delete + +if (!isset($SelectedTabs)){ + + /* It could still be the first time the page has been run and a record has been selected for modification - SelectedTabs will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters + then none of the above are true and the list of sales types will be displayed with + links to delete or edit each. These will call the same page again and allow update/input + or deletion of the records*/ + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry') . '" alt="" />' . ' ' . $title . '</p>'; + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<br /><table class="selection">'; //Main table + + echo '<tr><td>' . _('Petty Cash Tabs for User ') . $_SESSION['UserID'] . ':</td> + <td><select name="SelectedTabs">'; + + $SQL = "SELECT tabcode + FROM pctabs + WHERE usercode='" . $_SESSION['UserID'] . "'"; + + $result = DB_query($SQL,$db); + echo '<option value="">' . _('Not Yet Selected') . '</option>'; + while ($myrow = DB_fetch_array($result)) { + if (isset($_POST['SelectTabs']) and $myrow['tabcode']==$_POST['SelectTabs']) { + echo '<option selected="selected" value="'; + } else { + echo '<option value="'; + } + echo $myrow['tabcode'] . '">' . $myrow['tabcode'] . '</option>'; + + } //end while loop + + echo '</select></td></tr>'; + echo '</table>'; // close main table + DB_free_result($result); + + echo '<br /><div class="centre"><input type="submit" name="Process" value="' . _('Accept') . '" /><input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; + echo '</div>'; + echo '</form>'; + +} else { // isset($SelectedTabs) + + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Petty Cash Claim Entry') . '" alt="" /> + ' . ' ' . $title . '</p>'; + + echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Select another tab') . '</a></div>'; + + if (! isset($_GET['edit']) OR isset ($_POST['GO'])){ + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<br /><table class="selection">'; + echo '<tr><th colspan="8"><h3>' . _('Petty Cash Tab') . ' ' .$SelectedTabs. '</h3></th></tr>'; + echo '<tr><th colspan="8">' . _('Detail Of Movements For Last ') .': '; + + + if(!isset ($Days)){ + $Days=30; + } + + /* Retrieve decimal places to display */ + $SqlDecimalPlaces="SELECT decimalplaces + FROM currencies,pctabs + WHERE currencies.currabrev = pctabs.currency + AND tabcode='" . $SelectedTabs . "'"; + $result = DB_query($SqlDecimalPlaces,$db); + $myrow=DB_fetch_array($result); + $CurrDecimalPlaces = $myrow['decimalplaces']; + + echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; + echo '<input type="text" class="number" name="Days" value="' . $Days . '" maxlength="3" size="4" /> ' ._('Days'); + echo '<input type="submit" name="Go" value="' . _('Go') . '" />'; + echo '</th></tr>'; + + if (isset($_POST['Cancel'])) { + unset($_POST['SelectedExpense']); + unset($_POST['amount']); + unset($_POST['Date']); + unset($_POST['Notes']); + unset($_POST['Receipt']); + } + + $sql = "SELECT * FROM pcashdetails + WHERE tabcode='".$SelectedTabs."' + AND date >=DATE_SUB(CURDATE(), INTERVAL ".$Days." DAY) + ORDER BY date, counterindex ASC"; + + $result = DB_query($sql,$db); + + echo '<tr> + <th>' . _('Date Of Expense') . '</th> + <th>' . _('Expense Description') . '</th> + <th>' . _('Amount') . '</th> + <th>' . _('Authorized') . '</th> + <th>' . _('Notes') . '</th> + <th>' . _('Receipt') . '</th> + </tr>'; + + $k=0; //row colour counter + + while ($myrow = DB_fetch_row($result)) { + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k=1; + } + + $sqldes="SELECT description + FROM pcexpenses + WHERE codeexpense='". $myrow['3'] . "'"; + + $ResultDes = DB_query($sqldes,$db); + $Description=DB_fetch_array($ResultDes); + + if (!isset($Description['0'])){ + $Description['0']='ASSIGNCASH'; + } + if ($myrow['5']=='0000-00-00') { + $AuthorisedDate=_('Unauthorised'); + } else { + $AuthorisedDate=ConvertSQLDate($myrow['5']); + } + if (($myrow['5'] == '0000-00-00') and ($Description['0'] != 'ASSIGNCASH')){ + // only movements NOT authorized can be modified or deleted + printf('<td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td><a href="%sSelectedIndex=%s&SelectedTabs=' . $SelectedTabs . '&Days=' . $Days . '&edit=yes">' . _('Edit') . '</a></td> + <td><a href="%sSelectedIndex=%s&SelectedTabs=' . $SelectedTabs . '&Days=' . $Days . '&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this code and the expenses it may have set up?') . '");\'>' . _('Delete') . '</a></td> + </tr>', + ConvertSQLDate($myrow['2']), + $Description['0'], + locale_number_format($myrow['4'],$CurrDecimalPlaces), + $AuthorisedDate, + $myrow['7'], + $myrow['8'], + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['0'], + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['0']); + } else { + printf('<td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + </tr>', + ConvertSQLDate($myrow['2']), + $Description['0'], + locale_number_format($myrow['4'],$CurrDecimalPlaces), + $AuthorisedDate, + $myrow['7'], + $myrow['8']); + + } + + } + //END WHILE LIST LOOP + + $sqlamount="SELECT sum(amount) + FROM pcashdetails + WHERE tabcode='".$SelectedTabs."'"; + + $ResultAmount = DB_query($sqlamount,$db); + $Amount=DB_fetch_array($ResultAmount); + + if (!isset($Amount['0'])) { + $Amount['0']=0; + } + + echo '<tr><td colspan="2" style="text-align:right" >' . _('Current balance') . ':</td> + <td class="number">'.locale_number_format($Amount['0'],$CurrDecimalPlaces) . '</td></tr>'; + + + echo '</table>'; + echo '</div> + </form>'; + } + + if (! isset($_GET['delete'])) { + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + + if ( isset($_GET['edit'])) { + $sql = "SELECT * + FROM pcashdetails + WHERE counterindex='".$SelectedIndex."'"; + + $result = DB_query($sql, $db); + $myrow = DB_fetch_array($result); + + $_POST['Date'] = ConvertSQLDate($myrow['date']); + $_POST['SelectedExpense'] = $myrow['codeexpense']; + $_POST['Amount'] = -$myrow['amount']; + $_POST['Notes'] = $myrow['notes']; + $_POST['Receipt'] = $myrow['receipt']; + + echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; + echo '<input type="hidden" name="SelectedIndex" value="' . $SelectedIndex. '" />'; + echo '<input type="hidden" name="Days" value="' .$Days. '" />'; + + }//end of Get Edit + + if (!isset($_POST['Date'])) { + $_POST['Date']=Date($_SESSION['DefaultDateFormat']); + } + + echo '<br /><table class="selection">'; //Main table + echo '<tr><td>' . _('Date Of Expense') . ':</td> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="Date" size="10" maxlength="10" value="' . $_POST['Date']. '" /></td></tr>'; + echo '<tr><td>' . _('Code Of Expense') . ':</td><td><select name="SelectedExpense">'; + + DB_free_result($result); + + $SQL = "SELECT pcexpenses.codeexpense, + pcexpenses.description + FROM pctabexpenses, pcexpenses, pctabs + WHERE pctabexpenses.codeexpense = pcexpenses.codeexpense + AND pctabexpenses.typetabcode = pctabs.typetabcode + AND pctabs.tabcode = '".$SelectedTabs."' + ORDER BY pcexpenses.codeexpense ASC"; + + $result = DB_query($SQL,$db); + echo '<option value="">' . _('Not Yet Selected') . '</option>'; + while ($myrow = DB_fetch_array($result)) { + if (isset($_POST['SelectedExpense']) and $myrow['codeexpense']==$_POST['SelectedExpense']) { + echo '<option selected="selected" value="'; + } else { + echo '<option value="'; + } + echo $myrow['codeexpense'] . '">' . $myrow['codeexpense'] . ' - ' . $myrow['description'] . '</option>'; + + } //end while loop + + echo '</select></td></tr>'; + + if (!isset($_POST['Amount'])) { + $_POST['Amount']=0; + } + + echo '<tr><td>' . _('Amount') . ':</td> + <td><input type="text" class="number" name="amount" size="12" maxlength="11" value="' . $_POST['Amount'] . '" /></td></tr>'; + + if (!isset($_POST['Notes'])) { + $_POST['Notes']=''; + } + + echo '<tr><td>' . _('Notes') . ':</td> + <td><input type="text" name="Notes" size="50" maxlength="49" value="' . $_POST['Notes'] . '" /></td></tr>'; + + if (!isset($_POST['Receipt'])) { + $_POST['Receipt']=''; + } + + echo '<tr><td>' . _('Receipt') . ':</td> + <td><input type="text" name="Receipt" size="50" maxlength="49" value="' . $_POST['Receipt'] . '" /></td></tr>'; + echo '</table>'; // close main table + + echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; + echo '<input type="hidden" name="Days" value="' .$Days. '" />'; + + echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Accept') . '" /><input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; + echo '</div> + </form>'; + + } // end if user wish to delete + +} + +include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/PcExpenses.php =================================================================== --- trunk/PcExpenses.php 2012-04-03 20:28:39 UTC (rev 5216) +++ trunk/PcExpenses.php 2012-04-03 21:57:50 UTC (rev 5217) @@ -1,356 +1,358 @@ -<?php - -/* $Id$*/ - -include('includes/session.inc'); -$title = _('Maintenance Of Petty Cash Of Expenses'); -include('includes/header.inc'); - -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry') - . '" alt="" />' . ' ' . $title . '</p>'; - -if (isset($_POST['SelectedExpense'])){ - $SelectedExpense = mb_strtoupper($_POST['SelectedExpense']); -} elseif (isset($_GET['SelectedExpense'])){ - $SelectedExpense = mb_strtoupper($_GET['SelectedExpense']); -} - -if (isset($_POST['Cancel'])) { - unset($SelectedExpense); - unset($_POST['CodeExpense']); - unset($_POST['Description']); - unset($_POST['GLAccount']); - unset($_POST['Tag']); -} - - -if (isset($Errors)) { - unset($Errors); -} - -$Errors = array(); - -if (isset($_POST['submit'])) { - - //initialise no input errors assumed initially before we test - $InputError = 0; - - /* actions to take once the user has clicked the submit button - ie the page has called itself with some user input */ - - //first off validate inputs sensible - $i=1; - - if ($_POST['CodeExpense']=='' OR $_POST['CodeExpense']==' ' OR $_POST['CodeExpense']==' ') { - $InputError = 1; - prnMsg(_('The Expense type code cannot be an empty string or spaces'),'error'); - echo '<br />'; - $Errors[$i] = 'CodeExpense'; - $i++; - } elseif (mb_strlen($_POST['CodeExpense']) >20) { - $InputError = 1; - prnMsg(_('The Expense code must be twenty characters or less long'),'error'); - echo '<br />'; - $Errors[$i] = 'CodeExpense'; - $i++; - }elseif (ContainsIllegalCharacters($_POST['CodeExpense'])){ - $InputError = 1; - prnMsg(_('The Expense code cannot contain any of the following characters " \' - &'),'error'); - echo '<br />'; - $Errors[$i] = 'CodeExpense'; - $i++; - } elseif (ContainsIllegalCharacters($_POST['Description'])){ - $InputError = 1; - prnMsg(_('The Expense description cannot contain any of the following characters " \' - &'),'error'); - echo '<br />'; - $Errors[$i] = 'Description'; - $i++; - } elseif (mb_strlen($_POST['Description']) >50) { - $InputError = 1; - prnMsg(_('The tab code must be Fifty characters or less long'),'error'); - echo '<br />'; - echo '<br />'; - $Errors[$i] = 'Description'; - $i++; - } elseif (mb_strlen($_POST['Description'])==0) { - $InputError = 1; - echo prnMsg(_('The tab code description must be entered'),'error'); - echo '<br />'; - $Errors[$i] = 'Description'; - $i++; - } elseif ($_POST['GLAccount']=='') { - $InputError = 1; - echo prnMsg(_('A general ledger code must be selected for this expense'),'error'); - echo '<br />'; - } - - if (isset($SelectedExpense) AND $InputError !=1) { - - $sql = "UPDATE pcexpenses - SET description = '" . $_POST['Description'] . "', - glaccount = '" . $_POST['GLAccount'] . "', - tag = '" . $_POST['Tag'] . "' - WHERE codeexpense = '" . $SelectedExpense . "'"; - - $msg = _('The Expenses type') . ' ' . $SelectedExpense . ' ' . _('has been updated'); - } elseif ( $InputError !=1 ) { - - // First check the type is not being duplicated - - $checkSql = "SELECT count(*) - FROM pcexpenses - WHERE codeexpense = '" . $_POST['CodeExpense'] . "'"; - - $checkresult = DB_query($checkSql,$db); - $checkrow = DB_fetch_row($checkresult); - - if ( $checkrow[0] > 0 ) { - $InputError = 1; - prnMsg( _('The Expense type ') . $_POST['CodeExpense'] . _(' already exists.'),'error'); - } else { - - // Add new record on submit - - $sql = "INSERT INTO pcexpenses - (codeexpense, - description, - glaccount, - tag) - VALUES ('" . $_POST['CodeExpense'] . "', - '" . $_POST['Description'] . "', - '" . $_POST['GLAccount'] . "', - '" . $_POST['Tag'] . "')"; - - $msg = _('Expense ') . ' ' . $_POST['CodeExpense'] . ' ' . _('has been created'); - $checkSql = "SELECT count(codeexpense) - FROM pcexpenses"; - $result = DB_query($checkSql, $db); - $row = DB_fetch_row($result); - - } - } - - if ( $InputError !=1) { - //run the SQL from either of the above possibilites - $result = DB_query($sql,$db); - prnMsg($msg,'success'); - echo '<br />'; - unset($SelectedExpense); - unset($_POST['CodeExpense']); - unset($_POST['Description']); - unset($_POST['GLAccount']); - unset($_POST['Tag']); - } - -} elseif ( isset($_GET['delete']) ) { - - // PREVENT DELETES IF DEPENDENT RECORDS IN 'PcTabExpenses' - - $sql= "SELECT COUNT(*) - FROM pctabexpenses - WHERE codeexpense='" . $SelectedExpense . "'"; - - $ErrMsg = _('The number of type of tabs using this expense code could not be retrieved'); - $result = DB_query($sql,$db,$ErrMsg); - - $myrow = DB_fetch_row($result); - if ($myrow[0]>0) { - prnMsg(_('Cannot delete this petty cash expense because it is used in some tab types') . '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('tab types using this expense code'),'error'); - - } else { - - $sql="DELETE FROM pcexpenses - WHERE codeexpense='" . $SelectedExpense . "'"; - $ErrMsg = _('The expense type record could not be deleted because'); - $result = DB_query($sql,$db,$ErrMsg); - prnMsg(_('Expense type') . ' ' . $SelectedExpense . ' ' . _('has been deleted') ,'success'); - echo '<br />'; - unset ($SelectedExpense); - unset($_GET['delete']); - } //end if tab type used in transactions -} - -if (!isset($SelectedExpense)){ - -/* It could still be the second time the page has been run and a record has been selected for modification - SelectedExpense will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters -then none of the above are true and the list of sales types will be displayed with -links to delete or edit each. These will call the same page again and allow update/input -or deletion of the records*/ - - $sql = "SELECT * - FROM pcexpenses"; - $result = DB_query($sql,$db); - - echo '<table class="selection">'; - echo '<tr> - <th>' . _('Code Of Expense') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Account Code') . '</th> - <th>' . _('Account Description') . '</th> - <th>' . _('Tag') . '</th> - </tr>'; - - $k=0; //row colour counter - - while ($myrow = DB_fetch_row($result)) { - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k=1; - } - - $sqldesc="SELECT accountname - FROM chartmaster - WHERE accountcode='". $myrow[2] . "'"; - - $ResultDes = DB_query($sqldesc,$db); - $Description=DB_fetch_array($ResultDes); - - $SqlDescTag="SELECT tagdescription - FROM tags - WHERE tagref='". $myrow[3] . "'"; - - $ResultDesTag = DB_query($SqlDescTag,$db); - $DescriptionTag=DB_fetch_array($ResultDesTag); - - printf('<td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%sSelectedExpense=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedExpense=%s&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this expense code and all the details it may have set up?') . '\');">' . _('Delete') . '</td> - </tr>', - $myrow[0], - $myrow[1], - $myrow[2], - $Description['accountname'], - $DescriptionTag['tagdescription'], - htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow[0], - htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow[0]); - } - //END WHILE LIST LOOP - echo '</table>'; -} - -//end of ifs and buts! -if (isset($SelectedExpense)) { - - echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Show All Petty Cash Expenses Defined') . '</a></div><p>'; -} -if (! isset($_GET['delete'])) { - - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<p><table class="selection">'; //Main table - - // The user wish to EDIT an existing type - if ( isset($SelectedExpense) AND $SelectedExpense!='' ){ - - $sql = "SELECT codeexpense, - description, - glaccount, - tag - FROM pcexpenses - WHERE codeexpense='" . $SelectedExpense . "'"; - - $result = DB_query($sql, $db); - $myrow = DB_fetch_array($result); - - $_POST['CodeExpense'] = $myrow['codeexpense']; - $_POST['Description'] = $myrow['description']; - $_POST['GLAccount'] = $myrow['glaccount']; - $_POST['Tag'] = $myrow['tag']; - - echo '<input type="hidden" name="SelectedExpense" value="' . $SelectedExpense . '" />'; - echo '<input type="hidden" name="CodeExpense" value="' . $_POST['CodeExpense']. '" />'; - // We dont allow the user to change an existing type code - echo '<table class="selection"> - <tr> - <td>' . _('Code Of Expense') . ':</td> - <td>' . $_POST['CodeExpense'] . '</td> - </tr>'; - - } else { - - // This is a new type so the user may volunteer a type code - - echo '<table class="selection"> - <tr> - <td>' . _('Code Of Expense') . ':</td> - <td><input type="text"' . (in_array('CodeExpense',$Errors) ? 'class="inputerror"' : '' ) .' name="CodeExpense" /></td> - </tr>'; - - } - - if (!isset($_POST['Description'])) { - $_POST['Description']=''; - } - echo '<tr> - <td>' . _('Description') . ':</td> - <td><input type="text" ' . (in_array('Description',$Errors) ? 'class="inputerror"' : '' ) . ' name="Description" size="50" maxlength="49" value="' . $_POST['Description'] . '" /></td> - </tr>'; - - echo '<tr> - <td>' . _('Account Code') . ':</td> - <td><select name="GLAccount">'; - - DB_free_result($result); - $SQL = "SELECT accountcode, - accountname - FROM chartmaster - ORDER BY accountcode"; - $result = DB_query($SQL,$db); - echo '<option value="">' . _('Not Yet Selected') . '</option>'; - while ($myrow = DB_fetch_array($result)) { - if (isset($_POST['GLAccount']) and $myrow['accountcode']==$_POST['GLAccount']) { - echo '<option selected="selected" value="'; - } else { - echo '<option value="'; - } - echo $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; - - } //end while loop - - echo '</select></td></tr>'; - - //Select the tag - DB_free_result($result); - echo '<tr> - <td>' . _('Tag') . ':</td> - <td><select name="Tag">'; - - $SQL = "SELECT tagref, - tagdescription - FROM tags - ORDER BY tagref"; - - $result=DB_query($SQL,$db); - echo '<option value="0">0 - ' . _('None') . '</option>'; - while ($myrow=DB_fetch_array($result)){ - if (isset($_POST['Tag']) and $_POST['Tag']==$myrow['tagref']){ - echo '<option selected="selected" value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription'].'</option>'; - } else { - echo '<option value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; - } - } - echo '</select></td>'; - // End select tag - - echo '</td></tr></table>'; // close main table - - echo '<br /> - <div class="centre"> - <input type="submit" name="submit" value="' . _('Accept') . '" /> - <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> - </div>'; - - echo '</form>'; - -} // end if user wish to delete - - -include('includes/footer.inc'); +<?php + +/* $Id$*/ + +include('includes/session.inc'); +$title = _('Maintenance Of Petty Cash Of Expenses'); +include('includes/header.inc'); + +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry') + . '" alt="" />' . ' ' . $title . '</p>'; + +if (isset($_POST['SelectedExpense'])){ + $SelectedExpense = mb_strtoupper($_POST['SelectedExpense']); +} elseif (isset($_GET['SelectedExpense'])){ + $SelectedExpense = mb_strtoupper($_GET['SelectedExpense']); +} + +if (isset($_POST['Cancel'])) { + unset($SelectedExpense); + unset($_POST['CodeExpense']); + unset($_POST['Description']); + unset($_POST['GLAccount']); + unset($_POST['Tag']); +} + + +if (isset($Errors)) { + unset($Errors); +} + +$Errors = array(); + +if (isset($_POST['submit'])) { + + //initialise no input errors assumed initially before we test + $InputError = 0; + + /* actions to take once the user has clicked the submit button + ie the page has called itself with some user input */ + + //first off validate inputs sensible + $i=1; + + if ($_POST['CodeExpense']=='' OR $_POST['CodeExpense']==' ' OR $_POST['CodeExpense']==' ') { + $InputError = 1; + prnMsg(_('The Expense type code cannot be an empty string or spaces'),'error'); + echo '<br />'; + $Errors[$i] = 'CodeExpense'; + $i++; + } elseif (mb_strlen($_POST['CodeExpense']) >20) { + $InputError = 1; + prnMsg(_('The Expense code must be twenty characters or less long'),'error'); + echo '<br />'; + $Errors[$i] = 'CodeExpense'; + $i++; + }elseif (ContainsIllegalCharacters($_POST['CodeExpense'])){ + $InputError = 1; + prnMsg(_('The Expense code cannot contain any of the following characters " \' - &'),'error'); + echo '<br />'; + $Errors[$i] = 'CodeExpense'; + $i++; + } elseif (ContainsIllegalCharacters($_POST['Description'])){ + $InputError = 1; + prnMsg(_('The Expense description cannot contain any of the following characters " \' - &'),'error'); + echo '<br />'; + $Errors[$i] = 'Description'; + $i++; + } elseif (mb_strlen($_POST['Description']) >50) { + $InputError = 1; + prnMsg(_('The tab code must be Fifty characters or less long'),'error'); + echo '<br />'; + echo '<br />'; + $Errors[$i] = 'Description'; + $i++; + } elseif (mb_strlen($_POST['Description'])==0) { + $InputError = 1; + echo prnMsg(_('The tab code description must be entered'),'error'); + echo '<br />'; + $Errors[$i] = 'Description'; + $i++; + } elseif ($_POST['GLAccount']=='') { + $InputError = 1; + echo prnMsg(_('A general ledger code must be selected for this expense'),'error'); + echo '<br />'; + } + + if (isset($SelectedExpense) AND $InputError !=1) { + + $sql = "UPDATE pcexpenses + SET description = '" . $_POST['Description'] . "', + glaccount = '" . $_POST['GLAccount'] . "', + tag = '" . $_POST['Tag'] . "' + WHERE codeexpense = '" . $SelectedExpense . "'"; + + $msg = _('The Expenses type') . ' ' . $SelectedExpense . ' ' . _('has been updated'); + } elseif ( $InputError !=1 ) { + + // First check the type is not being duplicated + + $checkSql = "SELECT count(*) + FROM pcexpenses + WHERE codeexpense = '" . $_POST['CodeExpense'] . "'"; + + $checkresult = DB_query($checkSql,$db); + $checkrow = DB_fetch_row($checkresult); + + if ( $checkrow[0] > 0 ) { + $InputError = 1; + prnMsg( _('The Expense type ') . $_POST['CodeExpense'] . _(' already exists.'),'error'); + } else { + + // Add new record on submit + + $sql = "INSERT INTO pcexpenses + (codeexpense, + description, + glaccount, + tag) + VALUES ('" . $_POST['CodeExpense'] . "', + '" . $_POST['Description'] . "', + '" . $_POST['GLAccount'] . "', + '" . $_POST['Tag'] . "')"; + + $msg = _('Expense ') . ' ' . $_POST['CodeExpense'] . ' ' . _('has been created'); + $checkSql = "SELECT count(codeexpense) + FROM pcexpenses"; + $result = DB_query($checkSql, $db); + $row = DB_fetch_row($result); + + } + } + + if ( $InputError !=1) { + //run the SQL from either of the above possibilites + $result = DB_query($sql,$db); + prnMsg($msg,'success'); + echo '<br />'; + unset($SelectedExpense); + unset($_POST['CodeExpense']); + unset($_POST['Description']); + unset($_POST['GLAccount']); + unset($_POST['Tag']); + } + +} elseif ( isset($_GET['delete']) ) { + + // PREVENT DELETES IF DEPENDENT RECORDS IN 'PcTabExpenses' + + $sql= "SELECT COUNT(*) + FROM pctabexpenses + WHERE codeexpense='" . $SelectedExpense . "'"; + + $ErrMsg = _('The number of type of tabs using this expense code could not be retrieved'); + $result = DB_query($sql,$db,$ErrMsg); + + $myrow = DB_fetch_row($result); + if ($myrow[0]>0) { + prnMsg(_('Cannot delete this petty cash expense because it is used in some tab types') . '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('tab types using this expense code'),'error'); + + } else { + + $sql="DELETE FROM pcexpenses + WHERE codeexpense='" . $SelectedExpense . "'"; + $ErrMsg = _('The expense type record could not be deleted because'); + $result = DB_query($sql,$db,$ErrMsg); + prnMsg(_('Expense type') . ' ' . $SelectedExpense . ' ' . _('has been deleted') ,'success'); + echo '<br />'; + unset ($SelectedExpense); + unset($_GET['delete']); + } //end if tab type used in transactions +} + +if (!isset($SelectedExpense)){ + +/* It could still be the second time the page has been run and a record has been selected for modification - SelectedExpense will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters +then none of the above are true and the list of sales types will be displayed with +links to delete or edit each. These will call the same page again and allow update/input +or deletion of the records*/ + + $sql = "SELECT * + FROM pcexpenses"; + $result = DB_query($sql,$db); + + echo '<table class="selection">'; + echo '<tr> + <th>' . _('Code Of Expense') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Account Code') . '</th> + <th>' . _('Account Description') . '</th> + <th>' . _('Tag') . '</th> + </tr>'; + + $k=0; //row colour counter + + while ($myrow = DB_fetch_row($result)) { + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k=1; + } + + $sqldesc="SELECT accountname + FROM chartmaster + WHERE accountcode='". $myrow[2] . "'"; + + $ResultDes = DB_query($sqldesc,$db); + $Description=DB_fetch_array($ResultDes); + + $SqlDescTag="SELECT tagdescription + FROM tags + WHERE tagref='". $myrow[3] . "'"; + + $ResultDesTag = DB_query($SqlDescTag,$db); + $DescriptionTag=DB_fetch_array($ResultDesTag); + + printf('<td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td>%s</td> + <td>%s</td> + <td><a href="%sSelectedExpense=%s">' . _('Edit') . '</a></td> + <td><a href="%sSelectedExpense=%s&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this expense code and all the details it may have set up?') . '\');">' . _('Delete') . '</a></td> + </tr>', + $myrow[0], + $myrow[1], + $myrow[2], + $Description['accountname'], + $DescriptionTag['tagdescription'], + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow[0], + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow[0]); + } + //END WHILE LIST LOOP + echo '</table>'; +} + +//end of ifs and buts! +if (isset($SelectedExpense)) { + + echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Show All Petty Cash Expenses Defined') . '</a></div>'; +} +if (! isset($_GET['delete'])) { + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<br />'; //Main table + + // The user wish to EDIT an existing type + if ( isset($SelectedExpense) AND $SelectedExpense!='' ){ + + $sql = "SELECT codeexpense, + description, + glaccount, + tag + FROM pcexpenses + WHERE codeexpense='" . $SelectedExpense . "'"; + + $result = DB_query($sql, $db); + $myrow = DB_fetch_array($result); + + $_POST['CodeExpense'] = $myrow['codeexpense']; + $... [truncated message content] |
From: <vv...@us...> - 2012-04-03 21:57:58
|
Revision: 5217 http://web-erp.svn.sourceforge.net/web-erp/?rev=5217&view=rev Author: vvs2012 Date: 2012-04-03 21:57:50 +0000 (Tue, 03 Apr 2012) Log Message: ----------- Cleaned up Petty Cash module. Fixed several errors in SQL INSERT statements. Modified Paths: -------------- trunk/PcAssignCashToTab.php trunk/PcAuthorizeExpenses.php trunk/PcClaimExpensesFromTab.php trunk/PcExpenses.php trunk/PcExpensesTypeTab.php trunk/PcReportTab.php trunk/PcTabs.php trunk/PcTypeTabs.php trunk/doc/Change.log Modified: trunk/PcAssignCashToTab.php =================================================================== --- trunk/PcAssignCashToTab.php 2012-04-03 20:28:39 UTC (rev 5216) +++ trunk/PcAssignCashToTab.php 2012-04-03 21:57:50 UTC (rev 5217) @@ -99,12 +99,12 @@ posted, notes, receipt) - VALUES ('', + VALUES (NULL, '" . $_POST['SelectedTabs'] . "', '".FormatDateForSQL($_POST['Date'])."', 'ASSIGNCASH', '" . filter_number_format($_POST['Amount']) . "', - authorized = '0000-00-00', + '0000-00-00', '0', '" . $_POST['Notes'] . "', '" . $_POST['Receipt'] . "' @@ -127,7 +127,7 @@ } elseif ( isset($_GET['delete']) ) { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . - _('Search') . '" alt="">' . ' ' . $title. '</p>'; + _('Search') . '" alt="" />' . ' ' . $title. '</p>'; $sql="DELETE FROM pcashdetails WHERE counterindex='" . $SelectedIndex . "'"; $ErrMsg = _('The assignment of cash record could not be deleted because'); @@ -146,13 +146,9 @@ _('Search') . '" alt="" />' . ' ' . $title. '</p>'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<p><table class="selection">'; //Main table - echo '<tr><td>' . _('Petty Cash Tab To Assign Cash') . ':</td> - <td><select name="SelectedTabs">'; - - DB_free_result($result); $SQL = "SELECT tabcode FROM pctabs WHERE assigner='" . $_SESSION['UserID'] . "' @@ -160,6 +156,10 @@ $result = DB_query($SQL,$db); + echo '<br /><table class="selection">'; //Main table + + echo '<tr><td>' . _('Petty Cash Tab To Assign Cash') . ':</td> + <td><select name="SelectedTabs">'; while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectTabs']) and $myrow['tabcode']==$_POST['SelectTabs']) { echo '<option selected="selected" value="'; @@ -170,13 +170,16 @@ } echo '</select></td></tr>'; - echo '</td></tr></table>'; // close main table - echo '<p> + echo '</table>'; // close main table + DB_free_result($result); + + echo '<br /> <div class="centre"> <input type="submit" name="process" value="' . _('Accept') . '" /> <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> </div>'; - echo '</form>'; + echo '</div> + </form>'; } //end of ifs and buts! @@ -186,7 +189,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $title. '</p>'; } - echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Select another tab') . '<a/></div></p>'; + echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Select another tab') . '</a></div>'; @@ -218,14 +221,15 @@ ORDER BY date, counterindex ASC"; $result = DB_query($sql,$db); - echo '<table class="selection">'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; echo '<tr><th colspan="8">' . _('Detail Of PC Tab Movements For Last') .': '; echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; echo '<input type="text" class="number" name="Days" value="' . $Days . '" maxlength="3" size="4" /> ' . _('Days'); echo '<input type="submit" name="Go" value="' . _('Go') . '" />'; - echo '</th></tr></form>'; + echo '</th></tr>'; echo '<tr> <th>' . _('Date') . '</th> <th>' . _('Expense Code') . '</th> @@ -265,12 +269,12 @@ <td>' . ConvertSQLDate($myrow['authorized']) . '</td> <td>' . $myrow['notes'] . '</td> <td>' . $myrow['receipt'] . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedIndex=' . $myrow['counterindex'] . '&SelectedTabs=' . - $SelectedTabs . '&Days=' . $Days . '&edit=yes">' . _('Edit') . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedIndex=' . $myrow['counterindex'] . '&SelectedTabs=' . - $SelectedTabs . '&Days=' . $Days . '&delete=yes" onclick="return confirm("' . - _('Are you sure you wish to delete this code and the expense it may have set up?') . '");">' . - _('Delete') . '</td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedIndex=' . $myrow['counterindex'] . '&SelectedTabs=' . + $SelectedTabs . '&Days=' . $Days . '&edit=yes">' . _('Edit') . '</a></td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedIndex=' . $myrow['counterindex'] . '&SelectedTabs=' . + $SelectedTabs . '&Days=' . $Days . '&delete=yes" onclick="return confirm(\'' . + _('Are you sure you wish to delete this code and the expense it may have set up?') . '\');">' . + _('Delete') . '</a></td> </tr>'; }else{ echo '<td>' . ConvertSQLDate($myrow['date']) . '</td> @@ -300,7 +304,8 @@ <td>' . locale_number_format($Amount['0'],$CurrDecimalPlaces) . '</td></tr>'; echo '</table>'; - + echo '</div> + </form>'; } if (! isset($_GET['delete'])) { @@ -310,13 +315,8 @@ } echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<p><table class="selection">'; //Main table - if (isset($_GET['SelectedIndex'])) { - echo '<tr><th colspan="2"><font color=blue size="3">'._('Update Cash Assignment').'</font></th></tr>'; - } else { - echo '<tr><th colspan="2"><font color=blue size="3">'._('New Cash Assignment').'</font></th></tr>'; - } if ( isset($_GET['edit'])) { $sql = "SELECT * FROM pcashdetails @@ -342,6 +342,12 @@ $_POST['Date']=Date('d/m/Y'); } + echo '<br /><table class="selection">'; //Main table + if (isset($_GET['SelectedIndex'])) { + echo '<tr><th colspan="2"><h3>'._('Update Cash Assignment').'</h3></th></tr>'; + } else { + echo '<tr><th colspan="2"><h3>'._('New Cash Assignment').'</h3></th></tr>'; + } echo '<tr><td>' . _('Cash Assignation Date') . ':</td>'; echo '<td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="Date" size="10" maxlength="10" value="' . $_POST['Date'] . '" /></td></tr>'; @@ -372,17 +378,18 @@ <td><input type="text" name="Receipt" size="50" maxlength="49" value="' . $_POST['Receipt'] . '" /></td> </tr>'; - echo '<input type="hidden" name="CurrentAmount" value="' . $Amount['0']. '" />'; - echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; - echo '<input type="hidden" name="Days" value="' .$Days. '" />'; + echo '</table>'; // close main table - echo '</td></tr></table>'; // close main table + echo '<input type="hidden" name="CurrentAmount" value="' . $Amount['0']. '" />'; + echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; + echo '<input type="hidden" name="Days" value="' .$Days. '" />'; - echo '<p><div class="centre"> + echo '<br /><div class="centre"> <input type="submit" name="submit" value="' . _('Accept') . '" /> <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; - echo '</form>'; + echo '</div> + </form>'; } // end if user wish to delete } Modified: trunk/PcAuthorizeExpenses.php =================================================================== --- trunk/PcAuthorizeExpenses.php 2012-04-03 20:28:39 UTC (rev 5216) +++ trunk/PcAuthorizeExpenses.php 2012-04-03 21:57:50 UTC (rev 5217) @@ -48,6 +48,7 @@ if (isset($_POST['Submit']) or isset($_POST['update']) OR isset($SelectedTabs) OR isset ($_POST['GO'])) { echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if(!isset ($Days)){ @@ -57,8 +58,7 @@ 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 '<input type="submit" name="Go" value="' . _('Go') . '" /></tr></th>'; - echo '</form>'; + echo '<input type="submit" name="Go" value="' . _('Go') . '" /></th></tr>'; $sql = "SELECT pcashdetails.counterindex, pcashdetails.tabcode, @@ -95,8 +95,6 @@ </tr>'; $k=0; //row colour counter - echo'<form action="PcAuthorizeExpenses.php" method="post" name="'._('update').'">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; while ($myrow=DB_fetch_array($result)) { $CurrDecimalPlaces = $myrow['decimalplaces']; @@ -117,6 +115,7 @@ $type = 2; $AccountFrom = $myrow['glaccountassignment']; $AccountTo = $myrow['glaccountpcash']; + $TagTo = 0; }else{ $type = 1; $Amount = -$Amount; @@ -251,20 +250,20 @@ <td>' . $myrow['receipt'] . '</td>'; if (isset($_POST[$myrow['counterindex']])){ - echo'<td>'.ConvertSQLDate(Date('Y-m-d')).'</td>'; + echo'<td>'.ConvertSQLDate(Date('Y-m-d')); }else{ //compare against raw SQL format date, then convert for display. if(($myrow['authorized']!='0000-00-00')){ - echo'<td>'.ConvertSQLDate($myrow['authorized']).'</td>'; + echo'<td>'.ConvertSQLDate($myrow['authorized']); }else{ - echo '<td align=right><input type="checkbox" name="'.$myrow['counterindex'].'" /></td>'; + echo '<td align="right"><input type="checkbox" name="'.$myrow['counterindex'].'" />'; } } echo '<input type="hidden" name="SelectedIndex" value="' . $myrow['counterindex']. '" />'; echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; echo '<input type="hidden" name="Days" value="' .$Days. '" />'; - echo'</tr>'; + echo '</td></tr>'; } //end of looping @@ -285,26 +284,28 @@ // Do the postings include ('includes/GLPostings.inc'); - echo'</table><br /><div class="centre"><input type="submit" name="Submit" value="' . _('Update') . '" /></div></form>'; + echo '</table><br /><div class="centre"><input type="submit" name="Submit" value="' . _('Update') . '" /></div> + </div> + </form>'; } else { /*The option to submit was not hit so display form */ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<p><table class="selection">'; //Main table +echo '<br /><table class="selection">'; //Main table -echo '<tr><td>' . _('Authorise expenses to Petty Cash Tab') . ':</td> - <td><select name="SelectedTabs">'; - - DB_free_result($result); $SQL = "SELECT tabcode FROM pctabs WHERE authorizer='" . $_SESSION['UserID'] . "'"; $result = DB_query($SQL,$db); +echo '<tr><td>' . _('Authorise expenses to Petty Cash Tab') . ':</td> + <td><select name="SelectedTabs">'; + while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectTabs']) and $myrow['tabcode']==$_POST['SelectTabs']) { echo '<option selected="selected" value="'; @@ -316,12 +317,12 @@ } //end while loop get type of tab echo '</select></td></tr>'; + echo '</table>'; // close main table + DB_free_result($result); - echo '</td></tr></table>'; // close main table - - echo '<p><div class="centre"><input type="submit" name="Process" value="' . _('Accept') . '" /> + echo '<br /><div class="centre"><input type="submit" name="Process" value="' . _('Accept') . '" /> <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; - + echo '</div>'; echo '</form>'; } /*end of else not submit */ include('includes/footer.inc'); Modified: trunk/PcClaimExpensesFromTab.php =================================================================== --- trunk/PcClaimExpensesFromTab.php 2012-04-03 20:28:39 UTC (rev 5216) +++ trunk/PcClaimExpensesFromTab.php 2012-04-03 21:57:50 UTC (rev 5217) @@ -1,403 +1,409 @@ -<?php - -/* $Id$*/ - -include('includes/session.inc'); -$title = _('Claim Petty Cash Expenses From Tab'); -include('includes/header.inc'); - - -if (isset($_POST['SelectedTabs'])){ - $SelectedTabs = mb_strtoupper($_POST['SelectedTabs']); -} elseif (isset($_GET['SelectedTabs'])){ - $SelectedTabs = mb_strtoupper($_GET['SelectedTabs']); -} - -if (isset($_POST['SelectedIndex'])){ - $SelectedIndex = $_POST['SelectedIndex']; -} elseif (isset($_GET['SelectedIndex'])){ - $SelectedIndex = $_GET['SelectedIndex']; -} - -if (isset($_POST['Days'])){ - $Days = filter_number_format($_POST['Days']); -} elseif (isset($_GET['Days'])){ - $Days = filter_number_format($_GET['Days']); -} - -if (isset($_POST['Cancel'])) { - unset($SelectedTabs); - unset($SelectedIndex); - unset($Days); - unset($_POST['Amount']); - unset($_POST['Notes']); - unset($_POST['Receipt']); -} - - -if (isset($_POST['Process'])) { - - if ($_POST['SelectedTabs']=='') { - echo prnMsg(_('You have not selected a tab to claim the expenses on'),'error'); - unset($SelectedTabs); - } -} - -if (isset($_POST['Go'])) { - if ($Days<=0) { - prnMsg(_('The number of days must be a positive number'),'error'); - $Days=30; - } -} - -if (isset($_POST['submit'])) { -//initialise no input errors assumed initially before we test - $InputError = 0; - - /* actions to take once the user has clicked the submit button - ie the page has called itself with some user input */ - - //first off validate inputs sensible - - if ($_POST['SelectedExpense']=='') { - $InputError=1; - prnMsg(_('You have not selected an expense to claim on this tab'),'error'); - } elseif ($_POST['amount']==0) { - $InputError = 1; - prnMsg( _('The Amount must be greater than 0'),'error'); - } - - if (isset($SelectedIndex) AND $InputError !=1) { - $sql = "UPDATE pcashdetails - SET date = '".FormatDateForSQL($_POST['Date'])."', - codeexpense = '" . $_POST['SelectedExpense'] . "', - amount = '" .-filter_number_format($_POST['amount']) . "', - notes = '" . $_POST['Notes'] . "', - receipt = '" . $_POST['Receipt'] . "' - WHERE counterindex = '".$SelectedIndex."'"; - - $msg = _('The Expense Claim on Tab') . ' ' . $SelectedTabs . ' ' . _('has been updated'); - - } elseif ($InputError !=1 ) { - - // First check the type is not being duplicated - // Add new record on submit - - $sql = "INSERT INTO pcashdetails (counterindex, - tabcode, - date, - codeexpense, - amount, - authorized, - posted, - notes, - receipt) - VALUES ('','" . $_POST['SelectedTabs'] . "', - '".FormatDateForSQL($_POST['Date'])."', - '" . $_POST['SelectedExpense'] . "', - '" . -filter_number_format($_POST['amount']) . "', - '', - '', - '" . $_POST['Notes'] . "', - '" . $_POST['Receipt'] . "' - )"; - - $msg = _('The Expense Claim on Tab') . ' ' . $_POST['SelectedTabs'] . ' ' . _('has been created'); - } - - if ( $InputError !=1) { - //run the SQL from either of the above possibilites - $result = DB_query($sql,$db); - prnMsg($msg,'success'); - - unset($_POST['SelectedExpense']); - unset($_POST['amount']); - unset($_POST['Date']); - unset($_POST['Notes']); - unset($_POST['Receipt']); - } - -} elseif ( isset($_GET['delete']) ) { - - $sql="DELETE FROM pcashdetails - WHERE counterindex='".$SelectedIndex."'"; - $ErrMsg = _('Petty Cash Expense record could not be deleted because'); - $result = DB_query($sql,$db,$ErrMsg); - prnMsg(_('Petty cash Expense record') . ' ' . $SelectedTabs . ' ' . _('has been deleted') ,'success'); - - unset($_GET['delete']); - -}//end of get delete - -if (!isset($SelectedTabs)){ - - /* It could still be the first time the page has been run and a record has been selected for modification - SelectedTabs will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters - then none of the above are true and the list of sales types will be displayed with - links to delete or edit each. These will call the same page again and allow update/input - or deletion of the records*/ - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry') . '" alt="" />' . ' ' . $title . '</p>'; - - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br /><table class="selection">'; //Main table - - echo '<tr><td>' . _('Petty Cash Tabs for User ') . $_SESSION['UserID'] . ':</td> - <td><select name="SelectedTabs">'; - - DB_free_result($result); - $SQL = "SELECT tabcode - FROM pctabs - WHERE usercode='" . $_SESSION['UserID'] . "'"; - - $result = DB_query($SQL,$db); - echo '<option value="">' . _('Not Yet Selected') . '</option>'; - while ($myrow = DB_fetch_array($result)) { - if (isset($_POST['SelectTabs']) and $myrow['tabcode']==$_POST['SelectTabs']) { - echo '<option selected="selected" value="'; - } else { - echo '<option value="'; - } - echo $myrow['tabcode'] . '">' . $myrow['tabcode'] . '</option>'; - - } //end while loop - - echo '</select></td></tr>'; - echo '</td></tr></table>'; // close main table - - echo '<p><div class="centre"><input type="submit" name="Process" value="' . _('Accept') . '" /><input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; - - echo '</form>'; - -} else { // isset($SelectedTabs) - - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Petty Cash Claim Entry') . '" alt="" /> - ' . ' ' . $title . '</p>'; - - echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Select another tab') . '</a></div></p>'; - - if (! isset($_GET['edit']) OR isset ($_POST['GO'])){ - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br /><table class="selection">'; - echo '<tr><th colspan="8"><font color="navy" size="3">' . _('Petty Cash Tab') . ' ' .$SelectedTabs. '</font></th></tr>'; - echo '<tr><th colspan="8">' . _('Detail Of Movements For Last ') .': '; - - - if(!isset ($Days)){ - $Days=30; - } - - /* Retrieve decimal places to display */ - $SqlDecimalPlaces="SELECT decimalplaces - FROM currencies,pctabs - WHERE currencies.currabrev = pctabs.currency - AND tabcode='" . $SelectedTabs . "'"; - $result = DB_query($SqlDecimalPlaces,$db); - $myrow=DB_fetch_array($result); - $CurrDecimalPlaces = $myrow['decimalplaces']; - - echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; - echo '<input type="text" class="number" name="Days" value="' . $Days . '" maxlength="3" size="4" /> ' ._('Days'); - echo '<input type="submit" name="Go" value="' . _('Go') . '" />'; - echo '</th></div></form>'; - - if (isset($_POST['Cancel'])) { - unset($_POST['SelectedExpense']); - unset($_POST['amount']); - unset($_POST['Date']); - unset($_POST['Notes']); - unset($_POST['Receipt']); - } - - $sql = "SELECT * FROM pcashdetails - WHERE tabcode='".$SelectedTabs."' - AND date >=DATE_SUB(CURDATE(), INTERVAL ".$Days." DAY) - ORDER BY date, counterindex ASC"; - - $result = DB_query($sql,$db); - - echo '<tr> - <th>' . _('Date Of Expense') . '</th> - <th>' . _('Expense Description') . '</th> - <th>' . _('Amount') . '</th> - <th>' . _('Authorized') . '</th> - <th>' . _('Notes') . '</th> - <th>' . _('Receipt') . '</th> - </tr>'; - - $k=0; //row colour counter - - while ($myrow = DB_fetch_row($result)) { - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k=1; - } - - $sqldes="SELECT description - FROM pcexpenses - WHERE codeexpense='". $myrow['3'] . "'"; - - $ResultDes = DB_query($sqldes,$db); - $Description=DB_fetch_array($ResultDes); - - if (!isset($Description['0'])){ - $Description['0']='ASSIGNCASH'; - } - if ($myrow['5']=='0000-00-00') { - $AuthorisedDate=_('Unauthorised'); - } else { - $AuthorisedDate=ConvertSQLDate($myrow['5']); - } - if (($myrow['5'] == '0000-00-00') and ($Description['0'] != 'ASSIGNCASH')){ - // only movements NOT authorized can be modified or deleted - printf('<td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%sSelectedIndex=%s&SelectedTabs=' . $SelectedTabs . '&Days=' . $Days . '&edit=yes">' . _('Edit') . '</td> - <td><a href="%sSelectedIndex=%s&SelectedTabs=' . $SelectedTabs . '&Days=' . $Days . '&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this code and the expenses it may have set up?') . '");\'>' . _('Delete') . '</td> - </tr>', - ConvertSQLDate($myrow['2']), - $Description['0'], - locale_number_format($myrow['4'],$CurrDecimalPlaces), - $AuthorisedDate, - $myrow['7'], - $myrow['8'], - htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['0'], - htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['0']); - } else { - printf('<td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - </tr>', - ConvertSQLDate($myrow['2']), - $Description['0'], - locale_number_format($myrow['4'],$CurrDecimalPlaces), - $AuthorisedDate, - $myrow['7'], - $myrow['8']); - - } - - } - //END WHILE LIST LOOP - - $sqlamount="SELECT sum(amount) - FROM pcashdetails - WHERE tabcode='".$SelectedTabs."'"; - - $ResultAmount = DB_query($sqlamount,$db); - $Amount=DB_fetch_array($ResultAmount); - - if (!isset($Amount['0'])) { - $Amount['0']=0; - } - - echo '<tr><td colspan="2" style="text-align:right" >' . _('Current balance') . ':</td> - <td class="number">'.locale_number_format($Amount['0'],$CurrDecimalPlaces) . '</td></tr>'; - - - echo '</table>'; - } - - if (! isset($_GET['delete'])) { - - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - - echo '<br /><table class="selection">'; //Main table - - - if ( isset($_GET['edit'])) { - $sql = "SELECT * - FROM pcashdetails - WHERE counterindex='".$SelectedIndex."'"; - - $result = DB_query($sql, $db); - $myrow = DB_fetch_array($result); - - $_POST['Date'] = ConvertSQLDate($myrow['date']); - $_POST['SelectedExpense'] = $myrow['codeexpense']; - $_POST['Amount'] = -$myrow['amount']; - $_POST['Notes'] = $myrow['notes']; - $_POST['Receipt'] = $myrow['receipt']; - - echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; - echo '<input type="hidden" name="SelectedIndex" value="' . $SelectedIndex. '" />'; - echo '<input type="hidden" name="Days" value="' .$Days. '" />'; - - }//end of Get Edit - - if (!isset($_POST['Date'])) { - $_POST['Date']=Date($_SESSION['DefaultDateFormat']); - } - - echo '<tr><td>' . _('Date Of Expense') . ':</td> - <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="Date" size="10" maxlength="10" value="' . $_POST['Date']. '" /></td></tr>'; - echo '<tr><td>' . _('Code Of Expense') . ':</td><td><select name="SelectedExpense">'; - - DB_free_result($result); - - $SQL = "SELECT pcexpenses.codeexpense, - pcexpenses.description - FROM pctabexpenses, pcexpenses, pctabs - WHERE pctabexpenses.codeexpense = pcexpenses.codeexpense - AND pctabexpenses.typetabcode = pctabs.typetabcode - AND pctabs.tabcode = '".$SelectedTabs."' - ORDER BY pcexpenses.codeexpense ASC"; - - $result = DB_query($SQL,$db); - echo '<option value="">' . _('Not Yet Selected') . '</option>'; - while ($myrow = DB_fetch_array($result)) { - if (isset($_POST['SelectedExpense']) and $myrow['codeexpense']==$_POST['SelectedExpense']) { - echo '<option selected="selected" value="'; - } else { - echo '<option value="'; - } - echo $myrow['codeexpense'] . '">' . $myrow['codeexpense'] . ' - ' . $myrow['description'] . '</option>'; - - } //end while loop - - echo '</select></td></tr>'; - - if (!isset($_POST['Amount'])) { - $_POST['Amount']=0; - } - - echo '<tr><td>' . _('Amount') . ':</td> - <td><input type="text" class="number" name="amount" size="12" maxlength="11" value="' . $_POST['Amount'] . '" /></td></tr>'; - - if (!isset($_POST['Notes'])) { - $_POST['Notes']=''; - } - - echo '<tr><td>' . _('Notes') . ':</td> - <td><input type="text" name="Notes" size="50" maxlength="49" value="' . $_POST['Notes'] . '" /></td></tr>'; - - if (!isset($_POST['Receipt'])) { - $_POST['Receipt']=''; - } - - echo '<tr><td>' . _('Receipt') . ':</td> - <td><input type="text" name="Receipt" size="50" maxlength="49" value="' . $_POST['Receipt'] . '" /></td></tr>'; - echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; - echo '<input type="hidden" name="Days" value="' .$Days. '" />'; - - 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'); +<?php + +/* $Id$*/ + +include('includes/session.inc'); +$title = _('Claim Petty Cash Expenses From Tab'); +include('includes/header.inc'); + + +if (isset($_POST['SelectedTabs'])){ + $SelectedTabs = mb_strtoupper($_POST['SelectedTabs']); +} elseif (isset($_GET['SelectedTabs'])){ + $SelectedTabs = mb_strtoupper($_GET['SelectedTabs']); +} + +if (isset($_POST['SelectedIndex'])){ + $SelectedIndex = $_POST['SelectedIndex']; +} elseif (isset($_GET['SelectedIndex'])){ + $SelectedIndex = $_GET['SelectedIndex']; +} + +if (isset($_POST['Days'])){ + $Days = filter_number_format($_POST['Days']); +} elseif (isset($_GET['Days'])){ + $Days = filter_number_format($_GET['Days']); +} + +if (isset($_POST['Cancel'])) { + unset($SelectedTabs); + unset($SelectedIndex); + unset($Days); + unset($_POST['Amount']); + unset($_POST['Notes']); + unset($_POST['Receipt']); +} + + +if (isset($_POST['Process'])) { + + if ($_POST['SelectedTabs']=='') { + echo prnMsg(_('You have not selected a tab to claim the expenses on'),'error'); + unset($SelectedTabs); + } +} + +if (isset($_POST['Go'])) { + if ($Days<=0) { + prnMsg(_('The number of days must be a positive number'),'error'); + $Days=30; + } +} + +if (isset($_POST['submit'])) { +//initialise no input errors assumed initially before we test + $InputError = 0; + + /* actions to take once the user has clicked the submit button + ie the page has called itself with some user input */ + + //first off validate inputs sensible + + if ($_POST['SelectedExpense']=='') { + $InputError=1; + prnMsg(_('You have not selected an expense to claim on this tab'),'error'); + } elseif ($_POST['amount']==0) { + $InputError = 1; + prnMsg( _('The Amount must be greater than 0'),'error'); + } + + if (isset($SelectedIndex) AND $InputError !=1) { + $sql = "UPDATE pcashdetails + SET date = '".FormatDateForSQL($_POST['Date'])."', + codeexpense = '" . $_POST['SelectedExpense'] . "', + amount = '" .-filter_number_format($_POST['amount']) . "', + notes = '" . $_POST['Notes'] . "', + receipt = '" . $_POST['Receipt'] . "' + WHERE counterindex = '".$SelectedIndex."'"; + + $msg = _('The Expense Claim on Tab') . ' ' . $SelectedTabs . ' ' . _('has been updated'); + + } elseif ($InputError !=1 ) { + + // First check the type is not being duplicated + // Add new record on submit + + $sql = "INSERT INTO pcashdetails (counterindex, + tabcode, + date, + codeexpense, + amount, + authorized, + posted, + notes, + receipt) + VALUES (NULL, + '" . $_POST['SelectedTabs'] . "', + '".FormatDateForSQL($_POST['Date'])."', + '" . $_POST['SelectedExpense'] . "', + '" . -filter_number_format($_POST['amount']) . "', + 0, + 0, + '" . $_POST['Notes'] . "', + '" . $_POST['Receipt'] . "' + )"; + + $msg = _('The Expense Claim on Tab') . ' ' . $_POST['SelectedTabs'] . ' ' . _('has been created'); + } + + if ( $InputError !=1) { + //run the SQL from either of the above possibilites + $result = DB_query($sql,$db); + prnMsg($msg,'success'); + + unset($_POST['SelectedExpense']); + unset($_POST['amount']); + unset($_POST['Date']); + unset($_POST['Notes']); + unset($_POST['Receipt']); + } + +} elseif ( isset($_GET['delete']) ) { + + $sql="DELETE FROM pcashdetails + WHERE counterindex='".$SelectedIndex."'"; + $ErrMsg = _('Petty Cash Expense record could not be deleted because'); + $result = DB_query($sql,$db,$ErrMsg); + prnMsg(_('Petty cash Expense record') . ' ' . $SelectedTabs . ' ' . _('has been deleted') ,'success'); + + unset($_GET['delete']); + +}//end of get delete + +if (!isset($SelectedTabs)){ + + /* It could still be the first time the page has been run and a record has been selected for modification - SelectedTabs will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters + then none of the above are true and the list of sales types will be displayed with + links to delete or edit each. These will call the same page again and allow update/input + or deletion of the records*/ + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry') . '" alt="" />' . ' ' . $title . '</p>'; + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<br /><table class="selection">'; //Main table + + echo '<tr><td>' . _('Petty Cash Tabs for User ') . $_SESSION['UserID'] . ':</td> + <td><select name="SelectedTabs">'; + + $SQL = "SELECT tabcode + FROM pctabs + WHERE usercode='" . $_SESSION['UserID'] . "'"; + + $result = DB_query($SQL,$db); + echo '<option value="">' . _('Not Yet Selected') . '</option>'; + while ($myrow = DB_fetch_array($result)) { + if (isset($_POST['SelectTabs']) and $myrow['tabcode']==$_POST['SelectTabs']) { + echo '<option selected="selected" value="'; + } else { + echo '<option value="'; + } + echo $myrow['tabcode'] . '">' . $myrow['tabcode'] . '</option>'; + + } //end while loop + + echo '</select></td></tr>'; + echo '</table>'; // close main table + DB_free_result($result); + + echo '<br /><div class="centre"><input type="submit" name="Process" value="' . _('Accept') . '" /><input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; + echo '</div>'; + echo '</form>'; + +} else { // isset($SelectedTabs) + + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Petty Cash Claim Entry') . '" alt="" /> + ' . ' ' . $title . '</p>'; + + echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Select another tab') . '</a></div>'; + + if (! isset($_GET['edit']) OR isset ($_POST['GO'])){ + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<br /><table class="selection">'; + echo '<tr><th colspan="8"><h3>' . _('Petty Cash Tab') . ' ' .$SelectedTabs. '</h3></th></tr>'; + echo '<tr><th colspan="8">' . _('Detail Of Movements For Last ') .': '; + + + if(!isset ($Days)){ + $Days=30; + } + + /* Retrieve decimal places to display */ + $SqlDecimalPlaces="SELECT decimalplaces + FROM currencies,pctabs + WHERE currencies.currabrev = pctabs.currency + AND tabcode='" . $SelectedTabs . "'"; + $result = DB_query($SqlDecimalPlaces,$db); + $myrow=DB_fetch_array($result); + $CurrDecimalPlaces = $myrow['decimalplaces']; + + echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; + echo '<input type="text" class="number" name="Days" value="' . $Days . '" maxlength="3" size="4" /> ' ._('Days'); + echo '<input type="submit" name="Go" value="' . _('Go') . '" />'; + echo '</th></tr>'; + + if (isset($_POST['Cancel'])) { + unset($_POST['SelectedExpense']); + unset($_POST['amount']); + unset($_POST['Date']); + unset($_POST['Notes']); + unset($_POST['Receipt']); + } + + $sql = "SELECT * FROM pcashdetails + WHERE tabcode='".$SelectedTabs."' + AND date >=DATE_SUB(CURDATE(), INTERVAL ".$Days." DAY) + ORDER BY date, counterindex ASC"; + + $result = DB_query($sql,$db); + + echo '<tr> + <th>' . _('Date Of Expense') . '</th> + <th>' . _('Expense Description') . '</th> + <th>' . _('Amount') . '</th> + <th>' . _('Authorized') . '</th> + <th>' . _('Notes') . '</th> + <th>' . _('Receipt') . '</th> + </tr>'; + + $k=0; //row colour counter + + while ($myrow = DB_fetch_row($result)) { + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k=1; + } + + $sqldes="SELECT description + FROM pcexpenses + WHERE codeexpense='". $myrow['3'] . "'"; + + $ResultDes = DB_query($sqldes,$db); + $Description=DB_fetch_array($ResultDes); + + if (!isset($Description['0'])){ + $Description['0']='ASSIGNCASH'; + } + if ($myrow['5']=='0000-00-00') { + $AuthorisedDate=_('Unauthorised'); + } else { + $AuthorisedDate=ConvertSQLDate($myrow['5']); + } + if (($myrow['5'] == '0000-00-00') and ($Description['0'] != 'ASSIGNCASH')){ + // only movements NOT authorized can be modified or deleted + printf('<td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td><a href="%sSelectedIndex=%s&SelectedTabs=' . $SelectedTabs . '&Days=' . $Days . '&edit=yes">' . _('Edit') . '</a></td> + <td><a href="%sSelectedIndex=%s&SelectedTabs=' . $SelectedTabs . '&Days=' . $Days . '&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this code and the expenses it may have set up?') . '");\'>' . _('Delete') . '</a></td> + </tr>', + ConvertSQLDate($myrow['2']), + $Description['0'], + locale_number_format($myrow['4'],$CurrDecimalPlaces), + $AuthorisedDate, + $myrow['7'], + $myrow['8'], + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['0'], + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['0']); + } else { + printf('<td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + </tr>', + ConvertSQLDate($myrow['2']), + $Description['0'], + locale_number_format($myrow['4'],$CurrDecimalPlaces), + $AuthorisedDate, + $myrow['7'], + $myrow['8']); + + } + + } + //END WHILE LIST LOOP + + $sqlamount="SELECT sum(amount) + FROM pcashdetails + WHERE tabcode='".$SelectedTabs."'"; + + $ResultAmount = DB_query($sqlamount,$db); + $Amount=DB_fetch_array($ResultAmount); + + if (!isset($Amount['0'])) { + $Amount['0']=0; + } + + echo '<tr><td colspan="2" style="text-align:right" >' . _('Current balance') . ':</td> + <td class="number">'.locale_number_format($Amount['0'],$CurrDecimalPlaces) . '</td></tr>'; + + + echo '</table>'; + echo '</div> + </form>'; + } + + if (! isset($_GET['delete'])) { + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + + if ( isset($_GET['edit'])) { + $sql = "SELECT * + FROM pcashdetails + WHERE counterindex='".$SelectedIndex."'"; + + $result = DB_query($sql, $db); + $myrow = DB_fetch_array($result); + + $_POST['Date'] = ConvertSQLDate($myrow['date']); + $_POST['SelectedExpense'] = $myrow['codeexpense']; + $_POST['Amount'] = -$myrow['amount']; + $_POST['Notes'] = $myrow['notes']; + $_POST['Receipt'] = $myrow['receipt']; + + echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; + echo '<input type="hidden" name="SelectedIndex" value="' . $SelectedIndex. '" />'; + echo '<input type="hidden" name="Days" value="' .$Days. '" />'; + + }//end of Get Edit + + if (!isset($_POST['Date'])) { + $_POST['Date']=Date($_SESSION['DefaultDateFormat']); + } + + echo '<br /><table class="selection">'; //Main table + echo '<tr><td>' . _('Date Of Expense') . ':</td> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="Date" size="10" maxlength="10" value="' . $_POST['Date']. '" /></td></tr>'; + echo '<tr><td>' . _('Code Of Expense') . ':</td><td><select name="SelectedExpense">'; + + DB_free_result($result); + + $SQL = "SELECT pcexpenses.codeexpense, + pcexpenses.description + FROM pctabexpenses, pcexpenses, pctabs + WHERE pctabexpenses.codeexpense = pcexpenses.codeexpense + AND pctabexpenses.typetabcode = pctabs.typetabcode + AND pctabs.tabcode = '".$SelectedTabs."' + ORDER BY pcexpenses.codeexpense ASC"; + + $result = DB_query($SQL,$db); + echo '<option value="">' . _('Not Yet Selected') . '</option>'; + while ($myrow = DB_fetch_array($result)) { + if (isset($_POST['SelectedExpense']) and $myrow['codeexpense']==$_POST['SelectedExpense']) { + echo '<option selected="selected" value="'; + } else { + echo '<option value="'; + } + echo $myrow['codeexpense'] . '">' . $myrow['codeexpense'] . ' - ' . $myrow['description'] . '</option>'; + + } //end while loop + + echo '</select></td></tr>'; + + if (!isset($_POST['Amount'])) { + $_POST['Amount']=0; + } + + echo '<tr><td>' . _('Amount') . ':</td> + <td><input type="text" class="number" name="amount" size="12" maxlength="11" value="' . $_POST['Amount'] . '" /></td></tr>'; + + if (!isset($_POST['Notes'])) { + $_POST['Notes']=''; + } + + echo '<tr><td>' . _('Notes') . ':</td> + <td><input type="text" name="Notes" size="50" maxlength="49" value="' . $_POST['Notes'] . '" /></td></tr>'; + + if (!isset($_POST['Receipt'])) { + $_POST['Receipt']=''; + } + + echo '<tr><td>' . _('Receipt') . ':</td> + <td><input type="text" name="Receipt" size="50" maxlength="49" value="' . $_POST['Receipt'] . '" /></td></tr>'; + echo '</table>'; // close main table + + echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; + echo '<input type="hidden" name="Days" value="' .$Days. '" />'; + + echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Accept') . '" /><input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; + echo '</div> + </form>'; + + } // end if user wish to delete + +} + +include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/PcExpenses.php =================================================================== --- trunk/PcExpenses.php 2012-04-03 20:28:39 UTC (rev 5216) +++ trunk/PcExpenses.php 2012-04-03 21:57:50 UTC (rev 5217) @@ -1,356 +1,358 @@ -<?php - -/* $Id$*/ - -include('includes/session.inc'); -$title = _('Maintenance Of Petty Cash Of Expenses'); -include('includes/header.inc'); - -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry') - . '" alt="" />' . ' ' . $title . '</p>'; - -if (isset($_POST['SelectedExpense'])){ - $SelectedExpense = mb_strtoupper($_POST['SelectedExpense']); -} elseif (isset($_GET['SelectedExpense'])){ - $SelectedExpense = mb_strtoupper($_GET['SelectedExpense']); -} - -if (isset($_POST['Cancel'])) { - unset($SelectedExpense); - unset($_POST['CodeExpense']); - unset($_POST['Description']); - unset($_POST['GLAccount']); - unset($_POST['Tag']); -} - - -if (isset($Errors)) { - unset($Errors); -} - -$Errors = array(); - -if (isset($_POST['submit'])) { - - //initialise no input errors assumed initially before we test - $InputError = 0; - - /* actions to take once the user has clicked the submit button - ie the page has called itself with some user input */ - - //first off validate inputs sensible - $i=1; - - if ($_POST['CodeExpense']=='' OR $_POST['CodeExpense']==' ' OR $_POST['CodeExpense']==' ') { - $InputError = 1; - prnMsg(_('The Expense type code cannot be an empty string or spaces'),'error'); - echo '<br />'; - $Errors[$i] = 'CodeExpense'; - $i++; - } elseif (mb_strlen($_POST['CodeExpense']) >20) { - $InputError = 1; - prnMsg(_('The Expense code must be twenty characters or less long'),'error'); - echo '<br />'; - $Errors[$i] = 'CodeExpense'; - $i++; - }elseif (ContainsIllegalCharacters($_POST['CodeExpense'])){ - $InputError = 1; - prnMsg(_('The Expense code cannot contain any of the following characters " \' - &'),'error'); - echo '<br />'; - $Errors[$i] = 'CodeExpense'; - $i++; - } elseif (ContainsIllegalCharacters($_POST['Description'])){ - $InputError = 1; - prnMsg(_('The Expense description cannot contain any of the following characters " \' - &'),'error'); - echo '<br />'; - $Errors[$i] = 'Description'; - $i++; - } elseif (mb_strlen($_POST['Description']) >50) { - $InputError = 1; - prnMsg(_('The tab code must be Fifty characters or less long'),'error'); - echo '<br />'; - echo '<br />'; - $Errors[$i] = 'Description'; - $i++; - } elseif (mb_strlen($_POST['Description'])==0) { - $InputError = 1; - echo prnMsg(_('The tab code description must be entered'),'error'); - echo '<br />'; - $Errors[$i] = 'Description'; - $i++; - } elseif ($_POST['GLAccount']=='') { - $InputError = 1; - echo prnMsg(_('A general ledger code must be selected for this expense'),'error'); - echo '<br />'; - } - - if (isset($SelectedExpense) AND $InputError !=1) { - - $sql = "UPDATE pcexpenses - SET description = '" . $_POST['Description'] . "', - glaccount = '" . $_POST['GLAccount'] . "', - tag = '" . $_POST['Tag'] . "' - WHERE codeexpense = '" . $SelectedExpense . "'"; - - $msg = _('The Expenses type') . ' ' . $SelectedExpense . ' ' . _('has been updated'); - } elseif ( $InputError !=1 ) { - - // First check the type is not being duplicated - - $checkSql = "SELECT count(*) - FROM pcexpenses - WHERE codeexpense = '" . $_POST['CodeExpense'] . "'"; - - $checkresult = DB_query($checkSql,$db); - $checkrow = DB_fetch_row($checkresult); - - if ( $checkrow[0] > 0 ) { - $InputError = 1; - prnMsg( _('The Expense type ') . $_POST['CodeExpense'] . _(' already exists.'),'error'); - } else { - - // Add new record on submit - - $sql = "INSERT INTO pcexpenses - (codeexpense, - description, - glaccount, - tag) - VALUES ('" . $_POST['CodeExpense'] . "', - '" . $_POST['Description'] . "', - '" . $_POST['GLAccount'] . "', - '" . $_POST['Tag'] . "')"; - - $msg = _('Expense ') . ' ' . $_POST['CodeExpense'] . ' ' . _('has been created'); - $checkSql = "SELECT count(codeexpense) - FROM pcexpenses"; - $result = DB_query($checkSql, $db); - $row = DB_fetch_row($result); - - } - } - - if ( $InputError !=1) { - //run the SQL from either of the above possibilites - $result = DB_query($sql,$db); - prnMsg($msg,'success'); - echo '<br />'; - unset($SelectedExpense); - unset($_POST['CodeExpense']); - unset($_POST['Description']); - unset($_POST['GLAccount']); - unset($_POST['Tag']); - } - -} elseif ( isset($_GET['delete']) ) { - - // PREVENT DELETES IF DEPENDENT RECORDS IN 'PcTabExpenses' - - $sql= "SELECT COUNT(*) - FROM pctabexpenses - WHERE codeexpense='" . $SelectedExpense . "'"; - - $ErrMsg = _('The number of type of tabs using this expense code could not be retrieved'); - $result = DB_query($sql,$db,$ErrMsg); - - $myrow = DB_fetch_row($result); - if ($myrow[0]>0) { - prnMsg(_('Cannot delete this petty cash expense because it is used in some tab types') . '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('tab types using this expense code'),'error'); - - } else { - - $sql="DELETE FROM pcexpenses - WHERE codeexpense='" . $SelectedExpense . "'"; - $ErrMsg = _('The expense type record could not be deleted because'); - $result = DB_query($sql,$db,$ErrMsg); - prnMsg(_('Expense type') . ' ' . $SelectedExpense . ' ' . _('has been deleted') ,'success'); - echo '<br />'; - unset ($SelectedExpense); - unset($_GET['delete']); - } //end if tab type used in transactions -} - -if (!isset($SelectedExpense)){ - -/* It could still be the second time the page has been run and a record has been selected for modification - SelectedExpense will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters -then none of the above are true and the list of sales types will be displayed with -links to delete or edit each. These will call the same page again and allow update/input -or deletion of the records*/ - - $sql = "SELECT * - FROM pcexpenses"; - $result = DB_query($sql,$db); - - echo '<table class="selection">'; - echo '<tr> - <th>' . _('Code Of Expense') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Account Code') . '</th> - <th>' . _('Account Description') . '</th> - <th>' . _('Tag') . '</th> - </tr>'; - - $k=0; //row colour counter - - while ($myrow = DB_fetch_row($result)) { - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k=1; - } - - $sqldesc="SELECT accountname - FROM chartmaster - WHERE accountcode='". $myrow[2] . "'"; - - $ResultDes = DB_query($sqldesc,$db); - $Description=DB_fetch_array($ResultDes); - - $SqlDescTag="SELECT tagdescription - FROM tags - WHERE tagref='". $myrow[3] . "'"; - - $ResultDesTag = DB_query($SqlDescTag,$db); - $DescriptionTag=DB_fetch_array($ResultDesTag); - - printf('<td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%sSelectedExpense=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedExpense=%s&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this expense code and all the details it may have set up?') . '\');">' . _('Delete') . '</td> - </tr>', - $myrow[0], - $myrow[1], - $myrow[2], - $Description['accountname'], - $DescriptionTag['tagdescription'], - htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow[0], - htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow[0]); - } - //END WHILE LIST LOOP - echo '</table>'; -} - -//end of ifs and buts! -if (isset($SelectedExpense)) { - - echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Show All Petty Cash Expenses Defined') . '</a></div><p>'; -} -if (! isset($_GET['delete'])) { - - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<p><table class="selection">'; //Main table - - // The user wish to EDIT an existing type - if ( isset($SelectedExpense) AND $SelectedExpense!='' ){ - - $sql = "SELECT codeexpense, - description, - glaccount, - tag - FROM pcexpenses - WHERE codeexpense='" . $SelectedExpense . "'"; - - $result = DB_query($sql, $db); - $myrow = DB_fetch_array($result); - - $_POST['CodeExpense'] = $myrow['codeexpense']; - $_POST['Description'] = $myrow['description']; - $_POST['GLAccount'] = $myrow['glaccount']; - $_POST['Tag'] = $myrow['tag']; - - echo '<input type="hidden" name="SelectedExpense" value="' . $SelectedExpense . '" />'; - echo '<input type="hidden" name="CodeExpense" value="' . $_POST['CodeExpense']. '" />'; - // We dont allow the user to change an existing type code - echo '<table class="selection"> - <tr> - <td>' . _('Code Of Expense') . ':</td> - <td>' . $_POST['CodeExpense'] . '</td> - </tr>'; - - } else { - - // This is a new type so the user may volunteer a type code - - echo '<table class="selection"> - <tr> - <td>' . _('Code Of Expense') . ':</td> - <td><input type="text"' . (in_array('CodeExpense',$Errors) ? 'class="inputerror"' : '' ) .' name="CodeExpense" /></td> - </tr>'; - - } - - if (!isset($_POST['Description'])) { - $_POST['Description']=''; - } - echo '<tr> - <td>' . _('Description') . ':</td> - <td><input type="text" ' . (in_array('Description',$Errors) ? 'class="inputerror"' : '' ) . ' name="Description" size="50" maxlength="49" value="' . $_POST['Description'] . '" /></td> - </tr>'; - - echo '<tr> - <td>' . _('Account Code') . ':</td> - <td><select name="GLAccount">'; - - DB_free_result($result); - $SQL = "SELECT accountcode, - accountname - FROM chartmaster - ORDER BY accountcode"; - $result = DB_query($SQL,$db); - echo '<option value="">' . _('Not Yet Selected') . '</option>'; - while ($myrow = DB_fetch_array($result)) { - if (isset($_POST['GLAccount']) and $myrow['accountcode']==$_POST['GLAccount']) { - echo '<option selected="selected" value="'; - } else { - echo '<option value="'; - } - echo $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; - - } //end while loop - - echo '</select></td></tr>'; - - //Select the tag - DB_free_result($result); - echo '<tr> - <td>' . _('Tag') . ':</td> - <td><select name="Tag">'; - - $SQL = "SELECT tagref, - tagdescription - FROM tags - ORDER BY tagref"; - - $result=DB_query($SQL,$db); - echo '<option value="0">0 - ' . _('None') . '</option>'; - while ($myrow=DB_fetch_array($result)){ - if (isset($_POST['Tag']) and $_POST['Tag']==$myrow['tagref']){ - echo '<option selected="selected" value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription'].'</option>'; - } else { - echo '<option value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; - } - } - echo '</select></td>'; - // End select tag - - echo '</td></tr></table>'; // close main table - - echo '<br /> - <div class="centre"> - <input type="submit" name="submit" value="' . _('Accept') . '" /> - <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> - </div>'; - - echo '</form>'; - -} // end if user wish to delete - - -include('includes/footer.inc'); +<?php + +/* $Id$*/ + +include('includes/session.inc'); +$title = _('Maintenance Of Petty Cash Of Expenses'); +include('includes/header.inc'); + +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry') + . '" alt="" />' . ' ' . $title . '</p>'; + +if (isset($_POST['SelectedExpense'])){ + $SelectedExpense = mb_strtoupper($_POST['SelectedExpense']); +} elseif (isset($_GET['SelectedExpense'])){ + $SelectedExpense = mb_strtoupper($_GET['SelectedExpense']); +} + +if (isset($_POST['Cancel'])) { + unset($SelectedExpense); + unset($_POST['CodeExpense']); + unset($_POST['Description']); + unset($_POST['GLAccount']); + unset($_POST['Tag']); +} + + +if (isset($Errors)) { + unset($Errors); +} + +$Errors = array(); + +if (isset($_POST['submit'])) { + + //initialise no input errors assumed initially before we test + $InputError = 0; + + /* actions to take once the user has clicked the submit button + ie the page has called itself with some user input */ + + //first off validate inputs sensible + $i=1; + + if ($_POST['CodeExpense']=='' OR $_POST['CodeExpense']==' ' OR $_POST['CodeExpense']==' ') { + $InputError = 1; + prnMsg(_('The Expense type code cannot be an empty string or spaces'),'error'); + echo '<br />'; + $Errors[$i] = 'CodeExpense'; + $i++; + } elseif (mb_strlen($_POST['CodeExpense']) >20) { + $InputError = 1; + prnMsg(_('The Expense code must be twenty characters or less long'),'error'); + echo '<br />'; + $Errors[$i] = 'CodeExpense'; + $i++; + }elseif (ContainsIllegalCharacters($_POST['CodeExpense'])){ + $InputError = 1; + prnMsg(_('The Expense code cannot contain any of the following characters " \' - &'),'error'); + echo '<br />'; + $Errors[$i] = 'CodeExpense'; + $i++; + } elseif (ContainsIllegalCharacters($_POST['Description'])){ + $InputError = 1; + prnMsg(_('The Expense description cannot contain any of the following characters " \' - &'),'error'); + echo '<br />'; + $Errors[$i] = 'Description'; + $i++; + } elseif (mb_strlen($_POST['Description']) >50) { + $InputError = 1; + prnMsg(_('The tab code must be Fifty characters or less long'),'error'); + echo '<br />'; + echo '<br />'; + $Errors[$i] = 'Description'; + $i++; + } elseif (mb_strlen($_POST['Description'])==0) { + $InputError = 1; + echo prnMsg(_('The tab code description must be entered'),'error'); + echo '<br />'; + $Errors[$i] = 'Description'; + $i++; + } elseif ($_POST['GLAccount']=='') { + $InputError = 1; + echo prnMsg(_('A general ledger code must be selected for this expense'),'error'); + echo '<br />'; + } + + if (isset($SelectedExpense) AND $InputError !=1) { + + $sql = "UPDATE pcexpenses + SET description = '" . $_POST['Description'] . "', + glaccount = '" . $_POST['GLAccount'] . "', + tag = '" . $_POST['Tag'] . "' + WHERE codeexpense = '" . $SelectedExpense . "'"; + + $msg = _('The Expenses type') . ' ' . $SelectedExpense . ' ' . _('has been updated'); + } elseif ( $InputError !=1 ) { + + // First check the type is not being duplicated + + $checkSql = "SELECT count(*) + FROM pcexpenses + WHERE codeexpense = '" . $_POST['CodeExpense'] . "'"; + + $checkresult = DB_query($checkSql,$db); + $checkrow = DB_fetch_row($checkresult); + + if ( $checkrow[0] > 0 ) { + $InputError = 1; + prnMsg( _('The Expense type ') . $_POST['CodeExpense'] . _(' already exists.'),'error'); + } else { + + // Add new record on submit + + $sql = "INSERT INTO pcexpenses + (codeexpense, + description, + glaccount, + tag) + VALUES ('" . $_POST['CodeExpense'] . "', + '" . $_POST['Description'] . "', + '" . $_POST['GLAccount'] . "', + '" . $_POST['Tag'] . "')"; + + $msg = _('Expense ') . ' ' . $_POST['CodeExpense'] . ' ' . _('has been created'); + $checkSql = "SELECT count(codeexpense) + FROM pcexpenses"; + $result = DB_query($checkSql, $db); + $row = DB_fetch_row($result); + + } + } + + if ( $InputError !=1) { + //run the SQL from either of the above possibilites + $result = DB_query($sql,$db); + prnMsg($msg,'success'); + echo '<br />'; + unset($SelectedExpense); + unset($_POST['CodeExpense']); + unset($_POST['Description']); + unset($_POST['GLAccount']); + unset($_POST['Tag']); + } + +} elseif ( isset($_GET['delete']) ) { + + // PREVENT DELETES IF DEPENDENT RECORDS IN 'PcTabExpenses' + + $sql= "SELECT COUNT(*) + FROM pctabexpenses + WHERE codeexpense='" . $SelectedExpense . "'"; + + $ErrMsg = _('The number of type of tabs using this expense code could not be retrieved'); + $result = DB_query($sql,$db,$ErrMsg); + + $myrow = DB_fetch_row($result); + if ($myrow[0]>0) { + prnMsg(_('Cannot delete this petty cash expense because it is used in some tab types') . '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('tab types using this expense code'),'error'); + + } else { + + $sql="DELETE FROM pcexpenses + WHERE codeexpense='" . $SelectedExpense . "'"; + $ErrMsg = _('The expense type record could not be deleted because'); + $result = DB_query($sql,$db,$ErrMsg); + prnMsg(_('Expense type') . ' ' . $SelectedExpense . ' ' . _('has been deleted') ,'success'); + echo '<br />'; + unset ($SelectedExpense); + unset($_GET['delete']); + } //end if tab type used in transactions +} + +if (!isset($SelectedExpense)){ + +/* It could still be the second time the page has been run and a record has been selected for modification - SelectedExpense will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters +then none of the above are true and the list of sales types will be displayed with +links to delete or edit each. These will call the same page again and allow update/input +or deletion of the records*/ + + $sql = "SELECT * + FROM pcexpenses"; + $result = DB_query($sql,$db); + + echo '<table class="selection">'; + echo '<tr> + <th>' . _('Code Of Expense') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Account Code') . '</th> + <th>' . _('Account Description') . '</th> + <th>' . _('Tag') . '</th> + </tr>'; + + $k=0; //row colour counter + + while ($myrow = DB_fetch_row($result)) { + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k=1; + } + + $sqldesc="SELECT accountname + FROM chartmaster + WHERE accountcode='". $myrow[2] . "'"; + + $ResultDes = DB_query($sqldesc,$db); + $Description=DB_fetch_array($ResultDes); + + $SqlDescTag="SELECT tagdescription + FROM tags + WHERE tagref='". $myrow[3] . "'"; + + $ResultDesTag = DB_query($SqlDescTag,$db); + $DescriptionTag=DB_fetch_array($ResultDesTag); + + printf('<td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td>%s</td> + <td>%s</td> + <td><a href="%sSelectedExpense=%s">' . _('Edit') . '</a></td> + <td><a href="%sSelectedExpense=%s&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this expense code and all the details it may have set up?') . '\');">' . _('Delete') . '</a></td> + </tr>', + $myrow[0], + $myrow[1], + $myrow[2], + $Description['accountname'], + $DescriptionTag['tagdescription'], + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow[0], + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow[0]); + } + //END WHILE LIST LOOP + echo '</table>'; +} + +//end of ifs and buts! +if (isset($SelectedExpense)) { + + echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Show All Petty Cash Expenses Defined') . '</a></div>'; +} +if (! isset($_GET['delete'])) { + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<br />'; //Main table + + // The user wish to EDIT an existing type + if ( isset($SelectedExpense) AND $SelectedExpense!='' ){ + + $sql = "SELECT codeexpense, + description, + glaccount, + tag + FROM pcexpenses + WHERE codeexpense='" . $SelectedExpense . "'"; + + $result = DB_query($sql, $db); + $myrow = DB_fetch_array($result); + + $_POST['CodeExpense'] = $myrow['codeexpense']; + $... [truncated message content] |
From: <vv...@us...> - 2012-04-06 02:48:07
|
Revision: 5228 http://web-erp.svn.sourceforge.net/web-erp/?rev=5228&view=rev Author: vvs2012 Date: 2012-04-06 02:48:00 +0000 (Fri, 06 Apr 2012) Log Message: ----------- xhtml Modified Paths: -------------- trunk/GLAccountInquiry.php trunk/PDFBankingSummary.php trunk/PDFCustomerList.php trunk/PDFDIFOT.php trunk/PDFDeliveryDifferences.php trunk/PDFLowGP.php trunk/PDFOrderStatus.php trunk/PDFOrdersInvoiced.php trunk/PDFPeriodStockTransListing.php trunk/PDFPickingList.php trunk/PDFPriceList.php trunk/PDFPrintLabel.php trunk/PDFSuppTransListing.php Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/GLAccountInquiry.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -264,7 +264,7 @@ } $FormatedTranDate = ConvertSQLDate($myrow['trandate']); - $URL_to_TransDetail = $rootpath . '/GLTransInquiry.php?' . SID . '&TypeID=' . $myrow['type'] . '&TransNo=' . $myrow['typeno']; + $URL_to_TransDetail = $rootpath . '/GLTransInquiry.php?' . SID . '&TypeID=' . $myrow['type'] . '&TransNo=' . $myrow['typeno']; $tagsql="SELECT tagdescription FROM tags WHERE tagref='".$myrow['tag'] . "'"; $tagresult=DB_query($tagsql,$db); Modified: trunk/PDFBankingSummary.php =================================================================== --- trunk/PDFBankingSummary.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFBankingSummary.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -24,9 +24,10 @@ ORDER BY transno DESC"; $result=DB_query($sql, $db); - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"> - <table class="selection">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; echo '<tr><td>' . _('Select the batch number of receipts to be printed') . ':</td>'; echo '<td><select name="BatchNo">'; while ($myrow=DB_fetch_array($result)) { @@ -39,6 +40,7 @@ <div class="centre"> <input type="submit" name="EnterBatchNo" value="' . _('Create PDF') . '" /> </div> + </div> </form>'; include ('includes/footer.inc'); Modified: trunk/PDFCustomerList.php =================================================================== --- trunk/PDFCustomerList.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFCustomerList.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -368,9 +368,11 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . $title . '" alt="" />' . ' ' . $title . '</p>'; - echo '<form action=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . ' method="post"><table class="selection">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<tr><td>' . _('For Sales Areas') . ':</td><td><select name=Areas[] multiple="multiple">'; + echo '<table class="selection">'; + echo '<tr><td>' . _('For Sales Areas') . ':</td><td><select name="Areas[]" multiple="multiple">'; $sql="SELECT areacode, areadescription FROM areas"; $AreasResult= DB_query($sql,$db); @@ -383,7 +385,7 @@ echo '</select></td></tr>'; echo '<tr><td>' . _('For Sales folk'). ':</td> - <td><select name=SalesPeople[] multiple="multiple"> + <td><select name="SalesPeople[]" multiple="multiple"> <option selected="selected" value="All">'. _('All sales folk') . '</option>'; $sql = "SELECT salesmancode, salesmanname FROM salesman"; @@ -408,14 +410,16 @@ $DefaultActivitySince = Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-6,0,Date('y'))); echo '<tr> <td>' . _('Activity Since'). ':</td> - <td><input type="text" class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="ActivitySince" size="10" maxlength="10" value="' . $DefaultActivitySince . '" /></td> + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ActivitySince" size="10" maxlength="10" value="' . $DefaultActivitySince . '" /></td> </tr>'; echo '</table> <br /> <div class="centre"> - <input type="submit" Name="PrintPDF" value="'. _('Print PDF'). '" /> + <input type="submit" name="PrintPDF" value="'. _('Print PDF'). '" /> </div>'; + echo '</div> + </form>'; include('includes/footer.inc'); Modified: trunk/PDFDIFOT.php =================================================================== --- trunk/PDFDIFOT.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFDIFOT.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -25,7 +25,8 @@ . _('DIFOT Report') . '</p>'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> <td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ':</td> @@ -80,6 +81,8 @@ <div class="centre"> <input type="submit" name="Go" value="' . _('Create PDF') . '" /> </div>'; + echo '</div> + </form>'; if ($InputError==1){ prnMsg($msg,'error'); Modified: trunk/PDFDeliveryDifferences.php =================================================================== --- trunk/PDFDeliveryDifferences.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFDeliveryDifferences.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -22,9 +22,10 @@ include ('includes/header.inc'); echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' - . _('Delivery Differences Report') . '</p>'; + . _('Delivery Differences Report') . '</p></div>'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> @@ -80,6 +81,8 @@ <div class="centre"> <input type="submit" name="Go" value="' . _('Create PDF') . '" /> </div>'; + echo '</div> + </form>'; if ($InputError==1){ prnMsg($msg,'error'); Modified: trunk/PDFLowGP.php =================================================================== --- trunk/PDFLowGP.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFLowGP.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -124,10 +124,10 @@ $_POST['FromDate']=Date($_SESSION['DefaultDateFormat']); $_POST['ToDate']=Date($_SESSION['DefaultDateFormat']); $_POST['GPMin']=0; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> - <table class="selection">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; 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>'; @@ -145,6 +145,8 @@ <div class="centre"> <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> </div>'; + echo '</div> + </form>'; } include('includes/footer.inc'); Modified: trunk/PDFOrderStatus.php =================================================================== --- trunk/PDFOrderStatus.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFOrderStatus.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -30,6 +30,7 @@ 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="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> @@ -72,6 +73,8 @@ <div class="centre"> <input type="submit" name="Go" value="' . _('Create PDF') . '" /> </div>'; + echo '</div> + </form>'; include('includes/footer.inc'); exit; Modified: trunk/PDFOrdersInvoiced.php =================================================================== --- trunk/PDFOrdersInvoiced.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFOrdersInvoiced.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -34,6 +34,7 @@ . _('Orders Invoiced Report') . '</p>'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> @@ -68,6 +69,8 @@ echo '</table> <br /> <div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '" /></div>'; + echo '</div> + </form>'; include('includes/footer.inc'); exit; Modified: trunk/PDFPeriodStockTransListing.php =================================================================== --- trunk/PDFPeriodStockTransListing.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFPeriodStockTransListing.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -17,14 +17,15 @@ 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> + <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="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; echo '<tr> @@ -79,6 +80,8 @@ <div class="centre"> <input type="submit" name="Go" value="' . _('Create PDF') . '" /> </div>'; + echo '</div> + </form>'; include('includes/footer.inc'); exit; Modified: trunk/PDFPickingList.php =================================================================== --- trunk/PDFPickingList.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFPickingList.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -27,6 +27,7 @@ $result=DB_query($sql, $db); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" name="form">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> @@ -45,6 +46,7 @@ <div class="centre"> <input type="submit" name="Process" value="' . _('Print Picking Lists') . '" /> </div> + </div> </form>'; include('includes/footer.inc'); exit(); Modified: trunk/PDFPriceList.php =================================================================== --- trunk/PDFPriceList.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFPriceList.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -258,19 +258,22 @@ /*if $FromCriteria is not set then show a form to allow input */ - echo '<form action=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . ' method="post"><table class="selection">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; + echo '<tr><td>'. _('From Inventory Category Code') .':</td> + <td><select name="FromCriteria">'; - echo '<tr><td>'. _('From Inventory Category Code') .':</font></td><td><select name=FromCriteria>'; - $sql='SELECT categoryid, categorydescription FROM stockcategory ORDER BY categoryid'; $CatResult= DB_query($sql,$db); While ($myrow = DB_fetch_array($CatResult)){ - echo "<option value='" . $myrow['categoryid'] . "'>" . $myrow['categoryid'] . ' - ' . $myrow['categorydescription']; + echo "<option value='" . $myrow['categoryid'] . "'>" . $myrow['categoryid'] . ' - ' . $myrow['categorydescription'] . '</option>'; } echo '</select></td></tr>'; - echo '<tr><td>' . _('To Inventory Category Code'). ':</td><td><select name=ToCriteria>'; + echo '<tr><td>' . _('To Inventory Category Code'). ':</td> + <td><select name="ToCriteria">'; /*Set the index for the categories result set back to 0 */ DB_data_seek($CatResult,0); @@ -297,7 +300,7 @@ echo '</select></td></tr>'; echo '<tr><td>' . _('Price Listing Type'). ':</td><td><select name="CustomerSpecials">'; - echo '<option selected="selected" value="Sales Type Prices">'. _('Default Sales Type Prices'); + echo '<option selected="selected" value="Sales Type Prices">'. _('Default Sales Type Prices') . '</option>'; echo '<option value="Customer Special Prices Only">'. _('Customer Special Prices Only') . '</option>'; echo '<option value="Full Description">'. _('Full Description') . '</option>'; echo '</select></td></tr>'; @@ -306,7 +309,9 @@ echo '<td><input type="text" size="11" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveDate" value="' . Date($_SESSION['DefaultDateFormat']) . '" />'; echo '</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>'; + echo '</div> + </form>'; } include('includes/footer.inc'); Modified: trunk/PDFPrintLabel.php =================================================================== --- trunk/PDFPrintLabel.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFPrintLabel.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -127,18 +127,19 @@ <input type="submit" name="PDFTest" value="'. _('Print labels with borders') .'" /></div>'; $iTxt=0; - echo "<script type=\"text/javascript\"> + echo '<script type="text/javascript"> function setAll(all) { - var x=document.getElementById('form1'); + var x=document.getElementById("form1"); for (var i=0;i<x.length;i++) { - if (x.elements[i].id=='item'); + if (x.elements[i].id=="item"); x.elements[i].checked=all.checked; } } - </script>"; + </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="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'" method="post" id="form1">'; + echo '<form action="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'" method="post" id="form1">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; echo '<tbody>'; @@ -159,7 +160,8 @@ '.$OptionSales.' </select></td> </tr>'; - echo '<td class="number">'.$txt[$iTxt++].':</td> + echo '<tr> + <td class="number">'.$txt[$iTxt++].':</td> <td><select name="Currency" onchange="ReloadForm(form1.refresh)"> '.$OptionCurrency.' </select></td> @@ -171,11 +173,12 @@ </select> </td> </tr>'; echo '<tr><td class="number">'.$txt[$iTxt++].':</td> - <td><input type="text" class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="EffectiveDate" size="11" maxlength="10" value="' . $_POST['EffectiveDate'] . '" /></td></tr>'; + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="EffectiveDate" size="11" maxlength="10" value="' . $_POST['EffectiveDate'] . '" /></td></tr>'; echo '<tr> <th colspan="2"> <input type="submit" name="refresh" value="' . _('Refresh options') . '" /> - </th>'; + </th> + </tr>'; echo '<tr> <td colspan="2"> '.$TableItems.' @@ -184,6 +187,7 @@ echo '</tbody> </table> '.$SendButton.' + </div> </form>'; } @@ -224,7 +228,7 @@ function selectOptions($list, $currentKey) { $html=''; foreach ($list as $key=>$value) { - $xs = ($currentKey==$key) ? " selected":""; + $xs = ($currentKey==$key) ? ' selected="selected"':''; $html .= ' <option value="'. $key .'"'. $xs .'>'. $value. '</option>'; } @@ -258,7 +262,7 @@ <th>'.$txt[$ix++].'</th> <th>'.$txt[$ix++].'</th> <th colspan="2" align="center">'.$txt[$ix++].' - <input type="checkbox" checked onclick="setAll(this);" /> + <input type="checkbox" checked="checked" onclick="setAll(this);" /> </th> </tr> </thead> @@ -276,7 +280,7 @@ <td>{$myrow['description']}</td> <td class="number">{$price}</td> <td><div class="centre"> - <input type="checkbox" checked name="StockID[{$myrow['stockid']}]" id="item" /> + <input type="checkbox" checked="checked" name="StockID[{$myrow['stockid']}]" id="item" /> </div> </td> <td> </td> @@ -285,8 +289,7 @@ } return $html . ' </tbody> - </table> - </div>'; + </table>'; } function noneButton($msg) { Modified: trunk/PDFSuppTransListing.php =================================================================== --- trunk/PDFSuppTransListing.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFSuppTransListing.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -18,19 +18,20 @@ include ('includes/header.inc'); echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' - . _('Supplier Transaction Listing').'</p>'; + . _('Supplier Transaction Listing').'</p></div>'; if ($InputError==1){ prnMsg($msg,'error'); } echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> - <tr> + <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>'; + </tr>'; echo '<tr> <td>' . _('Transaction type') . '</td> @@ -46,6 +47,8 @@ <div class="centre"> <input type="submit" name="Go" value="' . _('Create PDF') . '" /> </div>'; + echo '</div> + </form>'; include('includes/footer.inc'); exit; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-04-06 02:48:07
|
Revision: 5228 http://web-erp.svn.sourceforge.net/web-erp/?rev=5228&view=rev Author: vvs2012 Date: 2012-04-06 02:48:00 +0000 (Fri, 06 Apr 2012) Log Message: ----------- xhtml Modified Paths: -------------- trunk/GLAccountInquiry.php trunk/PDFBankingSummary.php trunk/PDFCustomerList.php trunk/PDFDIFOT.php trunk/PDFDeliveryDifferences.php trunk/PDFLowGP.php trunk/PDFOrderStatus.php trunk/PDFOrdersInvoiced.php trunk/PDFPeriodStockTransListing.php trunk/PDFPickingList.php trunk/PDFPriceList.php trunk/PDFPrintLabel.php trunk/PDFSuppTransListing.php Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/GLAccountInquiry.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -264,7 +264,7 @@ } $FormatedTranDate = ConvertSQLDate($myrow['trandate']); - $URL_to_TransDetail = $rootpath . '/GLTransInquiry.php?' . SID . '&TypeID=' . $myrow['type'] . '&TransNo=' . $myrow['typeno']; + $URL_to_TransDetail = $rootpath . '/GLTransInquiry.php?' . SID . '&TypeID=' . $myrow['type'] . '&TransNo=' . $myrow['typeno']; $tagsql="SELECT tagdescription FROM tags WHERE tagref='".$myrow['tag'] . "'"; $tagresult=DB_query($tagsql,$db); Modified: trunk/PDFBankingSummary.php =================================================================== --- trunk/PDFBankingSummary.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFBankingSummary.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -24,9 +24,10 @@ ORDER BY transno DESC"; $result=DB_query($sql, $db); - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"> - <table class="selection">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; echo '<tr><td>' . _('Select the batch number of receipts to be printed') . ':</td>'; echo '<td><select name="BatchNo">'; while ($myrow=DB_fetch_array($result)) { @@ -39,6 +40,7 @@ <div class="centre"> <input type="submit" name="EnterBatchNo" value="' . _('Create PDF') . '" /> </div> + </div> </form>'; include ('includes/footer.inc'); Modified: trunk/PDFCustomerList.php =================================================================== --- trunk/PDFCustomerList.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFCustomerList.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -368,9 +368,11 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . $title . '" alt="" />' . ' ' . $title . '</p>'; - echo '<form action=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . ' method="post"><table class="selection">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<tr><td>' . _('For Sales Areas') . ':</td><td><select name=Areas[] multiple="multiple">'; + echo '<table class="selection">'; + echo '<tr><td>' . _('For Sales Areas') . ':</td><td><select name="Areas[]" multiple="multiple">'; $sql="SELECT areacode, areadescription FROM areas"; $AreasResult= DB_query($sql,$db); @@ -383,7 +385,7 @@ echo '</select></td></tr>'; echo '<tr><td>' . _('For Sales folk'). ':</td> - <td><select name=SalesPeople[] multiple="multiple"> + <td><select name="SalesPeople[]" multiple="multiple"> <option selected="selected" value="All">'. _('All sales folk') . '</option>'; $sql = "SELECT salesmancode, salesmanname FROM salesman"; @@ -408,14 +410,16 @@ $DefaultActivitySince = Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-6,0,Date('y'))); echo '<tr> <td>' . _('Activity Since'). ':</td> - <td><input type="text" class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="ActivitySince" size="10" maxlength="10" value="' . $DefaultActivitySince . '" /></td> + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ActivitySince" size="10" maxlength="10" value="' . $DefaultActivitySince . '" /></td> </tr>'; echo '</table> <br /> <div class="centre"> - <input type="submit" Name="PrintPDF" value="'. _('Print PDF'). '" /> + <input type="submit" name="PrintPDF" value="'. _('Print PDF'). '" /> </div>'; + echo '</div> + </form>'; include('includes/footer.inc'); Modified: trunk/PDFDIFOT.php =================================================================== --- trunk/PDFDIFOT.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFDIFOT.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -25,7 +25,8 @@ . _('DIFOT Report') . '</p>'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> <td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ':</td> @@ -80,6 +81,8 @@ <div class="centre"> <input type="submit" name="Go" value="' . _('Create PDF') . '" /> </div>'; + echo '</div> + </form>'; if ($InputError==1){ prnMsg($msg,'error'); Modified: trunk/PDFDeliveryDifferences.php =================================================================== --- trunk/PDFDeliveryDifferences.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFDeliveryDifferences.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -22,9 +22,10 @@ include ('includes/header.inc'); echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' - . _('Delivery Differences Report') . '</p>'; + . _('Delivery Differences Report') . '</p></div>'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> @@ -80,6 +81,8 @@ <div class="centre"> <input type="submit" name="Go" value="' . _('Create PDF') . '" /> </div>'; + echo '</div> + </form>'; if ($InputError==1){ prnMsg($msg,'error'); Modified: trunk/PDFLowGP.php =================================================================== --- trunk/PDFLowGP.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFLowGP.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -124,10 +124,10 @@ $_POST['FromDate']=Date($_SESSION['DefaultDateFormat']); $_POST['ToDate']=Date($_SESSION['DefaultDateFormat']); $_POST['GPMin']=0; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> - <table class="selection">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; 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>'; @@ -145,6 +145,8 @@ <div class="centre"> <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> </div>'; + echo '</div> + </form>'; } include('includes/footer.inc'); Modified: trunk/PDFOrderStatus.php =================================================================== --- trunk/PDFOrderStatus.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFOrderStatus.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -30,6 +30,7 @@ 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="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> @@ -72,6 +73,8 @@ <div class="centre"> <input type="submit" name="Go" value="' . _('Create PDF') . '" /> </div>'; + echo '</div> + </form>'; include('includes/footer.inc'); exit; Modified: trunk/PDFOrdersInvoiced.php =================================================================== --- trunk/PDFOrdersInvoiced.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFOrdersInvoiced.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -34,6 +34,7 @@ . _('Orders Invoiced Report') . '</p>'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> @@ -68,6 +69,8 @@ echo '</table> <br /> <div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '" /></div>'; + echo '</div> + </form>'; include('includes/footer.inc'); exit; Modified: trunk/PDFPeriodStockTransListing.php =================================================================== --- trunk/PDFPeriodStockTransListing.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFPeriodStockTransListing.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -17,14 +17,15 @@ 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> + <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="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; echo '<tr> @@ -79,6 +80,8 @@ <div class="centre"> <input type="submit" name="Go" value="' . _('Create PDF') . '" /> </div>'; + echo '</div> + </form>'; include('includes/footer.inc'); exit; Modified: trunk/PDFPickingList.php =================================================================== --- trunk/PDFPickingList.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFPickingList.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -27,6 +27,7 @@ $result=DB_query($sql, $db); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" name="form">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> @@ -45,6 +46,7 @@ <div class="centre"> <input type="submit" name="Process" value="' . _('Print Picking Lists') . '" /> </div> + </div> </form>'; include('includes/footer.inc'); exit(); Modified: trunk/PDFPriceList.php =================================================================== --- trunk/PDFPriceList.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFPriceList.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -258,19 +258,22 @@ /*if $FromCriteria is not set then show a form to allow input */ - echo '<form action=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . ' method="post"><table class="selection">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; + echo '<tr><td>'. _('From Inventory Category Code') .':</td> + <td><select name="FromCriteria">'; - echo '<tr><td>'. _('From Inventory Category Code') .':</font></td><td><select name=FromCriteria>'; - $sql='SELECT categoryid, categorydescription FROM stockcategory ORDER BY categoryid'; $CatResult= DB_query($sql,$db); While ($myrow = DB_fetch_array($CatResult)){ - echo "<option value='" . $myrow['categoryid'] . "'>" . $myrow['categoryid'] . ' - ' . $myrow['categorydescription']; + echo "<option value='" . $myrow['categoryid'] . "'>" . $myrow['categoryid'] . ' - ' . $myrow['categorydescription'] . '</option>'; } echo '</select></td></tr>'; - echo '<tr><td>' . _('To Inventory Category Code'). ':</td><td><select name=ToCriteria>'; + echo '<tr><td>' . _('To Inventory Category Code'). ':</td> + <td><select name="ToCriteria">'; /*Set the index for the categories result set back to 0 */ DB_data_seek($CatResult,0); @@ -297,7 +300,7 @@ echo '</select></td></tr>'; echo '<tr><td>' . _('Price Listing Type'). ':</td><td><select name="CustomerSpecials">'; - echo '<option selected="selected" value="Sales Type Prices">'. _('Default Sales Type Prices'); + echo '<option selected="selected" value="Sales Type Prices">'. _('Default Sales Type Prices') . '</option>'; echo '<option value="Customer Special Prices Only">'. _('Customer Special Prices Only') . '</option>'; echo '<option value="Full Description">'. _('Full Description') . '</option>'; echo '</select></td></tr>'; @@ -306,7 +309,9 @@ echo '<td><input type="text" size="11" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveDate" value="' . Date($_SESSION['DefaultDateFormat']) . '" />'; echo '</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>'; + echo '</div> + </form>'; } include('includes/footer.inc'); Modified: trunk/PDFPrintLabel.php =================================================================== --- trunk/PDFPrintLabel.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFPrintLabel.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -127,18 +127,19 @@ <input type="submit" name="PDFTest" value="'. _('Print labels with borders') .'" /></div>'; $iTxt=0; - echo "<script type=\"text/javascript\"> + echo '<script type="text/javascript"> function setAll(all) { - var x=document.getElementById('form1'); + var x=document.getElementById("form1"); for (var i=0;i<x.length;i++) { - if (x.elements[i].id=='item'); + if (x.elements[i].id=="item"); x.elements[i].checked=all.checked; } } - </script>"; + </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="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'" method="post" id="form1">'; + echo '<form action="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'" method="post" id="form1">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; echo '<tbody>'; @@ -159,7 +160,8 @@ '.$OptionSales.' </select></td> </tr>'; - echo '<td class="number">'.$txt[$iTxt++].':</td> + echo '<tr> + <td class="number">'.$txt[$iTxt++].':</td> <td><select name="Currency" onchange="ReloadForm(form1.refresh)"> '.$OptionCurrency.' </select></td> @@ -171,11 +173,12 @@ </select> </td> </tr>'; echo '<tr><td class="number">'.$txt[$iTxt++].':</td> - <td><input type="text" class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="EffectiveDate" size="11" maxlength="10" value="' . $_POST['EffectiveDate'] . '" /></td></tr>'; + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="EffectiveDate" size="11" maxlength="10" value="' . $_POST['EffectiveDate'] . '" /></td></tr>'; echo '<tr> <th colspan="2"> <input type="submit" name="refresh" value="' . _('Refresh options') . '" /> - </th>'; + </th> + </tr>'; echo '<tr> <td colspan="2"> '.$TableItems.' @@ -184,6 +187,7 @@ echo '</tbody> </table> '.$SendButton.' + </div> </form>'; } @@ -224,7 +228,7 @@ function selectOptions($list, $currentKey) { $html=''; foreach ($list as $key=>$value) { - $xs = ($currentKey==$key) ? " selected":""; + $xs = ($currentKey==$key) ? ' selected="selected"':''; $html .= ' <option value="'. $key .'"'. $xs .'>'. $value. '</option>'; } @@ -258,7 +262,7 @@ <th>'.$txt[$ix++].'</th> <th>'.$txt[$ix++].'</th> <th colspan="2" align="center">'.$txt[$ix++].' - <input type="checkbox" checked onclick="setAll(this);" /> + <input type="checkbox" checked="checked" onclick="setAll(this);" /> </th> </tr> </thead> @@ -276,7 +280,7 @@ <td>{$myrow['description']}</td> <td class="number">{$price}</td> <td><div class="centre"> - <input type="checkbox" checked name="StockID[{$myrow['stockid']}]" id="item" /> + <input type="checkbox" checked="checked" name="StockID[{$myrow['stockid']}]" id="item" /> </div> </td> <td> </td> @@ -285,8 +289,7 @@ } return $html . ' </tbody> - </table> - </div>'; + </table>'; } function noneButton($msg) { Modified: trunk/PDFSuppTransListing.php =================================================================== --- trunk/PDFSuppTransListing.php 2012-04-05 15:35:33 UTC (rev 5227) +++ trunk/PDFSuppTransListing.php 2012-04-06 02:48:00 UTC (rev 5228) @@ -18,19 +18,20 @@ include ('includes/header.inc'); echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' - . _('Supplier Transaction Listing').'</p>'; + . _('Supplier Transaction Listing').'</p></div>'; if ($InputError==1){ prnMsg($msg,'error'); } echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> - <tr> + <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>'; + </tr>'; echo '<tr> <td>' . _('Transaction type') . '</td> @@ -46,6 +47,8 @@ <div class="centre"> <input type="submit" name="Go" value="' . _('Create PDF') . '" /> </div>'; + echo '</div> + </form>'; include('includes/footer.inc'); exit; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-04-07 18:09:15
|
Revision: 5230 http://web-erp.svn.sourceforge.net/web-erp/?rev=5230&view=rev Author: vvs2012 Date: 2012-04-07 18:09:09 +0000 (Sat, 07 Apr 2012) Log Message: ----------- Fixed page breaks in PDF Balance Sheet and Outstanding GRNs Modified Paths: -------------- trunk/GLBalanceSheet.php trunk/OutstandingGRNs.php trunk/includes/PDFOstdgGRNsPageHeader.inc Modified: trunk/GLBalanceSheet.php =================================================================== --- trunk/GLBalanceSheet.php 2012-04-06 09:46:25 UTC (rev 5229) +++ trunk/GLBalanceSheet.php 2012-04-07 18:09:09 UTC (rev 5230) @@ -188,6 +188,9 @@ $GroupTotal[$Level]=0; $LYGroupTotal[$Level]=0; $Level--; + if ($YPos < $Bottom_Margin){ + include('includes/PDFBalanceSheetPageHeader.inc'); + } } $YPos -= $line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin+(10 * ($Level+1)),$YPos,200,$FontSize,_('Total') . ' ' . $ParentGroups[$Level]); @@ -197,6 +200,9 @@ $GroupTotal[$Level]=0; $LYGroupTotal[$Level]=0; $YPos -= $line_height; + if ($YPos < $Bottom_Margin){ + include('includes/PDFBalanceSheetPageHeader.inc'); + } } } @@ -209,6 +215,9 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,locale_number_format($SectionBalance,$_SESSION['CompanyRecord']['decimalplaces']),'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,locale_number_format($SectionBalanceLY,$_SESSION['CompanyRecord']['decimalplaces']),'right'); $YPos -= (2 * $line_height); + if ($YPos < $Bottom_Margin){ + include('includes/PDFBalanceSheetPageHeader.inc'); + } } $SectionBalanceLY = 0; $SectionBalance = 0; @@ -218,11 +227,16 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,200,$FontSize,$Sections[$myrow['sectioninaccounts']]); $YPos -= (2 * $line_height); - + if ($YPos < $Bottom_Margin){ + include('includes/PDFBalanceSheetPageHeader.inc'); + } } } if ($myrow['groupname']!= $ActGrp){ + if ($YPos < $Bottom_Margin + $line_height){ + include('includes/PDFBalanceSheetPageHeader.inc'); + } $FontSize =8; $pdf->setFont('','B'); if ($myrow['parentgroupname']==$ActGrp AND $ActGrp!=''){ Modified: trunk/OutstandingGRNs.php =================================================================== --- trunk/OutstandingGRNs.php 2012-04-06 09:46:25 UTC (rev 5229) +++ trunk/OutstandingGRNs.php 2012-04-07 18:09:09 UTC (rev 5230) @@ -84,6 +84,9 @@ if ($Supplier!=''){ /*Then it's NOT the first time round */ /* need to print the total of previous supplier */ + if ($YPos < $Bottom_Margin + $line_height * 5){ + include('includes/PDFOstdgGRNsPageHeader.inc'); + } $YPos -= (2*$line_height); $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,260-$Left_Margin,$FontSize,_('Total for') . ' ' . $Supplier . ' - ' . $SupplierName); $DisplaySuppTotVal = locale_number_format($SuppTot_Val,$GRNs['currdecimalplaces']); Modified: trunk/includes/PDFOstdgGRNsPageHeader.inc =================================================================== --- trunk/includes/PDFOstdgGRNsPageHeader.inc 2012-04-06 09:46:25 UTC (rev 5229) +++ trunk/includes/PDFOstdgGRNsPageHeader.inc 2012-04-07 18:09:09 UTC (rev 5230) @@ -26,9 +26,9 @@ /*Draw a rectangle to put the details in */ -$pdf->line($Left_Margin, $Page_Height-$YPos-$line_height,$Page_Width-$Right_Margin, $Page_Height-$YPos-$line_height); -$pdf->line($Left_Margin, $Page_Height-$YPos-$line_height,$Left_Margin, $YPos+10); -$pdf->line($Page_Width-$Right_Margin, $Page_Height-$YPos-$line_height,$Page_Width-$Right_Margin, $YPos+10); +$pdf->line($Left_Margin, $Bottom_Margin, $Page_Width-$Right_Margin, $Bottom_Margin); +$pdf->line($Left_Margin, $Bottom_Margin, $Left_Margin, $YPos+10); +$pdf->line($Page_Width-$Right_Margin, $Bottom_Margin, $Page_Width-$Right_Margin, $YPos+10); /*set up the headings */ $Xpos = $Left_Margin+1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-04-07 18:09:16
|
Revision: 5230 http://web-erp.svn.sourceforge.net/web-erp/?rev=5230&view=rev Author: vvs2012 Date: 2012-04-07 18:09:09 +0000 (Sat, 07 Apr 2012) Log Message: ----------- Fixed page breaks in PDF Balance Sheet and Outstanding GRNs Modified Paths: -------------- trunk/GLBalanceSheet.php trunk/OutstandingGRNs.php trunk/includes/PDFOstdgGRNsPageHeader.inc Modified: trunk/GLBalanceSheet.php =================================================================== --- trunk/GLBalanceSheet.php 2012-04-06 09:46:25 UTC (rev 5229) +++ trunk/GLBalanceSheet.php 2012-04-07 18:09:09 UTC (rev 5230) @@ -188,6 +188,9 @@ $GroupTotal[$Level]=0; $LYGroupTotal[$Level]=0; $Level--; + if ($YPos < $Bottom_Margin){ + include('includes/PDFBalanceSheetPageHeader.inc'); + } } $YPos -= $line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin+(10 * ($Level+1)),$YPos,200,$FontSize,_('Total') . ' ' . $ParentGroups[$Level]); @@ -197,6 +200,9 @@ $GroupTotal[$Level]=0; $LYGroupTotal[$Level]=0; $YPos -= $line_height; + if ($YPos < $Bottom_Margin){ + include('includes/PDFBalanceSheetPageHeader.inc'); + } } } @@ -209,6 +215,9 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,locale_number_format($SectionBalance,$_SESSION['CompanyRecord']['decimalplaces']),'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,locale_number_format($SectionBalanceLY,$_SESSION['CompanyRecord']['decimalplaces']),'right'); $YPos -= (2 * $line_height); + if ($YPos < $Bottom_Margin){ + include('includes/PDFBalanceSheetPageHeader.inc'); + } } $SectionBalanceLY = 0; $SectionBalance = 0; @@ -218,11 +227,16 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,200,$FontSize,$Sections[$myrow['sectioninaccounts']]); $YPos -= (2 * $line_height); - + if ($YPos < $Bottom_Margin){ + include('includes/PDFBalanceSheetPageHeader.inc'); + } } } if ($myrow['groupname']!= $ActGrp){ + if ($YPos < $Bottom_Margin + $line_height){ + include('includes/PDFBalanceSheetPageHeader.inc'); + } $FontSize =8; $pdf->setFont('','B'); if ($myrow['parentgroupname']==$ActGrp AND $ActGrp!=''){ Modified: trunk/OutstandingGRNs.php =================================================================== --- trunk/OutstandingGRNs.php 2012-04-06 09:46:25 UTC (rev 5229) +++ trunk/OutstandingGRNs.php 2012-04-07 18:09:09 UTC (rev 5230) @@ -84,6 +84,9 @@ if ($Supplier!=''){ /*Then it's NOT the first time round */ /* need to print the total of previous supplier */ + if ($YPos < $Bottom_Margin + $line_height * 5){ + include('includes/PDFOstdgGRNsPageHeader.inc'); + } $YPos -= (2*$line_height); $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,260-$Left_Margin,$FontSize,_('Total for') . ' ' . $Supplier . ' - ' . $SupplierName); $DisplaySuppTotVal = locale_number_format($SuppTot_Val,$GRNs['currdecimalplaces']); Modified: trunk/includes/PDFOstdgGRNsPageHeader.inc =================================================================== --- trunk/includes/PDFOstdgGRNsPageHeader.inc 2012-04-06 09:46:25 UTC (rev 5229) +++ trunk/includes/PDFOstdgGRNsPageHeader.inc 2012-04-07 18:09:09 UTC (rev 5230) @@ -26,9 +26,9 @@ /*Draw a rectangle to put the details in */ -$pdf->line($Left_Margin, $Page_Height-$YPos-$line_height,$Page_Width-$Right_Margin, $Page_Height-$YPos-$line_height); -$pdf->line($Left_Margin, $Page_Height-$YPos-$line_height,$Left_Margin, $YPos+10); -$pdf->line($Page_Width-$Right_Margin, $Page_Height-$YPos-$line_height,$Page_Width-$Right_Margin, $YPos+10); +$pdf->line($Left_Margin, $Bottom_Margin, $Page_Width-$Right_Margin, $Bottom_Margin); +$pdf->line($Left_Margin, $Bottom_Margin, $Left_Margin, $YPos+10); +$pdf->line($Page_Width-$Right_Margin, $Bottom_Margin, $Page_Width-$Right_Margin, $YPos+10); /*set up the headings */ $Xpos = $Left_Margin+1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-04-07 18:10:17
|
Revision: 5231 http://web-erp.svn.sourceforge.net/web-erp/?rev=5231&view=rev Author: vvs2012 Date: 2012-04-07 18:10:09 +0000 (Sat, 07 Apr 2012) Log Message: ----------- xhtml Modified Paths: -------------- trunk/PDFRemittanceAdvice.php trunk/PDFStockCheckComparison.php trunk/PDFStockLocTransfer.php trunk/PDFStockTransfer.php trunk/POReport.php trunk/PO_AuthorisationLevels.php trunk/PO_AuthoriseMyOrders.php trunk/PO_Header.php trunk/PO_Items.php trunk/PO_OrderDetails.php trunk/PO_PDFPurchOrder.php trunk/PO_SelectOSPurchOrder.php trunk/PO_SelectPurchOrder.php trunk/PeriodsInquiry.php Modified: trunk/PDFRemittanceAdvice.php =================================================================== --- trunk/PDFRemittanceAdvice.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PDFRemittanceAdvice.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -130,10 +130,14 @@ $title=_('Remittance Advices'); include('includes/header.inc'); + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . $title . '" alt="" />' . ' ' + . $title . '</p>'; /* show form to allow input */ - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"><table>'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table>'; if (!isset($_POST['FromCriteria']) or mb_strlen($_POST['FromCriteria'])<1){ $DefaultFromCriteria = '1'; @@ -146,7 +150,7 @@ $DefaultToCriteria = $_POST['ToCriteria']; } echo '<tr> - <td>' . _('From Supplier Code') . ':</font></td> + <td>' . _('From Supplier Code') . ':</td> <td><input type="text" maxlength="6" size="7" name="FromCriteria" value="' . $DefaultFromCriteria . '" /></td> </tr>'; echo '<tr> @@ -166,9 +170,13 @@ </tr>'; echo '</table> + <br /> <div class="centre"> - <input type="submit" Name="PrintPDF" value="' . _('Print PDF') . '" /> + <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> </div>'; + + echo '</div> + </form>'; include ('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/PDFStockCheckComparison.php =================================================================== --- trunk/PDFStockCheckComparison.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PDFStockCheckComparison.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -329,10 +329,12 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' . $title . '</p>'; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"><table class="selection">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - - echo '<tr><td>' . _('Choose Option'). ':</font></td> + + echo '<table class="selection">'; + echo '<tr><td>' . _('Choose Option'). ':</td> <td><select name="ReportOrClose">'; if ($_POST['ReportOrClose']=='ReportAndClose'){ @@ -355,7 +357,10 @@ echo '<option selected="selected" value="Leave">' . _('Do not Adjust System stock to Nil') . '</option>'; } + echo '</select></td></tr>'; echo '</table><br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF'). '" /></div>'; + echo '</div> + </form>'; include('includes/footer.inc'); Modified: trunk/PDFStockLocTransfer.php =================================================================== --- trunk/PDFStockLocTransfer.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PDFStockLocTransfer.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -16,6 +16,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Reprint transfer docket').'</p><br />'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table> <tr> @@ -23,8 +24,12 @@ <td><input type="text" class="number" size="10" name="TransferNo" /></td> </tr> </table>'; - echo '<div class="centre"> - <input type="submit" name="Print" value="' . _('Print') .'" />'; + echo '<br /> + <div class="centre"> + <input type="submit" name="Print" value="' . _('Print') .'" /> + </div>'; + echo '</div> + </form>'; include ('includes/footer.inc'); exit; } Modified: trunk/PDFStockTransfer.php =================================================================== --- trunk/PDFStockTransfer.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PDFStockTransfer.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -20,7 +20,8 @@ $title = _('Print Stock Transfer'); include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print Transfer Note') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" name="form">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" id="form">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> @@ -32,6 +33,7 @@ <div class="centre"> <input type="submit" name="Process" value="' . _('Print Transfer Note') . '" /> </div> + </div> </form>'; include('includes/footer.inc'); exit(); Modified: trunk/POReport.php =================================================================== --- trunk/POReport.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/POReport.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -66,7 +66,7 @@ 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>'; + '" alt="" />' . $title.'</p>'; display($db); } @@ -814,9 +814,10 @@ locale_number_format($TotalExtPrice,2), locale_number_format($TotalInvQty,2), ' '); + echo '</table>'; } // End of if ($_POST['ReportType'] - echo '</table>'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="ReportType" value="'.$_POST['ReportType'].'" />'; echo '<input type="hidden" name="DateType" value="'.$_POST['DateType'].'" />'; @@ -834,7 +835,8 @@ echo '<input type="hidden" name="SortBy" value="'.$_POST['SortBy'].'" />'; echo '<input type="hidden" name="SummaryType" value="'.$_POST['SummaryType'].'" />'; echo '<br /><div class="centre"><input type="submit" name="submitcsv" value="' . _('Export as csv file') . '" /></div>'; - echo '</form>'; + echo '</div> + </form>'; } // End of if inputerror != 1 } // End of function submit() @@ -1495,6 +1497,7 @@ // the page is called. echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; @@ -1503,17 +1506,17 @@ echo '<td><select name="ReportType">'; echo '<option selected="selected" value="Detail">' . _('Detail') . '</option>'; echo '<option value="Summary">' . _('Summary') . '</option>'; - echo '</select></td><td> </td></tr>'; + echo '</select></td><td> </td></tr>'; echo '<tr><td>' . _('Date Type') . ':</td>'; echo '<td><select name="DateType">'; echo '<option selected="selected" value="Order">' . _('Order Date') . '</option>'; echo '<option value="Delivery">' . _('Delivery Date') . '</option>'; - echo '</select></td><td> </td></tr>'; + echo '</select></td><td> </td></tr>'; echo '<tr> <td>' . _('Date Range') . ':</td> - <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" size="10" maxlength="10" value="' . $_POST['FromDate'] .'" /> ' . _('To') . ':   + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" size="10" maxlength="10" value="' . $_POST['FromDate'] .'" /> ' . _('To') . ': <input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '" /></td> </tr>'; @@ -1522,11 +1525,11 @@ echo '<option selected="selected" value="Equals">' . _('Equals') . '</option>'; echo '<option value="LIKE">' . _('Begins With') . '</option>'; echo '</select>'; - echo '  <input type="text" name="PartNumber" size="20" maxlength="20" value="'; + echo ' <input type="text" name="PartNumber" size="20" maxlength="20" value="'; if (isset($_POST['PartNumber'])) { echo $_POST['PartNumber'] . '" /></td></tr>'; } else { - echo '"></td></tr>'; + echo '" /></td></tr>'; } echo '<tr><td>' . _('Supplier Number') . ':</td>'; @@ -1534,11 +1537,11 @@ echo '<option selected="selected" value="Equals">' . _('Equals') . '</option>'; echo '<option value="LIKE">' . _('Begins With') . '</option>'; echo '</select>'; - echo '  <input type="text" name="SupplierId" size="10" maxlength="10" value="'; + echo ' <input type="text" name="SupplierId" size="10" maxlength="10" value="'; if (isset($_POST['SupplierId'])) { echo $_POST['SupplierId'] . '" /></td></tr>'; } else { - echo '"></td></tr>'; + echo '" /></td></tr>'; } echo '<tr><td>' . _('Supplier Name') . ':</td>'; @@ -1546,7 +1549,7 @@ echo '<option selected="selected" value="LIKE">' . _('Begins With') . '</option>'; echo '<option value="Equals">' . _('Equals') . '</option>'; echo '</select>'; - echo '  <input type="text" name="SupplierName" size="30" maxlength="30" value="'; + echo ' <input type="text" name="SupplierName" size="30" maxlength="30" value="'; if (isset($_POST['SupplierName'])) { echo $_POST['SupplierName'] . '" /></td></tr>'; } else { @@ -1554,12 +1557,12 @@ } echo '<tr><td>' . _('Order Number') . ':</td>'; - echo '<td>'._('Equals').':  '; + echo '<td>'._('Equals').': '; echo '<input type="text" name="OrderNo" size="10" maxlength="10" value="'; if (isset($_POST['OrderNo'])) { echo $_POST['OrderNo'] . '" /></td></tr>'; } else { - echo '"></td></tr>'; + echo '" /></td></tr>'; } echo '<tr><td>' . _('Line Item Status') . ':</td>'; @@ -1567,7 +1570,7 @@ echo '<option selected="selected" value="All">' . _('All') . '</option>'; echo '<option value="Completed">' . _('Completed') . '</option>'; echo '<option value="Open">' . _('Not Completed') . '</option>'; - echo '</select></td><td> </td></tr>'; + echo '</select></td><td> </td></tr>'; echo '<tr><td>' . _('Stock Categories') . ':</td><td><select name="Category">'; $sql="SELECT categoryid, categorydescription FROM stockcategory"; @@ -1578,16 +1581,16 @@ } echo '</select></td></tr>'; - echo '<tr><td> </td></tr>'; + echo '<tr><td> </td></tr>'; echo '<tr><td>' . _('Sort By') . ':</td>'; echo '<td><select name="SortBy">'; echo '<option selected="selected" value="purchorderdetails.orderno">' . _('Order Number') . '</option>'; echo '<option value="purchorderdetails.itemcode">' . _('Part Number') . '</option>'; echo '<option value="suppliers.supplierid,purchorderdetails.orderno">' . _('Supplier Number') . '</option>'; echo '<option value="suppliers.suppname,suppliers.supplierid,purchorderdetails.orderno">' . _('Supplier Name') . '</option>'; - echo '</select></td><td> </td></tr>'; + echo '</select></td><td> </td></tr>'; - echo '<tr><td> </td></tr>'; + echo '<tr><td> </td></tr>'; echo '<tr><td>' . _('Summary Type') . ':</td>'; echo '<td><select name="SummaryType">'; echo '<option selected="selected" value="orderno">' . _('Order Number') . '</option>'; @@ -1597,9 +1600,9 @@ echo '<option value="suppname">' . _('Supplier Name') . '</option>'; echo '<option value="month">' . _('Month') . '</option>'; echo '<option value="categoryid">' . _('Stock Category') . '</option>'; - echo '</select></td><td> </td></tr>'; + echo '</select></td><td> </td></tr>'; - echo '<tr><td> </td></tr> + echo '<tr><td> </td></tr> <tr> <td colspan="4"><div class="centre"><input type="submit" name="submit" value="' . _('Run Inquiry') . '" /></div></td> </tr> @@ -1608,7 +1611,8 @@ </tr> </table> <br/>'; - echo '</form>'; + echo '</div> + </form>'; } // End of function display() Modified: trunk/PO_AuthorisationLevels.php =================================================================== --- trunk/PO_AuthorisationLevels.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PO_AuthorisationLevels.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -147,10 +147,10 @@ <td>' . $DisplayCanCreate . '</td> <td>' . $DisplayOffHold . '</td> <td class="number">'.locale_number_format($myrow['authlevel'],$myrow['decimalplaces']).'</td> - <td><a href="'.$rootpath.'/PO_AuthorisationLevels.php?Edit=Yes&UserID=' . $myrow['userid'] . - '&Currency='.$myrow['currabrev'].'">'._('Edit').'</td> - <td><a href="'.$rootpath.'/PO_AuthorisationLevels.php?Delete=Yes&UserID=' . $myrow['userid'] . - '&Currency='.$myrow['currabrev'].'" onclick="return confirm(\'' . _('Are you sure you wish to delete this authorisation level?') . '\');">'._('Delete').'</td> + <td><a href="'.$rootpath.'/PO_AuthorisationLevels.php?Edit=Yes&UserID=' . $myrow['userid'] . + '&Currency='.$myrow['currabrev'].'">'._('Edit').'</a></td> + <td><a href="'.$rootpath.'/PO_AuthorisationLevels.php?Delete=Yes&UserID=' . $myrow['userid'] . + '&Currency='.$myrow['currabrev'].'" onclick="return confirm(\'' . _('Are you sure you wish to delete this authorisation level?') . '\');">'._('Delete').'</a></td> </tr>'; } @@ -164,7 +164,8 @@ $AuthLevel=0; } -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" name="form1">'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" id="form1">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; @@ -230,7 +231,7 @@ echo '<td><input type="checkbox" name="CanCreate" /></td> </tr>'; } else { - echo '<td><input type="checkbox" checked name="CanCreate" /></td> + echo '<td><input type="checkbox" checked="checked" name="CanCreate" /></td> </tr>'; } @@ -240,7 +241,7 @@ echo '<td><input type="checkbox" name="OffHold" /></td> </tr>'; } else { - echo '<td><input type="checkbox" checked name="OffHold" /></td> + echo '<td><input type="checkbox" checked="checked" name="OffHold" /></td> </tr>'; } @@ -254,14 +255,14 @@ echo '<br /> <div class="centre"> <input type="submit" name="Update" value="'._('Update Information').'" /> - </div> - </form>'; + </div>'; } else { echo '<br /> <div class="centre"> <input type="submit" name="Submit" value="'._('Enter Information').'" /> - </div> - </form>'; + </div>'; } +echo '</div> + </form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/PO_AuthoriseMyOrders.php =================================================================== --- trunk/PO_AuthoriseMyOrders.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PO_AuthoriseMyOrders.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -49,6 +49,7 @@ $result=DB_query($sql, $db); echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; @@ -140,6 +141,7 @@ <div class="centre"> <input type="submit" name="UpdateAll" value="' . _('Update'). '" /> </div> + </div> </form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PO_Header.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -302,13 +302,9 @@ if (isset($_POST['SearchSuppliers'])){ - if (mb_strlen($_POST['Keywords'])>0 AND mb_strlen($_SESSION['PO'.$identifier]->SupplierID)>0) { - prnMsg(_('Supplier name keywords have been used in preference to the supplier code extract entered'),'warn'); - } - if ($_POST['Keywords']=='' AND $_POST['SuppCode']=='') { - echo '<div><br /><br /></div>'; - prnMsg(_('At least one Supplier Name keyword OR an extract of a Supplier Code must be entered for the search'),'error'); - } else { + if (mb_strlen($_POST['Keywords'])>0 AND mb_strlen($_SESSION['PO'.$identifier]->SupplierID)>0) { + prnMsg(_('Supplier name keywords have been used in preference to the supplier code extract entered'),'warn'); + } if (mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -339,7 +335,19 @@ FROM suppliers WHERE suppliers.supplierid " . LIKE . " '%" . $_POST['SuppCode'] . "%' ORDER BY suppliers.supplierid"; - } + } else { + $SQL = "SELECT suppliers.supplierid, + suppliers.suppname, + suppliers.address1, + suppliers.address2, + suppliers.address3, + suppliers.address4, + suppliers.address5, + suppliers.address6, + suppliers.currcode + FROM suppliers + ORDER BY suppliers.supplierid"; + } $ErrMsg = _('The searched supplier records requested cannot be retrieved because'); $result_SuppSelect = DB_query($SQL,$db,$ErrMsg); @@ -351,7 +359,6 @@ prnMsg( _('No supplier records contain the selected text') . ' - ' . _('please alter your search criteria and try again'),'info'); } - } /*one of keywords or SuppCode was more than a zero length string */ } /*end of if search for supplier codes/names */ @@ -525,32 +532,33 @@ OR $_SESSION['PO'.$identifier]->SupplierID=='' ) { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . - _('Purchase Order') . '" alt="">' . ' ' . _('Purchase Order: Select Supplier') . ''; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '" method="post" name="choosesupplier">'; + _('Purchase Order') . '" alt="" />' . ' ' . _('Purchase Order: Select Supplier') . '</p>'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '" method="post" id="choosesupplier">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SuppliersReturned)){ echo '<input type="hidden" name="SuppliersReturned" value="' . $SuppliersReturned .'" />'; } - echo '<table cellpadding="3" colspan="4" class="selection"> + echo '<table cellpadding="3" class="selection"> <tr> - <td><font size="1">' . _('Enter text in the supplier name') . ':</font></td> + <td>' . _('Enter text in the supplier name') . ':</td> <td><input type="text" name="Keywords" size="20" maxlength="25" /></td> - <td><font size="3"><b>' . _('OR') . '</b></font></td> - <td><font size="1">' . _('Enter text extract in the supplier code') . ':</font></td> + <td><h3><b>' . _('OR') . '</b></h3></td> + <td>' . _('Enter text extract in the supplier code') . ':</td> <td><input type="text" name="SuppCode" size="15" maxlength="18" /></td> </tr> </table> <br /> <div class="centre"> <input type="submit" name="SearchSuppliers" value="' . _('Search Now') . '" /> - <input type="submit" action="reset" value="' . _('Reset') . '" /></div>'; + <input type="submit" value="' . _('Reset') . '" /></div>'; echo '<script type="text/javascript">defaultControl(document.forms[0].Keywords);</script>'; if (isset($result_SuppSelect)) { - echo '<br /><table cellpadding="3" colspan="7" class="selection">'; + echo '<br /><table cellpadding="3" class="selection">'; $tableheader = '<tr> <th>' . _('Code') . '</th> @@ -597,13 +605,14 @@ } else { /* everything below here only do if a supplier is selected */ - echo '<form name="form1" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '" method="post">'; + echo '<form id="form1" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"> <img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Purchase Order') . '" alt="" /> ' . $_SESSION['PO'.$identifier]->SupplierName . ' - ' . _('All amounts stated in') . ' - ' . $_SESSION['PO'.$identifier]->CurrCode . '<br />'; + ' . $_SESSION['PO'.$identifier]->CurrCode . '</p>'; if ($_SESSION['ExistingOrder']) { echo _(' Modify Purchase Order Number') . ' ' . $_SESSION['PO'.$identifier]->OrderNo; @@ -712,10 +721,10 @@ $_POST['PaymentTerms']=$_SESSION['PO'.$identifier]->PaymentTerms; } - echo '<br /><table colspan="1" width="80%"> + echo '<br /><table width="80%"> <tr> - <th><b>' . _('Order Initiation Details') . '</b></th> - <th><b>' . _('Order Status') . '</b></th> + <th><h3>' . _('Order Initiation Details') . '</h3></th> + <th><h3>' . _('Order Status') . '</h3></th> </tr> <tr><td style="width:50%">'; //sub table starts @@ -787,10 +796,10 @@ echo '<tr><td colspan="2"><a target="_blank" href="' . $rootpath . '/PO_PDFPurchOrder.php?OrderNo=' . $_SESSION['ExistingOrder'] . '&identifier='.$identifier. '">' . _('Reprint Now') . '</a></td></tr>'; } - echo '</table>'; + echo '</table></td>'; //Set up the next column with a sub-table in it too - echo '<td style="width:50%" valign=top> - <table class="selection" width="100%">'; + echo '<td style="width:50%" valign="top"> + <table class="selection" width="100%">'; if($_SESSION['ExistingOrder'] != 0 AND $_SESSION['PO'.$identifier]->Status == 'Printed'){ @@ -798,8 +807,8 @@ $_SESSION['PO'.$identifier]->OrderNo . '&identifier=' . $identifier . '">'._('Receive this order').'</a></td></tr>'; } if ($_SESSION['PO'.$identifier]->Status==''){ //then its a new order - echo '<input type="hidden" name="Status" value="NewOrder" />'; - echo '<tr><td>' . _('New Purchase Order') . '</td></tr>'; + echo '<tr><td><input type="hidden" name="Status" value="NewOrder" />'; + echo _('New Purchase Order') . '</td></tr>'; } else { echo '<tr><td>' . _('Status') . ' : </td> <td><select name="Status" onchange="ReloadForm(form1.UpdateStatus)">'; @@ -845,18 +854,17 @@ </tr>'; echo '<input type="hidden" name="StatusCommentsComplete" value="' . htmlspecialchars($_SESSION['PO'.$identifier]->StatusComments, ENT_QUOTES,'UTF-8') .'" />'; - echo '<tr><td><input type="submit" name="UpdateStatus" value="' . _('Status Update') .'" /></td>'; + echo '<tr><td><input type="submit" name="UpdateStatus" value="' . _('Status Update') .'" /></td></tr>'; } //end its not a new order - echo '</tr></table></td>'; + echo '</table></td></tr>'; - echo '<table width="80%"> - <tr> - <th><font color=blue size="4"><b>' . _('Warehouse Info') . '</b></font></th> - <!-- <th><font color=blue size="4"><b>' . _('Delivery To') . '</b></font></th> --> - <th><font color=blue size="4"><b>' . _('Supplier Info') . '</b></font></th> + echo '<tr> + <th><h3>' . _('Warehouse Info') . '</h3></th> + <!-- <th><h3>' . _('Delivery To') . '</h3></th> --> + <th><h3>' . _('Supplier Info') . '</h3></th> </tr> - <tr><td valign=top>'; + <tr><td valign="top">'; /*nested table level1 */ echo '<table class="selection" width="100%"> @@ -1005,7 +1013,7 @@ } } - echo '</select></tr></table>'; + echo '</select></td></tr></table>'; /* end of sub table */ echo '</td><td>'; /*sub table nested */ @@ -1028,8 +1036,7 @@ echo '<input type="submit" name="SearchSuppliers" value="' . _('Select Now') . '" /></td> </tr>'; - echo '</td></tr> - <tr> + echo '<tr> <td>' . _('Supplier Contact') . ':</td> <td><select name="SupplierContact">'; @@ -1106,12 +1113,12 @@ <td><input type="text" name="ExRate" value="'. locale_number_format($_POST['ExRate'],5).'" class="number" size="11" /></td> </tr>'; } else { - echo '<input type="hidden" name="ExRate" value="1" />'; + echo '<tr><td><input type="hidden" name="ExRate" value="1" /></td></tr>'; } - echo '</td></tr></table>'; /*end of sub table */ + echo '</table>'; /*end of sub table */ echo '</td></tr> - <tr><th colspan="4"><font color="blue" size="4"><b>' . _('Comments'); + <tr><th colspan="4"><h3>' . _('Comments'); $Default_Comments = ''; @@ -1119,11 +1126,9 @@ $_POST['Comments']=$Default_Comments; } - echo ':</b></font></th></tr> - <tr><td colspan="4"><textarea name="Comments" style="width:100%" rows="5">' . $_POST['Comments'] . '</textarea>'; + echo ':</h3></th></tr> + <tr><td colspan="4"><textarea name="Comments" style="width:100%" rows="5" cols="200">' . $_POST['Comments'] . '</textarea>'; - echo '</table>'; - echo '</td></tr></table><br />'; /* end of main table */ echo '<div class="centre"> @@ -1132,6 +1137,7 @@ } /*end of if supplier selected */ -echo '</form>'; +echo '</div> + </form>'; include('includes/footer.inc'); ?> Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PO_Items.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -641,20 +641,21 @@ /* This is where the order as selected should be displayed reflecting any deletions or insertions*/ -echo '<form name="form1" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '" method="post">'; +echo '<form id="form1" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '" method="post">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /*need to set up entry for item description where not a stock item and GL Codes */ if (count($_SESSION['PO'.$identifier]->LineItems)>0 and !isset($_GET['Edit'])){ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . - _('Purchase Order') . '" alt=""> '.$_SESSION['PO'.$identifier]->SupplierName; + _('Purchase Order') . '" alt="" /> '.$_SESSION['PO'.$identifier]->SupplierName; if (isset($_SESSION['PO'.$identifier]->OrderNo)) { echo ' ' . _('Purchase Order') .' '. $_SESSION['PO'.$identifier]->OrderNo ; } - echo '<br /><b>'._(' Order Summary') . '</b>'; - echo '<table cellpadding="2" colspan="7" class="selection">'; + echo '<br /><b>'._(' Order Summary') . '</b></p>'; + echo '<table cellpadding="2" class="selection">'; echo '<tr> <th>' . _('Item Code') . '</th> <th>' . _('Description') . '</th> @@ -705,9 +706,9 @@ <td class="number">' . $DisplayLineTotal . '</td> <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'].'" name="ReqDelDate' . $POLine->LineNo.'" size="10" value="' .$POLine->ReqDelDate .'" /></td>'; if ($POLine->QtyReceived !=0 AND $POLine->Completed!=1){ - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier .'&Complete=' . $POLine->LineNo . '">' . _('Complete') . '</a></td>'; + echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier .'&Complete=' . $POLine->LineNo . '">' . _('Complete') . '</a></td>'; } elseif ($POLine->QtyReceived ==0) { - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier .'&Delete=' . $POLine->LineNo . '">' . _('Delete'). '</a></td>'; + echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier .'&Delete=' . $POLine->LineNo . '">' . _('Delete'). '</a></td>'; } echo '</tr>'; $_SESSION['PO'.$identifier]->Total += $LineTotal; @@ -1013,10 +1014,9 @@ echo '<table class="selection"> <tr> - <th colspan="3"><font size="3" color="blue">'. _('Search For Stock Items') . '</th>'; + <th colspan="3"><h3>'. _('Search For Stock Items') . ':</h3></th>'; - echo ':</font> - </tr> + echo '</tr> <tr><td>' . _('Item Category') . ': <select name="StockCat">'; echo '<option selected="selected" value="All">' . _('All') . '</option>'; @@ -1048,11 +1048,11 @@ echo 'checked'; } echo ' /></td> - <td><font size="3"><b>' . _('OR') . ' </b></font>' . _('Enter extract of the Stock Code') . ':</td> + <td><b>' . _('OR') . ' </b>' . _('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> + <td><b>' . _('OR') . ' </b><a target="_blank" href="'.$rootpath.'/Stocks.php">' . _('Create a New Stock Item') . '</a></td></tr> </table> <br /> @@ -1065,7 +1065,7 @@ if (isset($SearchResult)) { - echo '<table cellpadding="1" colspan="7" class="selection">'; + echo '<table cellpadding="1" class="selection">'; $TableHeader = '<tr> <th>' . _('Code') . '</th> @@ -1133,6 +1133,7 @@ echo '<a name="end"></a><br /><div class="centre"><input type="submit" name="NewItem" value="Order some" /></div>'; }#end if SearchResults to show -echo '</form>'; +echo '</div> + </form>'; include('includes/footer.inc'); ?> Modified: trunk/PO_OrderDetails.php =================================================================== --- trunk/PO_OrderDetails.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PO_OrderDetails.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -24,7 +24,7 @@ $OrderRow = DB_fetch_row($OrderResult); $_GET['OrderNo'] = $OrderRow[0]; - echo '<br /><font size="4" color=BLUE>' . _('Order Number') . ' ' . $_GET['OrderNo'] . '</font>'; + echo '<br /><h3>' . _('Order Number') . ' ' . $_GET['OrderNo'] . '</h3>'; } if (!isset($_GET['OrderNo'])) { @@ -85,30 +85,30 @@ _('Purchase Order') . '" alt="" />' . ' ' . $title . '</p>'; echo '<table class="selection" cellpadding="2">'; -echo '<tr><th colspan="8"><font size="3" color="navy">'. _('Order Header Details'). '</font></th></tr>'; -echo '<tr><th style="text-align:left">' . _('Supplier Code'). '</td><td><a href="SelectSupplier.php?SupplierID='.$myrow['supplierid'].'">' . $myrow['supplierid'] . '</a></td> - <th style="text-align:left">' . _('Supplier Name'). '</td><td><a href="SelectSupplier.php?SupplierID='.$myrow['supplierid'].'">' . $myrow['suppname'] . '</a></td></tr>'; +echo '<tr><th colspan="8"><b>'. _('Order Header Details'). '</b></th></tr>'; +echo '<tr><td style="text-align:left">' . _('Supplier Code'). '</td><td><a href="SelectSupplier.php?SupplierID='.$myrow['supplierid'].'">' . $myrow['supplierid'] . '</a></td> + <td style="text-align:left">' . _('Supplier Name'). '</td><td><a href="SelectSupplier.php?SupplierID='.$myrow['supplierid'].'">' . $myrow['suppname'] . '</a></td></tr>'; -echo '<tr><th style="text-align:left">' . _('Ordered On'). '</td><td>' . ConvertSQLDate($myrow['orddate']) . '</td> - <th style="text-align:left">' . _('Delivery Address 1'). '</td><td>' . $myrow['deladd1'] . '</td></tr>'; +echo '<tr><td style="text-align:left">' . _('Ordered On'). '</td><td>' . ConvertSQLDate($myrow['orddate']) . '</td> + <td style="text-align:left">' . _('Delivery Address 1'). '</td><td>' . $myrow['deladd1'] . '</td></tr>'; -echo '<tr><th style="text-align:left">' . _('Order Currency'). '</td><td>' . $myrow['currcode'] . '</td> - <th style="text-align:left">' . _('Delivery Address 2'). '</td><td>' . $myrow['deladd2'] . '</td></tr>'; +echo '<tr><td style="text-align:left">' . _('Order Currency'). '</td><td>' . $myrow['currcode'] . '</td> + <td style="text-align:left">' . _('Delivery Address 2'). '</td><td>' . $myrow['deladd2'] . '</td></tr>'; -echo '<tr><th style="text-align:left">' . _('Exchange Rate'). '</td><td>' . $myrow['rate'] . '</td> - <th style="text-align:left">' . _('Delivery Address 3'). '</td><td>' . $myrow['deladd3'] . '</td></tr>'; +echo '<tr><td style="text-align:left">' . _('Exchange Rate'). '</td><td>' . $myrow['rate'] . '</td> + <td style="text-align:left">' . _('Delivery Address 3'). '</td><td>' . $myrow['deladd3'] . '</td></tr>'; -echo '<tr><th style="text-align:left">' . _('Deliver Into Location'). '</td><td>' . $myrow['locationname'] . '</td> - <th style="text-align:left">' . _('Delivery Address 4'). '</td><td>' . $myrow['deladd4'] . '</td></tr>'; +echo '<tr><td style="text-align:left">' . _('Deliver Into Location'). '</td><td>' . $myrow['locationname'] . '</td> + <td style="text-align:left">' . _('Delivery Address 4'). '</td><td>' . $myrow['deladd4'] . '</td></tr>'; -echo '<tr><th style="text-align:left">' . _('Initiator'). '</td><td>' . $myrow['realname'] . '</td> - <th style="text-align:left">' . _('Delivery Address 5'). '</td><td>' . $myrow['deladd5'] . '</td></tr>'; +echo '<tr><td style="text-align:left">' . _('Initiator'). '</td><td>' . $myrow['realname'] . '</td> + <td style="text-align:left">' . _('Delivery Address 5'). '</td><td>' . $myrow['deladd5'] . '</td></tr>'; -echo '<tr><th style="text-align:left">' . _('Requisition Ref'). '.</td><td>' . $myrow['requisitionno'] . '</td> - <th style="text-align:left">' . _('Delivery Address 6'). '</td><td>' . $myrow['deladd6'] . '</td></tr>'; +echo '<tr><td style="text-align:left">' . _('Requisition Ref'). '.</td><td>' . $myrow['requisitionno'] . '</td> + <td style="text-align:left">' . _('Delivery Address 6'). '</td><td>' . $myrow['deladd6'] . '</td></tr>'; -echo '<tr><th style="text-align:left">'. _('Printing') . '</td><td colspan="3">'; +echo '<tr><td style="text-align:left">'. _('Printing') . '</td><td colspan="3">'; if ($myrow['dateprinted'] == ''){ echo '<i>'. _('Not yet printed') . '</i> '; @@ -119,9 +119,9 @@ } echo '</td></tr>'; -echo '<tr><th style="text-align:left">'. _('Status') . '</td><td>'. _($myrow['status']) . '</td></tr>'; +echo '<tr><td style="text-align:left">'. _('Status') . '</td><td>'. _($myrow['status']) . '</td></tr>'; -echo '<tr><th style="text-align:left">' . _('Comments'). '</td><td colspan="3">' . $myrow['comments'] . '</td></tr>'; +echo '<tr><td style="text-align:left">' . _('Comments'). '</td><td colspan="3">' . $myrow['comments'] . '</td></tr>'; echo '</table>'; @@ -140,17 +140,17 @@ $LineItemsResult = DB_query($LineItemsSQL,$db, $ErrMsg); -echo '<table colspan="8" class="selection" cellpadding="0">'; -echo '<tr><th colspan="8"><font size="3" color="navy">'. _('Order Line Details'). '</font></th></tr>'; +echo '<table class="selection" cellpadding="0">'; +echo '<tr><th colspan="8"><b>'. _('Order Line Details'). '</b></th></tr>'; echo '<tr> - <th>' . _('Item Code'). '</td> - <th>' . _('Item Description'). '</td> - <th>' . _('Ord Qty'). '</td> - <th>' . _('Qty Recd'). '</td> - <th>' . _('Qty Inv'). '</td> - <th>' . _('Ord Price'). '</td> - <th>' . _('Chg Price'). '</td> - <th>' . _('Reqd Date'). '</td> + <td>' . _('Item Code'). '</td> + <td>' . _('Item Description'). '</td> + <td>' . _('Ord Qty'). '</td> + <td>' . _('Qty Recd'). '</td> + <td>' . _('Qty Inv'). '</td> + <td>' . _('Ord Price'). '</td> + <td>' . _('Chg Price'). '</td> + <td>' . _('Reqd Date'). '</td> </tr>'; $k =0; //row colour counter Modified: trunk/PO_PDFPurchOrder.php =================================================================== --- trunk/PO_PDFPurchOrder.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PO_PDFPurchOrder.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -349,6 +349,7 @@ else { /*the user has just gone into the page need to ask the question whether to print the order or email it to the supplier */ include ('includes/header.inc'); echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if ($ViewingOnly==1){ echo '<input type="hidden" name="ViewingOnly" value="1" />'; @@ -421,6 +422,7 @@ <div class="centre"> <input type="submit" name="DoIt" value="' . _('OK') . '" /> </div> + </div> </form>'; include('includes/footer.inc'); Modified: trunk/PO_SelectOSPurchOrder.php =================================================================== --- trunk/PO_SelectOSPurchOrder.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PO_SelectOSPurchOrder.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -30,6 +30,7 @@ } echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -132,7 +133,7 @@ if (!isset($OrderNumber) or $OrderNumber=='' ){ if (isset($SelectedSupplier)){ - echo '<a href="' . $rootpath . '/PO_Header.php?NewOrder=Yes&SupplierID=' . $SelectedSupplier . '">' . _('Add Purchase Order') . '</a>'; + echo '<a href="' . $rootpath . '/PO_Header.php?NewOrder=Yes&SupplierID=' . $SelectedSupplier . '">' . _('Add Purchase Order') . '</a>'; } else { echo '<a href="' . $rootpath . '/PO_Header.php?NewOrder=Yes">' . _('Add Purchase Order') . '</a>'; } @@ -193,13 +194,12 @@ $SQL="SELECT categoryid, categorydescription FROM stockcategory ORDER BY categorydescription"; $result1 = DB_query($SQL,$db); -echo '<br /><font size="1"><div class="page_help_text">' ._('To search for purchase orders for a specific part use the part selection facilities below') - .'</div> </font>'; +echo '<br /><div class="page_help_text">' ._('To search for purchase orders for a specific part use the part selection facilities below') . '</div>'; echo '<br /> <table class="selection"> <tr>'; -echo '<td><font size="1">' . _('Select a stock category') . ':</font> +echo '<td>' . _('Select a stock category') . ': <select name="StockCat">'; while ($myrow1 = DB_fetch_array($result1)) { @@ -210,11 +210,11 @@ } } echo '</select></td>'; -echo '<td><font size="1">' . _('Enter text extracts in the') . '<b>' . _('description') . '</b>:</font></td>'; +echo '<td>' . _('Enter text extracts in the') . '<b>' . _('description') . '</b>:</td>'; echo '<td><input type="text" name="Keywords" size="20" maxlength="25" /></td> </tr> <tr><td></td>'; -echo '<td><font size="4"><b>' . _('OR') . '</b></font><font size="1">' . _('Enter extract of the') . '<b>' . _('Stock Code') . '</b>:</font></td>'; +echo '<td><b>' . _('OR') . '</b>' . _('Enter extract of the') . '<b>' . _('Stock Code') . '</b>:</td>'; echo '<td><input type="text" name="StockCode" size="15" maxlength="18" /></td> </tr> </table> @@ -230,7 +230,7 @@ if (isset($StockItemsResult)) { - echo '<table cellpadding="2" colspan="7" class="selection">'; + echo '<table cellpadding="2" class="selection">'; $TableHeader = '<tr><th>' . _('Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('On Hand') . '</th> @@ -477,7 +477,7 @@ /*show a table of the orders returned by the SQL */ - echo '<table cellpadding="2" colspan="7 width="97%" class="selection">'; + echo '<table cellpadding="2" width="97%" class="selection">'; echo '<tr> @@ -518,7 +518,7 @@ } elseif ($myrow['status'] == 'Authorisied' AND $myrow['allowprint'] == 0) { $PrintPurchOrder = _('Printed'); } elseif ($myrow['status'] == 'Printed'){ - $PrintPurchOrder = '<a target="_blank" href="' . $rootpath . '/PO_PDFPurchOrder.php?OrderNo=' . $myrow['orderno'] . '&realorderno=' . $myrow['realorderno'] . '&ViewingOnly=2"> + $PrintPurchOrder = '<a target="_blank" href="' . $rootpath . '/PO_PDFPurchOrder.php?OrderNo=' . $myrow['orderno'] . '&realorderno=' . $myrow['realorderno'] . '&ViewingOnly=2"> ' . _('Print Copy') . '</a>'; } else { $PrintPurchOrder = _('N/A'); @@ -549,6 +549,7 @@ echo '</table>'; } echo '<script type="text/javascript">defaultControl(document.forms[0].StockCode);</script>'; -echo '</form>'; +echo '</div> + </form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/PO_SelectPurchOrder.php =================================================================== --- trunk/PO_SelectPurchOrder.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PO_SelectPurchOrder.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -25,6 +25,7 @@ $SelectedSupplier = $_POST['SelectedSupplier']; } echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($_POST['ResetPart'])) { unset($SelectedStockItem); @@ -175,9 +176,9 @@ <table class="selection"> <tr> <td>'; -echo '<font size="1">' . _('To search for purchase orders for a specific part use the part selection facilities below') . '</font>'; +echo _('To search for purchase orders for a specific part use the part selection facilities below') . '</td></tr>'; echo '<tr> - <td><font size="1">' . _('Select a stock category') . ':</font><select name="StockCat">'; + <td>' . _('Select a stock category') . ':<select name="StockCat">'; while ($myrow1 = DB_fetch_array($result1)) { if (isset($_POST['StockCat']) and $myrow1['categoryid'] == $_POST['StockCat']) { echo '<option selected="selected" value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; @@ -186,12 +187,12 @@ } } echo '</select></td> - <td><font size="1">' . _('Enter text extracts in the') . ' <b>' . _('description') . '</b>:</font></td> + <td>' . _('Enter text extracts in the') . ' <b>' . _('description') . '</b>:</td> <td><input type="text" name="Keywords" size="20" maxlength="25" /></td> </tr> <tr> <td></td> - <td><font size="3"><b>' . _('OR') . ' </b></font><font size="1">' . _('Enter extract of the') . '<b>' . _('Stock Code') . '</b>:</font></td> + <td><b>' . _('OR') . ' </b>' . _('Enter extract of the') . '<b>' . _('Stock Code') . '</b>:</td> <td><input type="text" name="StockCode" size="15" maxlength="18" /></td> </tr> <tr> @@ -425,7 +426,7 @@ if (DB_num_rows($PurchOrdersResult) > 0) { /*show a table of the orders returned by the SQL */ - echo '<table cellpadding="2" colspan="7" width="90%" class="selection">'; + echo '<table cellpadding="2" width="90%" class="selection">'; $TableHeader = '<tr> <th>' . _('View') . '</th> <th>' . _('Supplier') . '</th> @@ -476,6 +477,7 @@ echo '</table>'; } // end if purchase orders to show } -echo '</form>'; +echo '</div> + </form>'; include ('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/PeriodsInquiry.php =================================================================== --- trunk/PeriodsInquiry.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PeriodsInquiry.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -32,7 +32,7 @@ for ($i=0;$i<3;$i++) { echo '<td valign="top">'; - echo '<table cellpadding="2" colspan="2" class="selection">'; + echo '<table cellpadding="2" class="selection">'; echo $TableHeader; $k=0; $j=0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-04-07 18:10:17
|
Revision: 5231 http://web-erp.svn.sourceforge.net/web-erp/?rev=5231&view=rev Author: vvs2012 Date: 2012-04-07 18:10:09 +0000 (Sat, 07 Apr 2012) Log Message: ----------- xhtml Modified Paths: -------------- trunk/PDFRemittanceAdvice.php trunk/PDFStockCheckComparison.php trunk/PDFStockLocTransfer.php trunk/PDFStockTransfer.php trunk/POReport.php trunk/PO_AuthorisationLevels.php trunk/PO_AuthoriseMyOrders.php trunk/PO_Header.php trunk/PO_Items.php trunk/PO_OrderDetails.php trunk/PO_PDFPurchOrder.php trunk/PO_SelectOSPurchOrder.php trunk/PO_SelectPurchOrder.php trunk/PeriodsInquiry.php Modified: trunk/PDFRemittanceAdvice.php =================================================================== --- trunk/PDFRemittanceAdvice.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PDFRemittanceAdvice.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -130,10 +130,14 @@ $title=_('Remittance Advices'); include('includes/header.inc'); + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . $title . '" alt="" />' . ' ' + . $title . '</p>'; /* show form to allow input */ - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"><table>'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table>'; if (!isset($_POST['FromCriteria']) or mb_strlen($_POST['FromCriteria'])<1){ $DefaultFromCriteria = '1'; @@ -146,7 +150,7 @@ $DefaultToCriteria = $_POST['ToCriteria']; } echo '<tr> - <td>' . _('From Supplier Code') . ':</font></td> + <td>' . _('From Supplier Code') . ':</td> <td><input type="text" maxlength="6" size="7" name="FromCriteria" value="' . $DefaultFromCriteria . '" /></td> </tr>'; echo '<tr> @@ -166,9 +170,13 @@ </tr>'; echo '</table> + <br /> <div class="centre"> - <input type="submit" Name="PrintPDF" value="' . _('Print PDF') . '" /> + <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> </div>'; + + echo '</div> + </form>'; include ('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/PDFStockCheckComparison.php =================================================================== --- trunk/PDFStockCheckComparison.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PDFStockCheckComparison.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -329,10 +329,12 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' . $title . '</p>'; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"><table class="selection">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - - echo '<tr><td>' . _('Choose Option'). ':</font></td> + + echo '<table class="selection">'; + echo '<tr><td>' . _('Choose Option'). ':</td> <td><select name="ReportOrClose">'; if ($_POST['ReportOrClose']=='ReportAndClose'){ @@ -355,7 +357,10 @@ echo '<option selected="selected" value="Leave">' . _('Do not Adjust System stock to Nil') . '</option>'; } + echo '</select></td></tr>'; echo '</table><br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF'). '" /></div>'; + echo '</div> + </form>'; include('includes/footer.inc'); Modified: trunk/PDFStockLocTransfer.php =================================================================== --- trunk/PDFStockLocTransfer.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PDFStockLocTransfer.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -16,6 +16,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Reprint transfer docket').'</p><br />'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table> <tr> @@ -23,8 +24,12 @@ <td><input type="text" class="number" size="10" name="TransferNo" /></td> </tr> </table>'; - echo '<div class="centre"> - <input type="submit" name="Print" value="' . _('Print') .'" />'; + echo '<br /> + <div class="centre"> + <input type="submit" name="Print" value="' . _('Print') .'" /> + </div>'; + echo '</div> + </form>'; include ('includes/footer.inc'); exit; } Modified: trunk/PDFStockTransfer.php =================================================================== --- trunk/PDFStockTransfer.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PDFStockTransfer.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -20,7 +20,8 @@ $title = _('Print Stock Transfer'); include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print Transfer Note') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" name="form">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" id="form">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> @@ -32,6 +33,7 @@ <div class="centre"> <input type="submit" name="Process" value="' . _('Print Transfer Note') . '" /> </div> + </div> </form>'; include('includes/footer.inc'); exit(); Modified: trunk/POReport.php =================================================================== --- trunk/POReport.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/POReport.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -66,7 +66,7 @@ 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>'; + '" alt="" />' . $title.'</p>'; display($db); } @@ -814,9 +814,10 @@ locale_number_format($TotalExtPrice,2), locale_number_format($TotalInvQty,2), ' '); + echo '</table>'; } // End of if ($_POST['ReportType'] - echo '</table>'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="ReportType" value="'.$_POST['ReportType'].'" />'; echo '<input type="hidden" name="DateType" value="'.$_POST['DateType'].'" />'; @@ -834,7 +835,8 @@ echo '<input type="hidden" name="SortBy" value="'.$_POST['SortBy'].'" />'; echo '<input type="hidden" name="SummaryType" value="'.$_POST['SummaryType'].'" />'; echo '<br /><div class="centre"><input type="submit" name="submitcsv" value="' . _('Export as csv file') . '" /></div>'; - echo '</form>'; + echo '</div> + </form>'; } // End of if inputerror != 1 } // End of function submit() @@ -1495,6 +1497,7 @@ // the page is called. echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; @@ -1503,17 +1506,17 @@ echo '<td><select name="ReportType">'; echo '<option selected="selected" value="Detail">' . _('Detail') . '</option>'; echo '<option value="Summary">' . _('Summary') . '</option>'; - echo '</select></td><td> </td></tr>'; + echo '</select></td><td> </td></tr>'; echo '<tr><td>' . _('Date Type') . ':</td>'; echo '<td><select name="DateType">'; echo '<option selected="selected" value="Order">' . _('Order Date') . '</option>'; echo '<option value="Delivery">' . _('Delivery Date') . '</option>'; - echo '</select></td><td> </td></tr>'; + echo '</select></td><td> </td></tr>'; echo '<tr> <td>' . _('Date Range') . ':</td> - <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" size="10" maxlength="10" value="' . $_POST['FromDate'] .'" /> ' . _('To') . ':   + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" size="10" maxlength="10" value="' . $_POST['FromDate'] .'" /> ' . _('To') . ': <input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '" /></td> </tr>'; @@ -1522,11 +1525,11 @@ echo '<option selected="selected" value="Equals">' . _('Equals') . '</option>'; echo '<option value="LIKE">' . _('Begins With') . '</option>'; echo '</select>'; - echo '  <input type="text" name="PartNumber" size="20" maxlength="20" value="'; + echo ' <input type="text" name="PartNumber" size="20" maxlength="20" value="'; if (isset($_POST['PartNumber'])) { echo $_POST['PartNumber'] . '" /></td></tr>'; } else { - echo '"></td></tr>'; + echo '" /></td></tr>'; } echo '<tr><td>' . _('Supplier Number') . ':</td>'; @@ -1534,11 +1537,11 @@ echo '<option selected="selected" value="Equals">' . _('Equals') . '</option>'; echo '<option value="LIKE">' . _('Begins With') . '</option>'; echo '</select>'; - echo '  <input type="text" name="SupplierId" size="10" maxlength="10" value="'; + echo ' <input type="text" name="SupplierId" size="10" maxlength="10" value="'; if (isset($_POST['SupplierId'])) { echo $_POST['SupplierId'] . '" /></td></tr>'; } else { - echo '"></td></tr>'; + echo '" /></td></tr>'; } echo '<tr><td>' . _('Supplier Name') . ':</td>'; @@ -1546,7 +1549,7 @@ echo '<option selected="selected" value="LIKE">' . _('Begins With') . '</option>'; echo '<option value="Equals">' . _('Equals') . '</option>'; echo '</select>'; - echo '  <input type="text" name="SupplierName" size="30" maxlength="30" value="'; + echo ' <input type="text" name="SupplierName" size="30" maxlength="30" value="'; if (isset($_POST['SupplierName'])) { echo $_POST['SupplierName'] . '" /></td></tr>'; } else { @@ -1554,12 +1557,12 @@ } echo '<tr><td>' . _('Order Number') . ':</td>'; - echo '<td>'._('Equals').':  '; + echo '<td>'._('Equals').': '; echo '<input type="text" name="OrderNo" size="10" maxlength="10" value="'; if (isset($_POST['OrderNo'])) { echo $_POST['OrderNo'] . '" /></td></tr>'; } else { - echo '"></td></tr>'; + echo '" /></td></tr>'; } echo '<tr><td>' . _('Line Item Status') . ':</td>'; @@ -1567,7 +1570,7 @@ echo '<option selected="selected" value="All">' . _('All') . '</option>'; echo '<option value="Completed">' . _('Completed') . '</option>'; echo '<option value="Open">' . _('Not Completed') . '</option>'; - echo '</select></td><td> </td></tr>'; + echo '</select></td><td> </td></tr>'; echo '<tr><td>' . _('Stock Categories') . ':</td><td><select name="Category">'; $sql="SELECT categoryid, categorydescription FROM stockcategory"; @@ -1578,16 +1581,16 @@ } echo '</select></td></tr>'; - echo '<tr><td> </td></tr>'; + echo '<tr><td> </td></tr>'; echo '<tr><td>' . _('Sort By') . ':</td>'; echo '<td><select name="SortBy">'; echo '<option selected="selected" value="purchorderdetails.orderno">' . _('Order Number') . '</option>'; echo '<option value="purchorderdetails.itemcode">' . _('Part Number') . '</option>'; echo '<option value="suppliers.supplierid,purchorderdetails.orderno">' . _('Supplier Number') . '</option>'; echo '<option value="suppliers.suppname,suppliers.supplierid,purchorderdetails.orderno">' . _('Supplier Name') . '</option>'; - echo '</select></td><td> </td></tr>'; + echo '</select></td><td> </td></tr>'; - echo '<tr><td> </td></tr>'; + echo '<tr><td> </td></tr>'; echo '<tr><td>' . _('Summary Type') . ':</td>'; echo '<td><select name="SummaryType">'; echo '<option selected="selected" value="orderno">' . _('Order Number') . '</option>'; @@ -1597,9 +1600,9 @@ echo '<option value="suppname">' . _('Supplier Name') . '</option>'; echo '<option value="month">' . _('Month') . '</option>'; echo '<option value="categoryid">' . _('Stock Category') . '</option>'; - echo '</select></td><td> </td></tr>'; + echo '</select></td><td> </td></tr>'; - echo '<tr><td> </td></tr> + echo '<tr><td> </td></tr> <tr> <td colspan="4"><div class="centre"><input type="submit" name="submit" value="' . _('Run Inquiry') . '" /></div></td> </tr> @@ -1608,7 +1611,8 @@ </tr> </table> <br/>'; - echo '</form>'; + echo '</div> + </form>'; } // End of function display() Modified: trunk/PO_AuthorisationLevels.php =================================================================== --- trunk/PO_AuthorisationLevels.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PO_AuthorisationLevels.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -147,10 +147,10 @@ <td>' . $DisplayCanCreate . '</td> <td>' . $DisplayOffHold . '</td> <td class="number">'.locale_number_format($myrow['authlevel'],$myrow['decimalplaces']).'</td> - <td><a href="'.$rootpath.'/PO_AuthorisationLevels.php?Edit=Yes&UserID=' . $myrow['userid'] . - '&Currency='.$myrow['currabrev'].'">'._('Edit').'</td> - <td><a href="'.$rootpath.'/PO_AuthorisationLevels.php?Delete=Yes&UserID=' . $myrow['userid'] . - '&Currency='.$myrow['currabrev'].'" onclick="return confirm(\'' . _('Are you sure you wish to delete this authorisation level?') . '\');">'._('Delete').'</td> + <td><a href="'.$rootpath.'/PO_AuthorisationLevels.php?Edit=Yes&UserID=' . $myrow['userid'] . + '&Currency='.$myrow['currabrev'].'">'._('Edit').'</a></td> + <td><a href="'.$rootpath.'/PO_AuthorisationLevels.php?Delete=Yes&UserID=' . $myrow['userid'] . + '&Currency='.$myrow['currabrev'].'" onclick="return confirm(\'' . _('Are you sure you wish to delete this authorisation level?') . '\');">'._('Delete').'</a></td> </tr>'; } @@ -164,7 +164,8 @@ $AuthLevel=0; } -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" name="form1">'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" id="form1">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; @@ -230,7 +231,7 @@ echo '<td><input type="checkbox" name="CanCreate" /></td> </tr>'; } else { - echo '<td><input type="checkbox" checked name="CanCreate" /></td> + echo '<td><input type="checkbox" checked="checked" name="CanCreate" /></td> </tr>'; } @@ -240,7 +241,7 @@ echo '<td><input type="checkbox" name="OffHold" /></td> </tr>'; } else { - echo '<td><input type="checkbox" checked name="OffHold" /></td> + echo '<td><input type="checkbox" checked="checked" name="OffHold" /></td> </tr>'; } @@ -254,14 +255,14 @@ echo '<br /> <div class="centre"> <input type="submit" name="Update" value="'._('Update Information').'" /> - </div> - </form>'; + </div>'; } else { echo '<br /> <div class="centre"> <input type="submit" name="Submit" value="'._('Enter Information').'" /> - </div> - </form>'; + </div>'; } +echo '</div> + </form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/PO_AuthoriseMyOrders.php =================================================================== --- trunk/PO_AuthoriseMyOrders.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PO_AuthoriseMyOrders.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -49,6 +49,7 @@ $result=DB_query($sql, $db); echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; @@ -140,6 +141,7 @@ <div class="centre"> <input type="submit" name="UpdateAll" value="' . _('Update'). '" /> </div> + </div> </form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PO_Header.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -302,13 +302,9 @@ if (isset($_POST['SearchSuppliers'])){ - if (mb_strlen($_POST['Keywords'])>0 AND mb_strlen($_SESSION['PO'.$identifier]->SupplierID)>0) { - prnMsg(_('Supplier name keywords have been used in preference to the supplier code extract entered'),'warn'); - } - if ($_POST['Keywords']=='' AND $_POST['SuppCode']=='') { - echo '<div><br /><br /></div>'; - prnMsg(_('At least one Supplier Name keyword OR an extract of a Supplier Code must be entered for the search'),'error'); - } else { + if (mb_strlen($_POST['Keywords'])>0 AND mb_strlen($_SESSION['PO'.$identifier]->SupplierID)>0) { + prnMsg(_('Supplier name keywords have been used in preference to the supplier code extract entered'),'warn'); + } if (mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -339,7 +335,19 @@ FROM suppliers WHERE suppliers.supplierid " . LIKE . " '%" . $_POST['SuppCode'] . "%' ORDER BY suppliers.supplierid"; - } + } else { + $SQL = "SELECT suppliers.supplierid, + suppliers.suppname, + suppliers.address1, + suppliers.address2, + suppliers.address3, + suppliers.address4, + suppliers.address5, + suppliers.address6, + suppliers.currcode + FROM suppliers + ORDER BY suppliers.supplierid"; + } $ErrMsg = _('The searched supplier records requested cannot be retrieved because'); $result_SuppSelect = DB_query($SQL,$db,$ErrMsg); @@ -351,7 +359,6 @@ prnMsg( _('No supplier records contain the selected text') . ' - ' . _('please alter your search criteria and try again'),'info'); } - } /*one of keywords or SuppCode was more than a zero length string */ } /*end of if search for supplier codes/names */ @@ -525,32 +532,33 @@ OR $_SESSION['PO'.$identifier]->SupplierID=='' ) { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . - _('Purchase Order') . '" alt="">' . ' ' . _('Purchase Order: Select Supplier') . ''; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '" method="post" name="choosesupplier">'; + _('Purchase Order') . '" alt="" />' . ' ' . _('Purchase Order: Select Supplier') . '</p>'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '" method="post" id="choosesupplier">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SuppliersReturned)){ echo '<input type="hidden" name="SuppliersReturned" value="' . $SuppliersReturned .'" />'; } - echo '<table cellpadding="3" colspan="4" class="selection"> + echo '<table cellpadding="3" class="selection"> <tr> - <td><font size="1">' . _('Enter text in the supplier name') . ':</font></td> + <td>' . _('Enter text in the supplier name') . ':</td> <td><input type="text" name="Keywords" size="20" maxlength="25" /></td> - <td><font size="3"><b>' . _('OR') . '</b></font></td> - <td><font size="1">' . _('Enter text extract in the supplier code') . ':</font></td> + <td><h3><b>' . _('OR') . '</b></h3></td> + <td>' . _('Enter text extract in the supplier code') . ':</td> <td><input type="text" name="SuppCode" size="15" maxlength="18" /></td> </tr> </table> <br /> <div class="centre"> <input type="submit" name="SearchSuppliers" value="' . _('Search Now') . '" /> - <input type="submit" action="reset" value="' . _('Reset') . '" /></div>'; + <input type="submit" value="' . _('Reset') . '" /></div>'; echo '<script type="text/javascript">defaultControl(document.forms[0].Keywords);</script>'; if (isset($result_SuppSelect)) { - echo '<br /><table cellpadding="3" colspan="7" class="selection">'; + echo '<br /><table cellpadding="3" class="selection">'; $tableheader = '<tr> <th>' . _('Code') . '</th> @@ -597,13 +605,14 @@ } else { /* everything below here only do if a supplier is selected */ - echo '<form name="form1" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '" method="post">'; + echo '<form id="form1" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"> <img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Purchase Order') . '" alt="" /> ' . $_SESSION['PO'.$identifier]->SupplierName . ' - ' . _('All amounts stated in') . ' - ' . $_SESSION['PO'.$identifier]->CurrCode . '<br />'; + ' . $_SESSION['PO'.$identifier]->CurrCode . '</p>'; if ($_SESSION['ExistingOrder']) { echo _(' Modify Purchase Order Number') . ' ' . $_SESSION['PO'.$identifier]->OrderNo; @@ -712,10 +721,10 @@ $_POST['PaymentTerms']=$_SESSION['PO'.$identifier]->PaymentTerms; } - echo '<br /><table colspan="1" width="80%"> + echo '<br /><table width="80%"> <tr> - <th><b>' . _('Order Initiation Details') . '</b></th> - <th><b>' . _('Order Status') . '</b></th> + <th><h3>' . _('Order Initiation Details') . '</h3></th> + <th><h3>' . _('Order Status') . '</h3></th> </tr> <tr><td style="width:50%">'; //sub table starts @@ -787,10 +796,10 @@ echo '<tr><td colspan="2"><a target="_blank" href="' . $rootpath . '/PO_PDFPurchOrder.php?OrderNo=' . $_SESSION['ExistingOrder'] . '&identifier='.$identifier. '">' . _('Reprint Now') . '</a></td></tr>'; } - echo '</table>'; + echo '</table></td>'; //Set up the next column with a sub-table in it too - echo '<td style="width:50%" valign=top> - <table class="selection" width="100%">'; + echo '<td style="width:50%" valign="top"> + <table class="selection" width="100%">'; if($_SESSION['ExistingOrder'] != 0 AND $_SESSION['PO'.$identifier]->Status == 'Printed'){ @@ -798,8 +807,8 @@ $_SESSION['PO'.$identifier]->OrderNo . '&identifier=' . $identifier . '">'._('Receive this order').'</a></td></tr>'; } if ($_SESSION['PO'.$identifier]->Status==''){ //then its a new order - echo '<input type="hidden" name="Status" value="NewOrder" />'; - echo '<tr><td>' . _('New Purchase Order') . '</td></tr>'; + echo '<tr><td><input type="hidden" name="Status" value="NewOrder" />'; + echo _('New Purchase Order') . '</td></tr>'; } else { echo '<tr><td>' . _('Status') . ' : </td> <td><select name="Status" onchange="ReloadForm(form1.UpdateStatus)">'; @@ -845,18 +854,17 @@ </tr>'; echo '<input type="hidden" name="StatusCommentsComplete" value="' . htmlspecialchars($_SESSION['PO'.$identifier]->StatusComments, ENT_QUOTES,'UTF-8') .'" />'; - echo '<tr><td><input type="submit" name="UpdateStatus" value="' . _('Status Update') .'" /></td>'; + echo '<tr><td><input type="submit" name="UpdateStatus" value="' . _('Status Update') .'" /></td></tr>'; } //end its not a new order - echo '</tr></table></td>'; + echo '</table></td></tr>'; - echo '<table width="80%"> - <tr> - <th><font color=blue size="4"><b>' . _('Warehouse Info') . '</b></font></th> - <!-- <th><font color=blue size="4"><b>' . _('Delivery To') . '</b></font></th> --> - <th><font color=blue size="4"><b>' . _('Supplier Info') . '</b></font></th> + echo '<tr> + <th><h3>' . _('Warehouse Info') . '</h3></th> + <!-- <th><h3>' . _('Delivery To') . '</h3></th> --> + <th><h3>' . _('Supplier Info') . '</h3></th> </tr> - <tr><td valign=top>'; + <tr><td valign="top">'; /*nested table level1 */ echo '<table class="selection" width="100%"> @@ -1005,7 +1013,7 @@ } } - echo '</select></tr></table>'; + echo '</select></td></tr></table>'; /* end of sub table */ echo '</td><td>'; /*sub table nested */ @@ -1028,8 +1036,7 @@ echo '<input type="submit" name="SearchSuppliers" value="' . _('Select Now') . '" /></td> </tr>'; - echo '</td></tr> - <tr> + echo '<tr> <td>' . _('Supplier Contact') . ':</td> <td><select name="SupplierContact">'; @@ -1106,12 +1113,12 @@ <td><input type="text" name="ExRate" value="'. locale_number_format($_POST['ExRate'],5).'" class="number" size="11" /></td> </tr>'; } else { - echo '<input type="hidden" name="ExRate" value="1" />'; + echo '<tr><td><input type="hidden" name="ExRate" value="1" /></td></tr>'; } - echo '</td></tr></table>'; /*end of sub table */ + echo '</table>'; /*end of sub table */ echo '</td></tr> - <tr><th colspan="4"><font color="blue" size="4"><b>' . _('Comments'); + <tr><th colspan="4"><h3>' . _('Comments'); $Default_Comments = ''; @@ -1119,11 +1126,9 @@ $_POST['Comments']=$Default_Comments; } - echo ':</b></font></th></tr> - <tr><td colspan="4"><textarea name="Comments" style="width:100%" rows="5">' . $_POST['Comments'] . '</textarea>'; + echo ':</h3></th></tr> + <tr><td colspan="4"><textarea name="Comments" style="width:100%" rows="5" cols="200">' . $_POST['Comments'] . '</textarea>'; - echo '</table>'; - echo '</td></tr></table><br />'; /* end of main table */ echo '<div class="centre"> @@ -1132,6 +1137,7 @@ } /*end of if supplier selected */ -echo '</form>'; +echo '</div> + </form>'; include('includes/footer.inc'); ?> Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PO_Items.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -641,20 +641,21 @@ /* This is where the order as selected should be displayed reflecting any deletions or insertions*/ -echo '<form name="form1" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '" method="post">'; +echo '<form id="form1" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '" method="post">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /*need to set up entry for item description where not a stock item and GL Codes */ if (count($_SESSION['PO'.$identifier]->LineItems)>0 and !isset($_GET['Edit'])){ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . - _('Purchase Order') . '" alt=""> '.$_SESSION['PO'.$identifier]->SupplierName; + _('Purchase Order') . '" alt="" /> '.$_SESSION['PO'.$identifier]->SupplierName; if (isset($_SESSION['PO'.$identifier]->OrderNo)) { echo ' ' . _('Purchase Order') .' '. $_SESSION['PO'.$identifier]->OrderNo ; } - echo '<br /><b>'._(' Order Summary') . '</b>'; - echo '<table cellpadding="2" colspan="7" class="selection">'; + echo '<br /><b>'._(' Order Summary') . '</b></p>'; + echo '<table cellpadding="2" class="selection">'; echo '<tr> <th>' . _('Item Code') . '</th> <th>' . _('Description') . '</th> @@ -705,9 +706,9 @@ <td class="number">' . $DisplayLineTotal . '</td> <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'].'" name="ReqDelDate' . $POLine->LineNo.'" size="10" value="' .$POLine->ReqDelDate .'" /></td>'; if ($POLine->QtyReceived !=0 AND $POLine->Completed!=1){ - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier .'&Complete=' . $POLine->LineNo . '">' . _('Complete') . '</a></td>'; + echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier .'&Complete=' . $POLine->LineNo . '">' . _('Complete') . '</a></td>'; } elseif ($POLine->QtyReceived ==0) { - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier .'&Delete=' . $POLine->LineNo . '">' . _('Delete'). '</a></td>'; + echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier .'&Delete=' . $POLine->LineNo . '">' . _('Delete'). '</a></td>'; } echo '</tr>'; $_SESSION['PO'.$identifier]->Total += $LineTotal; @@ -1013,10 +1014,9 @@ echo '<table class="selection"> <tr> - <th colspan="3"><font size="3" color="blue">'. _('Search For Stock Items') . '</th>'; + <th colspan="3"><h3>'. _('Search For Stock Items') . ':</h3></th>'; - echo ':</font> - </tr> + echo '</tr> <tr><td>' . _('Item Category') . ': <select name="StockCat">'; echo '<option selected="selected" value="All">' . _('All') . '</option>'; @@ -1048,11 +1048,11 @@ echo 'checked'; } echo ' /></td> - <td><font size="3"><b>' . _('OR') . ' </b></font>' . _('Enter extract of the Stock Code') . ':</td> + <td><b>' . _('OR') . ' </b>' . _('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> + <td><b>' . _('OR') . ' </b><a target="_blank" href="'.$rootpath.'/Stocks.php">' . _('Create a New Stock Item') . '</a></td></tr> </table> <br /> @@ -1065,7 +1065,7 @@ if (isset($SearchResult)) { - echo '<table cellpadding="1" colspan="7" class="selection">'; + echo '<table cellpadding="1" class="selection">'; $TableHeader = '<tr> <th>' . _('Code') . '</th> @@ -1133,6 +1133,7 @@ echo '<a name="end"></a><br /><div class="centre"><input type="submit" name="NewItem" value="Order some" /></div>'; }#end if SearchResults to show -echo '</form>'; +echo '</div> + </form>'; include('includes/footer.inc'); ?> Modified: trunk/PO_OrderDetails.php =================================================================== --- trunk/PO_OrderDetails.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PO_OrderDetails.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -24,7 +24,7 @@ $OrderRow = DB_fetch_row($OrderResult); $_GET['OrderNo'] = $OrderRow[0]; - echo '<br /><font size="4" color=BLUE>' . _('Order Number') . ' ' . $_GET['OrderNo'] . '</font>'; + echo '<br /><h3>' . _('Order Number') . ' ' . $_GET['OrderNo'] . '</h3>'; } if (!isset($_GET['OrderNo'])) { @@ -85,30 +85,30 @@ _('Purchase Order') . '" alt="" />' . ' ' . $title . '</p>'; echo '<table class="selection" cellpadding="2">'; -echo '<tr><th colspan="8"><font size="3" color="navy">'. _('Order Header Details'). '</font></th></tr>'; -echo '<tr><th style="text-align:left">' . _('Supplier Code'). '</td><td><a href="SelectSupplier.php?SupplierID='.$myrow['supplierid'].'">' . $myrow['supplierid'] . '</a></td> - <th style="text-align:left">' . _('Supplier Name'). '</td><td><a href="SelectSupplier.php?SupplierID='.$myrow['supplierid'].'">' . $myrow['suppname'] . '</a></td></tr>'; +echo '<tr><th colspan="8"><b>'. _('Order Header Details'). '</b></th></tr>'; +echo '<tr><td style="text-align:left">' . _('Supplier Code'). '</td><td><a href="SelectSupplier.php?SupplierID='.$myrow['supplierid'].'">' . $myrow['supplierid'] . '</a></td> + <td style="text-align:left">' . _('Supplier Name'). '</td><td><a href="SelectSupplier.php?SupplierID='.$myrow['supplierid'].'">' . $myrow['suppname'] . '</a></td></tr>'; -echo '<tr><th style="text-align:left">' . _('Ordered On'). '</td><td>' . ConvertSQLDate($myrow['orddate']) . '</td> - <th style="text-align:left">' . _('Delivery Address 1'). '</td><td>' . $myrow['deladd1'] . '</td></tr>'; +echo '<tr><td style="text-align:left">' . _('Ordered On'). '</td><td>' . ConvertSQLDate($myrow['orddate']) . '</td> + <td style="text-align:left">' . _('Delivery Address 1'). '</td><td>' . $myrow['deladd1'] . '</td></tr>'; -echo '<tr><th style="text-align:left">' . _('Order Currency'). '</td><td>' . $myrow['currcode'] . '</td> - <th style="text-align:left">' . _('Delivery Address 2'). '</td><td>' . $myrow['deladd2'] . '</td></tr>'; +echo '<tr><td style="text-align:left">' . _('Order Currency'). '</td><td>' . $myrow['currcode'] . '</td> + <td style="text-align:left">' . _('Delivery Address 2'). '</td><td>' . $myrow['deladd2'] . '</td></tr>'; -echo '<tr><th style="text-align:left">' . _('Exchange Rate'). '</td><td>' . $myrow['rate'] . '</td> - <th style="text-align:left">' . _('Delivery Address 3'). '</td><td>' . $myrow['deladd3'] . '</td></tr>'; +echo '<tr><td style="text-align:left">' . _('Exchange Rate'). '</td><td>' . $myrow['rate'] . '</td> + <td style="text-align:left">' . _('Delivery Address 3'). '</td><td>' . $myrow['deladd3'] . '</td></tr>'; -echo '<tr><th style="text-align:left">' . _('Deliver Into Location'). '</td><td>' . $myrow['locationname'] . '</td> - <th style="text-align:left">' . _('Delivery Address 4'). '</td><td>' . $myrow['deladd4'] . '</td></tr>'; +echo '<tr><td style="text-align:left">' . _('Deliver Into Location'). '</td><td>' . $myrow['locationname'] . '</td> + <td style="text-align:left">' . _('Delivery Address 4'). '</td><td>' . $myrow['deladd4'] . '</td></tr>'; -echo '<tr><th style="text-align:left">' . _('Initiator'). '</td><td>' . $myrow['realname'] . '</td> - <th style="text-align:left">' . _('Delivery Address 5'). '</td><td>' . $myrow['deladd5'] . '</td></tr>'; +echo '<tr><td style="text-align:left">' . _('Initiator'). '</td><td>' . $myrow['realname'] . '</td> + <td style="text-align:left">' . _('Delivery Address 5'). '</td><td>' . $myrow['deladd5'] . '</td></tr>'; -echo '<tr><th style="text-align:left">' . _('Requisition Ref'). '.</td><td>' . $myrow['requisitionno'] . '</td> - <th style="text-align:left">' . _('Delivery Address 6'). '</td><td>' . $myrow['deladd6'] . '</td></tr>'; +echo '<tr><td style="text-align:left">' . _('Requisition Ref'). '.</td><td>' . $myrow['requisitionno'] . '</td> + <td style="text-align:left">' . _('Delivery Address 6'). '</td><td>' . $myrow['deladd6'] . '</td></tr>'; -echo '<tr><th style="text-align:left">'. _('Printing') . '</td><td colspan="3">'; +echo '<tr><td style="text-align:left">'. _('Printing') . '</td><td colspan="3">'; if ($myrow['dateprinted'] == ''){ echo '<i>'. _('Not yet printed') . '</i> '; @@ -119,9 +119,9 @@ } echo '</td></tr>'; -echo '<tr><th style="text-align:left">'. _('Status') . '</td><td>'. _($myrow['status']) . '</td></tr>'; +echo '<tr><td style="text-align:left">'. _('Status') . '</td><td>'. _($myrow['status']) . '</td></tr>'; -echo '<tr><th style="text-align:left">' . _('Comments'). '</td><td colspan="3">' . $myrow['comments'] . '</td></tr>'; +echo '<tr><td style="text-align:left">' . _('Comments'). '</td><td colspan="3">' . $myrow['comments'] . '</td></tr>'; echo '</table>'; @@ -140,17 +140,17 @@ $LineItemsResult = DB_query($LineItemsSQL,$db, $ErrMsg); -echo '<table colspan="8" class="selection" cellpadding="0">'; -echo '<tr><th colspan="8"><font size="3" color="navy">'. _('Order Line Details'). '</font></th></tr>'; +echo '<table class="selection" cellpadding="0">'; +echo '<tr><th colspan="8"><b>'. _('Order Line Details'). '</b></th></tr>'; echo '<tr> - <th>' . _('Item Code'). '</td> - <th>' . _('Item Description'). '</td> - <th>' . _('Ord Qty'). '</td> - <th>' . _('Qty Recd'). '</td> - <th>' . _('Qty Inv'). '</td> - <th>' . _('Ord Price'). '</td> - <th>' . _('Chg Price'). '</td> - <th>' . _('Reqd Date'). '</td> + <td>' . _('Item Code'). '</td> + <td>' . _('Item Description'). '</td> + <td>' . _('Ord Qty'). '</td> + <td>' . _('Qty Recd'). '</td> + <td>' . _('Qty Inv'). '</td> + <td>' . _('Ord Price'). '</td> + <td>' . _('Chg Price'). '</td> + <td>' . _('Reqd Date'). '</td> </tr>'; $k =0; //row colour counter Modified: trunk/PO_PDFPurchOrder.php =================================================================== --- trunk/PO_PDFPurchOrder.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PO_PDFPurchOrder.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -349,6 +349,7 @@ else { /*the user has just gone into the page need to ask the question whether to print the order or email it to the supplier */ include ('includes/header.inc'); echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if ($ViewingOnly==1){ echo '<input type="hidden" name="ViewingOnly" value="1" />'; @@ -421,6 +422,7 @@ <div class="centre"> <input type="submit" name="DoIt" value="' . _('OK') . '" /> </div> + </div> </form>'; include('includes/footer.inc'); Modified: trunk/PO_SelectOSPurchOrder.php =================================================================== --- trunk/PO_SelectOSPurchOrder.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PO_SelectOSPurchOrder.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -30,6 +30,7 @@ } echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -132,7 +133,7 @@ if (!isset($OrderNumber) or $OrderNumber=='' ){ if (isset($SelectedSupplier)){ - echo '<a href="' . $rootpath . '/PO_Header.php?NewOrder=Yes&SupplierID=' . $SelectedSupplier . '">' . _('Add Purchase Order') . '</a>'; + echo '<a href="' . $rootpath . '/PO_Header.php?NewOrder=Yes&SupplierID=' . $SelectedSupplier . '">' . _('Add Purchase Order') . '</a>'; } else { echo '<a href="' . $rootpath . '/PO_Header.php?NewOrder=Yes">' . _('Add Purchase Order') . '</a>'; } @@ -193,13 +194,12 @@ $SQL="SELECT categoryid, categorydescription FROM stockcategory ORDER BY categorydescription"; $result1 = DB_query($SQL,$db); -echo '<br /><font size="1"><div class="page_help_text">' ._('To search for purchase orders for a specific part use the part selection facilities below') - .'</div> </font>'; +echo '<br /><div class="page_help_text">' ._('To search for purchase orders for a specific part use the part selection facilities below') . '</div>'; echo '<br /> <table class="selection"> <tr>'; -echo '<td><font size="1">' . _('Select a stock category') . ':</font> +echo '<td>' . _('Select a stock category') . ': <select name="StockCat">'; while ($myrow1 = DB_fetch_array($result1)) { @@ -210,11 +210,11 @@ } } echo '</select></td>'; -echo '<td><font size="1">' . _('Enter text extracts in the') . '<b>' . _('description') . '</b>:</font></td>'; +echo '<td>' . _('Enter text extracts in the') . '<b>' . _('description') . '</b>:</td>'; echo '<td><input type="text" name="Keywords" size="20" maxlength="25" /></td> </tr> <tr><td></td>'; -echo '<td><font size="4"><b>' . _('OR') . '</b></font><font size="1">' . _('Enter extract of the') . '<b>' . _('Stock Code') . '</b>:</font></td>'; +echo '<td><b>' . _('OR') . '</b>' . _('Enter extract of the') . '<b>' . _('Stock Code') . '</b>:</td>'; echo '<td><input type="text" name="StockCode" size="15" maxlength="18" /></td> </tr> </table> @@ -230,7 +230,7 @@ if (isset($StockItemsResult)) { - echo '<table cellpadding="2" colspan="7" class="selection">'; + echo '<table cellpadding="2" class="selection">'; $TableHeader = '<tr><th>' . _('Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('On Hand') . '</th> @@ -477,7 +477,7 @@ /*show a table of the orders returned by the SQL */ - echo '<table cellpadding="2" colspan="7 width="97%" class="selection">'; + echo '<table cellpadding="2" width="97%" class="selection">'; echo '<tr> @@ -518,7 +518,7 @@ } elseif ($myrow['status'] == 'Authorisied' AND $myrow['allowprint'] == 0) { $PrintPurchOrder = _('Printed'); } elseif ($myrow['status'] == 'Printed'){ - $PrintPurchOrder = '<a target="_blank" href="' . $rootpath . '/PO_PDFPurchOrder.php?OrderNo=' . $myrow['orderno'] . '&realorderno=' . $myrow['realorderno'] . '&ViewingOnly=2"> + $PrintPurchOrder = '<a target="_blank" href="' . $rootpath . '/PO_PDFPurchOrder.php?OrderNo=' . $myrow['orderno'] . '&realorderno=' . $myrow['realorderno'] . '&ViewingOnly=2"> ' . _('Print Copy') . '</a>'; } else { $PrintPurchOrder = _('N/A'); @@ -549,6 +549,7 @@ echo '</table>'; } echo '<script type="text/javascript">defaultControl(document.forms[0].StockCode);</script>'; -echo '</form>'; +echo '</div> + </form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/PO_SelectPurchOrder.php =================================================================== --- trunk/PO_SelectPurchOrder.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PO_SelectPurchOrder.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -25,6 +25,7 @@ $SelectedSupplier = $_POST['SelectedSupplier']; } echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($_POST['ResetPart'])) { unset($SelectedStockItem); @@ -175,9 +176,9 @@ <table class="selection"> <tr> <td>'; -echo '<font size="1">' . _('To search for purchase orders for a specific part use the part selection facilities below') . '</font>'; +echo _('To search for purchase orders for a specific part use the part selection facilities below') . '</td></tr>'; echo '<tr> - <td><font size="1">' . _('Select a stock category') . ':</font><select name="StockCat">'; + <td>' . _('Select a stock category') . ':<select name="StockCat">'; while ($myrow1 = DB_fetch_array($result1)) { if (isset($_POST['StockCat']) and $myrow1['categoryid'] == $_POST['StockCat']) { echo '<option selected="selected" value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; @@ -186,12 +187,12 @@ } } echo '</select></td> - <td><font size="1">' . _('Enter text extracts in the') . ' <b>' . _('description') . '</b>:</font></td> + <td>' . _('Enter text extracts in the') . ' <b>' . _('description') . '</b>:</td> <td><input type="text" name="Keywords" size="20" maxlength="25" /></td> </tr> <tr> <td></td> - <td><font size="3"><b>' . _('OR') . ' </b></font><font size="1">' . _('Enter extract of the') . '<b>' . _('Stock Code') . '</b>:</font></td> + <td><b>' . _('OR') . ' </b>' . _('Enter extract of the') . '<b>' . _('Stock Code') . '</b>:</td> <td><input type="text" name="StockCode" size="15" maxlength="18" /></td> </tr> <tr> @@ -425,7 +426,7 @@ if (DB_num_rows($PurchOrdersResult) > 0) { /*show a table of the orders returned by the SQL */ - echo '<table cellpadding="2" colspan="7" width="90%" class="selection">'; + echo '<table cellpadding="2" width="90%" class="selection">'; $TableHeader = '<tr> <th>' . _('View') . '</th> <th>' . _('Supplier') . '</th> @@ -476,6 +477,7 @@ echo '</table>'; } // end if purchase orders to show } -echo '</form>'; +echo '</div> + </form>'; include ('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/PeriodsInquiry.php =================================================================== --- trunk/PeriodsInquiry.php 2012-04-07 18:09:09 UTC (rev 5230) +++ trunk/PeriodsInquiry.php 2012-04-07 18:10:09 UTC (rev 5231) @@ -32,7 +32,7 @@ for ($i=0;$i<3;$i++) { echo '<td valign="top">'; - echo '<table cellpadding="2" colspan="2" class="selection">'; + echo '<table cellpadding="2" class="selection">'; echo $TableHeader; $k=0; $j=0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-04-08 01:24:57
|
Revision: 5233 http://web-erp.svn.sourceforge.net/web-erp/?rev=5233&view=rev Author: vvs2012 Date: 2012-04-08 01:24:49 +0000 (Sun, 08 Apr 2012) Log Message: ----------- xhtml Modified Paths: -------------- trunk/Prices.php trunk/PricesBasedOnMarkUp.php trunk/PricesByCost.php trunk/Prices_Customer.php Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2012-04-07 18:47:08 UTC (rev 5232) +++ trunk/Prices.php 2012-04-08 01:24:49 UTC (rev 5233) @@ -206,16 +206,16 @@ $result = DB_query($sql,$db); if (DB_num_rows($result) > 0) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"> - <table class="selection"> + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<table class="selection"> <tr> <th colspan="7"> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />' . _('Pricing for part') . ': <input type="text" name="Item" size="22" value="' . $Item . '" maxlength="20" /> <input type="submit" name="NewPart" value="' . _('Review Prices') . '" /></th> - </tr> - </form>'; + </tr>'; echo '<tr><th>' . _('Currency') . '</th> <th>' . _('Sales Type') . '</th> @@ -246,8 +246,8 @@ <td class="number">' . locale_number_format($myrow['price'],$myrow['currdecimalplaces']) . '</td> <td>' . ConvertSQLDate($myrow['startdate']) . '</td> <td>' . $EndDateDisplay . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Item=' . $myrow['stockid'] . '&TypeAbbrev=' .$myrow['typeabbrev'] . '&CurrAbrev=' . $myrow['currabrev'] . '&Price=' . $myrow['price'] . '&StartDate=' . $myrow['startdate'] . '&EndDate=' . $myrow['enddate'] . '&Edit=1">' . _('Edit') . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Item=' . $myrow['stockid'] . '&TypeAbbrev=' .$myrow['typeabbrev'] . '&CurrAbrev=' . $myrow['currabrev'] . '&StartDate=' . $myrow['startdate'] . '&EndDate=' . $myrow['enddate'] . '&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</td></tr>'; + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Item=' . $myrow['stockid'] . '&TypeAbbrev=' .$myrow['typeabbrev'] . '&CurrAbrev=' . $myrow['currabrev'] . '&Price=' . $myrow['price'] . '&StartDate=' . $myrow['startdate'] . '&EndDate=' . $myrow['enddate'] . '&Edit=1">' . _('Edit') . '</a></td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Item=' . $myrow['stockid'] . '&TypeAbbrev=' .$myrow['typeabbrev'] . '&CurrAbrev=' . $myrow['currabrev'] . '&StartDate=' . $myrow['startdate'] . '&EndDate=' . $myrow['enddate'] . '&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</a></td></tr>'; } else { echo '<td>' . $myrow['currency'] . '</td> @@ -259,12 +259,15 @@ } //END WHILE LIST LOOP - echo '</table><p>'; + echo '</table><br />'; + echo '</div> + </form>'; } else { prnMsg(_('There are no prices set up for this part'),'warn'); } echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($_GET['Edit'])){ echo '<input type="hidden" name="OldTypeAbbrev" value="' . $_GET['TypeAbbrev'] .'" />'; @@ -289,7 +292,7 @@ $result = DB_query($SQL,$db); echo '<br /><table class="selection">'; - echo '<tr><th colspan="5"><font color="blue" size="3"><b>' . $Item . ' - ' . $PartDescription . '</b></font></th></tr>'; + echo '<tr><th colspan="5"><h3>' . $Item . ' - ' . $PartDescription . '</h3></th></tr>'; echo '<tr><td>' . _('Currency') . ':</td> <td><select name="CurrAbrev">'; while ($myrow = DB_fetch_array($result)) { @@ -333,8 +336,8 @@ echo '<tr><td>' . _('Price Effective From Date') . ':</td> <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="StartDate" size="10" maxlength="10" value="' . $_POST['StartDate'] . '" /></td></tr>'; echo '<tr><td>' . _('Price Effective To Date') . ':</td> - <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="EndDate" size="10" maxlength="10" value="' . $_POST['EndDate'] . '" /></td></tr>'; - echo '<input type="hidden" name="Item" value="' . $Item.'" />'; + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="EndDate" size="10" maxlength="10" value="' . $_POST['EndDate'] . '" />'; + echo '<input type="hidden" name="Item" value="' . $Item.'" /></td></tr>'; echo '<tr><td>' . _('Price') . ':</td> <td> <input type="text" class="number" name="Price" size="12" maxlength="11" value="'; @@ -349,7 +352,8 @@ </div>'; } -echo '</form>'; +echo '</div> + </form>'; include('includes/footer.inc'); Modified: trunk/PricesBasedOnMarkUp.php =================================================================== --- trunk/PricesBasedOnMarkUp.php 2012-04-07 18:47:08 UTC (rev 5232) +++ trunk/PricesBasedOnMarkUp.php 2012-04-08 01:24:49 UTC (rev 5233) @@ -7,22 +7,23 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . $title.'</p>'; -echo '<br /><div class="page_help_text">' . _('This page adds new prices or updates already existing prices for a specified sales type (price list) and currency for the stock category selected - based on a percentage mark up from cost prices or from preferred supplier cost data or from another price list. The rounding factor ensures that prices are at least this amount or a multiple of it. A rounding factor of 5 would mean that prices would be a minimum of 5 and other prices would be expressed as multiples of 5.') . '</div><br /><div class="centre">'; +echo '<br /><div class="page_help_text">' . _('This page adds new prices or updates already existing prices for a specified sales type (price list) and currency for the stock category selected - based on a percentage mark up from cost prices or from preferred supplier cost data or from another price list. The rounding factor ensures that prices are at least this amount or a multiple of it. A rounding factor of 5 would mean that prices would be a minimum of 5 and other prices would be expressed as multiples of 5.') . '</div><br />'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $SQL = 'SELECT sales_type, typeabbrev FROM salestypes'; $PricesResult = DB_query($SQL,$db); -echo '<p><table class="selection"> +echo '<br /><table class="selection"> <tr> <td>' . _('Select the Price List to update') .':</td> <td><select name="PriceList">'; if (!isset($_POST['PriceList']) OR $_POST['PriceList']=='0'){ - echo '<option selected="selected" value="0">' . _('No Price List Selected'); + echo '<option selected="selected" value="0">' . _('No Price List Selected') . '</option>'; } while ($PriceLists=DB_fetch_array($PricesResult)){ @@ -161,9 +162,10 @@ <td><input type="text" name="IncreasePercent" class="number" size="4" maxlength="4" value="' . $_POST['IncreasePercent'] . '" /></td></tr></table>'; -echo '<p><div class="centre"><input type="submit" name="UpdatePrices" value="' . _('Update Prices') . '\' onclick="return confirm(\'' . _('Are you sure you wish to update or add all the prices according to the criteria selected?') . '\');" /></div>'; +echo '<br /><div class="centre"><input type="submit" name="UpdatePrices" value="' . _('Update Prices') . '" onclick="return confirm(\'' . _('Are you sure you wish to update or add all the prices according to the criteria selected?') . '\');" /></div>'; -echo '</form>'; +echo '</div> + </form>'; if (isset($_POST['UpdatePrices'])){ $InputError =0; //assume the best Modified: trunk/PricesByCost.php =================================================================== --- trunk/PricesByCost.php 2012-04-07 18:47:08 UTC (rev 5232) +++ trunk/PricesByCost.php 2012-04-08 01:24:49 UTC (rev 5233) @@ -160,7 +160,8 @@ <th>' . _('List Price') . '</th> <tr>'; $k = 0; //row colour counter - echo '<form action="' .htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'" method="post" name="update">'; + echo '<form action="' .htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'" method="post" id="update">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo'<input type="hidden" value="' . $_POST['StockCat'] . '" name="StockCat" /> <input type="hidden" value="' . $_POST['Margin'] . '" name="Margin" /> @@ -220,18 +221,20 @@ echo '<tr> <td style="text-align:right" colspan="4"><input type="submit" name="submit" value="' . _('Update') . '" onclick="return confirm(\'' . _('If the prices above do not have a commencement date as today, this will create new prices with commencement date of today at the entered figures and update the existing prices with historical start dates to have an end date of yesterday. Are You Sure?') . '\');" /></td> <td style="text-align:left" colspan="3"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"><input type="submit" value="' . _('Back') . '" /></a></td> - </tr></form>'; + </tr> + </div> + </form>'; } else { prnMsg(_('There were no prices meeting the criteria specified to review'),'info'); - echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Back') . '<a/></div><p>'; + echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Back') . '<a/></div>'; } } else { /*The option to submit was not hit so display form */ echo '<div class="page_help_text">' . _('Prices can be displayed based on their relation to cost') . '</div><br />'; echo '<br /> - <br /> - <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> - <table class="selection">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; $SQL = "SELECT categoryid, categorydescription FROM stockcategory @@ -240,7 +243,7 @@ echo '<tr> <td>' . _('Category') . ':</td> <td><select name="StockCat">'; - echo '<option value="all">' . _('All Categories') . ''; + echo '<option value="all">' . _('All Categories') . '</option>'; while ($myrow1 = DB_fetch_array($result1)) { echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } @@ -283,7 +286,9 @@ DB_data_seek($result, 0); echo '</select></td></tr>'; echo '</table> - <br /><p><div class="centre"><input type="submit" name="submit" value="' . _('Submit') . '" /></div></p>'; + <br /><div class="centre"><input type="submit" name="submit" value="' . _('Submit') . '" /></div>'; + echo '</div> + </form>'; } /*end of else not submit */ include ('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2012-04-07 18:47:08 UTC (rev 5232) +++ trunk/Prices_Customer.php 2012-04-08 01:24:49 UTC (rev 5233) @@ -12,7 +12,7 @@ WHERE debtorsmaster.debtorno='" . $_SESSION['CustomerID'] . "'",$db); $myrow = DB_fetch_array($result); -$title = _('Special Prices for') . ' '. $myrow['name']; +$title = _('Special Prices for') . ' '. htmlspecialchars($myrow['name'], ENT_QUOTES, 'UTF-8'); include('includes/header.inc'); @@ -34,7 +34,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . _('Special Customer Prices').'</p><br />'; -echo '<font color=BLUE><b>' . $myrow['name'] . ' ' . _('in') . ' ' . $myrow['currcode'] . '<br />' . ' ' . _('for') . ' '; +echo '<b>' . htmlspecialchars($myrow['name'], ENT_QUOTES, 'UTF-8') . ' ' . _('in') . ' ' . $myrow['currcode'] . '<br />' . ' ' . _('for') . ' '; $CurrCode = $myrow['currcode']; $SalesType = $myrow['salestype']; @@ -55,7 +55,7 @@ exit; } -echo $Item . ' - ' . $myrow[0] . '</b></font></p>'; +echo $Item . ' - ' . $myrow[0] . '</b><br />'; if (isset($_POST['submit'])) { @@ -199,7 +199,7 @@ $DbgMsg = _('The SQL used to retrieve these records was'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); -echo '<table><tr><td valign=top>'; +echo '<table><tr><td valign="top">'; echo '<table class="selection">'; if (DB_num_rows($result) == 0) { @@ -274,18 +274,19 @@ <td class="number">'.$myrow['conversionfactor'].'</td> <td>'.ConvertSQLDate($myrow['startdate']).'</td> <td>'.$EndDateDisplay.'</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode']. - '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'] .'&EndDate='.$myrow['enddate'].'&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</td> + <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode']. + '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</a></td> + <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'] .'&EndDate='.$myrow['enddate'].'&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</a></td> </tr>'; } //END WHILE LIST LOOP } -echo '</table></tr></table><p />'; +echo '</table></td></tr></table><br />'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="Item" value="' . $Item . '" />'; @@ -335,19 +336,19 @@ while ($myrow=DB_fetch_array($result)) { if ($myrow['branchcode']==$_GET['Branch']) { - echo '<option selected="selected" value="'.$myrow['branchcode'].'">'.$myrow['brname'].'</option>'; + echo '<option selected="selected" value="'.$myrow['branchcode'].'">'.htmlspecialchars($myrow['brname'], ENT_QUOTES, 'UTF-8').'</option>'; } else { - echo '<option value="'.$myrow['branchcode'].'">'.$myrow['brname'].'</option>'; + echo '<option value="'.$myrow['branchcode'].'">'.htmlspecialchars($myrow['brname'], ENT_QUOTES, 'UTF-8').'</option>'; } } 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> + <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>'; + <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="' . locale_number_format($_POST['Price'],2) . '" /></td> @@ -359,6 +360,7 @@ <div class="centre"> <input type="submit" name="submit" value="' . _('Enter Information') . '" /> </div> + </div> </form>'; include('includes/footer.inc'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-04-08 01:24:57
|
Revision: 5233 http://web-erp.svn.sourceforge.net/web-erp/?rev=5233&view=rev Author: vvs2012 Date: 2012-04-08 01:24:49 +0000 (Sun, 08 Apr 2012) Log Message: ----------- xhtml Modified Paths: -------------- trunk/Prices.php trunk/PricesBasedOnMarkUp.php trunk/PricesByCost.php trunk/Prices_Customer.php Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2012-04-07 18:47:08 UTC (rev 5232) +++ trunk/Prices.php 2012-04-08 01:24:49 UTC (rev 5233) @@ -206,16 +206,16 @@ $result = DB_query($sql,$db); if (DB_num_rows($result) > 0) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"> - <table class="selection"> + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<table class="selection"> <tr> <th colspan="7"> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />' . _('Pricing for part') . ': <input type="text" name="Item" size="22" value="' . $Item . '" maxlength="20" /> <input type="submit" name="NewPart" value="' . _('Review Prices') . '" /></th> - </tr> - </form>'; + </tr>'; echo '<tr><th>' . _('Currency') . '</th> <th>' . _('Sales Type') . '</th> @@ -246,8 +246,8 @@ <td class="number">' . locale_number_format($myrow['price'],$myrow['currdecimalplaces']) . '</td> <td>' . ConvertSQLDate($myrow['startdate']) . '</td> <td>' . $EndDateDisplay . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Item=' . $myrow['stockid'] . '&TypeAbbrev=' .$myrow['typeabbrev'] . '&CurrAbrev=' . $myrow['currabrev'] . '&Price=' . $myrow['price'] . '&StartDate=' . $myrow['startdate'] . '&EndDate=' . $myrow['enddate'] . '&Edit=1">' . _('Edit') . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Item=' . $myrow['stockid'] . '&TypeAbbrev=' .$myrow['typeabbrev'] . '&CurrAbrev=' . $myrow['currabrev'] . '&StartDate=' . $myrow['startdate'] . '&EndDate=' . $myrow['enddate'] . '&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</td></tr>'; + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Item=' . $myrow['stockid'] . '&TypeAbbrev=' .$myrow['typeabbrev'] . '&CurrAbrev=' . $myrow['currabrev'] . '&Price=' . $myrow['price'] . '&StartDate=' . $myrow['startdate'] . '&EndDate=' . $myrow['enddate'] . '&Edit=1">' . _('Edit') . '</a></td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Item=' . $myrow['stockid'] . '&TypeAbbrev=' .$myrow['typeabbrev'] . '&CurrAbrev=' . $myrow['currabrev'] . '&StartDate=' . $myrow['startdate'] . '&EndDate=' . $myrow['enddate'] . '&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</a></td></tr>'; } else { echo '<td>' . $myrow['currency'] . '</td> @@ -259,12 +259,15 @@ } //END WHILE LIST LOOP - echo '</table><p>'; + echo '</table><br />'; + echo '</div> + </form>'; } else { prnMsg(_('There are no prices set up for this part'),'warn'); } echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($_GET['Edit'])){ echo '<input type="hidden" name="OldTypeAbbrev" value="' . $_GET['TypeAbbrev'] .'" />'; @@ -289,7 +292,7 @@ $result = DB_query($SQL,$db); echo '<br /><table class="selection">'; - echo '<tr><th colspan="5"><font color="blue" size="3"><b>' . $Item . ' - ' . $PartDescription . '</b></font></th></tr>'; + echo '<tr><th colspan="5"><h3>' . $Item . ' - ' . $PartDescription . '</h3></th></tr>'; echo '<tr><td>' . _('Currency') . ':</td> <td><select name="CurrAbrev">'; while ($myrow = DB_fetch_array($result)) { @@ -333,8 +336,8 @@ echo '<tr><td>' . _('Price Effective From Date') . ':</td> <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="StartDate" size="10" maxlength="10" value="' . $_POST['StartDate'] . '" /></td></tr>'; echo '<tr><td>' . _('Price Effective To Date') . ':</td> - <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="EndDate" size="10" maxlength="10" value="' . $_POST['EndDate'] . '" /></td></tr>'; - echo '<input type="hidden" name="Item" value="' . $Item.'" />'; + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="EndDate" size="10" maxlength="10" value="' . $_POST['EndDate'] . '" />'; + echo '<input type="hidden" name="Item" value="' . $Item.'" /></td></tr>'; echo '<tr><td>' . _('Price') . ':</td> <td> <input type="text" class="number" name="Price" size="12" maxlength="11" value="'; @@ -349,7 +352,8 @@ </div>'; } -echo '</form>'; +echo '</div> + </form>'; include('includes/footer.inc'); Modified: trunk/PricesBasedOnMarkUp.php =================================================================== --- trunk/PricesBasedOnMarkUp.php 2012-04-07 18:47:08 UTC (rev 5232) +++ trunk/PricesBasedOnMarkUp.php 2012-04-08 01:24:49 UTC (rev 5233) @@ -7,22 +7,23 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . $title.'</p>'; -echo '<br /><div class="page_help_text">' . _('This page adds new prices or updates already existing prices for a specified sales type (price list) and currency for the stock category selected - based on a percentage mark up from cost prices or from preferred supplier cost data or from another price list. The rounding factor ensures that prices are at least this amount or a multiple of it. A rounding factor of 5 would mean that prices would be a minimum of 5 and other prices would be expressed as multiples of 5.') . '</div><br /><div class="centre">'; +echo '<br /><div class="page_help_text">' . _('This page adds new prices or updates already existing prices for a specified sales type (price list) and currency for the stock category selected - based on a percentage mark up from cost prices or from preferred supplier cost data or from another price list. The rounding factor ensures that prices are at least this amount or a multiple of it. A rounding factor of 5 would mean that prices would be a minimum of 5 and other prices would be expressed as multiples of 5.') . '</div><br />'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $SQL = 'SELECT sales_type, typeabbrev FROM salestypes'; $PricesResult = DB_query($SQL,$db); -echo '<p><table class="selection"> +echo '<br /><table class="selection"> <tr> <td>' . _('Select the Price List to update') .':</td> <td><select name="PriceList">'; if (!isset($_POST['PriceList']) OR $_POST['PriceList']=='0'){ - echo '<option selected="selected" value="0">' . _('No Price List Selected'); + echo '<option selected="selected" value="0">' . _('No Price List Selected') . '</option>'; } while ($PriceLists=DB_fetch_array($PricesResult)){ @@ -161,9 +162,10 @@ <td><input type="text" name="IncreasePercent" class="number" size="4" maxlength="4" value="' . $_POST['IncreasePercent'] . '" /></td></tr></table>'; -echo '<p><div class="centre"><input type="submit" name="UpdatePrices" value="' . _('Update Prices') . '\' onclick="return confirm(\'' . _('Are you sure you wish to update or add all the prices according to the criteria selected?') . '\');" /></div>'; +echo '<br /><div class="centre"><input type="submit" name="UpdatePrices" value="' . _('Update Prices') . '" onclick="return confirm(\'' . _('Are you sure you wish to update or add all the prices according to the criteria selected?') . '\');" /></div>'; -echo '</form>'; +echo '</div> + </form>'; if (isset($_POST['UpdatePrices'])){ $InputError =0; //assume the best Modified: trunk/PricesByCost.php =================================================================== --- trunk/PricesByCost.php 2012-04-07 18:47:08 UTC (rev 5232) +++ trunk/PricesByCost.php 2012-04-08 01:24:49 UTC (rev 5233) @@ -160,7 +160,8 @@ <th>' . _('List Price') . '</th> <tr>'; $k = 0; //row colour counter - echo '<form action="' .htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'" method="post" name="update">'; + echo '<form action="' .htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'" method="post" id="update">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo'<input type="hidden" value="' . $_POST['StockCat'] . '" name="StockCat" /> <input type="hidden" value="' . $_POST['Margin'] . '" name="Margin" /> @@ -220,18 +221,20 @@ echo '<tr> <td style="text-align:right" colspan="4"><input type="submit" name="submit" value="' . _('Update') . '" onclick="return confirm(\'' . _('If the prices above do not have a commencement date as today, this will create new prices with commencement date of today at the entered figures and update the existing prices with historical start dates to have an end date of yesterday. Are You Sure?') . '\');" /></td> <td style="text-align:left" colspan="3"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"><input type="submit" value="' . _('Back') . '" /></a></td> - </tr></form>'; + </tr> + </div> + </form>'; } else { prnMsg(_('There were no prices meeting the criteria specified to review'),'info'); - echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Back') . '<a/></div><p>'; + echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Back') . '<a/></div>'; } } else { /*The option to submit was not hit so display form */ echo '<div class="page_help_text">' . _('Prices can be displayed based on their relation to cost') . '</div><br />'; echo '<br /> - <br /> - <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> - <table class="selection">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; $SQL = "SELECT categoryid, categorydescription FROM stockcategory @@ -240,7 +243,7 @@ echo '<tr> <td>' . _('Category') . ':</td> <td><select name="StockCat">'; - echo '<option value="all">' . _('All Categories') . ''; + echo '<option value="all">' . _('All Categories') . '</option>'; while ($myrow1 = DB_fetch_array($result1)) { echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } @@ -283,7 +286,9 @@ DB_data_seek($result, 0); echo '</select></td></tr>'; echo '</table> - <br /><p><div class="centre"><input type="submit" name="submit" value="' . _('Submit') . '" /></div></p>'; + <br /><div class="centre"><input type="submit" name="submit" value="' . _('Submit') . '" /></div>'; + echo '</div> + </form>'; } /*end of else not submit */ include ('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2012-04-07 18:47:08 UTC (rev 5232) +++ trunk/Prices_Customer.php 2012-04-08 01:24:49 UTC (rev 5233) @@ -12,7 +12,7 @@ WHERE debtorsmaster.debtorno='" . $_SESSION['CustomerID'] . "'",$db); $myrow = DB_fetch_array($result); -$title = _('Special Prices for') . ' '. $myrow['name']; +$title = _('Special Prices for') . ' '. htmlspecialchars($myrow['name'], ENT_QUOTES, 'UTF-8'); include('includes/header.inc'); @@ -34,7 +34,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . _('Special Customer Prices').'</p><br />'; -echo '<font color=BLUE><b>' . $myrow['name'] . ' ' . _('in') . ' ' . $myrow['currcode'] . '<br />' . ' ' . _('for') . ' '; +echo '<b>' . htmlspecialchars($myrow['name'], ENT_QUOTES, 'UTF-8') . ' ' . _('in') . ' ' . $myrow['currcode'] . '<br />' . ' ' . _('for') . ' '; $CurrCode = $myrow['currcode']; $SalesType = $myrow['salestype']; @@ -55,7 +55,7 @@ exit; } -echo $Item . ' - ' . $myrow[0] . '</b></font></p>'; +echo $Item . ' - ' . $myrow[0] . '</b><br />'; if (isset($_POST['submit'])) { @@ -199,7 +199,7 @@ $DbgMsg = _('The SQL used to retrieve these records was'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); -echo '<table><tr><td valign=top>'; +echo '<table><tr><td valign="top">'; echo '<table class="selection">'; if (DB_num_rows($result) == 0) { @@ -274,18 +274,19 @@ <td class="number">'.$myrow['conversionfactor'].'</td> <td>'.ConvertSQLDate($myrow['startdate']).'</td> <td>'.$EndDateDisplay.'</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode']. - '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'] .'&EndDate='.$myrow['enddate'].'&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</td> + <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode']. + '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</a></td> + <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'] .'&EndDate='.$myrow['enddate'].'&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</a></td> </tr>'; } //END WHILE LIST LOOP } -echo '</table></tr></table><p />'; +echo '</table></td></tr></table><br />'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; +echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="Item" value="' . $Item . '" />'; @@ -335,19 +336,19 @@ while ($myrow=DB_fetch_array($result)) { if ($myrow['branchcode']==$_GET['Branch']) { - echo '<option selected="selected" value="'.$myrow['branchcode'].'">'.$myrow['brname'].'</option>'; + echo '<option selected="selected" value="'.$myrow['branchcode'].'">'.htmlspecialchars($myrow['brname'], ENT_QUOTES, 'UTF-8').'</option>'; } else { - echo '<option value="'.$myrow['branchcode'].'">'.$myrow['brname'].'</option>'; + echo '<option value="'.$myrow['branchcode'].'">'.htmlspecialchars($myrow['brname'], ENT_QUOTES, 'UTF-8').'</option>'; } } 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> + <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>'; + <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="' . locale_number_format($_POST['Price'],2) . '" /></td> @@ -359,6 +360,7 @@ <div class="centre"> <input type="submit" name="submit" value="' . _('Enter Information') . '" /> </div> + </div> </form>'; include('includes/footer.inc'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Tu...@us...> - 2012-04-08 02:56:48
|
Revision: 5234 http://web-erp.svn.sourceforge.net/web-erp/?rev=5234&view=rev Author: TurboPT Date: 2012-04-08 02:56:40 +0000 (Sun, 08 Apr 2012) Log Message: ----------- Removed invalid attribute colspan where found within table tag elements. Modified Paths: -------------- trunk/PaymentAllocations.php trunk/RecurringSalesOrders.php trunk/ReverseGRN.php trunk/SalesAnalRepts.php trunk/SelectCompletedOrder.php trunk/SelectCreditItems.php trunk/SelectCustomer.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/SelectRecurringSalesOrder.php trunk/SelectSalesOrder.php trunk/SelectSupplier.php trunk/SelectWorkOrder.php trunk/ShipmentCosting.php trunk/Shipments.php trunk/ShiptsList.php trunk/SpecialOrder.php trunk/SupplierCredit.php trunk/SupplierInvoice.php trunk/SupplierTenderCreate.php trunk/SupplierTenders.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/doc/Change.log Modified: trunk/PaymentAllocations.php =================================================================== --- trunk/PaymentAllocations.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/PaymentAllocations.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -59,7 +59,7 @@ exit; } -echo '<table cellpadding="2" colspan="7 width="80%" class="selection">'; +echo '<table cellpadding="2" width="80%" class="selection">'; $TableHeader = '<tr> <th>' . _('Supplier Number') . '<br />' . _('Reference') . '</th> <th>' . _('Payment') .'<br />' . _('Reference') . '</th> Modified: trunk/RecurringSalesOrders.php =================================================================== --- trunk/RecurringSalesOrders.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/RecurringSalesOrders.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -312,7 +312,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<table cellpadding="2" colspan="7" class="selection">'; +echo '<table cellpadding="2" class="selection">'; echo '<tr><th colspan="7"><b>'._('Order Line Details').'</b></th></tr>'; echo '<tr> <th>'. _('Item Code') .'</th> Modified: trunk/ReverseGRN.php =================================================================== --- trunk/ReverseGRN.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/ReverseGRN.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -378,7 +378,7 @@ 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">'; + echo '<br /><table cellpadding="2" class="selection">'; $TableHeader = '<tr> <th>' . _('GRN') . ' #</th> <th>' . _('Item Code') . '</th> Modified: trunk/SalesAnalRepts.php =================================================================== --- trunk/SalesAnalRepts.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SalesAnalRepts.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -383,12 +383,12 @@ echo '<input type="hidden" name="SelectedReport" value="' . $SelectedReport . '" />'; echo '<input type="hidden" name="ReportID" value="' . $ReportID . '" />'; - echo '<table width="98%" colspan="4" class="selection"> + echo '<table width="98%" class="selection"> <tr> <th colspan="8"><font size="3" color="blue">' . _('Edit The Selected Report') . '</font></th> </tr>'; } else { - echo '<table width="98%" colspan="4" class="selection"> + echo '<table width="98%" class="selection"> <tr> <th colspan="8"><font size="3" color="blue">' . _('Define A New Report') . '</font></th> </tr>'; Modified: trunk/SelectCompletedOrder.php =================================================================== --- trunk/SelectCompletedOrder.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SelectCompletedOrder.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -543,7 +543,7 @@ If (isset($StockItemsResult)) { echo '<br /> - <table cellpadding="2" colspan="7" class="selection">'; + <table cellpadding="2" class="selection">'; $TableHeadings = '<tr> <th>' . _('Code') . '</th> @@ -595,7 +595,7 @@ /*show a table of the orders returned by the SQL */ - echo '<br /><table cellpadding="2" colspan="6" width="90%" class="selection">'; + echo '<br /><table cellpadding="2" width="90%" class="selection">'; $tableheader = '<tr><th>' . _('Order') . ' #</th> <th>' . _('Customer') . '</th> Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SelectCreditItems.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -214,7 +214,7 @@ echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Select Customer For Credit Note').'</p>'; - echo '<table cellpadding="3" colspan="4" class="selection">'; + echo '<table cellpadding="3" class="selection">'; echo '<tr><th colspan="5"><font size="3" color="navy"><b> ' . _('Customer Selection') .'</b></font></th></tr>'; echo '<tr> <td><font size="1">' . _('Enter text in the customer name') . ':</font></td> @@ -231,7 +231,7 @@ if (isset($result_CustSelect)) { - echo '<table cellpadding="2" colspan="7">'; + echo '<table cellpadding="2">'; $TableHeader = '<br /> <tr> @@ -667,7 +667,7 @@ /* This is where the credit note as selected should be displayed reflecting any deletions or insertions*/ - echo '<table cellpadding="2" colspan="7" class="selection"> + echo '<table cellpadding="2" class="selection"> <tr> <th>' . _('Item Code') . '</th> <th>' . _('Item Description') . '</th> @@ -983,7 +983,7 @@ if (isset($SearchResult)) { - echo '<table cellpadding="2" colspan="7" class="selection">'; + echo '<table cellpadding="2" class="selection">'; $TableHeader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SelectCustomer.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -260,7 +260,7 @@ prnMsg($msg,'info'); } echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for Customers').'</p>'; -echo '<table cellpadding="3" colspan="4" class="selection">'; +echo '<table cellpadding="3" class="selection">'; echo '<tr><td colspan="2">' . _('Enter a partial Name') . ':</td><td>'; if (isset($_POST['Keywords'])) { echo '<input type="text" name="Keywords" value="' . $_POST['Keywords'] . '" size="20" maxlength="25" />'; @@ -409,7 +409,7 @@ echo '</div>'; } echo '<br /> - <table cellpadding="2" colspan="7" class="selection">'; + <table cellpadding="2" class="selection">'; $TableHeader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Customer Name') . '</th> @@ -503,7 +503,7 @@ } else { echo '<tr> <td colspan="2"> - <table width="45%" colspan="2" cellpadding="4"> + <table width="45%" cellpadding="4"> <tr> <th width="33%">' . _('Customer Mapping') . '</th> </tr> @@ -555,7 +555,7 @@ $Total1Result = DB_query($SQL, $db); $row = DB_fetch_array($Total1Result); echo '<tr><td colspan="2">'; - echo '<table width="45%" colspan="2" cellpadding="4">'; + echo '<table width="45%" cellpadding="4">'; echo '<tr><th width="33%" colspan="3">' . _('Customer Data') . '</th></tr>'; echo '<tr><td valign="top" class="select">'; /* Customer Data */ if ($myrow['lastpaiddate'] == 0) { Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SelectOrderItems.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -580,7 +580,7 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier . '" name="SelectCustomer" method="post"> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table cellpadding="3" colspan="4" class="selection"> + echo '<table cellpadding="3" class="selection"> <tr> <td><h5>' . _('Part of the Customer Branch Name') . ':</h5></td> <td><input tabindex="1" type="text" name="CustKeywords" size="20" maxlength="25" /></td> @@ -1323,7 +1323,7 @@ /* This is where the order as selected should be displayed reflecting any deletions or insertions*/ echo '<br /> - <table width="90%" cellpadding="2" colspan="7"> + <table width="90%" cellpadding="2"> <tr style="background-color:#800000">'; if($_SESSION['Items'.$identifier]->DefaultPOLine == 1){ echo '<th>' . _('PO Line') . '</th>'; Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SelectProduct.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -483,7 +483,7 @@ echo '</td></tr></table>'; } else { // options (links) to pages. This requires stock id also to be passed. - echo '<table width="90%" colspan="2" cellpadding="4">'; + echo '<table width="90%" cellpadding="4">'; echo '<tr> <th width="33%">' . _('Item Inquiries') . '</th> <th width="33%">' . _('Item Transactions') . '</th> Modified: trunk/SelectRecurringSalesOrder.php =================================================================== --- trunk/SelectRecurringSalesOrder.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SelectRecurringSalesOrder.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -79,7 +79,7 @@ /*show a table of the orders returned by the SQL */ echo '<br /> - <table cellpadding="2" colspan="7" width="90%" class="selection">'; + <table cellpadding="2" width="90%" class="selection">'; $tableheader = '<tr> <th>' . _('Modify') . '</th> Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SelectSalesOrder.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -575,7 +575,7 @@ if (isset($StockItemsResult) AND DB_num_rows($StockItemsResult)>0) { - echo '<table cellpadding="2" colspan="7" class="selection">'; + echo '<table cellpadding="2" class="selection">'; $TableHeader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> @@ -822,7 +822,7 @@ $AuthResult=DB_query($AuthSQL,$db); $AuthRow=DB_fetch_array($AuthResult); - echo '<table cellpadding="2" colspan="7" width="95%" class="selection">'; + echo '<table cellpadding="2" width="95%" class="selection">'; if (isset($_POST['Quotations']) AND $_POST['Quotations']=='Orders_Only'){ $tableheader = '<tr> Modified: trunk/SelectSupplier.php =================================================================== --- trunk/SelectSupplier.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SelectSupplier.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -143,7 +143,7 @@ echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/supplier.png" title="' . _('Supplier') . '" alt="" />' . ' ' . _('Supplier') . ' : <b>' . $_SESSION['SupplierID'] . ' - ' . $SupplierName . '</b> ' . _('has been selected') . '.</p>'; echo '<div class="page_help_text">' . _('Select a menu option to operate using this supplier.') . '</div>'; echo '<br /> - <table width="90%" colspan="2" cellpadding="4"> + <table width="90%" cellpadding="4"> <tr> <th width="33%">' . _('Supplier Inquiries') . '</th> <th width="33%">' . _('Supplier Transactions') . '</th> @@ -178,7 +178,7 @@ } else { // Supplier is not selected yet echo '<br />'; - echo '<table width="90%" colspan="2" cellpadding="4"> + echo '<table width="90%" cellpadding="4"> <tr> <th width="33%">' . _('Supplier Inquiries') . '</th> <th width="33%">' . _('Supplier Transactions') . '</th> @@ -196,7 +196,7 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" 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="" />' . ' ' . _('Search for Suppliers') . '</p> - <table cellpadding="3" colspan="4" class="selection"> + <table cellpadding="3" class="selection"> <tr> <td>' . _('Enter a partial Name') . ':</font></td> <td>'; @@ -253,7 +253,7 @@ echo '<br /> <br /> <br /> - <table cellpadding="2" colspan="7">'; + <table cellpadding="2">'; $tableheader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Supplier Name') . '</th> @@ -349,7 +349,7 @@ $row = DB_fetch_array($Total1Result); echo '<br />'; echo '<tr><td colspan="2">'; - echo '<table width="45%" colspan="2" cellpadding="4">'; + echo '<table width="45%" cellpadding="4">'; echo '<tr><th width="33%" colspan="2">' . _('Supplier Data') . '</th></tr>'; echo '<tr><td valign="top" class="select">'; /* Supplier Data */ //echo "Distance to this Supplier: <b>TBA</b><br />"; Modified: trunk/SelectWorkOrder.php =================================================================== --- trunk/SelectWorkOrder.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SelectWorkOrder.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -186,7 +186,7 @@ if (isset($StockItemsResult)) { echo '<br /> - <table cellpadding="2" colspan="7" class="selection">'; + <table cellpadding="2" class="selection">'; $TableHeader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> @@ -301,7 +301,7 @@ /*show a table of the orders returned by the SQL */ if (DB_num_rows($WorkOrdersResult)>0) { echo '<br /> - <table cellpadding="2" colspan="7" width="95%" class="selection">'; + <table cellpadding="2" width="95%" class="selection">'; $tableheader = '<tr> Modified: trunk/ShipmentCosting.php =================================================================== --- trunk/ShipmentCosting.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/ShipmentCosting.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -140,7 +140,7 @@ $PeriodNo = GetPeriod(Date($_SESSION['DefaultDateFormat']), $db); } - echo '<br /><table cellpadding="2" colspan="7" class="selection">'; + echo '<br /><table cellpadding="2" class="selection">'; echo '<tr> <th colspan="9"><font color="navy" size="3">' . _('Items on shipment'). '</font></th></tr>'; @@ -498,7 +498,7 @@ echo '<br /> - <table colspan="2" width="95%"> + <table width="95%"> <tr> <td valign="top">'; // put this shipment charges side by side in a table (major table 2 cols) @@ -526,7 +526,7 @@ $ChargesResult = DB_query($sql,$db); -echo '<table cellpadding="2" colspan="6" class="selection">'; +echo '<table cellpadding="2" class="selection">'; echo '<tr> <th colspan="6"><font color="navy" size="3">' . _('Shipment Charges Against Products'). '</font></th> </tr>'; @@ -603,7 +603,7 @@ $ChargesResult = DB_query($sql,$db); -echo '<table cellpadding="2" colspan="5" class="selection">'; +echo '<table cellpadding="2" class="selection">'; echo '<tr> <th colspan="6"><font color="navy" size="3">'._('General Shipment Charges').'</font></th> </tr>'; Modified: trunk/Shipments.php =================================================================== --- trunk/Shipments.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/Shipments.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -476,7 +476,7 @@ if (DB_num_rows($result)>0){ - echo '<table cellpadding="2" colspan="7" class="selection">'; + echo '<table cellpadding="2" class="selection">'; echo '<tr> <th colspan="7"><font color="navy" size="3">'. _('Possible Order Lines To Add To This Shipment').'</font></th> </tr>'; Modified: trunk/ShiptsList.php =================================================================== --- trunk/ShiptsList.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/ShiptsList.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -32,7 +32,7 @@ } /*show a table of the shipments returned by the SQL */ -echo '<table cellpadding="2" colspan="2" class="selection">'; +echo '<table cellpadding="2" class="selection">'; echo '<tr> <th>'. _('Reference'). '</a></th> <th>'. _('Vessel'). '</th> Modified: trunk/SpecialOrder.php =================================================================== --- trunk/SpecialOrder.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SpecialOrder.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -618,7 +618,7 @@ if (count($_SESSION['SPL'.$identifier]->LineItems)>0){ echo '<div class="centre"><b>' . _('Special Order Summary') . '</b></div>'; - echo '<table class="selection" cellpadding="2" colspan="7" border="1">'; + echo '<table class="selection" cellpadding="2" border="1">'; echo '<tr> <th>' . _('Item Description') . '</th> Modified: trunk/SupplierCredit.php =================================================================== --- trunk/SupplierCredit.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SupplierCredit.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -258,7 +258,7 @@ /* everything below here only do if a Supplier is selected fisrt add a header to show who we are making an credit note for */ -echo '<table class="selection" colspan="4"> +echo '<table class="selection"> <tr><th>' . _('Supplier') . '</th> <th>' . _('Currency') . '</th> <th>' . _('Terms') . '</th> Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SupplierInvoice.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -229,7 +229,7 @@ /* everything below here only do if a Supplier is selected fisrt add a header to show who we are making an invoice for */ - echo '<br /><table class="selection" colspan="4"> + echo '<br /><table class="selection"> <tr> <th>' . _('Supplier') . '</th> <th>' . _('Currency') . '</th> Modified: trunk/SupplierTenderCreate.php =================================================================== --- trunk/SupplierTenderCreate.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SupplierTenderCreate.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -518,7 +518,7 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'].'?identifier='.$identifier, ENT_QUOTES,'UTF-8') . '" 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="" />' . ' ' . _('Search for Suppliers') . '</p> - <table cellpadding="3" colspan="4" class="selection"> + <table cellpadding="3" class="selection"> <tr> <td>' . _('Enter a partial Name') . ':</td> <td>'; @@ -574,7 +574,7 @@ echo '<br /> <br /> <br /> - <table cellpadding="2" colspan="7">'; + <table cellpadding="2">'; echo '<tr> <th>' . _('Code') . '</th> <th>' . _('Supplier Name') . '</th> Modified: trunk/SupplierTenders.php =================================================================== --- trunk/SupplierTenders.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SupplierTenders.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -681,7 +681,7 @@ if (isset($SearchResult)) { - echo '<table cellpadding="1" colspan="7">'; + echo '<table cellpadding="1">'; $TableHeader = '<tr> <th>' . _('Code') . '</th> Modified: trunk/WorkOrderEntry.php =================================================================== --- trunk/WorkOrderEntry.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/WorkOrderEntry.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -616,7 +616,7 @@ if (DB_num_rows($SearchResult)>1){ - echo '<table cellpadding="2" colspan="7" class="selection">'; + echo '<table cellpadding="2" class="selection">'; $TableHeader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> Modified: trunk/WorkOrderIssue.php =================================================================== --- trunk/WorkOrderIssue.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/WorkOrderIssue.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -686,7 +686,7 @@ if (DB_num_rows($SearchResult)>1){ echo '<br /> - <table cellpadding="2" colspan="7" class="selection">'; + <table cellpadding="2" class="selection">'; $TableHeader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/doc/Change.log 2012-04-08 02:56:40 UTC (rev 5234) @@ -1,4 +1,5 @@ webERP Change Log +7/4/2012 TurboPT: Remove invalid attribute colspan found within table tag elements. 5/4/2012 Exson: Fixed order delivery comments overlapped with Shipper in Packing slip of PDFOrderPageHeader_generic.inc Reported by CQZ from webERP Chinese Community QQ group 3/4/2012 Vitaly: Cleaned up Petty Cash module. Fixed several errors in SQL INSERT statements. 3/4/2012 Exson: Fixed typo in PurchData.php. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Tu...@us...> - 2012-04-08 02:56:48
|
Revision: 5234 http://web-erp.svn.sourceforge.net/web-erp/?rev=5234&view=rev Author: TurboPT Date: 2012-04-08 02:56:40 +0000 (Sun, 08 Apr 2012) Log Message: ----------- Removed invalid attribute colspan where found within table tag elements. Modified Paths: -------------- trunk/PaymentAllocations.php trunk/RecurringSalesOrders.php trunk/ReverseGRN.php trunk/SalesAnalRepts.php trunk/SelectCompletedOrder.php trunk/SelectCreditItems.php trunk/SelectCustomer.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/SelectRecurringSalesOrder.php trunk/SelectSalesOrder.php trunk/SelectSupplier.php trunk/SelectWorkOrder.php trunk/ShipmentCosting.php trunk/Shipments.php trunk/ShiptsList.php trunk/SpecialOrder.php trunk/SupplierCredit.php trunk/SupplierInvoice.php trunk/SupplierTenderCreate.php trunk/SupplierTenders.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/doc/Change.log Modified: trunk/PaymentAllocations.php =================================================================== --- trunk/PaymentAllocations.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/PaymentAllocations.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -59,7 +59,7 @@ exit; } -echo '<table cellpadding="2" colspan="7 width="80%" class="selection">'; +echo '<table cellpadding="2" width="80%" class="selection">'; $TableHeader = '<tr> <th>' . _('Supplier Number') . '<br />' . _('Reference') . '</th> <th>' . _('Payment') .'<br />' . _('Reference') . '</th> Modified: trunk/RecurringSalesOrders.php =================================================================== --- trunk/RecurringSalesOrders.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/RecurringSalesOrders.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -312,7 +312,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<table cellpadding="2" colspan="7" class="selection">'; +echo '<table cellpadding="2" class="selection">'; echo '<tr><th colspan="7"><b>'._('Order Line Details').'</b></th></tr>'; echo '<tr> <th>'. _('Item Code') .'</th> Modified: trunk/ReverseGRN.php =================================================================== --- trunk/ReverseGRN.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/ReverseGRN.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -378,7 +378,7 @@ 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">'; + echo '<br /><table cellpadding="2" class="selection">'; $TableHeader = '<tr> <th>' . _('GRN') . ' #</th> <th>' . _('Item Code') . '</th> Modified: trunk/SalesAnalRepts.php =================================================================== --- trunk/SalesAnalRepts.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SalesAnalRepts.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -383,12 +383,12 @@ echo '<input type="hidden" name="SelectedReport" value="' . $SelectedReport . '" />'; echo '<input type="hidden" name="ReportID" value="' . $ReportID . '" />'; - echo '<table width="98%" colspan="4" class="selection"> + echo '<table width="98%" class="selection"> <tr> <th colspan="8"><font size="3" color="blue">' . _('Edit The Selected Report') . '</font></th> </tr>'; } else { - echo '<table width="98%" colspan="4" class="selection"> + echo '<table width="98%" class="selection"> <tr> <th colspan="8"><font size="3" color="blue">' . _('Define A New Report') . '</font></th> </tr>'; Modified: trunk/SelectCompletedOrder.php =================================================================== --- trunk/SelectCompletedOrder.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SelectCompletedOrder.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -543,7 +543,7 @@ If (isset($StockItemsResult)) { echo '<br /> - <table cellpadding="2" colspan="7" class="selection">'; + <table cellpadding="2" class="selection">'; $TableHeadings = '<tr> <th>' . _('Code') . '</th> @@ -595,7 +595,7 @@ /*show a table of the orders returned by the SQL */ - echo '<br /><table cellpadding="2" colspan="6" width="90%" class="selection">'; + echo '<br /><table cellpadding="2" width="90%" class="selection">'; $tableheader = '<tr><th>' . _('Order') . ' #</th> <th>' . _('Customer') . '</th> Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SelectCreditItems.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -214,7 +214,7 @@ echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Select Customer For Credit Note').'</p>'; - echo '<table cellpadding="3" colspan="4" class="selection">'; + echo '<table cellpadding="3" class="selection">'; echo '<tr><th colspan="5"><font size="3" color="navy"><b> ' . _('Customer Selection') .'</b></font></th></tr>'; echo '<tr> <td><font size="1">' . _('Enter text in the customer name') . ':</font></td> @@ -231,7 +231,7 @@ if (isset($result_CustSelect)) { - echo '<table cellpadding="2" colspan="7">'; + echo '<table cellpadding="2">'; $TableHeader = '<br /> <tr> @@ -667,7 +667,7 @@ /* This is where the credit note as selected should be displayed reflecting any deletions or insertions*/ - echo '<table cellpadding="2" colspan="7" class="selection"> + echo '<table cellpadding="2" class="selection"> <tr> <th>' . _('Item Code') . '</th> <th>' . _('Item Description') . '</th> @@ -983,7 +983,7 @@ if (isset($SearchResult)) { - echo '<table cellpadding="2" colspan="7" class="selection">'; + echo '<table cellpadding="2" class="selection">'; $TableHeader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SelectCustomer.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -260,7 +260,7 @@ prnMsg($msg,'info'); } echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for Customers').'</p>'; -echo '<table cellpadding="3" colspan="4" class="selection">'; +echo '<table cellpadding="3" class="selection">'; echo '<tr><td colspan="2">' . _('Enter a partial Name') . ':</td><td>'; if (isset($_POST['Keywords'])) { echo '<input type="text" name="Keywords" value="' . $_POST['Keywords'] . '" size="20" maxlength="25" />'; @@ -409,7 +409,7 @@ echo '</div>'; } echo '<br /> - <table cellpadding="2" colspan="7" class="selection">'; + <table cellpadding="2" class="selection">'; $TableHeader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Customer Name') . '</th> @@ -503,7 +503,7 @@ } else { echo '<tr> <td colspan="2"> - <table width="45%" colspan="2" cellpadding="4"> + <table width="45%" cellpadding="4"> <tr> <th width="33%">' . _('Customer Mapping') . '</th> </tr> @@ -555,7 +555,7 @@ $Total1Result = DB_query($SQL, $db); $row = DB_fetch_array($Total1Result); echo '<tr><td colspan="2">'; - echo '<table width="45%" colspan="2" cellpadding="4">'; + echo '<table width="45%" cellpadding="4">'; echo '<tr><th width="33%" colspan="3">' . _('Customer Data') . '</th></tr>'; echo '<tr><td valign="top" class="select">'; /* Customer Data */ if ($myrow['lastpaiddate'] == 0) { Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SelectOrderItems.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -580,7 +580,7 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier . '" name="SelectCustomer" method="post"> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table cellpadding="3" colspan="4" class="selection"> + echo '<table cellpadding="3" class="selection"> <tr> <td><h5>' . _('Part of the Customer Branch Name') . ':</h5></td> <td><input tabindex="1" type="text" name="CustKeywords" size="20" maxlength="25" /></td> @@ -1323,7 +1323,7 @@ /* This is where the order as selected should be displayed reflecting any deletions or insertions*/ echo '<br /> - <table width="90%" cellpadding="2" colspan="7"> + <table width="90%" cellpadding="2"> <tr style="background-color:#800000">'; if($_SESSION['Items'.$identifier]->DefaultPOLine == 1){ echo '<th>' . _('PO Line') . '</th>'; Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SelectProduct.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -483,7 +483,7 @@ echo '</td></tr></table>'; } else { // options (links) to pages. This requires stock id also to be passed. - echo '<table width="90%" colspan="2" cellpadding="4">'; + echo '<table width="90%" cellpadding="4">'; echo '<tr> <th width="33%">' . _('Item Inquiries') . '</th> <th width="33%">' . _('Item Transactions') . '</th> Modified: trunk/SelectRecurringSalesOrder.php =================================================================== --- trunk/SelectRecurringSalesOrder.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SelectRecurringSalesOrder.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -79,7 +79,7 @@ /*show a table of the orders returned by the SQL */ echo '<br /> - <table cellpadding="2" colspan="7" width="90%" class="selection">'; + <table cellpadding="2" width="90%" class="selection">'; $tableheader = '<tr> <th>' . _('Modify') . '</th> Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SelectSalesOrder.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -575,7 +575,7 @@ if (isset($StockItemsResult) AND DB_num_rows($StockItemsResult)>0) { - echo '<table cellpadding="2" colspan="7" class="selection">'; + echo '<table cellpadding="2" class="selection">'; $TableHeader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> @@ -822,7 +822,7 @@ $AuthResult=DB_query($AuthSQL,$db); $AuthRow=DB_fetch_array($AuthResult); - echo '<table cellpadding="2" colspan="7" width="95%" class="selection">'; + echo '<table cellpadding="2" width="95%" class="selection">'; if (isset($_POST['Quotations']) AND $_POST['Quotations']=='Orders_Only'){ $tableheader = '<tr> Modified: trunk/SelectSupplier.php =================================================================== --- trunk/SelectSupplier.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SelectSupplier.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -143,7 +143,7 @@ echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/supplier.png" title="' . _('Supplier') . '" alt="" />' . ' ' . _('Supplier') . ' : <b>' . $_SESSION['SupplierID'] . ' - ' . $SupplierName . '</b> ' . _('has been selected') . '.</p>'; echo '<div class="page_help_text">' . _('Select a menu option to operate using this supplier.') . '</div>'; echo '<br /> - <table width="90%" colspan="2" cellpadding="4"> + <table width="90%" cellpadding="4"> <tr> <th width="33%">' . _('Supplier Inquiries') . '</th> <th width="33%">' . _('Supplier Transactions') . '</th> @@ -178,7 +178,7 @@ } else { // Supplier is not selected yet echo '<br />'; - echo '<table width="90%" colspan="2" cellpadding="4"> + echo '<table width="90%" cellpadding="4"> <tr> <th width="33%">' . _('Supplier Inquiries') . '</th> <th width="33%">' . _('Supplier Transactions') . '</th> @@ -196,7 +196,7 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" 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="" />' . ' ' . _('Search for Suppliers') . '</p> - <table cellpadding="3" colspan="4" class="selection"> + <table cellpadding="3" class="selection"> <tr> <td>' . _('Enter a partial Name') . ':</font></td> <td>'; @@ -253,7 +253,7 @@ echo '<br /> <br /> <br /> - <table cellpadding="2" colspan="7">'; + <table cellpadding="2">'; $tableheader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Supplier Name') . '</th> @@ -349,7 +349,7 @@ $row = DB_fetch_array($Total1Result); echo '<br />'; echo '<tr><td colspan="2">'; - echo '<table width="45%" colspan="2" cellpadding="4">'; + echo '<table width="45%" cellpadding="4">'; echo '<tr><th width="33%" colspan="2">' . _('Supplier Data') . '</th></tr>'; echo '<tr><td valign="top" class="select">'; /* Supplier Data */ //echo "Distance to this Supplier: <b>TBA</b><br />"; Modified: trunk/SelectWorkOrder.php =================================================================== --- trunk/SelectWorkOrder.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SelectWorkOrder.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -186,7 +186,7 @@ if (isset($StockItemsResult)) { echo '<br /> - <table cellpadding="2" colspan="7" class="selection">'; + <table cellpadding="2" class="selection">'; $TableHeader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> @@ -301,7 +301,7 @@ /*show a table of the orders returned by the SQL */ if (DB_num_rows($WorkOrdersResult)>0) { echo '<br /> - <table cellpadding="2" colspan="7" width="95%" class="selection">'; + <table cellpadding="2" width="95%" class="selection">'; $tableheader = '<tr> Modified: trunk/ShipmentCosting.php =================================================================== --- trunk/ShipmentCosting.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/ShipmentCosting.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -140,7 +140,7 @@ $PeriodNo = GetPeriod(Date($_SESSION['DefaultDateFormat']), $db); } - echo '<br /><table cellpadding="2" colspan="7" class="selection">'; + echo '<br /><table cellpadding="2" class="selection">'; echo '<tr> <th colspan="9"><font color="navy" size="3">' . _('Items on shipment'). '</font></th></tr>'; @@ -498,7 +498,7 @@ echo '<br /> - <table colspan="2" width="95%"> + <table width="95%"> <tr> <td valign="top">'; // put this shipment charges side by side in a table (major table 2 cols) @@ -526,7 +526,7 @@ $ChargesResult = DB_query($sql,$db); -echo '<table cellpadding="2" colspan="6" class="selection">'; +echo '<table cellpadding="2" class="selection">'; echo '<tr> <th colspan="6"><font color="navy" size="3">' . _('Shipment Charges Against Products'). '</font></th> </tr>'; @@ -603,7 +603,7 @@ $ChargesResult = DB_query($sql,$db); -echo '<table cellpadding="2" colspan="5" class="selection">'; +echo '<table cellpadding="2" class="selection">'; echo '<tr> <th colspan="6"><font color="navy" size="3">'._('General Shipment Charges').'</font></th> </tr>'; Modified: trunk/Shipments.php =================================================================== --- trunk/Shipments.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/Shipments.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -476,7 +476,7 @@ if (DB_num_rows($result)>0){ - echo '<table cellpadding="2" colspan="7" class="selection">'; + echo '<table cellpadding="2" class="selection">'; echo '<tr> <th colspan="7"><font color="navy" size="3">'. _('Possible Order Lines To Add To This Shipment').'</font></th> </tr>'; Modified: trunk/ShiptsList.php =================================================================== --- trunk/ShiptsList.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/ShiptsList.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -32,7 +32,7 @@ } /*show a table of the shipments returned by the SQL */ -echo '<table cellpadding="2" colspan="2" class="selection">'; +echo '<table cellpadding="2" class="selection">'; echo '<tr> <th>'. _('Reference'). '</a></th> <th>'. _('Vessel'). '</th> Modified: trunk/SpecialOrder.php =================================================================== --- trunk/SpecialOrder.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SpecialOrder.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -618,7 +618,7 @@ if (count($_SESSION['SPL'.$identifier]->LineItems)>0){ echo '<div class="centre"><b>' . _('Special Order Summary') . '</b></div>'; - echo '<table class="selection" cellpadding="2" colspan="7" border="1">'; + echo '<table class="selection" cellpadding="2" border="1">'; echo '<tr> <th>' . _('Item Description') . '</th> Modified: trunk/SupplierCredit.php =================================================================== --- trunk/SupplierCredit.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SupplierCredit.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -258,7 +258,7 @@ /* everything below here only do if a Supplier is selected fisrt add a header to show who we are making an credit note for */ -echo '<table class="selection" colspan="4"> +echo '<table class="selection"> <tr><th>' . _('Supplier') . '</th> <th>' . _('Currency') . '</th> <th>' . _('Terms') . '</th> Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SupplierInvoice.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -229,7 +229,7 @@ /* everything below here only do if a Supplier is selected fisrt add a header to show who we are making an invoice for */ - echo '<br /><table class="selection" colspan="4"> + echo '<br /><table class="selection"> <tr> <th>' . _('Supplier') . '</th> <th>' . _('Currency') . '</th> Modified: trunk/SupplierTenderCreate.php =================================================================== --- trunk/SupplierTenderCreate.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SupplierTenderCreate.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -518,7 +518,7 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'].'?identifier='.$identifier, ENT_QUOTES,'UTF-8') . '" 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="" />' . ' ' . _('Search for Suppliers') . '</p> - <table cellpadding="3" colspan="4" class="selection"> + <table cellpadding="3" class="selection"> <tr> <td>' . _('Enter a partial Name') . ':</td> <td>'; @@ -574,7 +574,7 @@ echo '<br /> <br /> <br /> - <table cellpadding="2" colspan="7">'; + <table cellpadding="2">'; echo '<tr> <th>' . _('Code') . '</th> <th>' . _('Supplier Name') . '</th> Modified: trunk/SupplierTenders.php =================================================================== --- trunk/SupplierTenders.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/SupplierTenders.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -681,7 +681,7 @@ if (isset($SearchResult)) { - echo '<table cellpadding="1" colspan="7">'; + echo '<table cellpadding="1">'; $TableHeader = '<tr> <th>' . _('Code') . '</th> Modified: trunk/WorkOrderEntry.php =================================================================== --- trunk/WorkOrderEntry.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/WorkOrderEntry.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -616,7 +616,7 @@ if (DB_num_rows($SearchResult)>1){ - echo '<table cellpadding="2" colspan="7" class="selection">'; + echo '<table cellpadding="2" class="selection">'; $TableHeader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> Modified: trunk/WorkOrderIssue.php =================================================================== --- trunk/WorkOrderIssue.php 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/WorkOrderIssue.php 2012-04-08 02:56:40 UTC (rev 5234) @@ -686,7 +686,7 @@ if (DB_num_rows($SearchResult)>1){ echo '<br /> - <table cellpadding="2" colspan="7" class="selection">'; + <table cellpadding="2" class="selection">'; $TableHeader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-04-08 01:24:49 UTC (rev 5233) +++ trunk/doc/Change.log 2012-04-08 02:56:40 UTC (rev 5234) @@ -1,4 +1,5 @@ webERP Change Log +7/4/2012 TurboPT: Remove invalid attribute colspan found within table tag elements. 5/4/2012 Exson: Fixed order delivery comments overlapped with Shipper in Packing slip of PDFOrderPageHeader_generic.inc Reported by CQZ from webERP Chinese Community QQ group 3/4/2012 Vitaly: Cleaned up Petty Cash module. Fixed several errors in SQL INSERT statements. 3/4/2012 Exson: Fixed typo in PurchData.php. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-04-08 19:55:56
|
Revision: 5235 http://web-erp.svn.sourceforge.net/web-erp/?rev=5235&view=rev Author: vvs2012 Date: 2012-04-08 19:55:49 +0000 (Sun, 08 Apr 2012) Log Message: ----------- xhtml Modified Paths: -------------- trunk/PrintCustOrder.php trunk/PrintCustOrder_generic.php trunk/PrintCustStatements.php trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php trunk/PurchData.php Modified: trunk/PrintCustOrder.php =================================================================== --- trunk/PrintCustOrder.php 2012-04-08 02:56:40 UTC (rev 5234) +++ trunk/PrintCustOrder.php 2012-04-08 19:55:49 UTC (rev 5235) @@ -20,9 +20,11 @@ <br /> <table class="table_index"> <tr><td class="menu_group_item"> + <ul> <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> - </td> + </ul> + </td> </tr> </table> </div> Modified: trunk/PrintCustOrder_generic.php =================================================================== --- trunk/PrintCustOrder_generic.php 2012-04-08 02:56:40 UTC (rev 5234) +++ trunk/PrintCustOrder_generic.php 2012-04-08 19:55:49 UTC (rev 5235) @@ -19,8 +19,10 @@ <table class="table_index"> <tr> <td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php?">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> + <ul> + <li><a href="'. $rootpath . '/SelectSalesOrder.php?">' . _('Outstanding Sales Orders') . '</a></li> + <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> + </ul> </td> </tr> </table> Modified: trunk/PrintCustStatements.php =================================================================== --- trunk/PrintCustStatements.php 2012-04-08 02:56:40 UTC (rev 5234) +++ trunk/PrintCustStatements.php 2012-04-08 19:55:49 UTC (rev 5235) @@ -414,17 +414,21 @@ /*if FromTransNo is not set then show a form to allow input of either a single statement number or a range of statements to be printed. Also get the last statement number created to show the user where the current range is up to */ - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"><table class="selection">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; echo '<tr><td>' . _('Starting Customer statement to print (Customer code)'). ' - </td><td><input type="text" max="6" size="7" name="FromCust" value="1" /></td></tr> + </td><td><input type="text" maxlength="6" size="7" name="FromCust" value="1" /></td></tr> <tr><td>'. _('Ending Customer statement to print (Customer code)').'</td><td> - <input type="text" max="6" size="7" name="ToCust" value="zzzzzz" /></td></tr></table> + <input type="text" maxlength="6" size="7" name="ToCust" value="zzzzzz" /></td></tr></table> <br /><div class="centre"> <input type="submit" name="PrintPDF" value="' . _('Print All Statements in the Range Selected').'" /> </div>'; + echo '</div> + </form>'; } echo '<br /><br /><br />'; include('includes/footer.inc'); Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2012-04-08 02:56:40 UTC (rev 5234) +++ trunk/PrintCustTrans.php 2012-04-08 19:55:49 UTC (rev 5235) @@ -502,11 +502,12 @@ /* 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="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . _('Print Invoices or Credit Notes (Landscape Mode)') . '</div>'; + echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . _('Print Invoices or Credit Notes (Landscape Mode)') . '</p></div>'; echo '<table class="table1"> - <tr><td>' . _('Print Invoices or Credit Notes') . '</td><td><select name=InvOrCredit>'; + <tr><td>' . _('Print Invoices or Credit Notes') . '</td><td><select name="InvOrCredit">'; if ($InvOrCredit=='Invoice' OR !isset($InvOrCredit)) { echo '<option selected="selected" value="Invoice">' . _('Invoices') . '</option>'; @@ -517,7 +518,7 @@ } echo '</select></td></tr>'; - echo '<tr><td>' . _('Print EDI Transactions') . '</td><td><select name=PrintEDI>'; + echo '<tr><td>' . _('Print EDI Transactions') . '</td><td><select name="PrintEDI">'; if ($InvOrCredit=='Invoice' OR !isset($InvOrCredit)) { @@ -536,7 +537,7 @@ echo '<tr><td>' . _('End invoice/credit note number to print') . '</td> <td><input type="text" class="number" maxlength="6" size="7" name="ToTransNo" /></td></tr> </table>'; - echo '<div class="centre"><input type="submit" name="Print" value="' . _('Print') . '" /><p>'; + echo '<div class="centre"><input type="submit" name="Print" value="' . _('Print') . '" /><br />'; echo '<input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div>'; $sql = "SELECT typeno FROM systypes WHERE typeid=10"; @@ -554,6 +555,8 @@ echo '<br /><b>' . _('The last credit note created was number') . ' ' . $myrow[0] . '</b> <br />' . _('A sequential range can be printed using the same method as for invoices above') . '. ' . _('A single credit note can be printed by only entering a start transaction number') . '</div>'; + echo '</div> + </form>'; } else { @@ -680,7 +683,7 @@ AND in_array(1, $_SESSION['AllowedPageSecurityTokens']) AND $myrow['debtorno'] != $_SESSION['CustomerID']){ - echo '<p><font color="red" size="4">' . _('This transaction is addressed to another customer and cannot be displayed for privacy reasons') . '. ' . _('Please select only transactions relevant to your company'); + echo '<p class="bad">' . _('This transaction is addressed to another customer and cannot be displayed for privacy reasons') . '. ' . _('Please select only transactions relevant to your company'); exit; } @@ -688,21 +691,21 @@ $PageNumber = 1; echo '<table class="table1"> - <tr><td VALIGN=TOP WIDTH="10%"><img src="' . $_SESSION['LogoFile'] . '" /></td> - <td style="background-color:#BBBBBB"><b>'; + <tr><td valign="top" style="width:10%"><img src="' . $_SESSION['LogoFile'] . '" alt="" /></td> + <td style="background-color:#BBBBBB">'; if ($InvOrCredit=='Invoice') { - echo '<font size="4">' . _('TAX INVOICE') . ' '; + echo '<h2>' . _('TAX INVOICE') . ' '; } else { - echo '<font color="red" size="4">' . _('TAX CREDIT NOTE') . ' '; + echo '<h2 style="color:red">' . _('TAX CREDIT NOTE') . ' '; } - echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br /><font size="1">' . _('Tax Authority Ref') . '. ' . $_SESSION['CompanyRecord']['gstno'] . '</td> + echo _('Number') . ' ' . $FromTransNo . '</h2><br />' . _('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 />'; + <tr><td><h2>' . $_SESSION['CompanyRecord']['coyname'] . '</h2><br />'; echo $_SESSION['CompanyRecord']['regoffice1'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice2'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice3'] . '<br />'; @@ -713,13 +716,13 @@ echo _('Facsimile') . ': ' . $_SESSION['CompanyRecord']['fax'] . '<br />'; echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br />'; - echo '</td><td width="50%" class="number">'; + echo '</td><td style="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 style="background-color:#BBBBBB"><b>' . _('Charge To') . ':</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Charge To') . ':</b></td> </tr> <tr> <td style="background-color:#EEEEEE">'; @@ -744,8 +747,8 @@ echo '<table class="table1"> <tr> - <td align=left style="background-color:#BBBBBB"><b>' . _('Charge Branch') . ':</b></td> - <td align=left style="background-color:#BBBBBB"><b>' . _('Delivered To') . ':</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Charge Branch') . ':</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Delivered To') . ':</b></td> </tr>'; echo '<tr> <td style="background-color:#EEEEEE">' .$myrow['brname'] . @@ -769,13 +772,13 @@ echo '<table class="table1"> <tr> - <td align=left style="background-color:#BBBBBB"><b>' . _('Your Order Ref') . '</b></td> - <td align=left style="background-color:#BBBBBB"><b>' . _('Our Order No') . '</b></td> - <td align=left style="background-color:#BBBBBB"><b>' . _('Order Date') . '</b></td> - <td align=left style="background-color:#BBBBBB"><b>' . _('Invoice Date') . '</b></td> - <td align=left style="background-color:#BBBBBB"><b>' . _('Sales Person') . '</font></b></td> - <td align=left style="background-color:#BBBBBB"><b>' . _('Shipper') . '</b></td> - <td align=left style="background-color:#BBBBBB"><b>' . _('Consignment Ref') . '</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Your Order Ref') . '</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Our Order No') . '</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Order Date') . '</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Invoice Date') . '</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Sales Person') . '</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Shipper') . '</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Consignment Ref') . '</b></td> </tr>'; echo '<tr> <td style="background-color:#EEEEEE">' . $myrow['customerref'] . '</td> @@ -807,7 +810,7 @@ } else { /* then its a credit note */ echo '<table width="50%"><tr> - <td align=left style="background-color:#BBBBBB"><b>' . _('Branch') . ':</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Branch') . ':</b></td> </tr>'; echo '<tr> <td style="background-color:#EEEEEE">' .$myrow['brname'] . @@ -819,8 +822,8 @@ '<br />' . $myrow['braddress6'] . '</td> </tr></table>'; echo '<hr /><table class="table1"><tr> - <td align=left style="background-color:#BBBBBB"><b>' . _('Date') . '</b></td> - <td align=left style="background-color:#BBBBBB"><b>' . _('Sales Person') . '</font></b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Date') . '</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Sales Person') . '</b></td> </tr>'; echo '<tr> <td style="background-color:#EEEEEE">' . ConvertSQLDate($myrow['trandate']) . '</td> @@ -844,7 +847,7 @@ } echo '<hr />'; - echo '<div class="centre"><font size="2">' . _('All amounts stated in') . ' ' . $myrow['currcode'] . '</font></div>'; + echo '<div class="centre"><h4>' . _('All amounts stated in') . ' ' . $myrow['currcode'] . '</h4></div>'; $result=DB_query($sql,$db); if (DB_error_no($db)!=0) { @@ -921,19 +924,19 @@ $PageNumber++; echo '</table> <table class="table1"> - <tr><td valign=top><img src="' . $_SESSION['LogoFile'] . '" /></td> - <td style="background-color:#BBBBBB"><b>'; + <tr><td valign=top><img src="' . $_SESSION['LogoFile'] . '" alt="" /></td> + <td style="background-color:#BBBBBB">'; if ($InvOrCredit=='Invoice') { - echo '<font size="4">' . _('TAX INVOICE') . ' '; + echo '<h2>' . _('TAX INVOICE') . ' '; } else { - echo '<font color=RED size="4">' . _('TAX CREDIT NOTE') . ' '; + echo '<h2 style="color:red">' . _('TAX CREDIT NOTE') . ' '; } - echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br /><font size="1">' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</td></tr></table>'; + echo _('Number') . ' ' . $FromTransNo . '</h2><br />' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</td></tr></table>'; /*Now print out company name and address */ echo '<table class="table1"><tr> - <td><font size="4" color="#333333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font><br />'; + <td><h2>' . $_SESSION['CompanyRecord']['coyname'] . '</h2><br />'; echo $_SESSION['CompanyRecord']['regoffice1'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice2'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice3'] . '<br />'; @@ -970,19 +973,19 @@ /* head up a new invoice/credit note page */ $PageNumber++; echo '<table class="table1"> - <tr><td valign=top><img src="' . $_SESSION['LogoFile'] . '" /></td> - <td style="background-color:#BBBBBB"><b>'; + <tr><td valign=top><img src="' . $_SESSION['LogoFile'] . '" alt="" /></td> + <td style="background-color:#BBBBBB">'; if ($InvOrCredit=='Invoice') { - echo '<font size="4">' . _('TAX INVOICE') .' '; + echo '<h2>' . _('TAX INVOICE') .' '; } else { - echo '<font color=RED size="4">' . _('TAX CREDIT NOTE') . ' '; + echo '<h2 style="color:red">' . _('TAX CREDIT NOTE') . ' '; } - echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br /><font size="1">' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</td></tr><table>'; + echo _('Number') . ' ' . $FromTransNo . '</h2><br />' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</td></tr><table>'; /* 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 />'; + <tr><td><h2>' . $_SESSION['CompanyRecord']['coyname'] . '</h2><br />'; echo $_SESSION['CompanyRecord']['regoffice1'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice2'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice3'] . '<br />'; @@ -1033,9 +1036,9 @@ } /*Print out the invoice text entered */ - echo '<table class=table1><tr> + echo '<table class="table1"><tr> <td class="number">' . _('Sub Total') . '</td> - <td class="number" style="background-color:#EEEEEE" width="15%">' . $DisplaySubTot . '</td></tr>'; + <td class="number" style="background-color:#EEEEEE;width:15%">' . $DisplaySubTot . '</td></tr>'; echo '<tr><td class="number">' . _('Freight') . '</td> <td class="number" style="background-color:#EEEEEE">' . $DisplayFreight . '</td></tr>'; echo '<tr><td class="number">' . _('Tax') . '</td> @@ -1043,12 +1046,12 @@ if ($InvOrCredit=='Invoice'){ echo '<tr> <td class="number"><b>' . _('TOTAL INVOICE') . '</b></td> - <td class="number" style="background-color:#EEEEEE"><U><b>' . $DisplayTotal . '</b></U></td> + <td class="number" style="background-color:#EEEEEE"><b>' . $DisplayTotal . '</b></td> </tr>'; } else { echo '<tr> - <td class="number"><font color=RED><b>' . _('TOTAL CREDIT') .'</b></font></td> - <td class="number" style="background-color:#EEEEEE"><font color="red"><U><b>' . $DisplayTotal . '</b></U></font></td> + <td class="number" style="color:red"><b>' . _('TOTAL CREDIT') .'</b></td> + <td class="number" style="background-color:#EEEEEE;color:red"><b>' . $DisplayTotal . '</b></td> </tr>'; } echo '</table>'; Modified: trunk/PrintCustTransPortrait.php =================================================================== --- trunk/PrintCustTransPortrait.php 2012-04-08 02:56:40 UTC (rev 5234) +++ trunk/PrintCustTransPortrait.php 2012-04-08 19:55:49 UTC (rev 5235) @@ -523,6 +523,7 @@ /*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="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; 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 (Portrait Mode)') . '</p>'; @@ -563,11 +564,11 @@ </tr>'; echo '<tr> <td>' . _('Start invoice/credit note number to print') . '</td> - <td><input class="number" type="text" max="6" size="7" name="FromTransNo" /></td> + <td><input class="number" type="text" maxlength="6" size="7" name="FromTransNo" /></td> </tr>'; echo '<tr> <td>' . _('End invoice/credit note number to print') . '</td> - <td><input class="number" type="text" max="6" size="7" name="ToTransNo" /></td> + <td><input class="number" type="text" maxlength="6" size="7" name="ToTransNo" /></td> </tr> </table>'; echo '<div class="centre"> @@ -590,6 +591,8 @@ $myrow = DB_fetch_row($result); echo '<br /><b>' . _('The last credit note created was number') . ' ' . $myrow[0] . '</b><br />' . _('A sequential range can be printed using the same method as for invoices above') . '. ' . _('A single credit note can be printed by only entering a start transaction number') . '</div>'; + echo '</div> + </form>'; } else { @@ -714,7 +717,7 @@ $myrow = DB_fetch_array($result); /* Then there's an invoice (or credit note) to print. So print out the invoice header and GST Number from the company record */ if (count($_SESSION['AllowedPageSecurityTokens'])==1 AND in_array(1, $_SESSION['AllowedPageSecurityTokens']) AND $myrow['debtorno'] != $_SESSION['CustomerID']){ - echo '<p><font color="red" size="4">' . _('This transaction is addressed to another customer and cannot be displayed for privacy reasons') . '. ' . _('Please select only transactions relevant to your company'); + echo '<p class="bad">' . _('This transaction is addressed to another customer and cannot be displayed for privacy reasons') . '. ' . _('Please select only transactions relevant to your company'); exit; } @@ -723,23 +726,23 @@ echo '<table class="table1"> <tr> - <td valign=top width="10%"><img src="' . $_SESSION['LogoFile'] . '" /></td> - <td style="background-color:#bbbbbb"><b>'; + <td valign="top" style="width:10%"><img src="' . $_SESSION['LogoFile'] . '" alt="" /></td> + <td style="background-color:#bbbbbb">'; if ($InvOrCredit=='Invoice') { - echo '<font size="4">' . _('TAX INVOICE') . ' '; + echo '<h2>' . _('TAX INVOICE') . ' '; } else { - echo '<font color="red" size="4">' . _('TAX CREDIT NOTE') . ' '; + echo '<h2 style="color:red">' . _('TAX CREDIT NOTE') . ' '; } - echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font> - <br /><font size="1">' . _('Tax Authority Ref') . '. ' . $_SESSION['CompanyRecord']['gstno'] . '</td> + echo _('Number') . ' ' . $FromTransNo . '</h2> + <br />' . _('Tax Authority Ref') . '. ' . $_SESSION['CompanyRecord']['gstno'] . '</td> </tr> </table>'; /*Now print out the logo and company name and address */ - echo '<table class"table1"> + echo '<table class="table1"> <tr> - <td><font size="4" color="#333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font> + <td><h2>' . $_SESSION['CompanyRecord']['coyname'] . '</h2> <br />'; echo $_SESSION['CompanyRecord']['regoffice1'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice2'] . '<br />'; @@ -752,7 +755,7 @@ echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br />'; echo '</td> - <td width="50%" class="number">'; + <td style="width:50%" class="number">'; /*Now the customer charged to details in a sub table within a cell of the main table*/ @@ -784,8 +787,8 @@ echo '<table class="table1"> <tr> - <td align=left style="background-color:#bbbbbb"><b>' . _('Charge Branch') . ':</b></td> - <td align=left style="background-color:#bbbbbb"><b>' . _('Delivered To') . ':</b></td> + <td align="left" style="background-color:#bbbbbb"><b>' . _('Charge Branch') . ':</b></td> + <td align="left" style="background-color:#bbbbbb"><b>' . _('Delivered To') . ':</b></td> </tr>'; echo '<tr> <td style="background-color:#eeeeee">' .$myrow['brname'] . @@ -810,13 +813,13 @@ echo '<table class="table1"> <tr> - <td align=left style="background-color:#bbbbbb"><b>' . _('Your Order Ref') . '</b></td> - <td align=left style="background-color:#bbbbbb"><b>' . _('Our Order No') . '</b></td> - <td align=left style="background-color:#bbbbbb"><b>' . _('Order Date') . '</b></td> - <td align=left style="background-color:#bbbbbb"><b>' . _('Invoice Date') . '</b></td> - <td align=left style="background-color:#bbbbbb"><b>' . _('Sales Person') . '</font></b></td> - <td align=left style="background-color:#bbbbbb"><b>' . _('Shipper') . '</b></td> - <td align=left style="background-color:#bbbbbb"><b>' . _('Consignment Ref') . '</b></td> + <td align="left" style="background-color:#bbbbbb"><b>' . _('Your Order Ref') . '</b></td> + <td align="left" style="background-color:#bbbbbb"><b>' . _('Our Order No') . '</b></td> + <td align="left" style="background-color:#bbbbbb"><b>' . _('Order Date') . '</b></td> + <td align="left" style="background-color:#bbbbbb"><b>' . _('Invoice Date') . '</b></td> + <td align="left" style="background-color:#bbbbbb"><b>' . _('Sales Person') . '</b></td> + <td align="left" style="background-color:#bbbbbb"><b>' . _('Shipper') . '</b></td> + <td align="left" style="background-color:#bbbbbb"><b>' . _('Consignment Ref') . '</b></td> </tr>'; echo '<tr> <td style="background-color:#EEEEEE">' . $myrow['customerref'] . '</td> @@ -848,7 +851,7 @@ echo '<table width="50%"> <tr> - <td align=left style="background-color:#BBBBBB"><b>' . _('Branch') . ':</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Branch') . ':</b></td> </tr>'; echo '<tr> <td style="background-color:#EEEEEE">' . $myrow['brname'] . @@ -864,7 +867,7 @@ <table class="table1"> <tr> <td align="left" style="background-color:#bbbbbb"><b>' . _('Date') . '</b></td> - <td align=left style="background-color:#BBBBBB"><b>' . _('Sales Person') . '</font></b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Sales Person') . '</b></td> </tr>'; echo '<tr> <td style="background-color:#EEEEEE">' . ConvertSQLDate($myrow['trandate']) . '</td> @@ -889,7 +892,7 @@ } echo '<hr />'; - echo '<div class="centre"><font size="2">' . _('All amounts stated in') . ' ' . $myrow['currcode'] . '</font></div>'; + echo '<div class="centre"><h4>' . _('All amounts stated in') . ' ' . $myrow['currcode'] . '</h4></div>'; $result=DB_query($sql,$db); if (DB_error_no($db)!=0) { @@ -971,22 +974,22 @@ echo '</table> <table class="table1"> <tr> - <td valign="top"><img src="' . $_SESSION['LogoFile'] . '" /></td> - <td style="background-color:#bbbbbb"><b>'; + <td valign="top"><img src="' . $_SESSION['LogoFile'] . '" alt="" /></td> + <td style="background-color:#bbbbbb">'; if ($InvOrCredit=='Invoice') { - echo '<font size="4">' . _('TAX INVOICE') . ' '; + echo '<h2>' . _('TAX INVOICE') . ' '; } else { - echo '<font color="red" size="4">' . _('TAX CREDIT NOTE') . ' '; + echo '<h2 style="color:red">' . _('TAX CREDIT NOTE') . ' '; } - echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br /><font size="1">' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</td> + echo _('Number') . ' ' . $FromTransNo . '</h2><br />' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</td> </tr> </table>'; /*Now print out company name and address */ echo '<table class="table1"> <tr> - <td><font size="4" color="#333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font><br />'; + <td><h2>' . $_SESSION['CompanyRecord']['coyname'] . '</h2><br />'; echo $_SESSION['CompanyRecord']['regoffice1'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice2'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice3'] . '<br />'; @@ -1027,23 +1030,22 @@ $PageNumber++; echo '<table class="table1"> <tr> - <td valign="top"><img src="' . $_SESSION['LogoFile'] . '" /></td> - <td style="background-color:#bbbbbb"><b>'; + <td valign="top"><img src="' . $_SESSION['LogoFile'] . '" alt="" /></td> + <td style="background-color:#bbbbbb">'; if ($InvOrCredit=='Invoice') { - echo '<font size="4">' . _('TAX INVOICE') .' '; + echo '<h2>' . _('TAX INVOICE') .' '; } else { - echo '<font color="red" size="4">' . _('TAX CREDIT NOTE') . ' '; + echo '<h2 style="color:red">' . _('TAX CREDIT NOTE') . ' '; } - echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font> - <br /> - <font size="1">' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</font></td> + echo _('Number') . ' ' . $FromTransNo . '</h2> + <br />' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</td> </tr> </table>'; /*Print out the logo and company name and address */ echo '<table class="table1"> <tr> - <td><font size="4" color="#333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font><br />'; + <td><h2>' . $_SESSION['CompanyRecord']['coyname'] . '</h2><br />'; echo $_SESSION['CompanyRecord']['regoffice1'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice2'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice3'] . '<br />'; @@ -1098,17 +1100,17 @@ /*Print out the invoice text entered */ echo '<table class="table1"><tr> <td class="number">' . _('Sub Total') . '</td> - <td class="number" style="background-color:#EEEEEE" width="15%">' . $DisplaySubTot . '</td></tr>'; + <td class="number" style="background-color:#EEEEEE;width:15%">' . $DisplaySubTot . '</td></tr>'; echo '<tr><td class="number">' . _('Freight') . '</td> <td class="number" style="background-color:#EEEEEE">' . $DisplayFreight . '</td></tr>'; echo '<tr><td class="number">' . _('Tax') . '</td> <td class="number" style="background-color:#EEEEEE">' . $DisplayTax . '</td></tr>'; if ($InvOrCredit=='Invoice'){ echo '<tr><td class="number"><b>' . _('TOTAL INVOICE') . '</b></td> - <td class="number" style="background-color:#EEEEEE"><u><b>' . $DisplayTotal . '</b></u></td></tr>'; + <td class="number" style="background-color:#EEEEEE"><b>' . $DisplayTotal . '</b></td></tr>'; } else { - echo '<tr><td class="number"><font color="red"><b>' . _('TOTAL CREDIT') . '</b></font></td> - <td class="number" style="background-color:#EEEEEE"><font color="red"><u><b>' . $DisplayTotal . '</b></u></font></td></tr>'; + echo '<tr><td class="number" style="color:red"><b>' . _('TOTAL CREDIT') . '</b></td> + <td class="number" style="background-color:#EEEEEE;color:red"><b>' . $DisplayTotal . '</b></td></tr>'; } echo '</table>'; } /* end of check to see that there was an invoice record to print */ Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2012-04-08 02:56:40 UTC (rev 5234) +++ trunk/PurchData.php 2012-04-08 19:55:49 UTC (rev 5235) @@ -224,9 +224,9 @@ <td class="number">%s</td> <td class="number">%s ' . _('days') . '</td> <td>%s</td> - <td><a href="%s?StockID=%s&SupplierID=%s&Edit=1&EffectiveFrom=%s">' . _('Edit') . '</a></td> - <td><a href="%s?StockID=%s&SupplierID=%s&Copy=1&EffectiveFrom=%s">' . _('Copy') . '</a></td> - <td><a href="%s?StockID=%s&SupplierID=%s&Delete=1&EffectiveFrom=%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this suppliers price?') . '\');">' . _('Delete') . '</a></td> + <td><a href="%s?StockID=%s&SupplierID=%s&Edit=1&EffectiveFrom=%s">' . _('Edit') . '</a></td> + <td><a href="%s?StockID=%s&SupplierID=%s&Copy=1&EffectiveFrom=%s">' . _('Copy') . '</a></td> + <td><a href="%s?StockID=%s&SupplierID=%s&Delete=1&EffectiveFrom=%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this suppliers price?') . '\');">' . _('Delete') . '</a></td> </tr>', $myrow['suppname'], locale_number_format($myrow['price'], $myrow['currdecimalplaces']), @@ -286,11 +286,12 @@ echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . ' ' . _('For Stock Code') . ' - ' . $StockID . '</p><br />'; } if (!isset($_POST['SearchSupplier'])) { - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"> - <table cellpadding="3" class="selection"> - <tr>'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="StockID" value="' . $StockID . '" />'; + echo '<table cellpadding="3" class="selection"> + <tr>'; echo '<td>' . _('Text in the Supplier') . ' <b>' . _('NAME') . '</b>:</td>'; echo '<td><input type="text" name="Keywords" size="20" maxlength="25" /></td>'; echo '<td><b>' . _('OR') . '</b></td>'; @@ -300,6 +301,7 @@ echo '<div class="centre"> <input type="submit" name="SearchSupplier" value="' . _('Find Suppliers Now') . '" /> </div> + </div> </form>'; include ('includes/footer.inc'); exit; @@ -372,9 +374,10 @@ } if (isset($SuppliersResult)) { - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"> - <table cellpadding="2" class="selection">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table cellpadding="2" class="selection">'; $TableHeader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Supplier Name') . '</th> @@ -398,8 +401,7 @@ <td>%s</td> <td>%s</td> <td>%s</td> - <td>%s</td> - </tr>', + <td>%s', $myrow['supplierid'], $myrow['suppname'], $myrow['currcode'], @@ -408,11 +410,13 @@ $myrow['address3']); echo '<input type="hidden" name="StockID" value="' . $StockID . '" />'; - echo '<input type="hidden" name="StockUOM" value="' . $StockUOM . '" />'; + echo '<input type="hidden" name="StockUOM" value="' . $StockUOM . '" /></td></tr>'; } //end of while loop - echo '</table><br/></form>'; + echo '</table><br/>'; + echo '</div> + </form>'; } //end if results to show @@ -467,10 +471,11 @@ $StockUOM=$myrow['units']; } echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> - <th colspan="3"><font color="navy" size="3">' . _('Data for Purchasing') . ' ' . $StockID . ' ' . _('from') . ' '. $SupplierID . '</font></th> + <th colspan="3"><h3>' . _('Data for Purchasing') . ' ' . $StockID . ' ' . _('from') . ' '. $SupplierID . '</h3></th> </tr>'; if (!isset($SupplierID)) { $SupplierID = ''; @@ -481,19 +486,17 @@ </tr>'; } else { echo '<tr> - <td>' . _('Supplier Name') . ':</td> - <input type="hidden" name="SupplierID" maxlength="10" size="11" value="' . $SupplierID . '" />'; - if ($SupplierID!='') { - echo '<td>'.$SuppName; - } - if (!isset($SuppName) OR $SuppName = "") { - echo '(' . _('A search facility is available below if necessary') . ')'; + <td>' . _('Supplier Name') . ': + <input type="hidden" name="SupplierID" maxlength="10" size="11" value="' . $SupplierID . '" /> + </td>'; + if (!isset($SuppName) OR $SuppName == "") { + echo '<td>(' . _('A search facility is available below if necessary') . ')'; } else { echo '<td>'.$SuppName; } echo '</td></tr>'; } - echo '<td><input type="hidden" name="StockID" maxlength="10" size="11" value="' . $StockID . '" />'; + echo '<tr><td><input type="hidden" name="StockID" maxlength="10" size="11" value="' . $StockID . '" /></td></tr>'; if (!isset($CurrCode)) { $CurrCode = ''; } @@ -516,7 +519,7 @@ $_POST['MinOrderQty'] = '1'; } echo '<tr><td>' . _('Currency') . ':</td> - <td><input type="hidden" name="CurrCode" . value="' . $CurrCode . '" />' . $CurrCode . '</td></tr>'; + <td><input type="hidden" name="CurrCode" value="' . $CurrCode . '" />' . $CurrCode . '</td></tr>'; echo '<tr><td>' . _('Price') . ' (' . _('in Supplier Currency') . '):</td> <td><input type="text" class="number" name="Price" maxlength="12" size="12" value="' . $_POST['Price'] . '" /></td></tr>'; echo '<tr><td>' . _('Date Updated') . ':</td> @@ -564,11 +567,13 @@ echo '<div class="centre">'; if (isset($StockLocation) and isset($StockID) AND mb_strlen($StockID) != 0) { echo '<br /><a href="' . $rootpath . '/StockStatus.php?StockID=' . $StockID . '">' . _('Show Stock Status') . '</a>'; - echo '<br /><a href="' . $rootpath . '/StockMovements.php?StockID=' . $StockID . '&StockLocation=' . $StockLocation . '">' . _('Show Stock Movements') . '</a>'; - echo '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?SelectedStockItem=' . $StockID . '&StockLocation=' . $StockLocation . '">' . _('Search Outstanding Sales Orders') . '</a>'; + echo '<br /><a href="' . $rootpath . '/StockMovements.php?StockID=' . $StockID . '&StockLocation=' . $StockLocation . '">' . _('Show Stock Movements') . '</a>'; + echo '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?SelectedStockItem=' . $StockID . '&StockLocation=' . $StockLocation . '">' . _('Search Outstanding Sales Orders') . '</a>'; echo '<br /><a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search Completed Sales Orders') . '</a>'; } - echo '</form></div>'; + echo '</div>'; + echo '</div> + </form>'; } include ('includes/footer.inc'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-04-08 19:55:56
|
Revision: 5235 http://web-erp.svn.sourceforge.net/web-erp/?rev=5235&view=rev Author: vvs2012 Date: 2012-04-08 19:55:49 +0000 (Sun, 08 Apr 2012) Log Message: ----------- xhtml Modified Paths: -------------- trunk/PrintCustOrder.php trunk/PrintCustOrder_generic.php trunk/PrintCustStatements.php trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php trunk/PurchData.php Modified: trunk/PrintCustOrder.php =================================================================== --- trunk/PrintCustOrder.php 2012-04-08 02:56:40 UTC (rev 5234) +++ trunk/PrintCustOrder.php 2012-04-08 19:55:49 UTC (rev 5235) @@ -20,9 +20,11 @@ <br /> <table class="table_index"> <tr><td class="menu_group_item"> + <ul> <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> - </td> + </ul> + </td> </tr> </table> </div> Modified: trunk/PrintCustOrder_generic.php =================================================================== --- trunk/PrintCustOrder_generic.php 2012-04-08 02:56:40 UTC (rev 5234) +++ trunk/PrintCustOrder_generic.php 2012-04-08 19:55:49 UTC (rev 5235) @@ -19,8 +19,10 @@ <table class="table_index"> <tr> <td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php?">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> + <ul> + <li><a href="'. $rootpath . '/SelectSalesOrder.php?">' . _('Outstanding Sales Orders') . '</a></li> + <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> + </ul> </td> </tr> </table> Modified: trunk/PrintCustStatements.php =================================================================== --- trunk/PrintCustStatements.php 2012-04-08 02:56:40 UTC (rev 5234) +++ trunk/PrintCustStatements.php 2012-04-08 19:55:49 UTC (rev 5235) @@ -414,17 +414,21 @@ /*if FromTransNo is not set then show a form to allow input of either a single statement number or a range of statements to be printed. Also get the last statement number created to show the user where the current range is up to */ - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"><table class="selection">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; echo '<tr><td>' . _('Starting Customer statement to print (Customer code)'). ' - </td><td><input type="text" max="6" size="7" name="FromCust" value="1" /></td></tr> + </td><td><input type="text" maxlength="6" size="7" name="FromCust" value="1" /></td></tr> <tr><td>'. _('Ending Customer statement to print (Customer code)').'</td><td> - <input type="text" max="6" size="7" name="ToCust" value="zzzzzz" /></td></tr></table> + <input type="text" maxlength="6" size="7" name="ToCust" value="zzzzzz" /></td></tr></table> <br /><div class="centre"> <input type="submit" name="PrintPDF" value="' . _('Print All Statements in the Range Selected').'" /> </div>'; + echo '</div> + </form>'; } echo '<br /><br /><br />'; include('includes/footer.inc'); Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2012-04-08 02:56:40 UTC (rev 5234) +++ trunk/PrintCustTrans.php 2012-04-08 19:55:49 UTC (rev 5235) @@ -502,11 +502,12 @@ /* 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="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . _('Print Invoices or Credit Notes (Landscape Mode)') . '</div>'; + echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . _('Print Invoices or Credit Notes (Landscape Mode)') . '</p></div>'; echo '<table class="table1"> - <tr><td>' . _('Print Invoices or Credit Notes') . '</td><td><select name=InvOrCredit>'; + <tr><td>' . _('Print Invoices or Credit Notes') . '</td><td><select name="InvOrCredit">'; if ($InvOrCredit=='Invoice' OR !isset($InvOrCredit)) { echo '<option selected="selected" value="Invoice">' . _('Invoices') . '</option>'; @@ -517,7 +518,7 @@ } echo '</select></td></tr>'; - echo '<tr><td>' . _('Print EDI Transactions') . '</td><td><select name=PrintEDI>'; + echo '<tr><td>' . _('Print EDI Transactions') . '</td><td><select name="PrintEDI">'; if ($InvOrCredit=='Invoice' OR !isset($InvOrCredit)) { @@ -536,7 +537,7 @@ echo '<tr><td>' . _('End invoice/credit note number to print') . '</td> <td><input type="text" class="number" maxlength="6" size="7" name="ToTransNo" /></td></tr> </table>'; - echo '<div class="centre"><input type="submit" name="Print" value="' . _('Print') . '" /><p>'; + echo '<div class="centre"><input type="submit" name="Print" value="' . _('Print') . '" /><br />'; echo '<input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div>'; $sql = "SELECT typeno FROM systypes WHERE typeid=10"; @@ -554,6 +555,8 @@ echo '<br /><b>' . _('The last credit note created was number') . ' ' . $myrow[0] . '</b> <br />' . _('A sequential range can be printed using the same method as for invoices above') . '. ' . _('A single credit note can be printed by only entering a start transaction number') . '</div>'; + echo '</div> + </form>'; } else { @@ -680,7 +683,7 @@ AND in_array(1, $_SESSION['AllowedPageSecurityTokens']) AND $myrow['debtorno'] != $_SESSION['CustomerID']){ - echo '<p><font color="red" size="4">' . _('This transaction is addressed to another customer and cannot be displayed for privacy reasons') . '. ' . _('Please select only transactions relevant to your company'); + echo '<p class="bad">' . _('This transaction is addressed to another customer and cannot be displayed for privacy reasons') . '. ' . _('Please select only transactions relevant to your company'); exit; } @@ -688,21 +691,21 @@ $PageNumber = 1; echo '<table class="table1"> - <tr><td VALIGN=TOP WIDTH="10%"><img src="' . $_SESSION['LogoFile'] . '" /></td> - <td style="background-color:#BBBBBB"><b>'; + <tr><td valign="top" style="width:10%"><img src="' . $_SESSION['LogoFile'] . '" alt="" /></td> + <td style="background-color:#BBBBBB">'; if ($InvOrCredit=='Invoice') { - echo '<font size="4">' . _('TAX INVOICE') . ' '; + echo '<h2>' . _('TAX INVOICE') . ' '; } else { - echo '<font color="red" size="4">' . _('TAX CREDIT NOTE') . ' '; + echo '<h2 style="color:red">' . _('TAX CREDIT NOTE') . ' '; } - echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br /><font size="1">' . _('Tax Authority Ref') . '. ' . $_SESSION['CompanyRecord']['gstno'] . '</td> + echo _('Number') . ' ' . $FromTransNo . '</h2><br />' . _('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 />'; + <tr><td><h2>' . $_SESSION['CompanyRecord']['coyname'] . '</h2><br />'; echo $_SESSION['CompanyRecord']['regoffice1'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice2'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice3'] . '<br />'; @@ -713,13 +716,13 @@ echo _('Facsimile') . ': ' . $_SESSION['CompanyRecord']['fax'] . '<br />'; echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br />'; - echo '</td><td width="50%" class="number">'; + echo '</td><td style="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 style="background-color:#BBBBBB"><b>' . _('Charge To') . ':</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Charge To') . ':</b></td> </tr> <tr> <td style="background-color:#EEEEEE">'; @@ -744,8 +747,8 @@ echo '<table class="table1"> <tr> - <td align=left style="background-color:#BBBBBB"><b>' . _('Charge Branch') . ':</b></td> - <td align=left style="background-color:#BBBBBB"><b>' . _('Delivered To') . ':</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Charge Branch') . ':</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Delivered To') . ':</b></td> </tr>'; echo '<tr> <td style="background-color:#EEEEEE">' .$myrow['brname'] . @@ -769,13 +772,13 @@ echo '<table class="table1"> <tr> - <td align=left style="background-color:#BBBBBB"><b>' . _('Your Order Ref') . '</b></td> - <td align=left style="background-color:#BBBBBB"><b>' . _('Our Order No') . '</b></td> - <td align=left style="background-color:#BBBBBB"><b>' . _('Order Date') . '</b></td> - <td align=left style="background-color:#BBBBBB"><b>' . _('Invoice Date') . '</b></td> - <td align=left style="background-color:#BBBBBB"><b>' . _('Sales Person') . '</font></b></td> - <td align=left style="background-color:#BBBBBB"><b>' . _('Shipper') . '</b></td> - <td align=left style="background-color:#BBBBBB"><b>' . _('Consignment Ref') . '</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Your Order Ref') . '</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Our Order No') . '</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Order Date') . '</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Invoice Date') . '</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Sales Person') . '</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Shipper') . '</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Consignment Ref') . '</b></td> </tr>'; echo '<tr> <td style="background-color:#EEEEEE">' . $myrow['customerref'] . '</td> @@ -807,7 +810,7 @@ } else { /* then its a credit note */ echo '<table width="50%"><tr> - <td align=left style="background-color:#BBBBBB"><b>' . _('Branch') . ':</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Branch') . ':</b></td> </tr>'; echo '<tr> <td style="background-color:#EEEEEE">' .$myrow['brname'] . @@ -819,8 +822,8 @@ '<br />' . $myrow['braddress6'] . '</td> </tr></table>'; echo '<hr /><table class="table1"><tr> - <td align=left style="background-color:#BBBBBB"><b>' . _('Date') . '</b></td> - <td align=left style="background-color:#BBBBBB"><b>' . _('Sales Person') . '</font></b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Date') . '</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Sales Person') . '</b></td> </tr>'; echo '<tr> <td style="background-color:#EEEEEE">' . ConvertSQLDate($myrow['trandate']) . '</td> @@ -844,7 +847,7 @@ } echo '<hr />'; - echo '<div class="centre"><font size="2">' . _('All amounts stated in') . ' ' . $myrow['currcode'] . '</font></div>'; + echo '<div class="centre"><h4>' . _('All amounts stated in') . ' ' . $myrow['currcode'] . '</h4></div>'; $result=DB_query($sql,$db); if (DB_error_no($db)!=0) { @@ -921,19 +924,19 @@ $PageNumber++; echo '</table> <table class="table1"> - <tr><td valign=top><img src="' . $_SESSION['LogoFile'] . '" /></td> - <td style="background-color:#BBBBBB"><b>'; + <tr><td valign=top><img src="' . $_SESSION['LogoFile'] . '" alt="" /></td> + <td style="background-color:#BBBBBB">'; if ($InvOrCredit=='Invoice') { - echo '<font size="4">' . _('TAX INVOICE') . ' '; + echo '<h2>' . _('TAX INVOICE') . ' '; } else { - echo '<font color=RED size="4">' . _('TAX CREDIT NOTE') . ' '; + echo '<h2 style="color:red">' . _('TAX CREDIT NOTE') . ' '; } - echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br /><font size="1">' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</td></tr></table>'; + echo _('Number') . ' ' . $FromTransNo . '</h2><br />' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</td></tr></table>'; /*Now print out company name and address */ echo '<table class="table1"><tr> - <td><font size="4" color="#333333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font><br />'; + <td><h2>' . $_SESSION['CompanyRecord']['coyname'] . '</h2><br />'; echo $_SESSION['CompanyRecord']['regoffice1'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice2'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice3'] . '<br />'; @@ -970,19 +973,19 @@ /* head up a new invoice/credit note page */ $PageNumber++; echo '<table class="table1"> - <tr><td valign=top><img src="' . $_SESSION['LogoFile'] . '" /></td> - <td style="background-color:#BBBBBB"><b>'; + <tr><td valign=top><img src="' . $_SESSION['LogoFile'] . '" alt="" /></td> + <td style="background-color:#BBBBBB">'; if ($InvOrCredit=='Invoice') { - echo '<font size="4">' . _('TAX INVOICE') .' '; + echo '<h2>' . _('TAX INVOICE') .' '; } else { - echo '<font color=RED size="4">' . _('TAX CREDIT NOTE') . ' '; + echo '<h2 style="color:red">' . _('TAX CREDIT NOTE') . ' '; } - echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br /><font size="1">' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</td></tr><table>'; + echo _('Number') . ' ' . $FromTransNo . '</h2><br />' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</td></tr><table>'; /* 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 />'; + <tr><td><h2>' . $_SESSION['CompanyRecord']['coyname'] . '</h2><br />'; echo $_SESSION['CompanyRecord']['regoffice1'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice2'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice3'] . '<br />'; @@ -1033,9 +1036,9 @@ } /*Print out the invoice text entered */ - echo '<table class=table1><tr> + echo '<table class="table1"><tr> <td class="number">' . _('Sub Total') . '</td> - <td class="number" style="background-color:#EEEEEE" width="15%">' . $DisplaySubTot . '</td></tr>'; + <td class="number" style="background-color:#EEEEEE;width:15%">' . $DisplaySubTot . '</td></tr>'; echo '<tr><td class="number">' . _('Freight') . '</td> <td class="number" style="background-color:#EEEEEE">' . $DisplayFreight . '</td></tr>'; echo '<tr><td class="number">' . _('Tax') . '</td> @@ -1043,12 +1046,12 @@ if ($InvOrCredit=='Invoice'){ echo '<tr> <td class="number"><b>' . _('TOTAL INVOICE') . '</b></td> - <td class="number" style="background-color:#EEEEEE"><U><b>' . $DisplayTotal . '</b></U></td> + <td class="number" style="background-color:#EEEEEE"><b>' . $DisplayTotal . '</b></td> </tr>'; } else { echo '<tr> - <td class="number"><font color=RED><b>' . _('TOTAL CREDIT') .'</b></font></td> - <td class="number" style="background-color:#EEEEEE"><font color="red"><U><b>' . $DisplayTotal . '</b></U></font></td> + <td class="number" style="color:red"><b>' . _('TOTAL CREDIT') .'</b></td> + <td class="number" style="background-color:#EEEEEE;color:red"><b>' . $DisplayTotal . '</b></td> </tr>'; } echo '</table>'; Modified: trunk/PrintCustTransPortrait.php =================================================================== --- trunk/PrintCustTransPortrait.php 2012-04-08 02:56:40 UTC (rev 5234) +++ trunk/PrintCustTransPortrait.php 2012-04-08 19:55:49 UTC (rev 5235) @@ -523,6 +523,7 @@ /*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="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<div>'; 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 (Portrait Mode)') . '</p>'; @@ -563,11 +564,11 @@ </tr>'; echo '<tr> <td>' . _('Start invoice/credit note number to print') . '</td> - <td><input class="number" type="text" max="6" size="7" name="FromTransNo" /></td> + <td><input class="number" type="text" maxlength="6" size="7" name="FromTransNo" /></td> </tr>'; echo '<tr> <td>' . _('End invoice/credit note number to print') . '</td> - <td><input class="number" type="text" max="6" size="7" name="ToTransNo" /></td> + <td><input class="number" type="text" maxlength="6" size="7" name="ToTransNo" /></td> </tr> </table>'; echo '<div class="centre"> @@ -590,6 +591,8 @@ $myrow = DB_fetch_row($result); echo '<br /><b>' . _('The last credit note created was number') . ' ' . $myrow[0] . '</b><br />' . _('A sequential range can be printed using the same method as for invoices above') . '. ' . _('A single credit note can be printed by only entering a start transaction number') . '</div>'; + echo '</div> + </form>'; } else { @@ -714,7 +717,7 @@ $myrow = DB_fetch_array($result); /* Then there's an invoice (or credit note) to print. So print out the invoice header and GST Number from the company record */ if (count($_SESSION['AllowedPageSecurityTokens'])==1 AND in_array(1, $_SESSION['AllowedPageSecurityTokens']) AND $myrow['debtorno'] != $_SESSION['CustomerID']){ - echo '<p><font color="red" size="4">' . _('This transaction is addressed to another customer and cannot be displayed for privacy reasons') . '. ' . _('Please select only transactions relevant to your company'); + echo '<p class="bad">' . _('This transaction is addressed to another customer and cannot be displayed for privacy reasons') . '. ' . _('Please select only transactions relevant to your company'); exit; } @@ -723,23 +726,23 @@ echo '<table class="table1"> <tr> - <td valign=top width="10%"><img src="' . $_SESSION['LogoFile'] . '" /></td> - <td style="background-color:#bbbbbb"><b>'; + <td valign="top" style="width:10%"><img src="' . $_SESSION['LogoFile'] . '" alt="" /></td> + <td style="background-color:#bbbbbb">'; if ($InvOrCredit=='Invoice') { - echo '<font size="4">' . _('TAX INVOICE') . ' '; + echo '<h2>' . _('TAX INVOICE') . ' '; } else { - echo '<font color="red" size="4">' . _('TAX CREDIT NOTE') . ' '; + echo '<h2 style="color:red">' . _('TAX CREDIT NOTE') . ' '; } - echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font> - <br /><font size="1">' . _('Tax Authority Ref') . '. ' . $_SESSION['CompanyRecord']['gstno'] . '</td> + echo _('Number') . ' ' . $FromTransNo . '</h2> + <br />' . _('Tax Authority Ref') . '. ' . $_SESSION['CompanyRecord']['gstno'] . '</td> </tr> </table>'; /*Now print out the logo and company name and address */ - echo '<table class"table1"> + echo '<table class="table1"> <tr> - <td><font size="4" color="#333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font> + <td><h2>' . $_SESSION['CompanyRecord']['coyname'] . '</h2> <br />'; echo $_SESSION['CompanyRecord']['regoffice1'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice2'] . '<br />'; @@ -752,7 +755,7 @@ echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br />'; echo '</td> - <td width="50%" class="number">'; + <td style="width:50%" class="number">'; /*Now the customer charged to details in a sub table within a cell of the main table*/ @@ -784,8 +787,8 @@ echo '<table class="table1"> <tr> - <td align=left style="background-color:#bbbbbb"><b>' . _('Charge Branch') . ':</b></td> - <td align=left style="background-color:#bbbbbb"><b>' . _('Delivered To') . ':</b></td> + <td align="left" style="background-color:#bbbbbb"><b>' . _('Charge Branch') . ':</b></td> + <td align="left" style="background-color:#bbbbbb"><b>' . _('Delivered To') . ':</b></td> </tr>'; echo '<tr> <td style="background-color:#eeeeee">' .$myrow['brname'] . @@ -810,13 +813,13 @@ echo '<table class="table1"> <tr> - <td align=left style="background-color:#bbbbbb"><b>' . _('Your Order Ref') . '</b></td> - <td align=left style="background-color:#bbbbbb"><b>' . _('Our Order No') . '</b></td> - <td align=left style="background-color:#bbbbbb"><b>' . _('Order Date') . '</b></td> - <td align=left style="background-color:#bbbbbb"><b>' . _('Invoice Date') . '</b></td> - <td align=left style="background-color:#bbbbbb"><b>' . _('Sales Person') . '</font></b></td> - <td align=left style="background-color:#bbbbbb"><b>' . _('Shipper') . '</b></td> - <td align=left style="background-color:#bbbbbb"><b>' . _('Consignment Ref') . '</b></td> + <td align="left" style="background-color:#bbbbbb"><b>' . _('Your Order Ref') . '</b></td> + <td align="left" style="background-color:#bbbbbb"><b>' . _('Our Order No') . '</b></td> + <td align="left" style="background-color:#bbbbbb"><b>' . _('Order Date') . '</b></td> + <td align="left" style="background-color:#bbbbbb"><b>' . _('Invoice Date') . '</b></td> + <td align="left" style="background-color:#bbbbbb"><b>' . _('Sales Person') . '</b></td> + <td align="left" style="background-color:#bbbbbb"><b>' . _('Shipper') . '</b></td> + <td align="left" style="background-color:#bbbbbb"><b>' . _('Consignment Ref') . '</b></td> </tr>'; echo '<tr> <td style="background-color:#EEEEEE">' . $myrow['customerref'] . '</td> @@ -848,7 +851,7 @@ echo '<table width="50%"> <tr> - <td align=left style="background-color:#BBBBBB"><b>' . _('Branch') . ':</b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Branch') . ':</b></td> </tr>'; echo '<tr> <td style="background-color:#EEEEEE">' . $myrow['brname'] . @@ -864,7 +867,7 @@ <table class="table1"> <tr> <td align="left" style="background-color:#bbbbbb"><b>' . _('Date') . '</b></td> - <td align=left style="background-color:#BBBBBB"><b>' . _('Sales Person') . '</font></b></td> + <td align="left" style="background-color:#BBBBBB"><b>' . _('Sales Person') . '</b></td> </tr>'; echo '<tr> <td style="background-color:#EEEEEE">' . ConvertSQLDate($myrow['trandate']) . '</td> @@ -889,7 +892,7 @@ } echo '<hr />'; - echo '<div class="centre"><font size="2">' . _('All amounts stated in') . ' ' . $myrow['currcode'] . '</font></div>'; + echo '<div class="centre"><h4>' . _('All amounts stated in') . ' ' . $myrow['currcode'] . '</h4></div>'; $result=DB_query($sql,$db); if (DB_error_no($db)!=0) { @@ -971,22 +974,22 @@ echo '</table> <table class="table1"> <tr> - <td valign="top"><img src="' . $_SESSION['LogoFile'] . '" /></td> - <td style="background-color:#bbbbbb"><b>'; + <td valign="top"><img src="' . $_SESSION['LogoFile'] . '" alt="" /></td> + <td style="background-color:#bbbbbb">'; if ($InvOrCredit=='Invoice') { - echo '<font size="4">' . _('TAX INVOICE') . ' '; + echo '<h2>' . _('TAX INVOICE') . ' '; } else { - echo '<font color="red" size="4">' . _('TAX CREDIT NOTE') . ' '; + echo '<h2 style="color:red">' . _('TAX CREDIT NOTE') . ' '; } - echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br /><font size="1">' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</td> + echo _('Number') . ' ' . $FromTransNo . '</h2><br />' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</td> </tr> </table>'; /*Now print out company name and address */ echo '<table class="table1"> <tr> - <td><font size="4" color="#333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font><br />'; + <td><h2>' . $_SESSION['CompanyRecord']['coyname'] . '</h2><br />'; echo $_SESSION['CompanyRecord']['regoffice1'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice2'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice3'] . '<br />'; @@ -1027,23 +1030,22 @@ $PageNumber++; echo '<table class="table1"> <tr> - <td valign="top"><img src="' . $_SESSION['LogoFile'] . '" /></td> - <td style="background-color:#bbbbbb"><b>'; + <td valign="top"><img src="' . $_SESSION['LogoFile'] . '" alt="" /></td> + <td style="background-color:#bbbbbb">'; if ($InvOrCredit=='Invoice') { - echo '<font size="4">' . _('TAX INVOICE') .' '; + echo '<h2>' . _('TAX INVOICE') .' '; } else { - echo '<font color="red" size="4">' . _('TAX CREDIT NOTE') . ' '; + echo '<h2 style="color:red">' . _('TAX CREDIT NOTE') . ' '; } - echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font> - <br /> - <font size="1">' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</font></td> + echo _('Number') . ' ' . $FromTransNo . '</h2> + <br />' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</td> </tr> </table>'; /*Print out the logo and company name and address */ echo '<table class="table1"> <tr> - <td><font size="4" color="#333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font><br />'; + <td><h2>' . $_SESSION['CompanyRecord']['coyname'] . '</h2><br />'; echo $_SESSION['CompanyRecord']['regoffice1'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice2'] . '<br />'; echo $_SESSION['CompanyRecord']['regoffice3'] . '<br />'; @@ -1098,17 +1100,17 @@ /*Print out the invoice text entered */ echo '<table class="table1"><tr> <td class="number">' . _('Sub Total') . '</td> - <td class="number" style="background-color:#EEEEEE" width="15%">' . $DisplaySubTot . '</td></tr>'; + <td class="number" style="background-color:#EEEEEE;width:15%">' . $DisplaySubTot . '</td></tr>'; echo '<tr><td class="number">' . _('Freight') . '</td> <td class="number" style="background-color:#EEEEEE">' . $DisplayFreight . '</td></tr>'; echo '<tr><td class="number">' . _('Tax') . '</td> <td class="number" style="background-color:#EEEEEE">' . $DisplayTax . '</td></tr>'; if ($InvOrCredit=='Invoice'){ echo '<tr><td class="number"><b>' . _('TOTAL INVOICE') . '</b></td> - <td class="number" style="background-color:#EEEEEE"><u><b>' . $DisplayTotal . '</b></u></td></tr>'; + <td class="number" style="background-color:#EEEEEE"><b>' . $DisplayTotal . '</b></td></tr>'; } else { - echo '<tr><td class="number"><font color="red"><b>' . _('TOTAL CREDIT') . '</b></font></td> - <td class="number" style="background-color:#EEEEEE"><font color="red"><u><b>' . $DisplayTotal . '</b></u></font></td></tr>'; + echo '<tr><td class="number" style="color:red"><b>' . _('TOTAL CREDIT') . '</b></td> + <td class="number" style="background-color:#EEEEEE;color:red"><b>' . $DisplayTotal . '</b></td></tr>'; } echo '</table>'; } /* end of check to see that there was an invoice record to print */ Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2012-04-08 02:56:40 UTC (rev 5234) +++ trunk/PurchData.php 2012-04-08 19:55:49 UTC (rev 5235) @@ -224,9 +224,9 @@ <td class="number">%s</td> <td class="number">%s ' . _('days') . '</td> <td>%s</td> - <td><a href="%s?StockID=%s&SupplierID=%s&Edit=1&EffectiveFrom=%s">' . _('Edit') . '</a></td> - <td><a href="%s?StockID=%s&SupplierID=%s&Copy=1&EffectiveFrom=%s">' . _('Copy') . '</a></td> - <td><a href="%s?StockID=%s&SupplierID=%s&Delete=1&EffectiveFrom=%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this suppliers price?') . '\');">' . _('Delete') . '</a></td> + <td><a href="%s?StockID=%s&SupplierID=%s&Edit=1&EffectiveFrom=%s">' . _('Edit') . '</a></td> + <td><a href="%s?StockID=%s&SupplierID=%s&Copy=1&EffectiveFrom=%s">' . _('Copy') . '</a></td> + <td><a href="%s?StockID=%s&SupplierID=%s&Delete=1&EffectiveFrom=%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this suppliers price?') . '\');">' . _('Delete') . '</a></td> </tr>', $myrow['suppname'], locale_number_format($myrow['price'], $myrow['currdecimalplaces']), @@ -286,11 +286,12 @@ echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . ' ' . _('For Stock Code') . ' - ' . $StockID . '</p><br />'; } if (!isset($_POST['SearchSupplier'])) { - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"> - <table cellpadding="3" class="selection"> - <tr>'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="StockID" value="' . $StockID . '" />'; + echo '<table cellpadding="3" class="selection"> + <tr>'; echo '<td>' . _('Text in the Supplier') . ' <b>' . _('NAME') . '</b>:</td>'; echo '<td><input type="text" name="Keywords" size="20" maxlength="25" /></td>'; echo '<td><b>' . _('OR') . '</b></td>'; @@ -300,6 +301,7 @@ echo '<div class="centre"> <input type="submit" name="SearchSupplier" value="' . _('Find Suppliers Now') . '" /> </div> + </div> </form>'; include ('includes/footer.inc'); exit; @@ -372,9 +374,10 @@ } if (isset($SuppliersResult)) { - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"> - <table cellpadding="2" class="selection">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table cellpadding="2" class="selection">'; $TableHeader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Supplier Name') . '</th> @@ -398,8 +401,7 @@ <td>%s</td> <td>%s</td> <td>%s</td> - <td>%s</td> - </tr>', + <td>%s', $myrow['supplierid'], $myrow['suppname'], $myrow['currcode'], @@ -408,11 +410,13 @@ $myrow['address3']); echo '<input type="hidden" name="StockID" value="' . $StockID . '" />'; - echo '<input type="hidden" name="StockUOM" value="' . $StockUOM . '" />'; + echo '<input type="hidden" name="StockUOM" value="' . $StockUOM . '" /></td></tr>'; } //end of while loop - echo '</table><br/></form>'; + echo '</table><br/>'; + echo '</div> + </form>'; } //end if results to show @@ -467,10 +471,11 @@ $StockUOM=$myrow['units']; } echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> - <th colspan="3"><font color="navy" size="3">' . _('Data for Purchasing') . ' ' . $StockID . ' ' . _('from') . ' '. $SupplierID . '</font></th> + <th colspan="3"><h3>' . _('Data for Purchasing') . ' ' . $StockID . ' ' . _('from') . ' '. $SupplierID . '</h3></th> </tr>'; if (!isset($SupplierID)) { $SupplierID = ''; @@ -481,19 +486,17 @@ </tr>'; } else { echo '<tr> - <td>' . _('Supplier Name') . ':</td> - <input type="hidden" name="SupplierID" maxlength="10" size="11" value="' . $SupplierID . '" />'; - if ($SupplierID!='') { - echo '<td>'.$SuppName; - } - if (!isset($SuppName) OR $SuppName = "") { - echo '(' . _('A search facility is available below if necessary') . ')'; + <td>' . _('Supplier Name') . ': + <input type="hidden" name="SupplierID" maxlength="10" size="11" value="' . $SupplierID . '" /> + </td>'; + if (!isset($SuppName) OR $SuppName == "") { + echo '<td>(' . _('A search facility is available below if necessary') . ')'; } else { echo '<td>'.$SuppName; } echo '</td></tr>'; } - echo '<td><input type="hidden" name="StockID" maxlength="10" size="11" value="' . $StockID . '" />'; + echo '<tr><td><input type="hidden" name="StockID" maxlength="10" size="11" value="' . $StockID . '" /></td></tr>'; if (!isset($CurrCode)) { $CurrCode = ''; } @@ -516,7 +519,7 @@ $_POST['MinOrderQty'] = '1'; } echo '<tr><td>' . _('Currency') . ':</td> - <td><input type="hidden" name="CurrCode" . value="' . $CurrCode . '" />' . $CurrCode . '</td></tr>'; + <td><input type="hidden" name="CurrCode" value="' . $CurrCode . '" />' . $CurrCode . '</td></tr>'; echo '<tr><td>' . _('Price') . ' (' . _('in Supplier Currency') . '):</td> <td><input type="text" class="number" name="Price" maxlength="12" size="12" value="' . $_POST['Price'] . '" /></td></tr>'; echo '<tr><td>' . _('Date Updated') . ':</td> @@ -564,11 +567,13 @@ echo '<div class="centre">'; if (isset($StockLocation) and isset($StockID) AND mb_strlen($StockID) != 0) { echo '<br /><a href="' . $rootpath . '/StockStatus.php?StockID=' . $StockID . '">' . _('Show Stock Status') . '</a>'; - echo '<br /><a href="' . $rootpath . '/StockMovements.php?StockID=' . $StockID . '&StockLocation=' . $StockLocation . '">' . _('Show Stock Movements') . '</a>'; - echo '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?SelectedStockItem=' . $StockID . '&StockLocation=' . $StockLocation . '">' . _('Search Outstanding Sales Orders') . '</a>'; + echo '<br /><a href="' . $rootpath . '/StockMovements.php?StockID=' . $StockID . '&StockLocation=' . $StockLocation . '">' . _('Show Stock Movements') . '</a>'; + echo '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?SelectedStockItem=' . $StockID . '&StockLocation=' . $StockLocation . '">' . _('Search Outstanding Sales Orders') . '</a>'; echo '<br /><a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search Completed Sales Orders') . '</a>'; } - echo '</form></div>'; + echo '</div>'; + echo '</div> + </form>'; } include ('includes/footer.inc'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |