[Weberp-svn] SF.net SVN: weberp:[5169] trunk
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2011-04-11 16:21:22
|
Revision: 5169 http://weberp.svn.sourceforge.net/weberp/?rev=5169&view=rev Author: tim_schofield Date: 2011-04-11 16:21:14 +0000 (Mon, 11 Apr 2011) Log Message: ----------- XHTML and quoting changes Modified Paths: -------------- trunk/SalesAnalRepts.php trunk/SalesInquiry.php trunk/SalesPeople.php trunk/SalesTypes.php trunk/SelectCompletedOrder.php trunk/SelectCustomer.php trunk/SelectOrderItems.php trunk/SelectSupplier.php trunk/WorkOrderIssue.php Modified: trunk/SalesAnalRepts.php =================================================================== --- trunk/SalesAnalRepts.php 2011-04-10 20:39:49 UTC (rev 5168) +++ trunk/SalesAnalRepts.php 2011-04-11 16:21:14 UTC (rev 5169) @@ -16,44 +16,44 @@ /*Sales analysis headers group by data options */ if ($GroupByDataX == 'Sales Area') { - echo '<option selected Value="Sales Area">' . _('Sales Area'); + echo '<option selected Value="Sales Area">' . _('Sales Area') . '</option>'; } else { - echo '<option Value="Sales Area">' . _('Sales Area'); + echo '<option Value="Sales Area">' . _('Sales Area') . '</option>'; } if ($GroupByDataX == 'Product Code') { - echo '<option selected Value="Product Code">' . _('Product Code'); + echo '<option selected Value="Product Code">' . _('Product Code') . '</option>'; } else { - echo '<option Value="Product Code">' . _('Product Code'); + echo '<option Value="Product Code">' . _('Product Code') . '</option>'; } if ($GroupByDataX == 'Customer Code') { - echo '<option selected Value="Customer Code">' . _('Customer Code'); + echo '<option selected Value="Customer Code">' . _('Customer Code') . '</option>'; } else { - echo '<option Value="Customer Code">' . _('Customer Code'); + echo '<option Value="Customer Code">' . _('Customer Code') . '</option>'; } if ($GroupByDataX == 'Sales Type') { - echo '<option selected Value="Sales Type">' . _('Sales Type'); + echo '<option selected Value="Sales Type">' . _('Sales Type') . '</option>'; } else { - echo '<option Value="Sales Type">' . _('Sales Type'); + echo '<option Value="Sales Type">' . _('Sales Type') . '</option>'; } if ($GroupByDataX == 'Product Type') { - echo '<option selected Value="Product Type">' . _('Product Type'); + echo '<option selected Value="Product Type">' . _('Product Type') . '</option>'; } else { - echo '<option Value="Product Type">' . _('Product Type'); + echo '<option Value="Product Type">' . _('Product Type') . '</option>'; } if ($GroupByDataX == 'Customer Branch') { - echo '<option selected Value="Customer Branch">' . _('Customer Branch'); + echo '<option selected Value="Customer Branch">' . _('Customer Branch') . '</option>'; } else { - echo '<option Value="Customer Branch">' . _('Customer Branch'); + echo '<option Value="Customer Branch">' . _('Customer Branch') . '</option>'; } if ($GroupByDataX == 'Sales Person') { - echo '<option selected Value="Sales Person">' . _('Sales Person'); + echo '<option selected Value="Sales Person">' . _('Sales Person') . '</option>'; } else { - echo '<option Value="Sales Person">' . _('Sales Person'); + echo '<option Value="Sales Person">' . _('Sales Person') . '</option>'; } if ($GroupByDataX=='Not Used' OR $GroupByDataX == '' OR ! isset($GroupByDataX) OR is_null($GroupByDataX)){ - echo "<option selected VALUE='Not Used'>" . _('Not Used'); + echo '<option selected VALUE="Not Used">' . _('Not Used') . '</option>'; } else { - echo "<option VALUE='Not Used'>" . _('Not Used'); + echo '<option VALUE="Not Used">' . _('Not Used') . '</option>'; } } @@ -116,19 +116,19 @@ } if ($_POST['GroupByData1']!='Not Used' AND $_POST['Lower1'] > $_POST['Upper1']) { $InputError = 1; - prnMsg(_('Group by Level 1 is set but the lower limit is greater than the upper limit') . ' - ' . _('the report will have no output'),'error',_('Lower Limit > Upper Limit')); + prnMsg(_('Group by Level 1 is set but the lower limit is greater than the upper limit') . ' - ' . _('the report will have no output'),'error',_('Lower Limit Greater Than Upper Limit')); } if ($_POST['GroupByData2']!='Not Used' AND $_POST['Lower2'] > $_POST['Upper2']) { $InputError = 1; - prnMsg(_('Group by Level 2 is set but the lower limit is greater than the upper limit') . ' - ' . _('the report will have no output'),'error',_('Lower Limit > Upper Limit')); + prnMsg(_('Group by Level 2 is set but the lower limit is greater than the upper limit') . ' - ' . _('the report will have no output'),'error',_('Lower Limit Greater Than Upper Limit')); } if ($_POST['GroupByData3']!='Not Used' AND $_POST['Lower3'] > $_POST['Upper3']) { $InputError = 1; - prnMsg(_('Group by Level 3 is set but the lower limit is greater than the upper limit') . ' - ' . _('the report will have no output'),'error',_('Lower Limit > Upper Limit')); + prnMsg(_('Group by Level 3 is set but the lower limit is greater than the upper limit') . ' - ' . _('the report will have no output'),'error',_('Lower Limit Greater Than Upper Limit')); } if ($_POST['GroupByData4']!='Not Used' AND $_POST['Lower4'] > $_POST['Upper4']) { $InputError = 1; - prnMsg(_('Group by Level 4 is set but the lower limit is greater than the upper limit') . ' - ' . _('the report will have no output'),'error',_('Lower Limit > Upper Limit')); + prnMsg(_('Group by Level 4 is set but the lower limit is greater than the upper limit') . ' - ' . _('the report will have no output'),'error',_('Lower Limit Greater Than Upper Limit')); } @@ -296,14 +296,14 @@ } - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> - <td><a href=\"%s&SelectedReport=%s\">" . _('Design') . "</a></td> - <td><a href=\"%s/SalesAnalReptCols.php?" . SID . "&ReportID=%s\">" . _('Define Columns') . "</a></td> - <td><a href=\"%s/SalesAnalysis_UserDefined.php?" . SID . "&ReportID=%s&ProducePDF=True\">" . _('Make PDF Report') . "</a></td> - <td><a href=\"%s/SalesAnalysis_UserDefined.php?" . SID . "&ReportID=%s&ProduceCVSFile=True\">" . _('Make CSV File') . "</a></td> - <td><a href=\"%s&SelectedReport=%s&delete=1\" onclick=\"return confirm('" . _('Are you sure you wish to remove this report design?') . "');\">" . _('Delete') . "</td> - </tr>", + <td><a href="%s&SelectedReport=%s\">' . _('Design') . '</a></td> + <td><a href="%s/SalesAnalReptCols.php?ReportID=%s">' . _('Define Columns') . '</a></td> + <td><a href="%s/SalesAnalysis_UserDefined.php?ReportID=%s&ProducePDF=True">' . _('Make PDF Report') . '</a></td> + <td><a href="%s/SalesAnalysis_UserDefined.php?ReportID=%s&ProduceCVSFile=True">' . _('Make CSV File') . '</a></td> + <td><a href="%s&SelectedReport=%s&delete=1" onclick="return confirm("' . _('Are you sure you wish to remove this report design?') . '");">' . _('Delete') . '</td> + </tr>', $myrow[0], $myrow[1], $_SERVER['PHP_SELF'] . '?' . SID, @@ -383,9 +383,9 @@ $_POST['Upper4'] = $myrow['upper4']; $_POST['Lower4'] = $myrow['lower4']; - echo "<input type=hidden name='SelectedReport' VALUE=$SelectedReport>"; - echo "<input type=hidden name='ReportID' VALUE=$ReportID>"; - echo '<table width=98% colspan=4 class=selection><tr><th colspan=8><font size=3 color=BLUE>' . _('Edit The Selected Report') . '</font></th></tr>'; + echo '<input type=hidden name="SelectedReport" value=$SelectedReport>'; + echo '<input type=hidden name="ReportID" value=$ReportID>'; + echo '<table width=98% colspan=4 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><tr><th colspan=8><font size=3 color=BLUE>' . _('Define A New Report') . '</font></th></tr>'; } @@ -393,7 +393,7 @@ if (!isset($_POST['ReportHeading'])) { $_POST['ReportHeading']=''; } - echo '<tr><td class=number>' . _('Report Heading') . ":</td><td colspan=2><input type='TEXT' size=80 maxlength=80 name=ReportHeading value='" . $_POST['ReportHeading'] . "'></td></tr>"; + echo '<tr><td class=number>' . _('Report Heading') . ':</td><td colspan=2><input type="TEXT" size=80 maxlength=80 name=ReportHeading value="' . $_POST['ReportHeading'] . '"></td></tr>'; echo '<tr><td>' . _('Group By 1') . ': <select name=GroupByData1>'; @@ -402,11 +402,11 @@ echo '</select></td><td>' . _('Page Break After') . ': <select name=NewPageAfter1>'; if ($_POST['NewPageAfter1']==0){ - echo "<option selected value=0>" . _('No'); - echo "<option value=1>" . _('Yes'); + echo '<option selected value=0>' . _('No') . '</option>'; + echo '<option value=1>' . _('Yes') . '</option>'; } Else { - echo '<option value=0>' . _('No'); - echo '<option selected value=1>' . _('Yes'); + echo '<option value=0>' . _('No') . '</option>'; + echo '<option selected value=1>' . _('Yes') . '</option>'; } echo '</select></td>'; @@ -418,8 +418,8 @@ if (!isset($_POST['Upper1'])) { $_POST['Upper1'] = ''; } - echo '<td>' . _('From') . ": <input type='TEXT' name='Lower1' size=10 maxlength=10 VALUE='" . $_POST['Lower1'] . "'></td>"; - echo '<td>' . _('To') . ": <input type='TEXT' name='Upper1' size=10 maxlength=10 VALUE='" . $_POST['Upper1'] . "'></td></tr>"; + echo '<td>' . _('From') . ': <input type="text" name="Lower1" size=10 maxlength=10 VALUE="' . $_POST['Lower1'] . '"></td>'; + echo '<td>' . _('To') . ': <input type="text" name="Upper1" size=10 maxlength=10 VALUE="' . $_POST['Upper1'] . '"></td></tr>'; echo '<tr><td>' . _('Group By 2') . ': <select name=GroupByData2>'; @@ -428,11 +428,11 @@ echo '</select></td><td>' . _('Page Break After') . ': <select name=NewPageAfter2>'; if ($_POST['NewPageAfter2']==0){ - echo '<option selected value=0>' . _('No'); - echo '<option value=1>' . _('Yes'); + echo '<option selected value=0>' . _('No') . '</option>'; + echo '<option value=1>' . _('Yes') . '</option>'; } Else { - echo '<option value=0>' . _('No'); - echo '<option selected value=1>' . _('Yes'); + echo '<option value=0>' . _('No') . '</option>'; + echo '<option selected value=1>' . _('Yes') . '</option>'; } if (!isset($_POST['Lower2'])) { @@ -444,8 +444,8 @@ } echo '</select></td>'; - echo '<td>' . _('From') . ": <input type='TEXT' name='Lower2' size=10 maxlength=10 VALUE='" . $_POST['Lower2'] . "'></td>"; - echo '<td>' . _('To') . ": <input type='TEXT' name='Upper2' size=10 maxlength=10 VALUE='" . $_POST['Upper2'] . "'></td></tr>"; + echo '<td>' . _('From') . ': <input type="text" name="Lower2" size=10 maxlength=10 VALUE="' . $_POST['Lower2'] . '"></td>'; + echo '<td>' . _('To') . ': <input type="text" name="Upper2" size=10 maxlength=10 VALUE="' . $_POST['Upper2'] . '"></td></tr>'; echo '<tr><td>' . _('Group By 3') . ': <select name=GroupByData3>'; @@ -454,11 +454,11 @@ echo '</select></td><td>' . _('Page Break After') . ': <select name=NewPageAfter3>'; if ($_POST['NewPageAfter3']==0){ - echo '<option selected value=0>' . _('No'); - echo '<option value=1>' . _('Yes'); + echo '<option selected value=0>' . _('No') . '</option>'; + echo '<option value=1>' . _('Yes') . '</option>'; } else { - echo 'OPTION value=0>' . _('No'); - echo '<option selected value=1>' . _('Yes'); + echo '<option value=0>' . _('No') . '</option>'; + echo '<option selected value=1>' . _('Yes') . '</option>'; } echo '</select></td>'; @@ -471,14 +471,14 @@ $_POST['Upper3'] = ''; } - echo '<td>' . _('From') . ": <input type='TEXT' name='Lower3' size=10 maxlength=10 VALUE='" . $_POST['Lower3'] . "'></td>"; - echo '<td>' . _('To') . ": <input type='TEXT' name='Upper3' size=10 maxlength=10 VALUE='" . $_POST['Upper3'] . "'></td></tr>"; + echo '<td>' . _('From') . ': <input type="text" name="Lower3" size=10 maxlength=10 VALUE="' . $_POST['Lower3'] . '"></td>'; + echo '<td>' . _('To') . ': <input type="text" name="Upper3" size=10 maxlength=10 VALUE="' . $_POST['Upper3'] . '"></td></tr>'; - echo '<tr><td>' . _('Group By 4') .": <select name=GroupByData4>"; + echo '<tr><td>' . _('Group By 4') .': <select name=GroupByData4>'; GrpByDataOptions($_POST['GroupByData4']); - echo "</select></td><td></td>"; + echo '</select></td><td></td>'; if (!isset($_POST['Lower4'])) { $_POST['Lower4'] = ''; @@ -488,12 +488,12 @@ $_POST['Upper4'] = ''; } - echo '<td>' . _('From') .": <input type='TEXT' name='Lower4' size=10 maxlength=10 VALUE='" . $_POST['Lower4'] . "'></td>"; - echo '<td>' . _('To') . ": <input type='TEXT' name='Upper4' size=10 maxlength=10 VALUE='" . $_POST['Upper4'] . "'></td></tr>"; + echo '<td>' . _('From') .': <input type="text" name="Lower4" size=10 maxlength=10 VALUE="' . $_POST['Lower4'] . '"></td>'; + echo '<td>' . _('To') . ': <input type="text" name="Upper4" size=10 maxlength=10 VALUE="' . $_POST['Upper4'] . '"></td></tr>'; echo '</table>'; - echo "<br /><div class='centre'><input type='Submit' name='submit' value='" . _('Enter Information') . "'></div></form>"; + echo '<br /><div class="centre"><input type="Submit" name="submit" value="' . _('Enter Information') . '"></div></form>'; } //end if record deleted no point displaying form to add record Modified: trunk/SalesInquiry.php =================================================================== --- trunk/SalesInquiry.php 2011-04-10 20:39:49 UTC (rev 5168) +++ trunk/SalesInquiry.php 2011-04-11 16:21:14 UTC (rev 5169) @@ -128,13 +128,13 @@ $wheredebtorname = " AND debtorsmaster.name " . $DebtorNameOp . " '" . $DebtorName . "' "; } if (strlen($_POST['OrderNo']) > 0) { - $whereorderno = ' AND salesorderdetails.orderno = ' . " '" . $_POST['OrderNo'] . "' "; + $whereorderno = " AND salesorderdetails.orderno = " . " '" . $_POST['OrderNo'] . "' "; } $wherelinestatus = ' '; # Had to use IF statement instead of comparing 'linestatus' to $_POST['LineStatus'] - #in WHERE clause because the WHERE clause didn't recognize + #in WHERE clause because the WHERE clause did not recognize # that had used the IF statement to create a field caused linestatus if ($_POST['LineStatus'] != 'All') { $wherelinestatus = " AND IF(salesorderdetails.quantity = salesorderdetails.qtyinvoiced || @@ -144,14 +144,6 @@ // The following is from PDFCustomerList.php and shows how to set up WHERE clause // for multiple selections from Areas - decided to just allow selection of one Area at // a time, so used simpler code -// $i=0; -// foreach ($_POST['Areas'] as $Area){ -// if ($i>0){ -// $SQL .= ' OR '; -// } -// $i++; -// $SQL .= "custbranch.area='" . $Area ."'"; -// } $wherearea = ' '; if ($_POST['Area'] != 'All') { $wherearea = " AND custbranch.area = '" . $_POST['Area'] . "'"; @@ -297,10 +289,10 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',salesorderdetails.stkcode, + ",salesorderdetails.stkcode, stockmaster.description, stockmaster.decimalplaces - ORDER BY ' . $orderby; + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'orderno') { $sql = "SELECT salesorderdetails.orderno, salesorders.debtorno, @@ -329,9 +321,9 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',salesorders.debtorno, + ",salesorders.debtorno, debtorsmaster.name - ORDER BY ' . $orderby; + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'debtorno' || $_POST['SummaryType'] == 'name') { if ($_POST['SummaryType'] == 'name') { $orderby = 'name'; @@ -363,8 +355,8 @@ $wherecategory GROUP BY debtorsmaster.debtorno" . ' ' . - ',debtorsmaster.name - ORDER BY ' . $orderby; + ",debtorsmaster.name + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'month') { $sql = "SELECT EXTRACT(YEAR_MONTH from salesorders.orddate) as month, CONCAT(MONTHNAME(salesorders.orddate),' ',YEAR(salesorders.orddate)) as monthname, @@ -392,8 +384,8 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',monthname - ORDER BY ' . $orderby; + ",monthname + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'categoryid') { $sql = "SELECT stockmaster.categoryid, stockcategory.categorydescription, @@ -421,8 +413,8 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',categorydescription - ORDER BY ' . $orderby; + ",categorydescription + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'salesman') { $sql = "SELECT custbranch.salesman, salesman.salesmanname, @@ -450,8 +442,8 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',salesmanname - ORDER BY ' . $orderby; + ",salesmanname + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'area') { $sql = "SELECT custbranch.area, areas.areadescription, @@ -479,8 +471,8 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',areas.areadescription - ORDER BY ' . $orderby; + ",areas.areadescription + ORDER BY " . $orderby; } } else { // Selects by tempstockmoves.trandate not order date @@ -516,8 +508,8 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',stockmaster.description - ORDER BY ' . $orderby; + ",stockmaster.description + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'orderno') { $sql = "SELECT salesorderdetails.orderno, salesorders.debtorno, @@ -551,9 +543,9 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',salesorders.debtorno, + ",salesorders.debtorno, debtorsmaster.name - ORDER BY ' . $orderby; + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'debtorno' || $_POST['SummaryType'] == 'name') { if ($_POST['SummaryType'] == 'name') { $orderby = 'name'; @@ -589,8 +581,8 @@ $wheresalesman $wherecategory GROUP BY debtorsmaster.debtorno" . ' ' . - ',debtorsmaster.name - ORDER BY ' . $orderby; + ",debtorsmaster.name + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'month') { $sql = "SELECT EXTRACT(YEAR_MONTH from salesorders.orddate) as month, CONCAT(MONTHNAME(salesorders.orddate),' ',YEAR(salesorders.orddate)) as monthname, @@ -623,8 +615,8 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',monthname - ORDER BY ' . $orderby; + ",monthname + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'categoryid') { $sql = "SELECT stockmaster.categoryid, stockcategory.categorydescription, @@ -657,8 +649,8 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',categorydescription - ORDER BY ' . $orderby; + ",categorydescription + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'salesman') { $sql = "SELECT custbranch.salesman, salesman.salesmanname, @@ -691,8 +683,8 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',salesmanname - ORDER BY ' . $orderby; + ",salesmanname + ORDER BY " . $orderby; } elseif ($_POST['SummaryType'] == 'area') { $sql = "SELECT custbranch.area, areas.areadescription, @@ -725,8 +717,8 @@ $wheresalesman $wherecategory GROUP BY " . $_POST['SummaryType'] . - ',areas.areadescription - ORDER BY ' . $orderby; + ",areas.areadescription + ORDER BY " . $orderby; } } } // End of if ($_POST['ReportType'] @@ -741,16 +733,16 @@ $totalinvqty = 0; // Create array for summary type to display in header. Access it with $savesummarytype - $summary_array["orderno"] = _('Order Number'); - $summary_array["stkcode"] = _('Part Number'); - $summary_array["extprice"] = _('Extended Price'); - $summary_array["debtorno"] = _('Customer Number'); - $summary_array["name"] = _('Customer Name'); - $summary_array["month"] = _('Month'); - $summary_array["categoryid"] = _('Stock Category'); - $summary_array["salesman"] = _('Salesman'); - $summary_array["area"] = _('Sales Area'); - $summary_array["transno"] = _('Transaction Number'); + $summary_array['orderno'] = _('Order Number'); + $summary_array['stkcode'] = _('Part Number'); + $summary_array['extprice'] = _('Extended Price'); + $summary_array['debtorno'] = _('Customer Number'); + $summary_array['name'] = _('Customer Name'); + $summary_array['month'] = _('Month'); + $summary_array['categoryid'] = _('Stock Category'); + $summary_array['salesman'] = _('Salesman'); + $summary_array['area'] = _('Sales Area'); + $summary_array['transno'] = _('Transaction Number'); // Create array for sort for detail report to display in header $detail_array['salesorderdetails.orderno'] = _('Order Number'); $detail_array['salesorderdetails.stkcode'] = _('Part Number'); @@ -797,7 +789,7 @@ echo '<br/><br/>'; if ($_POST['ReportType'] == 'Detail') { if ($_POST['DateType'] == 'Order') { - printf("%10s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %14s | %12s | %-10s | %-10s | %-10s | %-40s ", + printf('%10s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %14s | %12s | %-10s | %-10s | %-10s | %-40s ', _('Order No'), _('Part Number'), _('Order Date'), @@ -815,7 +807,7 @@ _('Part Description')); } else { // Headings for Invoiced Date - printf("%10s | %14s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %12s | %-10s | %-10s | %-10s | %-40s ", + printf('%10s | %14s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %12s | %-10s | %-10s | %-10s | %-40s ', _('Order No'), _('Trans. No'), _('Part Number'), @@ -837,7 +829,7 @@ while ($myrow = DB_fetch_array($result)) { $linectr++; if ($_POST['DateType'] == 'Order') { - printf("%10s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %14s | %12s | %-10s | %-10s | %-10s | %-40s ", + printf('%10s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %14s | %12s | %-10s | %-10s | %-10s | %-40s ', $myrow['orderno'], $myrow['stkcode'], ConvertSQLDate($myrow['orddate']), @@ -857,7 +849,7 @@ $totalqty += $myrow['quantity']; } else { // Detail for Invoiced Date - printf("%10s | %14s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %12s | %-10s | %-10s | %-10s | %-40s ", + printf('%10s | %14s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %12s | %-10s | %-10s | %-10s | %-40s ', $myrow['orderno'], $myrow['transno'], $myrow['stkcode'], @@ -883,7 +875,7 @@ } //END WHILE LIST LOOP // Print totals if ($_POST['DateType'] == 'Order') { - printf("%10s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %14s | %12s | %-10s | %-40s ", + printf('%10s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %14s | %12s | %-10s | %-40s ', _('Totals'), _('Lines - ') . $linectr, ' ', @@ -899,7 +891,7 @@ ' '); } else { // Print totals for Invoiced Date Type - Don't print invoice quantity - printf("%10s | %14s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %12s | %10s | %-40s ", + printf('%10s | %14s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %12s | %10s | %-40s ', _('Totals'), _('Lines - ') . $linectr, ' ', @@ -968,7 +960,7 @@ $summaryheader = _('Month'); $descriptionheader = _('Month'); } - printf(" %-30s | %-40s | %12s | %14s | %14s | %14s | %-15s", + printf(' %-30s | %-40s | %12s | %14s | %14s | %14s | %-15s', _($summaryheader), _($descriptionheader), _('Quantity'), @@ -995,7 +987,7 @@ // qty is from stockmoves $displayqty = $myrow['qty']; } - printf(" %-30s | %-40s | %12s | %14s | %14s | %14s | %-40s", + printf(' %-30s | %-40s | %12s | %14s | %14s | %14s | %-40s', $myrow[$summarytype], $myrow[$description], number_format($displayqty,2), @@ -1011,7 +1003,7 @@ $totalinvqty += $myrow['qtyinvoiced']; } //END WHILE LIST LOOP // Print totals - printf(" %-30s | %-40s | %12s | %14s | %14s | %14s", + printf(' %-30s | %-40s | %12s | %14s | %14s | %14s', _('Totals'), _('Lines - ') . $linectr, number_format($totalqty,2), @@ -1031,100 +1023,100 @@ // Display form fields. This function is called the first time // the page is called. - echo "<form action=" . $_SERVER['PHP_SELF'] . "?" . SID ." method=post><br/><br/>"; + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method=post><br/><br/>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table>'; echo '<tr><td>' . _('Report Type') . ':</td>'; - echo "<td><select name='ReportType'>"; - echo "<option selected value='Detail'>" . _('Detail'); - echo "<option value='Summary'>" . _('Summary'); + echo '<td><select name="ReportType">'; + echo '<option selected value="Detail">' . _('Detail') . '</option>'; + echo '<option value="Summary">' . _('Summary') . '</option>'; echo '</select></td><td> </td></tr>'; echo '<tr><td>' . _('Order Type') . ':</td>'; - echo "<td><select name='OrderType'>"; - echo "<option selected value='0'>" . _('Sales Order'); - echo "<option value='1'>" . _('Quotation'); + echo '<td><select name="OrderType">'; + echo '<option selected value="0">' . _('Sales Order') . '</option>'; + echo '<option value="1">' . _('Quotation') . '</option>'; echo '</select></td><td> </td></tr>'; echo '<tr><td>' . _('Date Type') . ':</td>'; - echo "<td><select name='DateType'>"; - echo "<option selected value='Order'>" . _('Order Date'); - echo "<option value='Invoice'>" . _('Invoice Date'); + echo '<td><select name="DateType">'; + echo '<option selected value="Order">' . _('Order Date') . '</option>'; + echo '<option value="Invoice">' . _('Invoice Date') . '</option>'; echo '</select></td><td> </td></tr>'; echo '<tr><td>' . _('Invoice Type') . ':</td>'; - echo "<td><select name='InvoiceType'>"; - echo "<option selected value='All'>" . _('All'); - echo "<option value='10'>" . _('Sales Invoice'); - echo "<option value='11'>" . _('Credit Note'); + echo '<td><select name="InvoiceType">'; + echo '<option selected value="All">' . _('All') . '</option>'; + echo '<option value="10">' . _('Sales Invoice') . '</option>'; + echo '<option value="11">' . _('Credit Note') . '</option>'; echo '</select></td><td> </td><td>' . _('Only Applies To Invoice Date Type') . '</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'] . '></td> - <td>' . _('To') . ":</td> - <td><input type='Text' class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' size=10 maxlength=10 value=" . $_POST['ToDate'] . "></td> - </tr>"; + <td>' . _('Date Range') . ':</td> + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="FromDate" size=10 maxlength=10 value=' . $_POST['FromDate'] . '></td> + <td>' . _('To') . ':</td> + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ToDate" size=10 maxlength=10 value=' . $_POST['ToDate'] . '></td> + </tr>'; echo '<tr><td>' . _('Part Number') . ':</td>'; - echo "<td><select name='PartNumberOp'>"; - echo "<option selected value='Equals'>" . _('Equals'); - echo "<option value='LIKE'>" . _('Begins With'); + echo '<td><select name="PartNumberOp">'; + echo '<option selected value="Equals">' . _('Equals') . '</option>'; + echo '<option value="LIKE">' . _('Begins With') . '</option>'; echo '</select></td><td> </td>'; - echo "<td><input type='Text' name='PartNumber' size=20 maxlength=20 value=" - . $_POST['PartNumber'] . "></td></tr>"; + echo '<td><input type="Text" name="PartNumber" size=20 maxlength=20 value=' + . $_POST['PartNumber'] . '></td></tr>'; echo '<tr><td>' . _('Customer Number') . ':</td>'; - echo "<td><select name='DebtorNoOp'>"; - echo "<option selected value='Equals'>" . _('Equals'); - echo "<option value='LIKE'>" . _('Begins With'); + echo '<td><select name="DebtorNoOp">'; + echo '<option selected value="Equals">' . _('Equals') . '</option>'; + echo '<option value="LIKE">' . _('Begins With') . '</option>'; echo '</select></td><td> </td>'; - echo "<td><input type='Text' name='DebtorNo' size=10 maxlength=10 value=" - . $_POST['DebtorNo'] . "></td></tr>"; + echo '<td><input type="text" name="DebtorNo" size=10 maxlength=10 value=' + . $_POST['DebtorNo'] . '></td></tr>'; echo '<tr><td>' . _('Customer Name') . ':</td>'; - echo "<td><select name='DebtorNameOp'>"; - echo "<option selected value='LIKE'>" . _('Begins With'); - echo "<option value='Equals'>" . _('Equals'); + echo '<td><select name="DebtorNameOp">'; + echo '<option selected value="LIKE">' . _('Begins With') . '</option>'; + echo '<option value="Equals">' . _('Equals') . '</option>'; echo '</select></td><td> </td>'; - echo "<td><input type='Text' name='DebtorName' size=30 maxlength=30 value=" - . $_POST['DebtorName'] . "></td></tr>"; + echo '<td><input type="text" name="DebtorName" size=30 maxlength=30 value=' + . $_POST['DebtorName'] . '></td></tr>'; echo '<tr><td>' . _('Order Number') . ':</td>'; - echo '<td>Equals</td><td> </td>'; - echo "<td><input type='Text' name='OrderNo' size=10 maxlength=10 value=" - . $_POST['OrderNo'] . "></td></tr>"; + echo '<td>' . _('Equals') . '</td><td> </td>'; + echo '<td><input type="Text" name="OrderNo" size=10 maxlength=10 value=' + . $_POST['OrderNo'] . '></td></tr>'; echo '<tr><td>' . _('Line Item Status') . ':</td>'; - echo "<td><select name='LineStatus'>"; - echo "<option selected value='All'>" . _('All'); - echo "<option value='Completed'>" . _('Completed'); - echo "<option value='Open'>" . _('Not Completed'); + echo '<td><select name="LineStatus">'; + echo '<option 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 '<tr><td>' . _('Stock Categories') . ":</td><td><select name='Category'>"; + echo '<tr><td>' . _('Stock Categories') . ':</td><td><select name="Category">'; $sql="SELECT categoryid, categorydescription FROM stockcategory"; $CategoryResult= DB_query($sql,$db); - echo '<option selected value="All">' . _('All Categories'); + echo '<option selected value="All">' . _('All Categories') . '</option>'; While ($myrow = DB_fetch_array($CategoryResult)){ - echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription']; + echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } echo '</select></td></tr>'; - echo '<tr><td>' . _('For Sales Man') . ":</td><td><select name='Salesman'>"; + echo '<tr><td>' . _('For Sales Man') . ':</td><td><select name="Salesman">'; $sql="SELECT salesmancode, salesmanname FROM salesman"; $SalesmanResult= DB_query($sql,$db); - echo '<option selected value="All">' . _('All Salesmen'); + echo '<option selected value="All">' . _('All Salesmen') . '</option>'; While ($myrow = DB_fetch_array($SalesmanResult)){ - echo '<option value="' . $myrow['salesmancode'] . '">' . $myrow['salesmanname']; + echo '<option value="' . $myrow['salesmancode'] . '">' . $myrow['salesmanname'] . '</option>'; } echo '</select></td></tr>'; // Use name='Areas[]' multiple - if want to create an array for Areas and allow multiple selections - echo '<tr><td>' . _('For Sales Areas') . ":</td><td><select name='Area'>"; + echo '<tr><td>' . _('For Sales Areas') . ':</td><td><select name="Area">'; $sql="SELECT areacode, areadescription FROM areas"; $AreasResult= DB_query($sql,$db); echo '<option selected value="All">' . _('All Areas'); @@ -1135,12 +1127,12 @@ echo '<tr><td> </td></tr>'; echo '<tr><td>' . _('Sort By') . ':</td>'; - echo "<td><select name='SortBy'>"; - echo "<option selected value='salesorderdetails.orderno'>" . _('Order Number'); - echo "<option value='salesorderdetails.stkcode'>" . _('Part Number'); - echo "<option value='debtorsmaster.debtorno,salesorderdetails.orderno'>" . _('Customer Number'); - echo "<option value='debtorsmaster.name,debtorsmaster.debtorno,salesorderdetails.orderno'>" . _('Customer Name'); - echo "<option value='tempstockmoves.transno,salesorderdetails.stkcode'>" . _('Transaction Number'); + echo '<td><select name="SortBy">'; + echo '<option selected value="salesorderdetails.orderno">' . _('Order Number') . '</option>'; + echo '<option value="salesorderdetails.stkcode">' . _('Part Number') . '</option>'; + echo '<option value="debtorsmaster.debtorno,salesorderdetails.orderno">' . _('Customer Number') . '</option>'; + echo '<option value="debtorsmaster.name,debtorsmaster.debtorno,salesorderdetails.orderno">' . _('Customer Name') . '</option>'; + echo '<option value="tempstockmoves.transno,salesorderdetails.stkcode">' . _('Transaction Number') . '</option>'; echo '</select></td><td> </td><td>Transaction Number sort only valid for Invoice Date Type</td></tr>'; echo '<tr><td> </td></tr> @@ -1149,28 +1141,28 @@ echo '<tr><td> </td></tr>'; echo '<tr><td>' . _('Summary Type') . ':</td>'; - echo "<td><select name='SummaryType'>"; - echo "<option selected value='orderno'>" . _('Order Number'); - echo "<option value='transno'>" . _('Transaction Number'); - echo "<option value='stkcode'>" . _('Part Number'); - echo "<option value='extprice'>" . _('Extended Price'); - echo "<option value='debtorno'>" . _('Customer Number'); - echo "<option value='name'>" . _('Customer Name'); - echo "<option value='month'>" . _('Month'); - echo "<option value='categoryid'>" . _('Stock Category'); - echo "<option value='salesman'>" . _('Salesman'); - echo "<option value='area'>" . _('Sales Area'); + echo '<td><select name="SummaryType">'; + echo '<option selected value="orderno">' . _('Order Number') . '</option>'; + echo '<option value="transno">' . _('Transaction Number') . '</option>'; + echo '<option value="stkcode">' . _('Part Number') . '</option>'; + echo '<option value="extprice">' . _('Extended Price') . '</option>'; + echo '<option value="debtorno">' . _('Customer Number') . '</option>'; + echo '<option value="name">' . _('Customer Name') . '</option>'; + echo '<option value="month">' . _('Month') . '</option>'; + echo '<option value="categoryid">' . _('Stock Category') . '</option>'; + echo '<option value="salesman">' . _('Salesman') . '</option>'; + echo '<option value="area">' . _('Sales Area') . '</option>'; echo '</select></td><td> </td><td>Transaction Number summary only valid for Invoice Date Type</td></tr>'; - echo " + echo ' <tr><td> </td></tr> <tr><td> </td></tr> <tr><td> </td></tr> <tr><td> </td> - <td><input type='submit' name='submit' value='" . _('Run Inquiry') . "'></td> + <td><input type="submit" name="submit" value="' . _('Run Inquiry') . '"></td> </tr> </table> - <br/>"; + <br />'; echo '</form>'; } // End of function display() @@ -1178,7 +1170,7 @@ function TempStockmoves(&$db) { // When report based on Invoice Date, use stockmoves as the main file, but credit -// notes, which are type 11 in stockmoves, don't have the order number in the +// notes, which are type 11 in stockmoves, do not have the order number in the // reference field; instead they have "Ex Inv - " and then the transno from the // type 10 stockmoves the credit note was applied to. Use this function to load all // type 10 and 11 stockmoves into a temporary table and then update the Modified: trunk/SalesPeople.php =================================================================== --- trunk/SalesPeople.php 2011-04-10 20:39:49 UTC (rev 5168) +++ trunk/SalesPeople.php 2011-04-11 16:21:14 UTC (rev 5169) @@ -181,13 +181,13 @@ $result = DB_query($sql,$db); echo '<table class=selection>'; - echo "<tr><th>" . _('Code') . "</th> - <th>" . _('Name') . "</th> - <th>" . _('Telephone') . "</th> - <th>" . _('Facsimile') . "</th> - <th>" . _('Comm Rate 1') . "</th> - <th>" . _('Break') . "</th> - <th>" . _('Comm Rate 2') . "</th></tr>"; + echo '<tr><th>' . _('Code') . '</th> + <th>' . _('Name') . '</th> + <th>' . _('Telephone') . '</th> + <th>' . _('Facsimile') . '</th> + <th>' . _('Comm Rate 1') . '</th> + <th>' . _('Break') . '</th> + <th>' . _('Comm Rate 2') . '</th></tr>'; $k=0; while ($myrow=DB_fetch_row($result)) { @@ -199,7 +199,7 @@ $k++; } - printf(" + printf(' <td>%s</td> <td>%s</td> <td>%s</td> @@ -207,9 +207,9 @@ <td class=number>%s</td> <td class=number>%s</td> <td class=number>%s</td> - <td><a href=\"%sSelectedSaleperson=%s\">". _('Edit') . "</a></td> - <td><a href=\"%sSelectedSaleperson=%s&delete=1\">" . _('Delete') . "</a></td> - </tr>", + <td><a href="%sSelectedSaleperson=%s">'. _('Edit') . '</a></td> + <td><a href="%sSelectedSaleperson=%s&delete=1">' . _('Delete') . '</a></td> + </tr>', $myrow[0], $myrow[1], $myrow[2], @@ -227,12 +227,12 @@ } //end of ifs and buts! if (isset($SelectedSaleperson)) { - echo "<div class='centre'><a href='" . $_SERVER['PHP_SELF'] . '?' . SID . "'>" . _('Show All Sales People') . "</a></div>"; + echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '">' . _('Show All Sales People') . '</a></div>'; } if (! isset($_GET['delete'])) { - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedSaleperson)) { @@ -260,15 +260,15 @@ $_POST['CommissionRate2'] = $myrow['commissionrate2']; - echo "<input type=hidden name='SelectedSaleperson' VALUE='" . $SelectedSaleperson . "'>"; - echo "<input type=hidden name='SalesmanCode' VALUE='" . $_POST['SalesmanCode'] . "'>"; + echo '<input type=hidden name="SelectedSaleperson" VALUE="' . $SelectedSaleperson . '">'; + echo '<input type=hidden name="SalesmanCode" VALUE="' . $_POST['SalesmanCode'] . '">'; echo '<table class=selection> <tr><td>' . _('Salesperson code') . ':</td><td>'; echo $_POST['SalesmanCode'] . '</td></tr>'; } else { //end of if $SelectedSaleperson only do the else when a new record is being entered - echo '<table class=selection><tr><td>' . _('Salesperson code') . ":</td> - <td><input type='Text' ". (in_array('SalesmanCode',$Errors) ? 'class="inputerror"' : '' ) ." name='SalesmanCode' size=3 maxlength=3></td></tr>"; + echo '<table class=selection><tr><td>' . _('Salesperson code') . ':</td> + <td><input type="text" '. (in_array('SalesmanCode',$Errors) ? 'class="inputerror"' : '' ) .' name="SalesmanCode" size=3 maxlength=3></td></tr>'; } if (!isset($_POST['SalesmanName'])){ $_POST['SalesmanName']=''; @@ -290,16 +290,16 @@ } - echo '<tr><td>' . _('Salesperson Name') . ":</td><td><input type='text' ". (in_array('SalesmanName',$Errors) ? 'class="inputerror"' : '' ) ." name='SalesmanName' size=30 maxlength=30 VALUE='" . $_POST['SalesmanName'] . "'></td></tr>"; - echo '<tr><td>' . _('Telephone No') . ":</td><td><input type='Text' name='SManTel' size=20 maxlength=20 VALUE='" . $_POST['SManTel'] . "'></td></tr>"; - echo '<tr><td>' . _('Facsimile No') . ":</td><td><input type='Text' name='SManFax' size=20 maxlength=20 VALUE='" . $_POST['SManFax'] . "'></td></tr>"; - echo '<tr><td>' . _('Commission Rate 1') . ":</td><td><input type='Text' class=number name='CommissionRate1' size=5 maxlength=5 VALUE=" . $_POST['CommissionRate1'] . '></td></tr>'; - echo '<tr><td>' . _('Breakpoint') . ":</td><td><input type='Text' class=number name='Breakpoint' size=6 maxlength=6 VALUE=" . $_POST['Breakpoint'] . '></td></tr>'; - echo '<tr><td>' . _('Commission Rate 2') . ":</td><td><input type='Text' class=number name='CommissionRate2' size=5 maxlength=5 VALUE=" . $_POST['CommissionRate2']. '></td></tr>'; + echo '<tr><td>' . _('Salesperson Name') . ':</td><td><input type="text" '. (in_array('SalesmanName',$Errors) ? 'class="inputerror"' : '' ) .' name="SalesmanName" size=30 maxlength=30 VALUE="' . $_POST['SalesmanName'] . '"></td></tr>'; + echo '<tr><td>' . _('Telephone No') . ':</td><td><input type="text" name="SManTel" size=20 maxlength=20 VALUE="' . $_POST['SManTel'] . '"></td></tr>'; + echo '<tr><td>' . _('Facsimile No') . ':</td><td><input type="text" name="SManFax" size=20 maxlength=20 VALUE="' . $_POST['SManFax'] . '"></td></tr>'; + echo '<tr><td>' . _('Commission Rate 1') . ':</td><td><input type="text" class=number name="CommissionRate1" size=5 maxlength=5 VALUE="' . $_POST['CommissionRate1'] . '"></td></tr>'; + echo '<tr><td>' . _('Breakpoint') . ':</td><td><input type="text" class=number name="Breakpoint" size=6 maxlength=6 VALUE="' . $_POST['Breakpoint'] . '"></td></tr>'; + echo '<tr><td>' . _('Commission Rate 2') . ':</td><td><input type="text" class=number name="CommissionRate2" size=5 maxlength=5 VALUE="' . $_POST['CommissionRate2']. '"></td></tr>'; echo '</table>'; - echo "<br /><div class='centre'><input type='Submit' name='submit' value='" . _('Enter Information') . "'></div>"; + echo '<br /><div class="centre"><input type="Submit" name="submit" value="' . _('Enter Information') . '"></div>'; echo '</form>'; Modified: trunk/SalesTypes.php =================================================================== --- trunk/SalesTypes.php 2011-04-10 20:39:49 UTC (rev 5168) +++ trunk/SalesTypes.php 2011-04-11 16:21:14 UTC (rev 5169) @@ -185,10 +185,10 @@ $result = DB_query($sql,$db); echo '<table class=selection>'; - echo "<tr> - <th>" . _('Type Code') . "</th> - <th>" . _('Type Name') . "</th> - </tr>"; + echo '<tr> + <th>' . _('Type Code') . '</th> + <th>' . _('Type Name') . '</th> + </tr>'; $k=0; //row colour counter @@ -201,11 +201,11 @@ $k=1; } - printf("<td>%s</td> + printf('<td>%s</td> <td>%s</td> - <td><a href='%sSelectedType=%s'>" . _('Edit') . "</td> - <td><a href='%sSelectedType=%s&delete=yes' onclick=\"return confirm('" . _('Are you sure you wish to delete this price list and all the prices it may have set up?') . "');\">" . _('Delete') . "</td> - </tr>", + <td><a href="%sSelectedType=%s">' . _('Edit') . '</td> + <td><a href="%sSelectedType=%s&delete=yes onclick=\'return confirm("' . _('Are you sure you wish to delete this price list and all the prices it may have set up?') . '");\'>' . _('Delete') . '</td> + </tr>', $myrow[0], $myrow[1], $_SERVER['PHP_SELF'] . '?' . SID, $myrow[0], @@ -222,7 +222,7 @@ } if (! isset($_GET['delete'])) { - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '" >'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p><table class=selection>'; //Main table @@ -242,11 +242,11 @@ $_POST['TypeAbbrev'] = $myrow['typeabbrev']; $_POST['Sales_Type'] = $myrow['sales_type']; - echo "<input type=hidden name='SelectedType' VALUE=" . $SelectedType . ">"; - echo "<input type=hidden name='TypeAbbrev' VALUE=" . $_POST['TypeAbbrev'] . ">"; - echo "<table class=selection>"; + echo '<input type=hidden name="SelectedType" VALUE="' . $SelectedType . '">'; + echo '<input type=hidden name="TypeAbbrev" VALUE="' . $_POST['TypeAbbrev'] . '">'; + echo '<table class=selection>'; echo '<tr><th colspan=4><font size=2 color=blue><b>' . _('Sales Type/Price List Setup') . '</b></font></th></tr>'; - echo "<tr><td>" . _('Type Code') . ":</td><td>"; + echo '<tr><td>' . _('Type Code') . ':</td><td>'; // We dont allow the user to change an existing type code @@ -256,17 +256,17 @@ // This is a new type so the user may volunteer a type code - echo "<table class=selection>"; + echo '<table class=selection>'; echo '<tr><th colspan=4><font size=2 color=blue><b>' . _('Sales Type/Price List Setup') . '</b></font></th></tr>'; - echo "<tr><td>" . _('Type Code') . ":</td><td><input type='Text' - " . (in_array('SalesType',$Errors) ? 'class="inputerror"' : '' ) ." size=3 maxlength=2 name='TypeAbbrev'></td></tr>"; + echo '<tr><td>' . _('Type Code') . ':</td><td><input type="text" + ' . (in_array('SalesType',$Errors) ? 'class="inputerror"' : '' ) .' size=3 maxlength=2 name="TypeAbbrev"></td></tr>'; } if (!isset($_POST['Sales_Type'])) { $_POST['Sales_Type']=''; } - echo "<tr><td>" . _('Sales Type Name') . ":</td><td><input type='Text' name='Sales_Type' value='" . $_POST['Sales_Type'] . "'></td></tr>"; + echo '<tr><td>' . _('Sales Type Name') . ':</td><td><input type="Text" name="Sales_Type" value="' . $_POST['Sales_Type'] . '"></td></tr>'; echo '</td></tr></table>'; // close main table Modified: trunk/SelectCompletedOrder.php =================================================================== --- trunk/SelectCompletedOrder.php 2011-04-10 20:39:49 UTC (rev 5168) +++ trunk/SelectCompletedOrder.php 2011-04-11 16:21:14 UTC (rev 5169) @@ -13,14 +13,14 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search Sales Orders') . '</p>'; -echo "<form action='" . $_SERVER['PHP_SELF'] . '?' . SID ."' method=post>"; +echo '<form action="' . $_SERVER['PHP_SELF'] . ' method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($_POST['completed'])) { - $completed='=1'; - $ShowChecked='checked="checked"'; + $completed="=1"; + $ShowChecked="checked='checked'"; } else { - $completed='>=0'; + $completed=">=0"; $ShowChecked=''; } @@ -78,13 +78,13 @@ } else { if (isset($SelectedCustomer)) { echo _('For customer') . ': ' . $SelectedCustomer .' ' . _('and') . ' '; - echo "<input type=hidden name='SelectedCustomer' value='".$SelectedCustomer."'>"; + echo '<input type=hidden name="SelectedCustomer" value="'.$SelectedCustomer.'">'; } if (isset($SelectedStockItem)) { $PartString = _('for the part') . ': <b>' . $SelectedStockItem . '</b> ' . _('and') . ' ' . - "<input type=hidden name='SelectedStockItem' value='".$SelectedStockItem."'>"; + '<input type=hidden name="SelectedStockItem" value="'.$SelectedStockItem.'">'; } } @@ -221,7 +221,7 @@ $SelectedStockItem = $myrow[0]; $_POST['SearchOrders']='True'; unset($StockItemsResult); - echo '<br>' . _('For the part') . ': ' . $SelectedStockItem . ' ' . _('and') . " <input type=hidden name='SelectedStockItem' value='$SelectedStockItem'>"; + echo '<br />' . _('For the part') . ': ' . $SelectedStockItem . ' ' . _('and') . " <input type=hidden name='SelectedStockItem' value='$SelectedStockItem'>"; } } } else if (isset($_POST['SearchOrders']) AND Is_Date($_POST['OrdersAfterDate'])==1) { @@ -415,8 +415,8 @@ $SalesOrdersResult = DB_query($SQL,$db); if (DB_error_no($db) !=0) { - echo '<br>' . _('No orders were returned by the SQL because') . ' ' . DB_error_msg($db); - echo "<br>$SQL"; + echo '<br />' . _('No orders were returned by the SQL because') . ' ' . DB_error_msg($db); + echo '<br />'. $SQL; } }//end of which button clicked options @@ -424,20 +424,20 @@ if (!isset($_POST['OrdersAfterDate']) OR $_POST['OrdersAfterDate'] == '' OR ! Is_Date($_POST['OrdersAfterDate'])){ $_POST['OrdersAfterDate'] = Date($_SESSION['DefaultDateFormat'],Mktime(0,0,0,Date('m')-2,Date('d'),Date('Y'))); } -echo "<table class=selection>"; +echo '<table class=selection>'; if (isset($PartString)) { - echo "<tr><td>".$PartString."</td>"; + echo '<tr><td>'.$PartString.'</td>'; } else { - echo "<tr><td></td>"; + echo '<tr><td></td>'; } if (!isset($OrderNumber) or $OrderNumber==''){ - echo '<td>' . _('Order Number') . ':</td><td>' . "<input type='text' name='OrderNumber' maxlength =8 size=9></td><td>" . _('for all orders placed after') . - ": </td><td><input type='text' class='date' alt='".$_SESSION['DefaultDateFormat']."' name='OrdersAfterDate' maxlength =10 size=11 value=" . $_POST['OrdersAfterDate'] . "></td><td>" . - "<input type='submit' name='SearchOrders' value='" . _('Search Orders') . "'></td></tr>"; - echo '<tr><td></td><td>' . _('Customer Ref') . ':</td><td>' . "<input type='text' name='CustomerRef' maxlength =8 size=9></td> - <td></td><td colspan=2><input type='checkbox' ".$ShowChecked." name='completed' />"._('Show Completed orders only') . "</td></tr>"; + echo '<td>' . _('Order Number') . ':</td><td>' . '<input type="text" name="OrderNumber" maxlength =8 size=9></td><td>' . _('for all orders placed after') . + ': </td><td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="OrdersAfterDate" maxlength =10 size=11 value=' . $_POST['OrdersAfterDate'] . '></td><td>' . + '<input type="submit" name="SearchOrders" value="' . _('Search Orders') . '"></td></tr>'; + echo '<tr><td></td><td>' . _('Customer Ref') . ':</td><td>' . '<input type="text" name=2CustomerRef" maxlength =8 size=9></td> + <td></td><td colspan=2><input type="checkbox" '.$ShowChecked.' name="completed" />'._('Show Completed orders only') . '</td></tr>'; } echo '</table>'; @@ -445,17 +445,17 @@ $SQL="SELECT categoryid, categorydescription FROM stockcategory ORDER BY categorydescription"; $result1 = DB_query($SQL,$db); - echo '<br>'; + echo '<br />'; echo '<div class="page_help_text"><font size=1>' . _('To search for sales orders for a specific part use the part selection facilities below') . ' </font></div>'; - echo '<br><table class=selection>'; + echo '<br /><table class=selection>'; echo '<tr><td><font size=1>' . _('Select a stock category') . ':</font>'; echo '<select name="StockCat">'; while ($myrow1 = DB_fetch_array($result1)) { if (isset($_POST['StockCat']) and $myrow1['categoryid'] == $_POST['StockCat']){ - echo "<option selected value='". $myrow1['categoryid'] . "'>" . $myrow1['categorydescription']; + echo '<option selected value="'. $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } else { - echo "<option value='". $myrow1['categoryid'] . "'>" . $myrow1['categorydescription']; + echo '<option value="'. $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } } @@ -477,14 +477,14 @@ If (isset($StockItemsResult)) { - echo '<br><table cellpadding=2 colspan=7 class=selection>'; + echo '<br /><table cellpadding=2 colspan=7 class=selection>'; - $TableHeadings = "<tr><th>" . _('Code') . "</th>" . - "<th>" . _('Description') . "</th>" . - "<th>" . _('On Hand') . '</th>' . - "<th>" . _('Purchase Orders') . '</th>' . - "<th>" . _('Sales Orders') . "</th>" . - "<th>" . _('Units') . '</th></tr>'; + $TableHeadings = '<tr><th>' . _('Code') . '</th>' . + '<th>' . _('Description') . '</th>' . + '<th>' . _('On Hand') . '</th>' . + '<th>' . _('Purchase Orders') . '</th>' . + '<th>' . _('Sales Orders') . '</th>' . + '<th>' . _('Units') . '</th></tr>'; echo $TableHeadings; @@ -501,12 +501,12 @@ $k++; } - printf("<td><font size=1><input type='submit' name='SelectedStockItem' value='%s'</font></td> + printf('<td><font size=1><input type="submit" name="SelectedStockItem" value="%s" /></font></td> <td><font size=1>%s</font></td> <td class=number><font size=1>%s</font></td> <td class=number><font size=1>%s</font></td> <td class=number><font size=1>%s</font></td> - <td><font size=1>%s</font></td></tr>", + <td><font size=1>%s</font></td></tr>', $myrow['stockid'], $myrow['description'], $myrow['qoh'], @@ -527,16 +527,16 @@ /*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 colspan=6 width=90% class=selection>'; - $tableheader = "<tr><th>" . _('Order') . " #</th> - <th>" . _('Customer') . "</th> - <th>" . _('Branch') . "</th> - <th>" . _('Cust Order') . " #</th> - <th>" . _('Order Date') . "</th> - <th>" . _('Req Del Date') . "</th> - <th>" . _('Delivery To') . "</th> - <th>" . _('Order Total') . "</th></tr>"; + $tableheader = '<tr><th>' . _('Order') . ' #</th> + <th>' . _('Customer') . '</th> + <th>' . _('Branch') . '</th> + <th>' . _('Cust Order') . ' #</th> + <th>' . _('Order Date') . '</th> + <th>' . _('Req Del Date') . '</th> + <th>' . _('Delivery To') . '</th> + <th>' . _('Order Total') . '</th></tr>'; echo $tableheader; @@ -558,7 +558,7 @@ $FormatedOrderDate = ConvertSQLDate($myrow['orddate']); $FormatedOrderValue = number_format($myrow['ordervalue'],2); - printf("<td><a href='%s'>%s</a></td> + printf('<td><a href="%s">%s</a></td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -566,7 +566,7 @@ <td>%s</td> <td>%s</td> <td class=number>%s</td> - </tr>", + </tr>', $ViewPage, $myrow['orderno'], $myrow['name'], @@ -588,4 +588,4 @@ echo '</form>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2011-04-10 20:39:49 UTC (rev 5168) +++ trunk/SelectCustomer.php 2011-04-11 16:21:14 UTC (rev 5169) @@ -54,7 +54,6 @@ echo '<script src="http://maps.google.com/maps?file=api&v=2&key=' . $api_key . '"'; echo ' type="text/javascript"></script>'; echo ' <script type="text/javascript">'; - echo ' //<![CDATA[ '; echo 'function load() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); @@ -69,7 +68,6 @@ marker.openInfoWindowHtml(WINDOW_HTML); } } - //]]> </script>'; echo '<body onload="load()" onunload="GUnload()">'; } @@ -301,9 +299,9 @@ echo '</td>'; echo '</tr></table><br />'; } else { - echo "<table width=90%><tr><th width=33%>" . _('Customer Inquiries') . "</th> - <th width=33%>" . _('Customer Transactions') . "</th> - <th width=33%>" . _('Customer Maintenance') . "</th></tr>"; + echo '<table width=90%><tr><th width=33%>' . _('Customer Inquiries') . '</th> + <th width=33%>' . _('Customer Transactions') . '</th> + <th width=33%>' . _('Customer Maintenance') . '</th></tr>'; echo '<tr><td class="select">'; echo '</td><td class="select">'; echo '</td><td class="select">'; @@ -318,8 +316,8 @@ 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 "<tr><td colspan=2>" . _('Enter a partial Name') . ":</td><td>"; +echo '<table cellpadding=3 colspan=4 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>'; } else { @@ -432,9 +430,9 @@ $_POST['PageOffset'] = $_POST['PageOffset'] - 1; } } - echo "<input type=\"hidden\" name=\"PageOffset\" value=\"" . $_POST['PageOffset'] . "\"/>"; + echo '<input type="hidden" name="PageOffset" value="' . $_POST['PageOffset'] . '" />'; if ($ListPageMax > 1) { - echo "<p><div class=centre> " . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $ListPageMax . ' ' . _('pages') . '. ' . _('Go to Page') . ': '; + echo '<p><div class=centre> ' . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $ListPageMax . ' ' . _('pages') . '. ' . _('Go to Page') . ': '; echo '<select name="PageOffset1">'; $ListPage = 1; while ($ListPage <= $ListPageMax) { @@ -487,13 +485,13 @@ echo '<tr class="OddTableRows">'; $k = 1; } - echo "<td><font size=1><input type=submit name='Select' value='" . $myrow['debtorno'].' '.$myrow['branchcode'] . "'></font></td> - <td><font size=1>" . $myrow['name'] . "</font></td> - <td><font size=1>" . $myrow['brname'] . "</font></td> - <td><font size=1>" . $myrow['contactname'] . "</font></td> - <td><font size=1>" . $myrow['typename'] . "</font></td> - <td><font size=1>" . $myrow['phoneno'] . "</font></td> - <td><font size=1>" . $myrow['faxno'] . "</font></td></tr>"; + echo '<td><font size=1><input type=submit name="Select" value="' . $myrow['debtorno'].' '.$myrow['branchcode'] . '"></font></td> + <td><font size=1>' . $myrow['name'] . '</font></td> + <td><font size=1>' . $myrow['brname'] . '</font></td> + <td><font size=1>' . $myrow['contactname'] . '</font></td> + <td><font size=1>' . $myrow['typename'] . '</font></td> + <td><font size=1>' . $myrow['phoneno'] . '</font></td> + <td><font size=1>' . $myrow['faxno'] . '</font></td></tr>'; $j++; if ($j == 11 AND ($RowIndex + 1 != $_SESSION['DisplayRecordsMax'])) { $j = 1; @@ -538,11 +536,11 @@ } else { echo '<tr><td colspan=2>'; echo '<table width=45% colspan=2 cellpadding=4>'; - echo "<tr><th width=33%>" . _('Customer Mapping') . "</th></tr>"; + echo '<tr><th width=33%>' . _('Customer Mapping') . '</th></tr>'; echo '</td><td valign=TOp>'; /* Mapping */ - echo '<div class="centre"' . _('Mapping is enabled, Map will display below.') . '</div>'; + echo '<div class="centre">' . _('Mapping is enabled, Map will display below.') . '</div>'; echo '<div align="center" id="map" style="width: ' . $map_width . 'px; height: ' . $map_height . 'px"></div><br />'; - echo "</th></tr></table>"; + echo '</th></tr></table>'; } } // Extended Customer Info only if selected in Configuration @@ -569,12 +567,12 @@ $DataResult = DB_query($SQL, $db); $myrow = DB_fetch_array($DataResult); // Select some more data about the customer - $SQL = "select sum(ovamount+ovgst) as total from debtortrans where debtorno = '" . $_SESSION['CustomerID'] . "' and type !=12"; + $SQL = "SELECT sum(ovamount+ovgst) AS total FROM debtortrans WHERE debtorno = '" . $_SESSION['CustomerID'] . "' AND type !=12"; $Total1Result = DB_query($SQL, $db); $row = DB_fetch_array($Total1Result); echo '<tr><td colspan=2>'; echo '<table width=45% colspan=2 cellpadding=4>'; - echo "<tr><th width=33% colspan=3>" . _('Customer Data') . "</th></tr>"; + echo '<tr><th width=33% colspan=3>' . _('Customer Data') . '</th></tr>'; echo '<tr><td valign=top class=select>'; /* Customer Data */ //echo _('Distance to this customer:') . '<b>TBA</b><br />'; if ($myrow['lastpaiddate'] == 0) { @@ -702,12 +700,12 @@ } //END WHILE LIST LOOP echo '</table>'; } else { - if ($_SESSION['CustomerID'] != "") { + if ($_SESSION['CustomerID'] != '') { echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Group Notes') . '" alt=""><a href="AddCustomerTypeNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Group Note') . '</a></div><br />'; } } } } -echo "<script>defaultControl(document.forms[0].CustCode);</script>"; +echo '<script>defaultControl(document.forms[0].CustCode);</script>'; include ('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-04-10 20:39:49 UTC (rev 5168) +++ trunk/Sele... [truncated message content] |