|
From: <vv...@us...> - 2012-04-12 07:43:35
|
Revision: 5239
http://web-erp.svn.sourceforge.net/web-erp/?rev=5239&view=rev
Author: vvs2012
Date: 2012-04-12 07:43:22 +0000 (Thu, 12 Apr 2012)
Log Message:
-----------
xhtml
Modified Paths:
--------------
trunk/BankAccounts.php
trunk/COGSGLPostings.php
trunk/GLAccountCSV.php
trunk/GLAccountInquiry.php
trunk/GLBalanceSheet.php
trunk/GLBudgets.php
trunk/GLCodesInquiry.php
trunk/GLJournal.php
trunk/GLProfit_Loss.php
trunk/GLTagProfit_Loss.php
trunk/GLTrialBalance.php
trunk/Payments.php
trunk/PcExpenses.php
trunk/PcTabs.php
trunk/PrintCustTrans.php
trunk/SalesGLPostings.php
trunk/SelectCustomer.php
trunk/SelectGLAccount.php
trunk/SelectOrderItems.php
trunk/SelectProduct.php
trunk/SelectRecurringSalesOrder.php
trunk/SelectSalesOrder.php
trunk/SelectSupplier.php
trunk/SelectWorkOrder.php
trunk/css/aguapop/default.css
trunk/css/default/default.css
trunk/css/fresh/default.css
trunk/css/gel/default.css
trunk/css/jelly/default.css
trunk/css/professional/default.css
trunk/css/professional-rtl/default.css
trunk/css/silverwolf/default.css
trunk/includes/OutputSerialItems.php
trunk/install/index.php
Modified: trunk/BankAccounts.php
===================================================================
--- trunk/BankAccounts.php 2012-04-10 22:05:59 UTC (rev 5238)
+++ trunk/BankAccounts.php 2012-04-12 07:43:22 UTC (rev 5239)
@@ -299,9 +299,9 @@
$result = DB_query($sql,$db);
while ($myrow = DB_fetch_array($result)) {
if (isset($_POST['AccountCode']) and $myrow['accountcode']==$_POST['AccountCode']) {
- echo '<option selected="selected" value="'.$myrow['accountcode'] . '">' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8') . '</option>';
+ echo '<option selected="selected" value="'.$myrow['accountcode'] . '">' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8', false) . '</option>';
} else {
- echo '<option value="'.$myrow['accountcode'] . '">' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8') . '</option>';
+ echo '<option value="'.$myrow['accountcode'] . '">' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8', false) . '</option>';
}
} //end while loop
Modified: trunk/COGSGLPostings.php
===================================================================
--- trunk/COGSGLPostings.php 2012-04-10 22:05:59 UTC (rev 5238)
+++ trunk/COGSGLPostings.php 2012-04-12 07:43:22 UTC (rev 5239)
@@ -341,7 +341,7 @@
} else {
echo '<option value="';
}
- echo $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8') . '</option>';
+ echo $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8',false) . '</option>';
} //end while loop
Modified: trunk/GLAccountCSV.php
===================================================================
--- trunk/GLAccountCSV.php 2012-04-10 22:05:59 UTC (rev 5238)
+++ trunk/GLAccountCSV.php 2012-04-12 07:43:22 UTC (rev 5239)
@@ -35,10 +35,10 @@
$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'] . ' ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8') . '</option>';
+ echo '<option selected="selected" value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8', false) . '</option>';
$i++;
} else {
- echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8') . '</option>';
+ echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8', false) . '</option>';
}
}
echo '</select></td>';
Modified: trunk/GLAccountInquiry.php
===================================================================
--- trunk/GLAccountInquiry.php 2012-04-10 22:05:59 UTC (rev 5238)
+++ trunk/GLAccountInquiry.php 2012-04-12 07:43:22 UTC (rev 5239)
@@ -36,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'] . ' ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8') . '</option>';
+ echo '<option selected="selected" value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8', false) . '</option>';
} else {
- echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8') . '</option>';
+ echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8', false) . '</option>';
}
}
echo '</select></td></tr>';
Modified: trunk/GLBalanceSheet.php
===================================================================
--- trunk/GLBalanceSheet.php 2012-04-10 22:05:59 UTC (rev 5238)
+++ trunk/GLBalanceSheet.php 2012-04-12 07:43:22 UTC (rev 5239)
@@ -579,7 +579,7 @@
<td></td>
</tr>',
$ActEnquiryURL,
- htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8'),
+ htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8',false),
locale_number_format($AccountBalance,$_SESSION['CompanyRecord']['decimalplaces']),
locale_number_format($LYAccountBalance,$_SESSION['CompanyRecord']['decimalplaces']));
$j++;
Modified: trunk/GLBudgets.php
===================================================================
--- trunk/GLBudgets.php 2012-04-10 22:05:59 UTC (rev 5238)
+++ trunk/GLBudgets.php 2012-04-12 07:43:22 UTC (rev 5239)
@@ -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'] . ' - ' . htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8');
+ $Account = $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8',false);
if (isset($SelectedAccount) AND isset($LastCode) AND $SelectedAccount==$myrow['accountcode']){
echo '<option selected="selected" value="' . $myrow['accountcode'] . '">' . $Account . '</option>';
$PrevCode=$LastCode;
Modified: trunk/GLCodesInquiry.php
===================================================================
--- trunk/GLCodesInquiry.php 2012-04-10 22:05:59 UTC (rev 5238)
+++ trunk/GLCodesInquiry.php 2012-04-12 07:43:22 UTC (rev 5239)
@@ -46,7 +46,7 @@
<td>%s</td>
</tr>',
$myrow['accountcode'],
- htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8'));
+ htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8',false));
} else {
$ActGrp = $myrow['group_'];
printf('<td><b>%s</b></td>
@@ -55,7 +55,7 @@
</tr>',
$myrow['group_'],
$myrow['accountcode'],
- htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8'));
+ htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8',false));
}
}
//end of while loop
Modified: trunk/GLJournal.php
===================================================================
--- trunk/GLJournal.php 2012-04-10 22:05:59 UTC (rev 5238)
+++ trunk/GLJournal.php 2012-04-12 07:43:22 UTC (rev 5239)
@@ -331,9 +331,9 @@
echo '<option value="">' . _('Select a general ledger account code') . '</option>';
while ($myrow=DB_fetch_array($result)){
if (isset($_POST['tag']) and $_POST['tag']==$myrow['accountcode']){
- echo '<option selected="selected" value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'].' - ' .htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8') . '</option>';
+ echo '<option selected="selected" value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'].' - ' .htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8', false) . '</option>';
} else {
- echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'].' - ' .htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8') .'</option>';
+ echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'].' - ' .htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8', false) .'</option>';
}
}
echo '</select></td>';
Modified: trunk/GLProfit_Loss.php
===================================================================
--- trunk/GLProfit_Loss.php 2012-04-10 22:05:59 UTC (rev 5238)
+++ trunk/GLProfit_Loss.php 2012-04-12 07:43:22 UTC (rev 5239)
@@ -926,7 +926,7 @@
<td class="number">%s</td>
</tr>',
$ActEnquiryURL,
- htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8'),
+ htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8', false),
locale_number_format(-$AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']),
locale_number_format(-$AccountPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces']),
locale_number_format(-$AccountPeriodLY,$_SESSION['CompanyRecord']['decimalplaces']));
@@ -941,7 +941,7 @@
<td></td>
</tr>',
$ActEnquiryURL,
- htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8'),
+ htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8', false),
locale_number_format($AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']),
locale_number_format($AccountPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces']),
locale_number_format($AccountPeriodLY,$_SESSION['CompanyRecord']['decimalplaces']));
Modified: trunk/GLTagProfit_Loss.php
===================================================================
--- trunk/GLTagProfit_Loss.php 2012-04-10 22:05:59 UTC (rev 5238)
+++ trunk/GLTagProfit_Loss.php 2012-04-12 07:43:22 UTC (rev 5239)
@@ -769,7 +769,7 @@
<td class="number">%s</td>
</tr>',
$ActEnquiryURL,
- htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8'),
+ htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8', false),
locale_number_format(-$AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']));
} else {
printf('<td>%s</td>
@@ -777,7 +777,7 @@
<td class="number">%s</td>
</tr>',
$ActEnquiryURL,
- htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8'),
+ htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8', false),
locale_number_format(-$AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']));
}
Modified: trunk/GLTrialBalance.php
===================================================================
--- trunk/GLTrialBalance.php 2012-04-10 22:05:59 UTC (rev 5238)
+++ trunk/GLTrialBalance.php 2012-04-12 07:43:22 UTC (rev 5239)
@@ -623,7 +623,7 @@
<td class="number">%s</td>
</tr>',
$ActEnquiryURL,
- htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8'),
+ htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8', false),
locale_number_format($myrow['monthactual'],$_SESSION['CompanyRecord']['decimalplaces']),
locale_number_format($myrow['monthbudget'],$_SESSION['CompanyRecord']['decimalplaces']),
locale_number_format($AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']),
Modified: trunk/Payments.php
===================================================================
--- trunk/Payments.php 2012-04-10 22:05:59 UTC (rev 5238)
+++ trunk/Payments.php 2012-04-12 07:43:22 UTC (rev 5239)
@@ -1010,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'] . ' - ' . htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8') . '</option>';
+ echo '<option selected="selected" value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8',false) . '</option>';
} else {
- echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8') . '</option>';
+ echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8',false) . '</option>';
}
}
echo '</select></td></tr>';
Modified: trunk/PcExpenses.php
===================================================================
--- trunk/PcExpenses.php 2012-04-10 22:05:59 UTC (rev 5238)
+++ trunk/PcExpenses.php 2012-04-12 07:43:22 UTC (rev 5239)
@@ -311,7 +311,7 @@
} else {
echo '<option value="';
}
- echo $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8') . '</option>';
+ echo $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8', false) . '</option>';
} //end while loop
Modified: trunk/PcTabs.php
===================================================================
--- trunk/PcTabs.php 2012-04-10 22:05:59 UTC (rev 5238)
+++ trunk/PcTabs.php 2012-04-12 07:43:22 UTC (rev 5239)
@@ -434,7 +434,7 @@
} else {
echo '<option value="';
}
- echo $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8') . '</option>';
+ echo $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8', false) . '</option>';
} //end while loop
@@ -456,7 +456,7 @@
} else {
echo '<option value="';
}
- echo $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8') . '</option>';
+ echo $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8', false) . '</option>';
} //end while loop
Modified: trunk/PrintCustTrans.php
===================================================================
--- trunk/PrintCustTrans.php 2012-04-10 22:05:59 UTC (rev 5238)
+++ trunk/PrintCustTrans.php 2012-04-12 07:43:22 UTC (rev 5239)
@@ -924,7 +924,7 @@
$PageNumber++;
echo '</table>
<table class="table1">
- <tr><td valign=top><img src="' . $_SESSION['LogoFile'] . '" alt="" /></td>
+ <tr><td valign="top"><img src="' . $_SESSION['LogoFile'] . '" alt="" /></td>
<td style="background-color:#BBBBBB">';
if ($InvOrCredit=='Invoice') {
@@ -973,7 +973,7 @@
/* head up a new invoice/credit note page */
$PageNumber++;
echo '<table class="table1">
- <tr><td valign=top><img src="' . $_SESSION['LogoFile'] . '" alt="" /></td>
+ <tr><td valign="top"><img src="' . $_SESSION['LogoFile'] . '" alt="" /></td>
<td style="background-color:#BBBBBB">';
if ($InvOrCredit=='Invoice') {
Modified: trunk/SalesGLPostings.php
===================================================================
--- trunk/SalesGLPostings.php 2012-04-10 22:05:59 UTC (rev 5238)
+++ trunk/SalesGLPostings.php 2012-04-12 07:43:22 UTC (rev 5239)
@@ -390,7 +390,7 @@
} else {
echo '<option value="';
}
- echo $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8') . '</option>';
+ echo $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8', false) . '</option>';
} //end while loop
@@ -406,7 +406,7 @@
} else {
echo '<option value="';
}
- echo $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8') . '</option>';
+ echo $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . htmlspecialchars($myrow['accountname'], ENT_QUOTES, 'UTF-8', false) . '</option>';
} //end while loop
Modified: trunk/SelectCustomer.php
===================================================================
--- trunk/SelectCustomer.php 2012-04-10 22:05:59 UTC (rev 5238)
+++ trunk/SelectCustomer.php 2012-04-12 07:43:22 UTC (rev 5239)
@@ -52,7 +52,7 @@
$map_height = $myrow['map_height'];
$map_width = $myrow['map_width'];
$map_host = $myrow['map_host'];
- echo '<script src="http://maps.google.com/maps?file=api&v=2&key=' . $api_key . '"';
+ 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 'function load() {
@@ -204,7 +204,7 @@
$ErrMsg = _('The customer name requested cannot be retrieved because');
$result = DB_query($SQL, $db, $ErrMsg);
if ($myrow = DB_fetch_array($result)) {
- $CustomerName = $myrow['name'];
+ $CustomerName = htmlspecialchars($myrow['name'],ENT_QUOTES,'UTF-8',false);
$PhoneNo = $myrow['phoneno'];
}
unset($result);
@@ -214,22 +214,22 @@
echo '<table cellpadding="4" width="90%" class="selection">
<tr>
- <th width="33%">' . _('Customer Inquiries') . '</th>
- <th width="33%">' . _('Customer Transactions') . '</th>
- <th width="33%">' . _('Customer Maintenance') . '</th>
+ <th style="width:33%">' . _('Customer Inquiries') . '</th>
+ <th style="width:33%">' . _('Customer Transactions') . '</th>
+ <th style="width:33%">' . _('Customer Maintenance') . '</th>
</tr>';
- echo '<tr><td valign=top class="select">';
+ echo '<tr><td valign="top" class="select">';
/* Customer Inquiry Options */
echo '<a href="' . $rootpath . '/CustomerInquiry.php?CustomerID=' . $_SESSION['CustomerID'] . '">' . _('Customer Transaction Inquiries') . '</a><br />';
- echo '<a href="' . $rootpath . '/Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '&Modify=No">' . _('View Customer Details') . '</a><br />';
- echo '<a href="' . $rootpath . '/PrintCustStatements.php?FromCust=' . $_SESSION['CustomerID'] . '&ToCust=' . $_SESSION['CustomerID'] . '&PrintPDF=Yes">' . _('Print Customer Statement') . '</a><br />';
+ echo '<a href="' . $rootpath . '/Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '&Modify=No">' . _('View Customer Details') . '</a><br />';
+ echo '<a href="' . $rootpath . '/PrintCustStatements.php?FromCust=' . $_SESSION['CustomerID'] . '&ToCust=' . $_SESSION['CustomerID'] . '&PrintPDF=Yes">' . _('Print Customer Statement') . '</a><br />';
echo '<a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Order Inquiries') . '</a><br />';
wikiLink('Customer', $_SESSION['CustomerID']);
- echo '</td><td valign=top class="select">';
+ echo '</td><td valign="top" class="select">';
echo '<a href="' . $rootpath . '/SelectSalesOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Modify Outstanding Sales Orders') . '</a><br />';
echo '<a href="' . $rootpath . '/CustomerAllocations.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Allocate Receipts or Credit Notes') . '</a><br />';
- echo '<a href="' . $rootpath . '/CounterSales.php?DebtorNo=' . $_SESSION['CustomerID'] . '&BranchNo=' . $_SESSION['BranchCode'] . '">' . _('Create a Counter Sale for this Customer') . '</a><br />';
- echo '</td><td valign=top class="select">';
+ echo '<a href="' . $rootpath . '/CounterSales.php?DebtorNo=' . $_SESSION['CustomerID'] . '&BranchNo=' . $_SESSION['BranchCode'] . '">' . _('Create a Counter Sale for this Customer') . '</a><br />';
+ echo '</td><td valign="top" class="select">';
echo '<a href="' . $rootpath . '/Customers.php?">' . _('Add a New Customer') . '</a><br />';
echo '<a href="' . $rootpath . '/Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Modify Customer Details') . '</a><br />';
echo '<a href="' . $rootpath . '/CustomerBranches.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Add/Modify/Delete Customer Branches') . '</a><br />';
@@ -241,9 +241,9 @@
} else {
echo '<table width="90%">
<tr>
- <th width="33%">' . _('Customer Inquiries') . '</th>
- <th width="33%">' . _('Customer Transactions') . '</th>
- <th width="33%">' . _('Customer Maintenance') . '</th>
+ <th style="width:33%">' . _('Customer Inquiries') . '</th>
+ <th style="width:33%">' . _('Customer Transactions') . '</th>
+ <th style="width:33%">' . _('Customer Maintenance') . '</th>
</tr>';
echo '<tr>
<td class="select"></td>
@@ -255,6 +255,7 @@
echo '</td></tr></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'] . '" />';
if (mb_strlen($msg)>1){
prnMsg($msg,'info');
@@ -268,7 +269,7 @@
echo '<input type="text" name="Keywords" size="20" maxlength="25" />';
}
echo '</td>
- <td><font size="3"><b>' . _('OR') . '</b></font></td><td>' . _('Enter a partial Code') . ':</td>
+ <td><b>' . _('OR') . '</b></td><td>' . _('Enter a partial Code') . ':</td>
<td>';
if (isset($_POST['CustCode'])) {
echo '<input type="text" name="CustCode" value="' . $_POST['CustCode'] . '" size="15" maxlength="18" />';
@@ -278,7 +279,7 @@
echo '</td>
</tr>
<tr>
- <td><font size="3"><b>' . _('OR') . '</b></font></td>
+ <td><b>' . _('OR') . '</b></td>
<td>' . _('Enter a partial Phone Number') . ':</td>
<td>';
if (isset($_POST['CustPhone'])) {
@@ -287,7 +288,7 @@
echo '<input type="text" name="CustPhone" size="15" maxlength="18" />';
}
echo '</td>';
-echo '<td><font size="3"><b>' . _('OR') . '</b></font></td>
+echo '<td><b>' . _('OR') . '</b></td>
<td>' . _('Enter part of the Address') . ':</td>
<td>';
if (isset($_POST['CustAdd'])) {
@@ -297,7 +298,7 @@
}
echo '</td></tr>';
echo '<tr>
- <td><font size="3"><b>' . _('OR') . '</b></font></td>
+ <td><b>' . _('OR') . '</b></td>
<td>' . _('Choose a Type') . ':</td>
<td>';
if (isset($_POST['CustType'])) {
@@ -343,7 +344,7 @@
}
/* Option to select a sales area */
-echo '<td><font size="3"><b>' . _('OR') . '</b></font></td>
+echo '<td><b>' . _('OR') . '</b></td>
<td>' . _('Choose an Area') . ':</td><td>';
$result2 = DB_query("SELECT areacode, areadescription FROM areas", $db);
// Error if no sales areas setup
@@ -366,7 +367,7 @@
echo '</select></td></tr>';
}
-echo '</td></tr></table><br />';
+echo '</table><br />';
echo '<div class="centre">
<input type="submit" name="Search" value="' . _('Search Now') . '" />
<input type="submit" name="CSV" value="' . _('CSV Format') . '" />
@@ -391,7 +392,7 @@
}
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 '<br /><div class="centre"> ' . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $ListPageMax . ' ' . _('pages') . '. ' . _('Go to Page') . ': ';
echo '<select name="PageOffset1">';
$ListPage = 1;
while ($ListPage <= $ListPageMax) {
@@ -433,7 +434,6 @@
while ($myrow2 = DB_fetch_array($result)) {
fwrite($fp, $myrow2['debtorno'] . ',' . str_replace(',', '', $myrow2['name']) . ',' . str_replace(',', '', $myrow2['address1']) . ',' . str_replace(',', '', $myrow2['address2']) . ',' . str_replace(',', '', $myrow2['address3']) . ',' . str_replace(',', '', $myrow2['address4']) . ',' . str_replace(',', '', $myrow2['contactname']) . ',' . str_replace(',', '', $myrow2['typename']) . ',' . $myrow2['phoneno'] . ',' . $myrow2['faxno'] . ',' . $myrow2['email'] . "\n");
}
- echo '</div>';
}
if (!isset($_POST['CSV'])) {
DB_data_seek($result, ($_POST['PageOffset'] - 1) * $_SESSION['DisplayRecordsMax']);
@@ -447,16 +447,16 @@
echo '<tr class="OddTableRows">';
$k = 1;
}
- echo '<td><font size="1"><input type="submit" name="SubmitCustomerSelection' . $i .'" value="' . htmlspecialchars($myrow['debtorno'].' '.$myrow['branchcode'],ENT_QUOTES,'UTF-8') . '" /></font></td>
+ echo '<td><input type="submit" name="SubmitCustomerSelection' . $i .'" value="' . htmlspecialchars($myrow['debtorno'].' '.$myrow['branchcode'],ENT_QUOTES,'UTF-8',false) . '" />
<input type="hidden" name="SelectedCustomer' . $i . '" value="'.$myrow['debtorno'].'" />
- <input type="hidden" name="SelectedBranch' . $i . '" value="'. $myrow['branchcode'].'" />
- <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>
- <td><font size="1">' . $myrow['email'] . '</font></td>
+ <input type="hidden" name="SelectedBranch' . $i . '" value="'. $myrow['branchcode'].'" /></td>
+ <td>' . htmlspecialchars($myrow['name'],ENT_QUOTES,'UTF-8',false) . '</td>
+ <td>' . htmlspecialchars($myrow['brname'],ENT_QUOTES,'UTF-8',false) . '</td>
+ <td>' . $myrow['contactname'] . '</td>
+ <td>' . $myrow['typename'] . '</td>
+ <td>' . $myrow['phoneno'] . '</td>
+ <td>' . $myrow['faxno'] . '</td>
+ <td>' . $myrow['email'] . '</td>
</tr>';
$i++;
$j++;//row counter
@@ -475,7 +475,7 @@
//end if results to show
if (!isset($_POST['CSV'])) {
if (isset($ListPageMax) and $ListPageMax > 1) {
- echo '<p><div class="centre"> ' . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $ListPageMax . ' ' . _('pages') . '. ' . _('Go to Page') . ': ';
+ echo '<br /><div class="centre"> ' . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $ListPageMax . ' ' . _('pages') . '. ' . _('Go to Page') . ': ';
echo '<select name="PageOffset2">';
$ListPage = 1;
while ($ListPage <= $ListPageMax) {
@@ -490,10 +490,12 @@
<input type="submit" name="Go2" value="' . _('Go') . '" />
<input type="submit" name="Previous" value="' . _('Previous') . '" />
<input type="submit" name="Next" value="' . _('Next') . '" />';
+ echo '</div>';
}
//end if results to show
- echo '</div></form>';
}
+echo '</div>
+ </form>';
// Only display the geocode map if the integration is turned on, and there is a latitude/longitude to display
if (isset($_SESSION['CustomerID']) and $_SESSION['CustomerID'] != '') {
if ($_SESSION['geocode_integration'] == 1) {
@@ -505,7 +507,7 @@
<td colspan="2">
<table width="45%" cellpadding="4">
<tr>
- <th width="33%">' . _('Customer Mapping') . '</th>
+ <th style="width:33%">' . _('Customer Mapping') . '</th>
</tr>
</td>
<th valign="top">
@@ -556,7 +558,7 @@
$row = DB_fetch_array($Total1Result);
echo '<tr><td colspan="2">';
echo '<table width="45%" cellpadding="4">';
- echo '<tr><th width="33%" colspan="3">' . _('Customer Data') . '</th></tr>';
+ echo '<tr><th style="width:33%" colspan="3">' . _('Customer Data') . '</th></tr>';
echo '<tr><td valign="top" class="select">'; /* Customer Data */
if ($myrow['lastpaiddate'] == 0) {
echo _('No receipts from this customer.') . '</td>
@@ -632,8 +634,8 @@
<td>' . $myrow[4] . '</td>
<td><a href=mailto:' . $myrow[6] . '>' . $myrow[6] . '</a></td>
<td>' . $myrow[5] . '</td>
- <td><a href="AddCustomerContacts.php?Id=' . $myrow[0] . '&DebtorNo=' . $myrow[1] . '">' . _('Edit') . '</a></td>
- <td><a href="AddCustomerContacts.php?Id=' . $myrow[0] . '&DebtorNo=' . $myrow[1] . '&delete=1">' . _('Delete') . '</a></td>
+ <td><a href="AddCustomerContacts.php?Id=' . $myrow[0] . '&DebtorNo=' . $myrow[1] . '">' . _('Edit') . '</a></td>
+ <td><a href="AddCustomerContacts.php?Id=' . $myrow[0] . '&DebtorNo=' . $myrow[1] . '&delete=1">' . _('Delete') . '</a></td>
</tr>';
} //END WHILE LIST LOOP
echo '</table>';
@@ -673,8 +675,8 @@
<td>' . $myrow[3] . '</td>
<td>' . $myrow[2] . '</td>
<td>' . $myrow[5] . '</td>
- <td><a href="AddCustomerNotes.php?Id=' . $myrow[0] . '&DebtorNo=' . $myrow[1] . '">' . _('Edit') . '</a></td>
- <td><a href="AddCustomerNotes.php?Id=' . $myrow[0] . '&DebtorNo=' . $myrow[1] . '&delete=1">' . _('Delete') . '</a></td>
+ <td><a href="AddCustomerNotes.php?Id=' . $myrow[0] . '&DebtorNo=' . $myrow[1] . '">' . _('Edit') . '</a></td>
+ <td><a href="AddCustomerNotes.php?Id=' . $myrow[0] . '&DebtorNo=' . $myrow[1] . '&delete=1">' . _('Delete') . '</a></td>
</tr>';
} //END WHILE LIST LOOP
echo '</table>';
@@ -714,8 +716,8 @@
<td>' . $myrow[3] . '</td>
<td>' . $myrow[2] . '</td>
<td>' . $myrow[5] . '</td>
- <td><a href="AddCustomerTypeNotes.php?Id=' . $myrow[0] . '&DebtorType=' . $myrow[1] . '">' . _('Edit') . '</a></td>
- <td><a href="AddCustomerTypeNotes.php?Id=' . $myrow[0] . '&DebtorType=' . $myrow[1] . '&delete=1">' . _('Delete') . '</a></td>
+ <td><a href="AddCustomerTypeNotes.php?Id=' . $myrow[0] . '&DebtorType=' . $myrow[1] . '">' . _('Edit') . '</a></td>
+ <td><a href="AddCustomerTypeNotes.php?Id=' . $myrow[0] . '&DebtorType=' . $myrow[1] . '&delete=1">' . _('Delete') . '</a></td>
</tr>';
} //END WHILE LIST LOOP
echo '</table>';
Modified: trunk/SelectGLAccount.php
===================================================================
--- trunk/SelectGLAccount.php 2012-04-10 22:05:59 UTC (rev 5238)
+++ trunk/SelectGLAccount.php 2012-04-12 07:43:22 UTC (rev 5239)
@@ -34,9 +34,16 @@
$msg=_('Account name keywords have been used in preference to the account code extract entered');
}
if ($_POST['Keywords']=='' AND $_POST['GLCode']=='') {
- $msg=_('At least one Account Name keyword OR an extract of an Account Code must be entered for the search');
- } else {
- If (mb_strlen($_POST['Keywords'])>0) {
+ $SQL = "SELECT chartmaster.accountcode,
+ chartmaster.accountname,
+ chartmaster.group_,
+ CASE WHEN accountgroups.pandl!=0 THEN '" . _('Profit and Loss') . "' ELSE '" . _('Balance Sheet') ."' END AS pl
+ FROM chartmaster,
+ accountgroups
+ WHERE chartmaster.group_=accountgroups.groupname
+ ORDER BY chartmaster.accountcode";
+ }
+ elseif (mb_strlen($_POST['Keywords'])>0) {
//insert wildcard characters in spaces
$SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%';
@@ -72,7 +79,6 @@
if (isset($SQL) and $SQL!=''){
$result = DB_query($SQL, $db);
}
- } //one of keywords or GLCode was more than a zero length string
} //end of if search
if (!isset($AccountID)) {
@@ -82,6 +88,7 @@
'" alt="" />' . ' ' . _('Search for General Ledger Accounts') . '</p>';
echo '<br />
<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">';
+ echo '<div>';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
if(mb_strlen($msg)>1){
@@ -90,10 +97,10 @@
echo '<table class="selection">
<tr>
- <td><font size="1">' . _('Enter extract of text in the Account name') .':</font></td>
+ <td>' . _('Enter extract of text in the Account 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 Account No. to search from') . ':</font></td>
+ <td><b>' . _('OR') . '</b></td>
+ <td>' . _('Enter Account No. to search from') . ':</td>
<td><input type="text" name="GLCode" size="15" maxlength="18" class="number" /></td>
</tr>
</table>
@@ -101,7 +108,7 @@
echo '<div class="centre">
<input type="submit" name="Search" value="' . _('Search Now') . '" />
- <input type="submit" action=reset value="' . _('Reset') .'" />
+ <input type="submit" name="reset" value="' . _('Reset') .'" />
</div>';
if (isset($result) and DB_num_rows($result)>0) {
@@ -122,13 +129,13 @@
while ($myrow=DB_fetch_array($result)) {
printf('<tr>
- <td><font size="1"><input type="submit" name="Select" 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><input type="submit" name="Select" value="%s" /></td>
+ <td>%s</td>
+ <td>%s</td>
+ <td>%s</td>
</tr>',
$myrow['accountcode'],
- $myrow['accountname'],
+ htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8',false),
$myrow['group_'],
$myrow['pl']);
@@ -147,7 +154,8 @@
}
//end if results to show
- echo '</form>';
+ echo '</div>
+ </form>';
} //end AccountID already selected
Modified: trunk/SelectOrderItems.php
===================================================================
--- trunk/SelectOrderItems.php 2012-04-10 22:05:59 UTC (rev 5238)
+++ trunk/SelectOrderItems.php 2012-04-12 07:43:22 UTC (rev 5239)
@@ -300,7 +300,16 @@
AND in_array(2,$_SESSION['AllowedPageSecurityTokens'])){
if (($_POST['CustKeywords']=='') AND ($_POST['CustCode']=='') AND ($_POST['CustPhone']=='')) {
- prnMsg(_('At least one Customer Branch Name keyword OR an extract of a Customer Branch Code or Branch Phone Number must be entered for the search'), 'warn');
+ $SQL = "SELECT custbranch.brname,
+ custbranch.contactname,
+ custbranch.phoneno,
+ custbranch.faxno,
+ custbranch.branchcode,
+ custbranch.debtorno,
+ debtorsmaster.name
+ FROM custbranch
+ LEFT JOIN debtorsmaster
+ ON custbranch.debtorno=debtorsmaster.debtorno";
} else {
//insert wildcard characters in spaces
$_POST['CustKeywords'] = mb_strtoupper(trim($_POST['CustKeywords']));
@@ -325,6 +334,7 @@
}
$SQL .= " AND custbranch.disabletrans=0
ORDER BY custbranch.debtorno, custbranch.branchcode";
+ } /*one of keywords or custcode was more than a zero length string */
$ErrMsg = _('The searched customer records requested cannot be retrieved because');
$result_CustSelect = DB_query($SQL,$db,$ErrMsg);
@@ -336,7 +346,6 @@
} elseif (DB_num_rows($result_CustSelect)==0){
prnMsg(_('No Customer Branch records contain the search criteria') . ' - ' . _('please try again') . ' - ' . _('Note a Customer Branch Name may be different to the Customer Name'),'info');
}
- } /*one of keywords or custcode was more than a zero length string */
} /*end of if search for customer codes/names */
if (isset($_POST['JustSelectedACustomer'])){
@@ -386,7 +395,7 @@
$myrow = DB_fetch_array($result);
if ($myrow[1] != 1){
if ($myrow[1]==2){
- prnMsg(_('The') . ' ' . $myrow[0] . ' ' . _('account is currently flagged as an account that needs to be watched. Please contact the credit control personnel to discuss'),'warn');
+ prnMsg(_('The') . ' ' . htmlspecialchars($myrow[0], ENT_QUOTES, 'UTF-8', false) . ' ' . _('account is currently flagged as an account that needs to be watched. Please contact the credit control personnel to discuss'),'warn');
}
$_SESSION['RequireCustomerSelection']=0;
@@ -473,16 +482,16 @@
$_SESSION['Items'.$identifier]->CreditAvailable = GetCreditAvailable($_SESSION['Items'.$identifier]->DebtorNo,$db);
if ($_SESSION['CheckCreditLimits']==1 AND $_SESSION['Items'.$identifier]->CreditAvailable <=0){
- prnMsg(_('The') . ' ' . $myrow[0] . ' ' . _('account is currently at or over their credit limit'),'warn');
+ prnMsg(_('The') . ' ' . htmlspecialchars($myrow[0], ENT_QUOTES, 'UTF-8', false) . ' ' . _('account is currently at or over their credit limit'),'warn');
} elseif ($_SESSION['CheckCreditLimits']==2 AND $_SESSION['Items'.$identifier]->CreditAvailable <=0){
- prnMsg(_('No more orders can be placed by') . ' ' . $myrow[0] . ' ' . _(' their account is currently at or over their credit limit'),'warn');
+ prnMsg(_('No more orders can be placed by') . ' ' . htmlspecialchars($myrow[0], ENT_QUOTES, 'UTF-8', false) . ' ' . _(' their account is currently at or over their credit limit'),'warn');
include('includes/footer.inc');
exit;
}
}
} else {
- prnMsg(_('The') . ' ' . $myrow[0] . ' ' . _('account is currently on hold please contact the credit control personnel to discuss'),'warn');
+ prnMsg(_('The') . ' ' . htmlspecialchars($myrow[0], ENT_QUOTES, 'UTF-8', false) . ' ' . _('account is currently on hold please contact the credit control personnel to discuss'),'warn');
}
} elseif (!$_SESSION['Items'.$identifier]->DefaultSalesType
@@ -577,29 +586,35 @@
echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' .
' ' . _('Enter an Order or Quotation') . ' : ' . _('Search for the Customer Branch.') . '</p>';
echo '<div class="page_help_text">' . _('Orders/Quotations are placed against the Customer Branch. A Customer may have several Branches.') . '</div>';
- 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 '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier . '" id="SelectCustomer" method="post">
+ <div>
+ <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
echo '<table cellpadding="3" class="selection">
<tr>
- <td><h5>' . _('Part of the Customer Branch Name') . ':</h5></td>
+ <td>' . _('Part of the Customer Branch Name') . ':</td>
<td><input tabindex="1" type="text" name="CustKeywords" size="20" maxlength="25" /></td>
- <td><h2><b>' . _('OR') . '</b></h2></td>
- <td><h5>' . _('Part of the Customer Branch Code') . ':</h5></td>
+ <td><b>' . _('OR') . '</b></td>
+ <td>' . _('Part of the Customer Branch Code') . ':</td>
<td><input tabindex="2" type="text" name="CustCode" size="15" maxlength="18" /></td>
- <td><h2><b>' . _('OR') . '</b></h2></td>
- <td><h5>' . _('Part of the Branch Phone Number') . ':</h5></td>
+ <td><b>' . _('OR') . '</b></td>
+ <td>' . _('Part of the Branch Phone Number') . ':</td>
<td><input tabindex="3" type="text" name="CustPhone" size="15" maxlength="18" /></td>
</tr>
</table>
<br /><div class="centre"><input tabindex="4" type="submit" name="SearchCust" value="' . _('Search Now') . '" />
- <input tabindex="5" type="submit" action="reset" value="' . _('Reset') . '" /></div>';
+ <input tabindex="5" type="submit" name="reset" value="' . _('Reset') . '" /></div>';
+ echo '</div>
+ </form>';
if (isset($result_CustSelect)) {
- echo '<table class="selection">';
+ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier . '" id="SelectParts" method="post">';
+ echo '<div>';
+ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
+ echo '<br /><table class="selection">';
- $TableHeader = '<br /><tr>
+ $TableHeader = '<tr>
<th>' . _('Customer') . '</th>
<th>' . _('Branch') . '</th>
<th>' . _('Contact') . '</th>
@@ -620,16 +635,14 @@
echo '<tr class="OddTableRows">';
$k=1;
}
- echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier . '" name="SelectParts" method="post">';
- echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
if ($LastCustomer != $myrow['name']) {
- echo '<td>'.$myrow['name'].'</td>';
+ echo '<td>'.htmlspecialchars($myrow['name'], ENT_QUOTES, 'UTF-8', false).'</td>';
} else {
echo '<td></td>';
}
- echo '<td><input tabindex="'.strval($j+5).'" type="submit" name="SubmitCustomerSelection' . $j .'" value="' . htmlspecialchars($myrow['brname'], ENT_QUOTES,'UTF-8'). '" /></td>
+ echo '<td><input tabindex="'.strval($j+5).'" type="submit" name="SubmitCustomerSelection' . $j .'" value="' . htmlspecialchars($myrow['brname'], ENT_QUOTES, 'UTF-8', false). '" />
<input type="hidden" name="SelectedCustomer' . $j .'" value="'.$myrow['debtorno'].'" />
- <input type="hidden" name="SelectedBranch' . $j .'" value="'. $myrow['branchcode'].'" />
+ <input type="hidden" name="SelectedBranch' . $j .'" value="'. $myrow['branchcode'].'" /></td>
<td>'.$myrow['contactname'].'</td>
<td>'.$myrow['phoneno'].'</td>
<td>'.$myrow['faxno'].'</td>
@@ -639,8 +652,10 @@
//end of page full new headings if
}
//end of while loop
+ echo '</table>';
echo '<input type="hidden" name="JustSelectedACustomer" value="Yes" />';
- echo '</table></form>';
+ echo '</div>
+ </form>';
}//end if results to show
@@ -707,8 +722,8 @@
echo _('Order for customer') . ' ';
}
- echo ':<b> ' . $_SESSION['Items'.$identifier]->DebtorNo . ' ' . _('Customer Name') . ': ' . $_SESSION['Items'.$identifier]->CustomerName;
- echo '</b></p><div class="page_help_text">' . '<b>' . _('Default Options (can be modified during order):') . '</b><br />' . _('Deliver To') . ':<b> ' . $_SESSION['Items'.$identifier]->DeliverTo;
+ echo ':<b> ' . $_SESSION['Items'.$identifier]->DebtorNo . ' ' . _('Customer Name') . ': ' . htmlspecialchars($_SESSION['Items'.$identifier]->CustomerName, ENT_QUOTES, 'UTF-8', false);
+ echo '</b></p><div class="page_help_text">' . '<b>' . _('Default Options (can be modified during order):') . '</b><br />' . _('Deliver To') . ':<b> ' . htmlspecialchars($_SESSION['Items'.$identifier]->DeliverTo, ENT_QUOTES, 'UTF-8', false);
echo '</b> ' . _('From Location') . ':<b> ' . $_SESSION['Items'.$identifier]->LocationName;
echo '</b><br />' . _('Sales Type') . '/' . _('Price List') . ':<b> ' . $_SESSION['Items'.$identifier]->SalesTypeName;
echo '</b><br />' . _('Terms') . ':<b> ' . $_SESSION['Items'.$identifier]->PaymentTerms;
@@ -718,11 +733,11 @@
if (isset($_POST['Search']) or isset($_POST['Next']) or isset($_POST['Prev'])){
if ($_POST['Keywords']!='' AND $_POST['StockCode']=='') {
- $msg='</b><div class="page_help_text">' . _('Order Item description has been used in search') . '.</div>';
+ $msg='<div class="page_help_text">' . _('Order Item description has been used in search') . '.</div>';
} elseif ($_POST['StockCode']!='' AND $_POST['Keywords']=='') {
- $msg='</b><div class="page_help_text">' . _('Stock Code has been used in search') . '.</div>';
+ $msg='<div class="page_help_text">' . _('Stock Code has been used in search') . '.</div>';
} elseif ($_POST['Keywords']=='' AND $_POST['StockCode']=='') {
- $msg='</b><div class="page_help_text">' . _('Stock Category has been used in search') . '.</div>';
+ $msg='<div class="page_help_text">' . _('Stock Category has been used in search') . '.</div>';
}
if (isset($_POST['Keywords']) AND mb_strlen($_POST['Keywords'])>0) {
//insert wildcard characters in spaces
@@ -840,7 +855,8 @@
#Always do the stuff below if not looking for a customerid
- echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier . '" name="SelectParts" method="post">';
+ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier . '" id="SelectParts" method="post">';
+ echo '<div>';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
//Get The exchange rate used for GPPercent calculations on adding or amending items
@@ -1322,13 +1338,13 @@
/* This is where the order as selected should be displayed reflecting any deletions or insertions*/
+ echo '<div class="page_help_text">' . _('Quantity (required) - Enter the number of units ordered. Price (required) - Enter the unit price. Discount (optional) - Enter a percentage discount. GP% (optional) - Enter a percentage Gross Profit (GP) to add to the unit cost. Due Date (optional) - Enter a date for delivery.') . '</div><br />';
echo '<br />
<table width="90%" cellpadding="2">
<tr style="background-color:#800000">';
if($_SESSION['Items'.$identifier]->DefaultPOLine == 1){
echo '<th>' . _('PO Line') . '</th>';
}
- echo '<div class="page_help_text">' . _('Quantity (required) - Enter the number of units ordered. Price (required) - Enter the unit price. Discount (optional) - Enter a percentage discount. GP% (optional) - Enter a percentage Gross Profit (GP) to add to the unit cost. Due Date (optional) - Enter a date for delivery.') . '</div><br />';
echo '<th>' . _('Item Code') . '</th>
<th>' . _('Item Description') . '</th>
<th>' . _('Quantity') . '</th>
@@ -1367,13 +1383,14 @@
}
echo $RowStarter;
+ echo '<td>';
if($_SESSION['Items'.$identifier]->DefaultPOLine ==1){ //show the input field only if required
- echo '<td><input tabindex="1" type="text" name="POLine_' . $OrderLine->LineNumber . '" size="20" maxlength="20" value="' . $OrderLine->POLine . '" /></td>';
+ echo '<input tabindex="1" type="text" name="POLine_' . $OrderLine->LineNumber . '" size="20" maxlength="20" value="' . $OrderLine->POLine . '" /></td><td>';
} else {
echo '<input type="hidden" name="POLine_' . $OrderLine->LineNumber . '" value="" />';
}
- echo '<td><a target="_blank" href="' . $rootpath . '/StockStatus.php?identifier='.$identifier . '&StockID=' . $OrderLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo . '">' . $OrderLine->StockID . '</a></td>
+ echo '<a target="_blank" href="' . $rootpath . '/StockStatus.php?identifier='.$identifier . '&StockID=' . $OrderLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo . '">' . $OrderLine->StockID . '</a></td>
<td>' . $OrderLine->ItemDescription . '</td>';
echo '<td><input class="number" tabindex="2" type="text" name="Quantity_' . $OrderLine->LineNumber . '" size="6" maxlength="6" value="' . locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces) . '" />';
@@ -1390,9 +1407,9 @@
<td><input class="number" type="text" name="Discount_' . $OrderLine->LineNumber . '" size="5" maxlength="4" value="' . locale_number_format(($OrderLine->DiscountPercent * 100),2) . '" /></td>
<td><input class="number" type="text" name="GPPercent_' . $OrderLine->LineNumber . '" size="4" maxlength="40" value="' . locale_number_format($OrderLine->GPPercent,2) . '" /></td>';
} else {
- echo '<td class="number">' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>';
+ echo '<td class="number">' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces);
echo '<input class="number" type="hidden" name="GPPercent_' . $OrderLine->LineNumber . '" size="4" maxlength="40" value="' . locale_number_format($OrderLine->GPPercent,2) . '" />';
- echo '<input type="hidden" name="Price_' . $OrderLine->LineNumber . '" value="' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" />';
+ echo '<input type="hidden" name="Price_' . $OrderLine->LineNumber . '" value="' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" /></td>';
}
if ($_SESSION['Items'.$identifier]->Some_Already_Delivered($OrderLine->LineNumber)){
$RemTxt = _('Clear Remaining');
@@ -1408,13 +1425,13 @@
echo '<td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ItemDue_' . $OrderLine->LineNumber . '" size="10" maxlength="10" value="' . $LineDueDate . '" /></td>';
- echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . $RemTxt . '</a></td></tr>';
+ echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . $RemTxt . '</a></td></tr>';
if ($_SESSION['AllowOrderLineItemNarrative'] == 1){
echo $RowStarter;
echo '<td colspan="10">' . _('Narrative') . ':<textarea name="Narrative_' . $OrderLine->LineNumber . '" cols="100%" rows="1">' . stripslashes(AddCarriageReturns($OrderLine->Narrative)) . '</textarea><br /></td></tr>';
} else {
- echo '<input type="hidden" name="Narrative" value="" />';
+ echo '<tr><td><input type="hidden" name="Narrative" value="" /></td></tr>';
}
$_SESSION['Items'.$identifier]->total = $_SESSION['Items'.$identifier]->total + $LineTotal;
@@ -1450,7 +1467,7 @@
<input type="submit" name="Recalculate" value="' . _('Re-Calculate') . '" />
<input type="submit" name="DeliveryDetails" value="' . _('Enter Delivery Details and Confirm Order') . '" />
</div>
- <hr />';
+ <br />';
} # end of if lines
/* Now show the stock item selection search stuff below */
@@ -1570,14 +1587,14 @@
$Available = $QOH - $DemandQty + $OnOrder;
- printf('<td>%s</font></td>
+ printf('<td>%s</td>
<td>%s</td>
<td>%s</td>
<td class="number">%s</td>
<td class="number">%s</td>
<td class="number">%s</td>
<td class="number">%s</td>
- <td><font size="1"><input class="number" tabindex="'. strval($j+7).'" type="textbox" size="6" name="OrderQty' . $i . '" value="0" />
+ <td><input class="number" tabindex="'. strval($j+7).'" type="text" size="6" name="OrderQty' . $i . '" value="0" />
<input type="hidden" name="StockID' . $i . '" value="' . $myrow['stockid'] . '" />
</td>
</tr>',
@@ -1596,20 +1613,20 @@
#end of page full new headings if
}
#end of while loop for Frequently Ordered Items
- echo '<td style="text-align:center" colspan="8"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'.strval($j+8).'" type="submit" value="'._('Add to Sales Order').'" /></td>';
+ echo '<td style="text-align:center" colspan="8"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'.strval($j+8).'" type="submit" value="'._('Add to Sales Order').'" /></td></tr>';
echo '</table>';
} //end of if Frequently Ordered Items > 0
- echo '<p><div class="centre"><b><p>' . $msg . '</b></p>';
+ echo '<br /><div class="centre">' . $msg;
echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ';
- echo _('Search for Order Items') . '</p>';
+ echo _('Search for Order Items') . '</p></div>';
echo '<div class="page_help_text">' . _('Search for Order Items') . _(', Searches the database for items, you can narrow the results by selecting a stock category, or just enter a partial item description or partial item code') . '.</div><br />';
echo '<table class="selection"><tr><td><b>' . _('Select a Stock Category') . ': </b><select tabindex="1" name="StockCat">';
if (!isset($_POST['StockCat'])){
- echo '<option selected="selected" value="All">' . _('All');
+ echo '<option selected="selected" value="All">' . _('All') . '</option>';
$_POST['StockCat'] ='All';
} else {
- echo '<option value="All">' . _('All');
+ echo '<option value="All">' . _('All') . '</option>';
}
$SQL="SELECT categoryid,
categorydescription
@@ -1644,21 +1661,24 @@
<td style="text-align:center" colspan="1"><input tabindex="4" type="submit" name="Search" value="' . _('Search Now') . '" /></td>
<td style="text-align:center" colspan="1"><input tabindex="5" type="submit" name="QuickEntry" value="' . _('Use Quick Entry') . '" /></td>';
- if (!isset($_POST['PartSearch'])) {
- echo '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.Keywords);}</script>';
- }
if (in_array(2,$_SESSION['AllowedPageSecurityTokens'])){ //not a customer entry of own order
echo '<td style="text-align:center" colspan="1"><input tabindex="6" type="submit" name="ChangeCustomer" value="' . _('Change Customer') . '" /></td>
- <td style="text-align:center" colspan="1"><input tabindex="7" type="submit" name="SelectAsset" value="' . _('Fixed Asset Disposal') . '" /></td>
- </tr></table><br />';
+ <td style="text-align:center" colspan="1"><input tabindex="7" type="submit" name="SelectAsset" value="' . _('Fixed Asset Disposal') . '" /></td>';
}
+ echo '</tr></table><br />';
+ echo '</div>
+ </form>';
+ if (!isset($_POST['PartSearch'])) {
+ echo '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.Keywords);}</script>';
+ }
if (isset($SearchResult)) {
echo '<br />';
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') . '?identifier='.$identifier . '" method="post" name="orderform">';
+ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier . '" method="post" id="orderform">';
+ echo '<div>';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
echo '<table class="table1">';
echo '<tr><td colspan="1"><input type="hidden" name="previous" value="'.strval($Offset-1).'" /><input tabindex="'.strval($j+8).'" type="submit" name="Prev" value="'._('Prev').'" /></td>';
@@ -1762,7 +1782,7 @@
<td class="number">%s</td>
<td class="number">%s</td>
<td class="number">%s</td>
- <td><font size="1"><input class="number" tabindex="'.strval($j+7).'" type="textbox" size="6" name="OrderQty'. $i . '" value="0" />
+ <td><input class="number" tabindex="'.strval($j+7).'" type="text" size="6" name="OrderQty'. $i . '" value="0" />
<input type="hidden" name="StockID'. $i . '" value="' . $myrow['stockid']. '" />
</td>
</tr>',
@@ -1781,10 +1801,12 @@
#end of page full new headings if
}
#end of while loop
- echo '<tr><td><input type="hidden" name="previous" value="'. strval($Offset-1).'"><input tabindex="'. strval($j+7).'" type="submit" name="Prev" value="'._('Prev').'" /></td>';
+ echo '<tr><td><input type="hidden" name="previous" value="'. strval($Offset-1).'" /><input tabindex="'. strval($j+7).'" type="submit" name="Prev" value="'._('Prev').'" /></td>';
echo '<td style="text-align:center" colspan="6"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'. strval($j+8).'" type="submit" value="'._('Add to Sales Order').'" /></td>';
echo '<td><input type="hidden" name="nextlist" value="'.strval($Offset+1).'" /><input tabindex="'.strval($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td></tr>';
- echo '</table></form>';
+ echo '</table>
+ </div>
+ </form>';
echo $jsCall;
}#end if SearchResults to show
@@ -1815,11 +1837,13 @@
<td><input type="text" class="date" name="itemdue_' . $i . '" size="25" maxlength="25"
alt="'.$_SESSION['DefaultDateFormat'].'" value="' . $DefaultDeliveryDate . '" /></td></tr>';
}
- echo '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.part_1);}</script>';
+ echo '</table><script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.part_1);}</script>';
- echo '</table><br /><div class="centre"><input type="submit" name="QuickEntry" value="' . _('Quick Entry') . '" />
+ echo '<br /><div class="centre"><input type="submit" name="QuickEntry" value="' . _('Quick Entry') . '" />
<input type="submit" name="PartSearch" value="' . _('Search Parts') . '" /></div>';
+ echo '</div>
+ </form>';
} elseif (isset($_POST['SelectAsset'])){
echo '<div class="page_help_text"><b>' . _('Use this screen to select an asset to dispose of to this customer') . '</b></div><br />
@@ -1840,6 +1864,8 @@
<br /><div class="centre"><input type="submit" name="AssetDisposalEntered" value="' . _('Add Asset To Order') . '" />
<input type="submit" name="PartSearch" value="' . _('Search Parts') . '" /></div>';
+ echo '</div>
+ </form>';
} //end of if it is a Quick Entry screen/part search or asset selection form to display
if ($_SESSION['Items'.$identifier]->ItemsOrdered >=1){
@@ -1847,7 +1873,6 @@
}
}#end of else not selecting a customer
-echo '</form>';
if (isset($_GET['NewOrder']) and $_GET['NewOrder']!='') {
echo '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectCustomer.CustKeywords);}</script>';
Modified: trunk/SelectProduct.php
===================================================================
--- trunk/SelectProduct.php 2012-04-10 22:05:59 UTC (rev 5238)
+++ trunk/SelectProduct.php 2012-04-12 07:43:22 UTC (rev 5239)
@@ -36,7 +36,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;
}
@@ -71,18 +71,18 @@
$Its_A_Kitset = false;
$Its_A_Labour_Item = false;
if ($myrow['discontinued']==1){
- $ItemStatus = '<font class="bad">' ._('Obsolete') . '</font>';
+ $ItemStatus = '<p class="bad">' ._('Obsolete') . '</p>';
} else {
$ItemStatus = '';
}
echo '<table width="90%">
<tr>
- <th colspan="3"><img src="' . $rootpath . '/css/' . $theme . '/images/inventory.png" title="' . _('Inventory') . '" alt="" /><b>' . ' ' . $StockID . ' - ' . $myrow['description'] . ' ' . $ItemStatus . '</b></th>
+ <th colspan="3"><img src="' . $rootpath . '/css/' . $theme . '/images/inventory.png" title="' . _('Inventory') . '" alt="" /><b>' . ' ' . $StockID . ' - ' . $myrow['description'] . '</b> ' . $ItemStatus . '</th>
</tr>';
echo '<tr>
- <td width="40%" valign="top">
- <table align="left">'; //nested table
+ <td style="width:40%" valign="top">
+ <table>'; //nested table
echo '<tr><th class="number">' . _('Item Type:') . '</th>
<td colspan="2" class="select">';
switch ($myrow['mbflag']) {
@@ -194,12 +194,12 @@
} else {
$Cost = $myrow['cost'];
}
- echo '<th class="number">' . _('Cost') . '</th>
- <td class="select">' . locale_number_format($Cost, $_SESSION['StandardCostDecimalPlaces']) . '</td>';
+ echo '<tr><th class="number">' . _('Cost') . '</th>
+ <td class="select">' . locale_number_format($Cost, $_SESSION['StandardCostDecimalPlaces']) . '</td></tr>';
} //end of if PricesSecuirty allows viewing of prices
echo '</table>'; //end of first nested table
// Item Category Property mod: display the item properties
- echo '<table align="left">';
+ echo '<table>';
$CatValResult = DB_query("SELECT categoryid
FROM stockmaster
WHERE stockid='" . $StockID . "'", $db);
@@ -226,11 +226,11 @@
echo '<tr><th align="right">' . $PropertyRow['label'] . ':</th>';
switch ($PropertyRow['controltype']) {
case 0; //textbox
- echo '<td class="select" width="60"><in...
[truncated message content] |