|
From: <dai...@us...> - 2013-08-30 21:08:40
|
Revision: 6312
http://sourceforge.net/p/web-erp/reponame/6312
Author: daintree
Date: 2013-08-30 21:08:37 +0000 (Fri, 30 Aug 2013)
Log Message:
-----------
autofocusing
Modified Paths:
--------------
trunk/AccountSections.php
trunk/CounterReturns.php
trunk/FixedAssetLocations.php
trunk/GetStockImage.php
trunk/SelectCustomer.php
trunk/SelectOrderItems.php
trunk/StockLocTransfer.php
trunk/SupplierPriceList.php
trunk/SupplierTenderCreate.php
trunk/WhereUsedInquiry.php
Modified: trunk/AccountSections.php
===================================================================
--- trunk/AccountSections.php 2013-08-29 10:43:46 UTC (rev 6311)
+++ trunk/AccountSections.php 2013-08-30 21:08:37 UTC (rev 6312)
@@ -263,16 +263,10 @@
<td colspan="2"><div class="centre"><input tabindex="3" type="submit" name="submit" value="' . _('Enter Information') . '" /></div></td>
</tr>
</table>
- <br />';
+ <br />
+ </div>
+ </form>';
- if (!isset($_GET['SelectedSectionID']) or $_GET['SelectedSectionID']=='') {
- echo '<script type="text/javascript">defaultControl(document.AccountSections.SectionID);</script>';
- } else {
- echo '<script type="text/javascript">defaultControl(document.AccountSections.SectionName);</script>';
- }
- echo '</div>';
- echo '</form>';
-
} //end if record deleted no point displaying form to add record
include('includes/footer.inc');
Modified: trunk/CounterReturns.php
===================================================================
--- trunk/CounterReturns.php 2013-08-29 10:43:46 UTC (rev 6311)
+++ trunk/CounterReturns.php 2013-08-30 21:08:37 UTC (rev 6312)
@@ -1633,7 +1633,7 @@
</select></td>
<td><b><?php echo _('Enter partial Description'); ?>:</b>
- <input tabindex="2" type="text" name="Keywords" autofocus="autofocus" size="20" maxlength="25" value="<?php if (isset($_POST['Keywords'])) echo $_POST['Keywords']; ?>" /></td>
+ <input tabindex="2" type="text" name="Keywords" <?php isset($SearchResult)? '': 'autofocus="autofocus"' ?> size="20" maxlength="25" value="<?php if (isset($_POST['Keywords'])) echo $_POST['Keywords']; ?>" /></td>
<td align="right"><b><?php echo _('OR'); ?> </b><b><?php echo _('Enter extract of the Stock Code'); ?>:</b>
<input tabindex="3" type="text" name="StockCode" size="15" maxlength="18" value="<?php if (isset($_POST['StockCode'])) echo $_POST['StockCode']; ?>" /></td>
@@ -1757,7 +1757,7 @@
<td class="number">%s</td>
<td class="number">%s</td>
<td class="number">%s</td>
- <td><input class="number" tabindex="'.strval($j+7).'" type="number" required="required" size="6" name="ReturnQty%s" value="0" /></font><input type="hidden" name="StockID%s" value="%s" /></td>
+ <td><input class="number" tabindex="'.strval($j+7).'" type="text" required="required" ' . ($i==0?'autofocus="autofocus"':'') . ' size="6" name="ReturnQty%s" value="0" /><input type="hidden" name="StockID%s" value="%s" /></td>
</tr>',
$myrow['stockid'],
$myrow['longdescription'],
@@ -1770,26 +1770,26 @@
$i,
$i,
$myrow['stockid']);
- if ($j==1) {
- $jsCall = '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.itm'.$myrow['stockid'].');}</script>';
- }
$j++;
$i++;
#end of page full new headings if
}
#end of while loop
- echo '<input type="hidden" name="CustRef" value="'.$_SESSION['Items' . $identifier]->CustRef.'" />';
- echo '<input type="hidden" name="Comments" value="'.$_SESSION['Items' . $identifier]->Comments.'" />';
- echo '<input type="hidden" name="DeliverTo" value="'.$_SESSION['Items' . $identifier]->DeliverTo.'" />';
- echo '<input type="hidden" name="PhoneNo" value="'.$_SESSION['Items' . $identifier]->PhoneNo.'" />';
- echo '<input type="hidden" name="Email" value="'.$_SESSION['Items' . $identifier]->Email.'" />';
-
- 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="SelectingReturnItems" value="1" /><input tabindex="'.strval($j+8).'" type="submit" value="'._('Add to Sale').'" /></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 $jsCall;
-
+ echo '<input type="hidden" name="CustRef" value="'.$_SESSION['Items' . $identifier]->CustRef.'" />
+ <input type="hidden" name="Comments" value="'.$_SESSION['Items' . $identifier]->Comments.'" />
+ <input type="hidden" name="DeliverTo" value="'.$_SESSION['Items' . $identifier]->DeliverTo.'" />
+ <input type="hidden" name="PhoneNo" value="'.$_SESSION['Items' . $identifier]->PhoneNo.'" />
+ <input type="hidden" name="Email" value="'.$_SESSION['Items' . $identifier]->Email.'" />
+ <tr>
+ <td><input type="hidden" name="previous" value="'.strval($Offset-1).'" />
+ <input tabindex="'.strval($j+7).'" type="submit" name="Prev" value="'._('Prev').'" /></td>
+ <td style="text-align:center" colspan="6"><input type="hidden" name="SelectingReturnItems" value="1" />
+ <input tabindex="'.strval($j+8).'" type="submit" value="'._('Add to Sale').'" /></td>
+ <td><input type="hidden" name="NextList" value="'.strval($Offset+1).'" />
+ <input tabindex="'.strval($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td>
+ </tr>
+ </table>
+ </form>';
}#end if SearchResults to show
} /*end of PartSearch options to be displayed */
else { /* show the quick entry form variable */
@@ -1803,11 +1803,11 @@
</tr>';
$ReturnDate = Date($_SESSION['DefaultDateFormat']);
if (count($_SESSION['Items' . $identifier]->LineItems)==0) {
- echo '<input type="hidden" name="CustRef" value="'.$_SESSION['Items' . $identifier]->CustRef.'" />';
- echo '<input type="hidden" name="Comments" value="'.$_SESSION['Items' . $identifier]->Comments.'" />';
- echo '<input type="hidden" name="DeliverTo" value="'.$_SESSION['Items' . $identifier]->DeliverTo.'" />';
- echo '<input type="hidden" name="PhoneNo" value="'.$_SESSION['Items' . $identifier]->PhoneNo.'" />';
- echo '<input type="hidden" name="Email" value="'.$_SESSION['Items' . $identifier]->Email.'" />';
+ echo '<input type="hidden" name="CustRef" value="'.$_SESSION['Items' . $identifier]->CustRef.'" />
+ <input type="hidden" name="Comments" value="'.$_SESSION['Items' . $identifier]->Comments.'" />
+ <input type="hidden" name="DeliverTo" value="'.$_SESSION['Items' . $identifier]->DeliverTo.'" />
+ <input type="hidden" name="PhoneNo" value="'.$_SESSION['Items' . $identifier]->PhoneNo.'" />
+ <input type="hidden" name="Email" value="'.$_SESSION['Items' . $identifier]->Email.'" />';
}
for ($i=1;$i<=$_SESSION['QuickEntries'];$i++){
@@ -1835,4 +1835,4 @@
}
echo '</form>';
include('includes/footer.inc');
-?>
\ No newline at end of file
+?>
Modified: trunk/FixedAssetLocations.php
===================================================================
--- trunk/FixedAssetLocations.php 2013-08-29 10:43:46 UTC (rev 6311)
+++ trunk/FixedAssetLocations.php 2013-08-30 21:08:37 UTC (rev 6312)
@@ -25,9 +25,9 @@
}
if ($InputError==0) {
$sql="INSERT INTO fixedassetlocations
- VALUES ('".$_POST['LocationID']."',
- '".$_POST['LocationDescription']."',
- '".$_POST['ParentLocationID']."')";
+ VALUES ('".$_POST['LocationID']."',
+ '".$_POST['LocationDescription']."',
+ '".$_POST['ParentLocationID']."')";
$result=DB_query($sql, $db);
}
}
@@ -95,9 +95,9 @@
if (DB_num_rows($result) > 0) {
echo '<table class="selection">
<tr>
- <th>' . _('Location ID') . '</th>
- <th>' . _('Location Description') . '</th>
- <th>' . _('Parent Location') . '</th>
+ <th class="ascending">' . _('Location ID') . '</th>
+ <th class="ascending">' . _('Location Description') . '</th>
+ <th class="ascending">' . _('Parent Location') . '</th>
</tr>';
}
while ($myrow=DB_fetch_array($result)) {
@@ -165,4 +165,4 @@
</form>';
include('includes/footer.inc');
-?>
\ No newline at end of file
+?>
Modified: trunk/GetStockImage.php
===================================================================
--- trunk/GetStockImage.php 2013-08-29 10:43:46 UTC (rev 6311)
+++ trunk/GetStockImage.php 2013-08-30 21:08:37 UTC (rev 6312)
@@ -147,7 +147,7 @@
$Title = _('Stock Image Retrieval ....');
include('includes/header.inc');
prnMsg( _('The Image could not be retrieved because it does not exist'), 'error');
- echo '<br /><a href="' .$RootPath .'/index.php?' . SID . '">' . _('Back to the menu'). '</a>';
+ echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu'). '</a>';
include('includes/footer.inc');
exit;
}
@@ -352,4 +352,4 @@
$func($im);
// Destroy image
imagedestroy($im);
-?>
\ No newline at end of file
+?>
Modified: trunk/SelectCustomer.php
===================================================================
--- trunk/SelectCustomer.php 2013-08-29 10:43:46 UTC (rev 6311)
+++ trunk/SelectCustomer.php 2013-08-30 21:08:37 UTC (rev 6312)
@@ -732,6 +732,5 @@
}
} //end if Extended_CustomerInfo is turned on
} //end if isset($_SESSION['CustomerID']) AND $_SESSION['CustomerID'] != ''
-echo '<script type="text/javascript">defaultControl(document.forms[0].CustCode);</script>';
include('includes/footer.inc');
?>
Modified: trunk/SelectOrderItems.php
===================================================================
--- trunk/SelectOrderItems.php 2013-08-29 10:43:46 UTC (rev 6311)
+++ trunk/SelectOrderItems.php 2013-08-30 21:08:37 UTC (rev 6312)
@@ -1369,8 +1369,8 @@
if($_SESSION['Items'.$identifier]->DefaultPOLine == 1){
echo '<th>' . _('PO Line') . '</th>';
}
- echo '<th class="ascending" >' . _('Item Code') . '</th>
- <th class="ascending" >' . _('Item Description') . '</th>
+ echo '<th>' . _('Item Code') . '</th>
+ <th>' . _('Item Description') . '</th>
<th>' . _('Quantity') . '</th>
<th>' . _('QOH') . '</th>
<th>' . _('Unit') . '</th>
@@ -1378,10 +1378,10 @@
if (in_array($_SESSION['PageSecurityArray']['OrderEntryDiscountPricing'], $_SESSION['AllowedPageSecurityTokens'])){
echo '<th>' . _('Discount') . '</th>
- <th>' . _('GP %') . '</th>';
+ <th>' . _('GP %') . '</th>';
}
echo '<th>' . _('Total') . '</th>
- <th>' . _('Due Date') . '</th></tr>';
+ <th>' . _('Due Date') . '</th></tr>';
$_SESSION['Items'.$identifier]->total = 0;
$_SESSION['Items'.$identifier]->totalVolume = 0;
@@ -1453,7 +1453,8 @@
if ($_SESSION['AllowOrderLineItemNarrative'] == 1){
echo $RowStarter;
- echo '<td colspan="10">' . _('Narrative') . ':<textarea name="Narrative_' . $OrderLine->LineNumber . '" cols="100%" rows="1" title="' . _('Enter any narrative to describe to the customer the nature of the charge for this line') . '" >' . stripslashes(AddCarriageReturns($OrderLine->Narrative)) . '</textarea><br /></td></tr>';
+ echo '<td colspan="10">' . _('Narrative') . ':<textarea name="Narrative_' . $OrderLine->LineNumber . '" cols="100%" rows="1" title="' . _('Enter any narrative to describe to the customer the nature of the charge for this line') . '" >' . stripslashes(AddCarriageReturns($OrderLine->Narrative)) . '</textarea><br /></td>
+ </tr>';
} else {
echo '<tr>
<td><input type="hidden" name="Narrative" value="" /></td>
@@ -1480,18 +1481,17 @@
$DisplayVolume = locale_number_format($_SESSION['Items'.$identifier]->totalVolume,2);
$DisplayWeight = locale_number_format($_SESSION['Items'.$identifier]->totalWeight,2);
- echo '<table><tr class="EvenTableRows"><td>' . _('Total Weight') . ':</td>
+ echo '<table>
+ <tr class="EvenTableRows"><td>' . _('Total Weight') . ':</td>
<td>' . $DisplayWeight . '</td>
<td>' . _('Total Volume') . ':</td>
<td>' . $DisplayVolume . '</td>
</tr>
- </table>';
-
-
- echo '<br />
+ </table>
+ <br />
<div class="centre">
- <input type="submit" name="Recalculate" value="' . _('Re-Calculate') . '" />
- <input type="submit" name="DeliveryDetails" value="' . _('Enter Delivery Details and Confirm Order') . '" />
+ <input type="submit" name="Recalculate" value="' . _('Re-Calculate') . '" />
+ <input type="submit" name="DeliveryDetails" value="' . _('Enter Delivery Details and Confirm Order') . '" />
</div>
<br />';
} # end of if lines
@@ -1530,18 +1530,17 @@
<div class="page_help_text">' . _('Frequently Ordered Items') . _(', shows the most frequently ordered items in the last 6 months. You can choose from this list, or search further for other items') .
'.</div>
<br />
- <table class="table1">';
-
- echo '<tr>
- <th class="ascending" >' . _('Code') . '</th>
- <th class="ascending" >' . _('Description') . '</th>
- <th>' . _('Units') . '</th>
- <th class="ascending" >' . _('On Hand') . '</th>
- <th class="ascending" >' . _('On Demand') . '</th>
- <th class="ascending" >' . _('On Order') . '</th>
- <th class="ascending" >' . _('Available') . '</th>
- <th class="ascending" >' . _('Quantity') . '</th>
- </tr>';
+ <table class="table1">
+ <tr>
+ <th class="ascending" >' . _('Code') . '</th>
+ <th class="ascending" >' . _('Description') . '</th>
+ <th>' . _('Units') . '</th>
+ <th class="ascending" >' . _('On Hand') . '</th>
+ <th class="ascending" >' . _('On Demand') . '</th>
+ <th class="ascending" >' . _('On Order') . '</th>
+ <th class="ascending" >' . _('Available') . '</th>
+ <th class="ascending" >' . _('Quantity') . '</th>
+ </tr>';
$i=0;
$j=1;
$k=0; //row colour counter
@@ -1628,7 +1627,7 @@
<td class="number">%s</td>
<td class="number">%s</td>
<td class="number">%s</td>
- <td><input class="number" tabindex="%s" type="text" required="required" size="6" name="OrderQty%s" value="0" />
+ <td><input class="number" ' . ($i==0 ? 'autofocus="autofocus"':'') . ' tabindex="%s" type="text" required="required" size="6" name="OrderQty%s" value="0" />
<input type="hidden" name="StockID%s" value="%s" />
</td>
</tr>',
@@ -1645,16 +1644,7 @@
$i,
$i,
$myrow['stockid']);
-
- if ($j==1) {
- $jsCall = '<script type="text/javascript">
- if (document.getElementById("SelectParts")!=null {
- defaultControl(document.SelectParts.itm'.$myrow['stockid'].');
- }
- </script>';
- }
$i++;
- $j++;
#end of page full new headings if
}
#end of while loop for Frequently Ordered Items
@@ -1698,7 +1688,7 @@
}
echo '" /></td>';
- echo '<td align="right"><b>' . _('OR') . ' ' . _('Enter extract of the Stock Code') . ':</b><input tabindex="3" type="text" autofocus="autofocus" name="StockCode" size="15" maxlength="18" value="';
+ echo '<td align="right"><b>' . _('OR') . ' ' . _('Enter extract of the Stock Code') . ':</b><input tabindex="3" type="text" ' . (!isset($_POST['PartSearch']) ? 'autofocus="autofocus"' :'') . ' name="StockCode" size="15" maxlength="18" value="';
if (isset($_POST['StockCode'])) {
echo $_POST['StockCode'];
}
@@ -1713,13 +1703,10 @@
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>';
}
- echo '</tr></table><br />';
- echo '</div>';
- if (!isset($_POST['PartSearch'])) {
- echo '<script type="text/javascript">
- defaultControl(document.forms[0].Keywords);
- </script>';
- }
+ echo '</tr>
+ </table>
+ <br />
+ </div>';
if (isset($SearchResult)) {
echo '<br />';
echo '<div class="page_help_text">' . _('Select an item by entering the quantity required. Click Order when ready.') . '</div>';
@@ -1830,7 +1817,7 @@
<td class="number">%s</td>
<td class="number">%s</td>
<td class="number">%s</td>
- <td><input class="number" tabindex="%s" type="text" size="6" name="OrderQty%s" value="0" min="0"/>
+ <td><input class="number" tabindex="%s" type="text" size="6" name="OrderQty%s" ' . ($i==0 ? 'autofocus="autofocus"':'') . ' value="0" min="0"/>
<input type="hidden" name="StockID%s" value="%s" />
</td>
</tr>',
@@ -1847,9 +1834,6 @@
$i,
$myrow['stockid'] );
$i++;
- if ($j==1) {
- $jsCall = '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.itm'.$myrow['stockid'].');}</script>';
- }
$j++;
#end of page full new headings if
}
@@ -1889,46 +1873,59 @@
echo '<td><input type="text" name="part_' . $i . '" size="21" maxlength="20" title="' . _('Enter the item code ordered') . '" /></td>
<td><input class="number" type="text" name="qty_' . $i . '" size="6" maxlength="6" title="' . _('Enter the quantity of the item ordered by the customer') . '" /></td>
<td><input type="text" class="date" name="itemdue_' . $i . '" size="25" maxlength="25"
- alt="'.$_SESSION['DefaultDateFormat'].'" value="' . $DefaultDeliveryDate . '" title="' . _('Enter the date that the customer requires delivery by') . '" /></td></tr>';
+ alt="'.$_SESSION['DefaultDateFormat'].'" value="' . $DefaultDeliveryDate . '" title="' . _('Enter the date that the customer requires delivery by') . '" /></td>
+ </tr>';
}
echo '</table>
- <script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.part_1);}</script>';
-
- echo '<br /><div class="centre"><input type="submit" name="QuickEntry" value="' . _('Quick Entry') . '" />
- <input type="submit" name="PartSearch" value="' . _('Search Parts') . '" /></div>';
-
- echo '</div>
+ <br />
+ <div class="centre">
+ <input type="submit" name="QuickEntry" value="' . _('Quick Entry') . '" />
+ <input type="submit" name="PartSearch" value="' . _('Search Parts') . '" />
+ </div>
+ </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 />
+ echo '<div class="page_help_text"><b>' . _('Use this screen to select an asset to dispose of to this customer') . '</b></div>
+ <br />
<table border="1">';
/*do not display colum unless customer requires po line number by sales order line*/
if($_SESSION['Items'.$identifier]->DefaultPOLine ==1){
- echo '<tr><td>' . _('PO Line') . '</td>
- <td><input type="text" name="poline" size="21" maxlength="20" title="' . _('Enter the customer\'s purchase order reference') . '" /></td></tr>';
+ echo '<tr>
+ <td>' . _('PO Line') . '</td>
+ <td><input type="text" name="poline" size="21" maxlength="20" title="' . _('Enter the customer\'s purchase order reference') . '" /></td>
+ </tr>';
}
- echo '<tr><td>' . _('Asset to Dispose Of') . ':</td>
- <td><select name="AssetToDisposeOf">';
+ echo '<tr>
+ <td>' . _('Asset to Dispose Of') . ':</td>
+ <td><select name="AssetToDisposeOf">';
$AssetsResult = DB_query("SELECT assetid, description FROM fixedassets WHERE disposaldate='0000-00-00'",$db);
echo '<option selected="selected" value="NoAssetSelected">' . _('Select Asset To Dispose of From the List Below') . '</option>';
while ($AssetRow = DB_fetch_array($AssetsResult)){
echo '<option value="' . $AssetRow['assetid'] . '">' . $AssetRow['assetid'] . ' - ' . $AssetRow['description'] . '</option>';
}
- echo '</select></td></tr></table>
- <br /><div class="centre"><input type="submit" name="AssetDisposalEntered" value="' . _('Add Asset To Order') . '" />
- <input type="submit" name="PartSearch" value="' . _('Search Parts') . '" /></div>';
+ echo '</select></td>
+ </tr>
+ </table>
+ <br />
+ <div class="centre">
+ <input type="submit" name="AssetDisposalEntered" value="' . _('Add Asset To Order') . '" />
+ <input type="submit" name="PartSearch" value="' . _('Search Parts') . '" />
+ </div>
+ </form>';
- 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){
echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier .
'" method="post" name="deleteform">';
echo '<div>';
- echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
- echo '<br /><div class="centre"><input type="submit" name="CancelOrder" value="' . _('Cancel Whole Order') . '" onclick="return confirm(\'' . _('Are you sure you wish to cancel this entire order?') . '\');" /></div></form>';
+ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />
+ <br />
+ <div class="centre">
+ <input type="submit" name="CancelOrder" value="' . _('Cancel Whole Order') . '" onclick="return confirm(\'' . _('Are you sure you wish to cancel this entire order?') . '\');" />
+ </div>
+ </form>';
}
}#end of else not selecting a customer
Modified: trunk/StockLocTransfer.php
===================================================================
--- trunk/StockLocTransfer.php 2013-08-29 10:43:46 UTC (rev 6311)
+++ trunk/StockLocTransfer.php 2013-08-30 21:08:37 UTC (rev 6312)
@@ -298,18 +298,15 @@
<td>' . _('Upload CSV file of Transfer Items and Quantites') . ':</td>
<td><input name="SelectedTransferFile" type="file" /></td>
</tr>
- </table>';
+ </table>
+ <br />
+ <table class="selection">
+ <tr>
+ <th>' . _('Item Code'). '</th>
+ <th>' . _('Quantity'). '</th>
+ <th>' . _('Clear All') . ':<input type="checkbox" name="ClearAll" /></th>
+ </tr>';
- echo '<br /><table class="selection">';
-
- $TableHeader = '<tr>
- <th>' . _('Item Code'). '</th>
- <th>' . _('Quantity'). '</th>
- <th>' . _('Clear All') . ':<input type="checkbox" name="ClearAll" /></th>
- </tr>';
- echo $TableHeader;
-
- $k=0; /* page heading row counter */
$j=0; /* row counter for reindexing */
if(isset($_POST['LinesCounter'])){
@@ -320,20 +317,15 @@
if ($_POST['StockID' . $i] ==''){
break;
}
- if ($k==18){
- echo $TableHeader;
- $k=0;
- }
- $k++;
echo '<tr>
- <td><input type="text" name="StockID' . $j .'" size="21" maxlength="20" value="' . $_POST['StockID' . $i] . '" /></td>
- <td><input type="text" name="StockQTY' . $j .'" size="10" maxlength="10" class="number" value="' . locale_number_format($_POST['StockQTY' . $i],'Variable') . '" /></td>
- <td>' . _('Delete') . '<input type="checkbox" name="Delete' . $j .'" /></td>
- </tr>';
+ <td><input type="text" name="StockID' . $j .'" size="21" maxlength="20" value="' . $_POST['StockID' . $i] . '" /></td>
+ <td><input type="text" name="StockQTY' . $j .'" size="10" maxlength="10" class="number" value="' . locale_number_format($_POST['StockQTY' . $i],'Variable') . '" /></td>
+ <td>' . _('Delete') . '<input type="checkbox" name="Delete' . $j .'" /></td>
+ </tr>';
$j++;
}
- }else {
+ } else {
$j = 0;
}
// $i is incremented an extra time, so 9 to get 10...
@@ -347,9 +339,9 @@
$_POST['StockQTY' . $j]=0;
}
echo '<tr>
- <td><input type="text" name="StockID' . $j .'" size="21" maxlength="20" value="' . $_POST['StockID' . $j] . '" /></td>
- <td><input type="text" name="StockQTY' . $j .'" size="10" maxlength="10" class="number" value="' . locale_number_format($_POST['StockQTY' . $j]) . '" /></td>
- </tr>';
+ <td><input type="text" name="StockID' . $j .'" ' . ($j==0 OR $j==$z-9 ? 'autofocus="autofocus"' : '') . ' size="21" maxlength="20" value="' . $_POST['StockID' . $j] . '" /></td>
+ <td><input type="text" name="StockQTY' . $j .'" size="10" maxlength="10" class="number" value="' . locale_number_format($_POST['StockQTY' . $j]) . '" /></td>
+ </tr>';
$j++;
}
@@ -359,13 +351,10 @@
<input type="hidden" name="LinesCounter" value="'. $j .'" />
<input type="submit" name="EnterMoreItems" value="'. _('Add More Items'). '" />
<input type="submit" name="Submit" value="'. _('Create Transfer Shipment'). '" />
- <br />';
-
- echo '<script type="text/javascript">defaultControl(document.forms[0].StockID' . (int)($j-9) . ');</script>';
-
- echo '</div>
- </div>
- </form>';
+ <br />
+ </div>
+ </div>
+ </form>';
include('includes/footer.inc');
}
-?>
\ No newline at end of file
+?>
Modified: trunk/SupplierPriceList.php
===================================================================
--- trunk/SupplierPriceList.php 2013-08-29 10:43:46 UTC (rev 6311)
+++ trunk/SupplierPriceList.php 2013-08-30 21:08:37 UTC (rev 6312)
@@ -7,15 +7,14 @@
include ('includes/header.inc');
if (isset($_POST['StockSearch'])) {
- echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">';
- echo '<div>';
- echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
- echo '<input type="hidden" value="' . $_POST['SupplierID'] . '" name="SupplierID" />';
-
- echo '<p class="page_title_text"><img src="' . $RootPath . '/css/' . $Theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for Inventory Items'). '</p>';
- echo '<table class="selection"><tr>';
- echo '<td>' . _('In Stock Category') . ':';
- echo '<select name="StockCat">';
+ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">
+ <div>
+ <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />
+ <input type="hidden" value="' . $_POST['SupplierID'] . '" name="SupplierID" />
+ <p class="page_title_text"><img src="' . $RootPath . '/css/' . $Theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for Inventory Items'). '</p>
+ <table class="selection">
+ <tr>
+ <td>' . _('In Stock Category') . ':<select name="StockCat">';
if (!isset($_POST['StockCat'])) {
$_POST['StockCat'] = '';
}
@@ -39,23 +38,31 @@
echo '</select></td>';
echo '<td>' . _('Enter partial') . '<b> ' . _('Description') . '</b>:</td><td>';
if (isset($_POST['Keywords'])) {
- echo '<input type="search" name="Keywords" value="' . $_POST['Keywords'] . '" size="34" maxlength="25" />';
+ echo '<input type="search" name="Keywords" value="' . $_POST['Keywords'] . '" autofocus="autofocus" size="34" maxlength="25" />';
} else {
- echo '<input type="search" name="Keywords" size="34" maxlength="25" placeholder="Enter part of the item description" />';
+ echo '<input type="search" name="Keywords" size="34" maxlength="25" autofocus="autofocus" placeholder="Enter part of the item description" />';
}
- echo '</td></tr><tr><td></td>';
- echo '<td><b>' . _('OR') . ' ' . '</b>' . _('Enter partial') . ' <b>' . _('Stock Code') . '</b>:</td>';
- echo '<td>';
+ echo '</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td><b>' . _('OR') . ' ' . '</b>' . _('Enter partial') . ' <b>' . _('Stock Code') . '</b>:</td>
+ <td>';
if (isset($_POST['StockCode'])) {
echo '<input type="text" name="StockCode" value="' . $_POST['StockCode'] . '" size="15" maxlength="18" />';
} else {
echo '<input type="text" name="StockCode" size="15" maxlength="18" />';
}
- echo '</td></tr></table><br />';
- echo '<div class="centre"><input type="submit" name="Search" value="' . _('Search Now') . '" /></div><br />';
- echo '<script type="text/javascript">defaultControl(document.forms[0].StockCode);</script>';
- echo '</div>
- </form>';
+ echo '</td>
+ </tr>
+ </table>
+ <br />
+ <div class="centre">
+ <input type="submit" name="Search" value="' . _('Search Now') . '" />
+ </div>
+ <br />
+ </div>
+ </form>';
include('includes/footer.inc');
exit;
}
@@ -215,10 +222,10 @@
/* display list if there is more than one record */
if (isset($searchresult) AND !isset($_POST['Select'])) {
echo '<p class="page_title_text"><img src="' . $RootPath . '/css/' . $Theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for Inventory Items'). '</p>';
- echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">';
- echo '<div>';
- echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
- echo '<input type="hidden" value="' . $_POST['SupplierID'] . '" name="SupplierID" />';
+ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">
+ <div>
+ <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />
+ <input type="hidden" value="' . $_POST['SupplierID'] . '" name="SupplierID" />';
$ListCount = DB_num_rows($searchresult);
if ($ListCount > 0) {
// If the user hit the search button and there is more than one item to show
@@ -260,8 +267,8 @@
}
echo '<table class="selection">';
echo'<tr>
- <th>' . _('Code') . '</th>
- <th>' . _('Description') . '</th>
+ <th class="ascending">' . _('Code') . '</th>
+ <th class="ascending">' . _('Description') . '</th>
<th>' . _('Units') . '</th>
</tr>';
$j = 1;
@@ -602,4 +609,4 @@
exit;
}
-?>
\ No newline at end of file
+?>
Modified: trunk/SupplierTenderCreate.php
===================================================================
--- trunk/SupplierTenderCreate.php 2013-08-29 10:43:46 UTC (rev 6311)
+++ trunk/SupplierTenderCreate.php 2013-08-30 21:08:37 UTC (rev 6312)
@@ -421,11 +421,13 @@
/* Item Details
*/
echo '<td valign="top"><table class="selection">';
- echo '<tr><th colspan="6"><h3>' . _('Items in Tender') . '</h3></th></tr>';
echo '<tr>
- <th>' . _('Stock ID') . '</th>
- <th>' . _('Description') . '</th>
- <th>' . _('Quantity') . '</th>
+ <th colspan="6"><h3>' . _('Items in Tender') . '</h3></th>
+ </tr>
+ <tr>
+ <th class="ascending">' . _('Stock ID') . '</th>
+ <th class="ascending">' . _('Description') . '</th>
+ <th class="ascending">' . _('Quantity') . '</th>
<th>' . _('UOM') . '</th>
</tr>';
$k=0;
@@ -439,16 +441,19 @@
$k=1;
}
echo '<td>' . $LineItems->StockID . '</td>
- <td>' . $LineItems->ItemDescription . '</td>
- <td class="number">' . locale_number_format($LineItems->Quantity,$LineItems->DecimalPlaces) . '</td>
- <td>' . $LineItems->Units . '</td>
- <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'].'?identifier='.$identifier,ENT_QUOTES,'UTF-8') . '&DeleteItem=' . $LineItems->LineNo . '">' . _('Delete') . '</a></td>
+ <td>' . $LineItems->ItemDescription . '</td>
+ <td class="number">' . locale_number_format($LineItems->Quantity,$LineItems->DecimalPlaces) . '</td>
+ <td>' . $LineItems->Units . '</td>
+ <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'].'?identifier='.$identifier,ENT_QUOTES,'UTF-8') . '&DeleteItem=' . $LineItems->LineNo . '">' . _('Delete') . '</a></td>
</tr>';
}
}
- echo '</table></td></tr></table><br />';
-
- echo '<div class="centre">
+ echo '</table>
+ </td>
+ </tr>
+ </table>
+ <br />
+ <div class="centre">
<input type="submit" name="Suppliers" value="' . _('Select Suppliers') . '" />
<input type="submit" name="Items" value="' . _('Select Item Details') . '" />
';
Modified: trunk/WhereUsedInquiry.php
===================================================================
--- trunk/WhereUsedInquiry.php 2013-08-29 10:43:46 UTC (rev 6311)
+++ trunk/WhereUsedInquiry.php 2013-08-30 21:08:37 UTC (rev 6312)
@@ -38,16 +38,15 @@
<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
if (isset($StockID)) {
- echo _('Enter an Item Code') . ': <input type="text" required="required" pattern="[^ +%-]{1,}" title="'._('Illegal characters and blank is not allowed').'" name="StockID" size="21" maxlength="20" value="' . $StockID . '" placeholder="'._('No illegal characters allowed').'" />';
+ echo _('Enter an Item Code') . ': <input type="text" required="required" pattern="[^ +%-]{1,}" title="'._('Illegal characters and blank is not allowed').'" name="StockID" autofocus="autofocus" size="21" maxlength="20" value="' . $StockID . '" placeholder="'._('No illegal characters allowed').'" />';
} else {
- echo _('Enter an Item Code') . ': <input type="text" required="required" pattern="[^ +%-]{1,}" title="'._('Illegal characters and blank is not allowed').'" name="StockID" size="21" maxlength="20" placeholder="'._('No illegal characters allowed').'" />';
+ echo _('Enter an Item Code') . ': <input type="text" required="required" pattern="[^ +%-]{1,}" title="'._('Illegal characters and blank is not allowed').'" name="StockID" autofocus="autofocus" size="21" maxlength="20" placeholder="'._('No illegal characters allowed').'" />';
}
-echo '<input type="submit" name="ShowWhereUsed" value="' . _('Show Where Used') . '" />';
+echo '<input type="submit" name="ShowWhereUsed" value="' . _('Show Where Used') . '" />
+ <br />
+ </div>';
-echo '<br />
- </div>';
-
if (isset($StockID)) {
$SQL = "SELECT bom.*,
@@ -64,17 +63,15 @@
prnMsg(_('The selected item') . ' ' . $StockID . ' ' . _('is not used as a component of any other parts'),'error');
} else {
- echo '<table width="97%" class="selection">';
-
- $TableHeader = '<tr>
- <th>' . _('Used By') . '</th>
- <th>' . _('Work Centre') . '</th>
- <th>' . _('Location') . '</th>
- <th>' . _('Quantity Required') . '</th>
- <th>' . _('Effective After') . '</th>
- <th>' . _('Effective To') . '</th>
- </tr>';
- echo $TableHeader;
+ echo '<table width="97%" class="selection">
+ <tr>
+ <th class="ascending">' . _('Used By') . '</th>
+ <th class="ascending">' . _('Work Centre') . '</th>
+ <th class="ascending">' . _('Location') . '</th>
+ <th class="ascending">' . _('Quantity Required') . '</th>
+ <th class="ascending">' . _('Effective After') . '</th>
+ <th class="ascending">' . _('Effective To') . '</th>
+ </tr>';
$k=0;
while ($myrow=DB_fetch_array($result)) {
@@ -87,22 +84,18 @@
}
echo '<td><a target="_blank" href="' . $RootPath . '/BOMInquiry.php?StockID=' . $myrow['parent'] . '" alt="' . _('Show Bill Of Material') . '">' . $myrow['parent']. ' - ' . $myrow['description']. '</a></td>
- <td>' . $myrow['workcentreadded']. '</td>
- <td>' . $myrow['loccode']. '</td>
- <td class="number">' . locale_number_format($myrow['quantity'],'Variable') . '</td>
- <td>' . ConvertSQLDate($myrow['effectiveafter']) . '</td>
- <td>' . ConvertSQLDate($myrow['effectiveto']) . '</td>
+ <td>' . $myrow['workcentreadded']. '</td>
+ <td>' . $myrow['loccode']. '</td>
+ <td class="number">' . locale_number_format($myrow['quantity'],'Variable') . '</td>
+ <td>' . ConvertSQLDate($myrow['effectiveafter']) . '</td>
+ <td>' . ConvertSQLDate($myrow['effectiveto']) . '</td>
</tr>';
//end of page full new headings if
}
-
echo '</table>';
}
} // StockID is set
-
-echo '<script type="text/javascript">defaultControl(document.forms[0].StockID);</script>';
-
echo '</form>';
include('includes/footer.inc');
?>
|