From: <dai...@us...> - 2013-08-17 08:07:51
|
Revision: 6241 http://sourceforge.net/p/web-erp/reponame/6241 Author: daintree Date: 2013-08-17 08:07:47 +0000 (Sat, 17 Aug 2013) Log Message: ----------- html5 table sorting Modified Paths: -------------- trunk/AccountGroups.php trunk/AccountSections.php trunk/BankMatching.php trunk/ConfirmDispatch_Invoice.php trunk/POReport.php trunk/PO_AuthoriseMyOrders.php trunk/PO_Header.php trunk/PO_Items.php trunk/PO_OrderDetails.php trunk/PO_SelectPurchOrder.php trunk/PricesByCost.php trunk/Prices_Customer.php trunk/PurchData.php trunk/SalesCategories.php trunk/SuppTransGLAnalysis.php trunk/TaxAuthorityRates.php Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2013-08-16 10:17:58 UTC (rev 6240) +++ trunk/AccountGroups.php 2013-08-17 08:07:47 UTC (rev 6241) @@ -287,11 +287,11 @@ echo '<table class="selection"> <tr> - <th>' . _('Group Name') . '</th> - <th>' . _('Section') . '</th> - <th>' . _('Sequence In TB') . '</th> - <th>' . _('Profit and Loss') . '</th> - <th>' . _('Parent Group') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Group Name') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Section') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Sequence In TB') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Profit and Loss') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Parent Group') . '</th> </tr>'; $k=0; //row colour counter @@ -471,4 +471,4 @@ } //end if record deleted no point displaying form to add record include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2013-08-16 10:17:58 UTC (rev 6240) +++ trunk/AccountSections.php 2013-08-17 08:07:47 UTC (rev 6241) @@ -173,8 +173,8 @@ echo '<table class="selection"> <tr> - <th>' . _('Section Number') . '</th> - <th>' . _('Section Description') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Section Number') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Section Description') . '</th> </tr>'; $k=0; //row colour counter @@ -276,4 +276,4 @@ } //end if record deleted no point displaying form to add record include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/BankMatching.php =================================================================== --- trunk/BankMatching.php 2013-08-16 10:17:58 UTC (rev 6240) +++ trunk/BankMatching.php 2013-08-17 08:07:47 UTC (rev 6241) @@ -272,12 +272,12 @@ echo '<table cellpadding="2" class="selection"> <tr> - <th>'. _('Cheque No') . '</th> - <th>' . _('Ref') . '</th> - <th>' . $TypeName . '</th> - <th>' . _('Date') . '</th> - <th>' . _('Amount') . '</th> - <th>' . _('Outstanding') . '</th> + <th class="ascending" onClick="SortSelect(this)">'. _('Cheque No') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Ref') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . $TypeName . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Date') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Amount') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Outstanding') . '</th> <th colspan="3">' . _('Clear') . ' / ' . _('Unclear') . '</th> </tr>'; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2013-08-16 10:17:58 UTC (rev 6240) +++ trunk/ConfirmDispatch_Invoice.php 2013-08-17 08:07:47 UTC (rev 6241) @@ -1095,12 +1095,12 @@ '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', - '" . $_SESSION['ProcessingOrder'] . "', + '" . DB_escape_string($_SESSION['ProcessingOrder']) . "', '" . -$OrderLine->QtyDispatched . "', '" . $OrderLine->DiscountPercent . "', '" . $OrderLine->StandardCost . "', '" . ($QtyOnHandPrior - $OrderLine->QtyDispatched) . "', - '" . $OrderLine->Narrative . "' )"; + '" . DB_escape_string($OrderLine->Narrative) . "' )"; } else { // its an assembly or dummy and assemblies/dummies always have nil stock (by definition they are made up at the time of dispatch so new qty on hand will be nil if (empty($OrderLine->StandardCost)) { @@ -1133,7 +1133,7 @@ '" . -$OrderLine->QtyDispatched . "', '" . $OrderLine->DiscountPercent . "', '" . $OrderLine->StandardCost . "', - '" . $OrderLine->Narrative . "')"; + '" . DB_escape_striing($OrderLine->Narrative) . "')"; } Modified: trunk/POReport.php =================================================================== --- trunk/POReport.php 2013-08-16 10:17:58 UTC (rev 6240) +++ trunk/POReport.php 2013-08-17 08:07:47 UTC (rev 6241) @@ -1498,124 +1498,153 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - - echo '<table class="selection">'; - - echo '<tr><td>' . _('Report Type') . ':</td>'; - echo '<td><select name="ReportType">'; - echo '<option selected="selected" value="Detail">' . _('Detail') . '</option>'; - echo '<option value="Summary">' . _('Summary') . '</option>'; - echo '</select></td><td> </td></tr>'; - - echo '<tr><td>' . _('Date Type') . ':</td>'; - echo '<td><select name="DateType">'; - echo '<option selected="selected" value="Order">' . _('Order Date') . '</option>'; - echo '<option value="Delivery">' . _('Delivery Date') . '</option>'; - echo '</select></td><td> </td></tr>'; - - echo '<tr> - <td>' . _('Date Range') . ':</td> - <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" size="10" maxlength="10" value="' . $_POST['FromDate'] .'" /> ' . _('To') . ': - <input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '" /></td> - </tr>'; - - echo '<tr><td>' . _('Part Number') . ':</td>'; - echo '<td><select name="PartNumberOp">'; - echo '<option selected="selected" value="Equals">' . _('Equals') . '</option>'; - echo '<option value="LIKE">' . _('Begins With') . '</option>'; - echo '</select>'; - echo ' <input type="text" name="PartNumber" size="20" maxlength="20" value="'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <td>' . _('Report Type') . ':</td> + <td><select required="required" autofocus="autofocus" name="ReportType"> + <option selected="selected" value="Detail">' . _('Detail') . '</option> + <option value="Summary">' . _('Summary') . '</option> + </select></td> + <td> </td> + </tr> + <tr> + <td>' . _('Date Type') . ':</td> + <td><select required="required" name="DateType"> + <option selected="selected" value="Order">' . _('Order Date') . '</option> + <option value="Delivery">' . _('Delivery Date') . '</option> + </select></td> + <td> </td> + </tr> + <tr> + <td>' . _('Date Range') . ':</td> + <td><input type="text" required="required" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" size="10" maxlength="10" value="' . $_POST['FromDate'] .'" /> ' . _('To') . ': + <input type="text" required="required" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '" /></td> + </tr> + <tr> + <td>' . _('Part Number') . ':</td> + <td><select name="PartNumberOp"> + <option selected="selected" value="Equals">' . _('Equals') . '</option> + <option value="LIKE">' . _('Begins With') . '</option> + </select> + + <input type="text" name="PartNumber" size="20" maxlength="20" value="'; if (isset($_POST['PartNumber'])) { - echo $_POST['PartNumber'] . '" /></td></tr>'; + echo $_POST['PartNumber'] . '" /></td> + </tr>'; } else { - echo '" /></td></tr>'; + echo '" /></td> + </tr>'; } - echo '<tr><td>' . _('Supplier Number') . ':</td>'; - echo '<td><select name="SupplierIdOp">'; - echo '<option selected="selected" value="Equals">' . _('Equals') . '</option>'; - echo '<option value="LIKE">' . _('Begins With') . '</option>'; - echo '</select>'; - echo ' <input type="text" name="SupplierId" size="10" maxlength="10" value="'; + echo '<tr> + <td>' . _('Supplier Number') . ':</td> + <td><select name="SupplierIdOp"> + <option selected="selected" value="Equals">' . _('Equals') . '</option> + <option value="LIKE">' . _('Begins With') . '</option> + </select> + + <input type="text" name="SupplierId" size="10" maxlength="10" value="'; if (isset($_POST['SupplierId'])) { - echo $_POST['SupplierId'] . '" /></td></tr>'; + echo $_POST['SupplierId'] . '" /></td> + </tr>'; } else { - echo '" /></td></tr>'; + echo '" /></td> + </tr>'; } - echo '<tr><td>' . _('Supplier Name') . ':</td>'; - echo '<td><select name="SupplierNameOp">'; - echo '<option selected="selected" value="LIKE">' . _('Begins With') . '</option>'; - echo '<option value="Equals">' . _('Equals') . '</option>'; - echo '</select>'; - echo ' <input type="text" name="SupplierName" size="30" maxlength="30" value="'; + echo '<tr> + <td>' . _('Supplier Name') . ':</td> + <td><select name="SupplierNameOp"> + <option selected="selected" value="LIKE">' . _('Begins With') . '</option> + <option value="Equals">' . _('Equals') . '</option> + </select> + + <input type="text" name="SupplierName" size="30" maxlength="30" value="'; if (isset($_POST['SupplierName'])) { - echo $_POST['SupplierName'] . '" /></td></tr>'; + echo $_POST['SupplierName'] . '" /></td> + </tr>'; } else { - echo '" /></td></tr>'; + echo '" /></td> + </tr>'; } - echo '<tr><td>' . _('Order Number') . ':</td>'; - echo '<td>'._('Equals').': '; - echo '<input type="text" name="OrderNo" size="10" maxlength="10" value="'; + echo '<tr> + <td>' . _('Order Number') . ':</td> + <td>'._('Equals').': <input type="text" name="OrderNo" size="10" maxlength="10" value="'; if (isset($_POST['OrderNo'])) { - echo $_POST['OrderNo'] . '" /></td></tr>'; + echo $_POST['OrderNo'] . '" /></td> + </tr>'; } else { - echo '" /></td></tr>'; + echo '" /></td> + </tr>'; } - echo '<tr><td>' . _('Line Item Status') . ':</td>'; - echo '<td><select name="LineStatus">'; - echo '<option selected="selected" value="All">' . _('All') . '</option>'; - echo '<option value="Completed">' . _('Completed') . '</option>'; - echo '<option value="Open">' . _('Not Completed') . '</option>'; - echo '</select></td><td> </td></tr>'; - - echo '<tr><td>' . _('Stock Categories') . ':</td><td><select name="Category">'; + echo '<tr> + <td>' . _('Line Item Status') . ':</td> + <td><select name="LineStatus"> + <option selected="selected" value="All">' . _('All') . '</option> + <option value="Completed">' . _('Completed') . '</option> + <option value="Open">' . _('Not Completed') . '</option> + </select></td> + <td> </td> + </tr> + <tr> + <td>' . _('Stock Categories') . ':</td> + <td><select name="Category">'; $sql="SELECT categoryid, categorydescription FROM stockcategory"; $CategoryResult= DB_query($sql,$db); echo '<option selected="selected" value="All">' . _('All Categories') . '</option>'; While ($myrow = DB_fetch_array($CategoryResult)){ echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } - echo '</select></td></tr>'; - - echo '<tr><td> </td></tr>'; - echo '<tr><td>' . _('Sort By') . ':</td>'; - echo '<td><select name="SortBy">'; - echo '<option selected="selected" value="purchorderdetails.orderno">' . _('Order Number') . '</option>'; - echo '<option value="purchorderdetails.itemcode">' . _('Part Number') . '</option>'; - echo '<option value="suppliers.supplierid,purchorderdetails.orderno">' . _('Supplier Number') . '</option>'; - echo '<option value="suppliers.suppname,suppliers.supplierid,purchorderdetails.orderno">' . _('Supplier Name') . '</option>'; - echo '</select></td><td> </td></tr>'; - - echo '<tr><td> </td></tr>'; - echo '<tr><td>' . _('Summary Type') . ':</td>'; - echo '<td><select name="SummaryType">'; - echo '<option selected="selected" value="orderno">' . _('Order Number') . '</option>'; - echo '<option value="itemcode">' . _('Part Number') . '</option>'; - echo '<option value="extprice">' . _('Extended Price') . '</option>'; - echo '<option value="supplierno">' . _('Supplier Number') . '</option>'; - echo '<option value="suppname">' . _('Supplier Name') . '</option>'; - echo '<option value="month">' . _('Month') . '</option>'; - echo '<option value="categoryid">' . _('Stock Category') . '</option>'; - echo '</select></td><td> </td></tr>'; - - echo '<tr><td> </td></tr> + echo '</select></td> + </tr> <tr> - <td colspan="4"><div class="centre"><input type="submit" name="submit" value="' . _('Run Inquiry') . '" /></div></td> - </tr> - <tr> - <td colspan="4"><div class="centre"><input type="submit" name="submitcsv" value="' . _('Export as csv file') . '" /></div></td> - </tr> + <td> </td> + </tr> + <tr> + <td>' . _('Sort By') . ':</td> + <td><select name="SortBy"> + <option selected="selected" value="purchorderdetails.orderno">' . _('Order Number') . '</option> + <option value="purchorderdetails.itemcode">' . _('Part Number') . '</option> + <option value="suppliers.supplierid,purchorderdetails.orderno">' . _('Supplier Number') . '</option> + <option value="suppliers.suppname,suppliers.supplierid,purchorderdetails.orderno">' . _('Supplier Name') . '</option> + </select></td> + <td> </td> + </tr> + <tr> + <td> </td> + </tr> + <tr> + <td>' . _('Summary Type') . ':</td> + <td><select name="SummaryType"> + <option selected="selected" value="orderno">' . _('Order Number') . '</option> + <option value="itemcode">' . _('Part Number') . '</option> + <option value="extprice">' . _('Extended Price') . '</option> + <option value="supplierno">' . _('Supplier Number') . '</option> + <option value="suppname">' . _('Supplier Name') . '</option> + <option value="month">' . _('Month') . '</option> + <option value="categoryid">' . _('Stock Category') . '</option> + </select></td> + <td> </td> + </tr> + <tr> + <td> </td> + </tr> + <tr> + <td colspan="4"><div class="centre"><input type="submit" name="submit" value="' . _('Run Inquiry') . '" /></div></td> + </tr> + <tr> + <td colspan="4"><div class="centre"><input type="submit" name="submitcsv" value="' . _('Export as csv file') . '" /></div></td> + </tr> </table> - <br/>'; - echo '</div> - </form>'; + <br/> + </div> + </form>'; } // End of function display() include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/PO_AuthoriseMyOrders.php =================================================================== --- trunk/PO_AuthoriseMyOrders.php 2013-08-16 10:17:58 UTC (rev 6240) +++ trunk/PO_AuthoriseMyOrders.php 2013-08-17 08:07:47 UTC (rev 6241) @@ -17,9 +17,9 @@ if (isset($_POST['UpdateAll'])) { foreach ($_POST as $key => $value) { - if (mb_substr($key,0,6)=='status') { + if (mb_substr($key,0,6)=='Status') { $OrderNo=mb_substr($key,6); - $Status=$_POST['status'.$OrderNo]; + $Status=$_POST['Status'.$OrderNo]; $Comment=date($_SESSION['DefaultDateFormat']).' - '._('Authorised by').' <a href="mailto:' . $EmailRow['email'].'">'.$_SESSION['UserID'].'</a><br />' . html_entity_decode($_POST['comment'],ENT_QUOTES,'UTF-8'); $sql="UPDATE purchorders SET status='".$Status."', @@ -49,18 +49,18 @@ $result=DB_query($sql, $db); echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; -echo '<div>'; -echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<table class="selection">'; +echo '<div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection">'; /* Create the table for the purchase order header */ echo '<tr> - <th>'._('Order Number').'</th> - <th>'._('Supplier').'</th> - <th>'._('Date Ordered').'</th> - <th>'._('Initiator').'</th> - <th>'._('Delivery Date').'</th> - <th>'._('Status').'</th> + <th class="ascending" onClick="SortSelect(this)">'._('Order Number').'</th> + <th class="ascending" onClick="SortSelect(this)">'._('Supplier').'</th> + <th class="ascending" onClick="SortSelect(this)">'._('Date Ordered').'</th> + <th class="ascending" onClick="SortSelect(this)">'._('Initiator').'</th> + <th class="ascending" onClick="SortSelect(this)">'._('Delivery Date').'</th> + <th class="ascending" onClick="SortSelect(this)">'._('Status').'</th> </tr>'; while ($myrow=DB_fetch_array($result)) { @@ -88,7 +88,7 @@ <td>'.ConvertSQLDate($myrow['orddate']).'</td> <td><a href="mailto:'.$myrow['email'].'">'.$myrow['realname'].'</td> <td>'.ConvertSQLDate($myrow['deliverydate']).'</td> - <td><select name="status'.$myrow['orderno'].'"> + <td><select name="Status'.$myrow['orderno'].'"> <option selected="selected" value="Pending">'._('Pending').'</option> <option value="Authorised">'._('Authorised').'</option> <option value="Rejected">'._('Rejected').'</option> @@ -110,11 +110,11 @@ <td colspan="5" align="left"> <table class="selection" align="left"> <tr> - <th>'._('Product').'</th> - <th>'._('Quantity Ordered').'</th> - <th>'._('Currency').'</th> - <th>'._('Price').'</th> - <th>'._('Line Total').'</th> + <th class="ascending" onClick="SortSelect(this)">'._('Product').'</th> + <th class="ascending" onClick="SortSelect(this)">'._('Quantity Ordered').'</th> + <th class="ascending" onClick="SortSelect(this)">'._('Currency').'</th> + <th class="ascending" onClick="SortSelect(this)">'._('Price').'</th> + <th class="ascending" onClick="SortSelect(this)">'._('Line Total').'</th> </tr>'; while ($LineRow=DB_fetch_array($LineResult)) { @@ -144,4 +144,4 @@ </div> </form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2013-08-16 10:17:58 UTC (rev 6240) +++ trunk/PO_Header.php 2013-08-17 08:07:47 UTC (rev 6241) @@ -253,7 +253,7 @@ if (isset($_GET['ModifyOrderNumber'])) { include('includes/PO_ReadInOrder.inc'); -} //isset($_GET['ModifyOrderNumber']) +} if (!isset($_SESSION['PO' . $identifier])) { @@ -552,15 +552,12 @@ if (isset($result_SuppSelect)) { echo '<br /><table cellpadding="3" class="selection">'; - $tableheader = '<tr> - <th>' . _('Code') . '</th> - <th>' . _('Supplier Name') . '</th> - <th>' . _('Address') . '</th> - <th>' . _('Currency') . '</th> - </tr>'; - - echo $tableheader; - + echo '<tr> + <th class="ascending" onClick="SortSelect(this)">' . _('Code') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Supplier Name') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Address') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Currency') . '</th> + </tr>'; $j = 1; $k = 0; /*row counter to determine background colour */ @@ -664,7 +661,26 @@ $PurchItemRow['leadtime'] = 1; } - $_SESSION['PO' . $identifier]->add_to_order(1, $Purch_Item, $PurchItemRow['serialised'], $PurchItemRow['controlled'], $Qty * $PurchItemRow['conversionfactor'], $PurchItemRow['description'], $PurchItemRow['price'] / $PurchItemRow['conversionfactor'], $PurchItemRow['units'], $PurchItemRow['stockact'], $_SESSION['PO' . $identifier]->DeliveryDate, 0, 0, '', 0, 0, '', $PurchItemRow['decimalplaces'], $PurchItemRow['suppliersuom'], $PurchItemRow['conversionfactor'], $PurchItemRow['leadtime'], $PurchItemRow['suppliers_partno']); + $_SESSION['PO' . $identifier]->add_to_order(1, + $Purch_Item, + $PurchItemRow['serialised'], + $PurchItemRow['controlled'], + $Qty * $PurchItemRow['conversionfactor'], + $PurchItemRow['description'], + $PurchItemRow['price'] / $PurchItemRow['conversionfactor'], + $PurchItemRow['units'], + $PurchItemRow['stockact'], + $_SESSION['PO' . $identifier]->DeliveryDate, 0, + 0, + '', + 0, + 0, + '', + $PurchItemRow['decimalplaces'], + $PurchItemRow['suppliersuom'], + $PurchItemRow['conversionfactor'], + $PurchItemRow['leadtime'], + $PurchItemRow['suppliers_partno']); echo '<meta http-equiv="refresh" content="0; url=' . $RootPath . '/PO_Items.php?identifier=' . $identifier . '">'; } @@ -698,7 +714,8 @@ $_POST['InitiatorName'] = $myrow['realname']; } - echo '<br /><table width="80%"> + echo '<br /> + <table width="80%"> <tr> <th><h3>' . _('Order Initiation Details') . '</h3></th> <th><h3>' . _('Order Status') . '</h3></th> @@ -837,9 +854,9 @@ <option value="Pending">' . _('Pending') . '</option>'; break; } - echo '</select></td></tr>'; - - echo '<tr> + echo '</select></td> + </tr> + <tr> <td>' . _('Status Comment') . ':</td> <td><input type="text" name="StatusComments" size="50" /></td> </tr> @@ -853,9 +870,8 @@ } //end its not a new order echo '</table></td> - </tr>'; - - echo '<tr> + </tr> + <tr> <th><h3>' . _('Warehouse Info') . '</h3></th> <!-- <th><h3>' . _('Delivery To') . '</h3></th> --> <th><h3>' . _('Supplier Info') . '</h3></th> Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2013-08-16 10:17:58 UTC (rev 6240) +++ trunk/PO_Items.php 2013-08-17 08:07:47 UTC (rev 6241) @@ -714,17 +714,17 @@ echo '<br /><b>'._(' Order Summary') . '</b></p>'; echo '<table cellpadding="2" class="selection">'; echo '<tr> - <th>' . _('Item Code') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Quantity Our Units') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Item Code') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Description') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Quantity Our Units') . '</th> <th>' . _('Our Unit') .'</th> - <th>' . _('Price Our Units') .' (' . $_SESSION['PO'.$identifier]->CurrCode . ')</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Price Our Units') .' (' . $_SESSION['PO'.$identifier]->CurrCode . ')</th> <th>' . _('Unit Conversion Factor') . '</th> - <th>' . _('Order Quantity') . '<br />' . _('Supplier Units') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Order Quantity') . '<br />' . _('Supplier Units') . '</th> <th>' . _('Supplier Unit') . '</th> - <th>' . _('Order Price') . '<br />' . _('Supp Units') . ' ('.$_SESSION['PO'.$identifier]->CurrCode. ')</th> - <th>' . _('Sub-Total') .' ('.$_SESSION['PO'.$identifier]->CurrCode. ')</th> - <th>' . _('Deliver By') .'</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Order Price') . '<br />' . _('Supp Units') . ' ('.$_SESSION['PO'.$identifier]->CurrCode. ')</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Sub-Total') .' ('.$_SESSION['PO'.$identifier]->CurrCode. ')</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Deliver By') .'</th> </tr>'; $_SESSION['PO'.$identifier]->Total = 0; @@ -792,8 +792,8 @@ <td>' . _('Item Description') . '</td>'; echo '<td><input type="text" name="ItemDescription" size="40" /></td></tr>'; echo '<tr> - <td>' . _('General Ledger Code') . '</td>'; - echo '<td><select name="GLCode">'; + <td>' . _('General Ledger Code') . '</td> + <td><select name="GLCode">'; $sql="SELECT accountcode, accountname FROM chartmaster @@ -807,7 +807,12 @@ echo '<tr> <td>'._('OR Asset ID'). '</td> <td><select name="AssetID">'; - $AssetsResult = DB_query("SELECT assetid, description, datepurchased FROM fixedassets ORDER BY assetid DESC",$db); + $AssetsResult = DB_query("SELECT assetid, + description, + datepurchased + FROM fixedassets + ORDER BY assetid DESC", + $db); echo '<option selected="selected" value="Not an Asset">' . _('Not an Asset') . '</option>'; while ($AssetRow = DB_fetch_array($AssetsResult)){ if ($AssetRow['datepurchased']=='0000-00-00'){ @@ -1147,8 +1152,8 @@ echo '<table cellpadding="1" class="selection">'; $TableHeader = '<tr> - <th>' . _('Code') . '</th> - <th>' . _('Description') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Code') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Description') . '</th> <th>' . _('Our Units') . '</th> <th>' . _('Conversion') . '<br />' ._('Factor') . '</th> <th>' . _('Supplier/Order') . '<br />' . _('Units') . '</th> @@ -1215,4 +1220,4 @@ echo '</div> </form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/PO_OrderDetails.php =================================================================== --- trunk/PO_OrderDetails.php 2013-08-16 10:17:58 UTC (rev 6240) +++ trunk/PO_OrderDetails.php 2013-08-17 08:07:47 UTC (rev 6241) @@ -15,9 +15,9 @@ if (isset($_GET['FromGRNNo'])){ $SQL= "SELECT purchorderdetails.orderno - FROM purchorderdetails INNER JOIN grns - ON purchorderdetails.podetailitem=grns.podetailitem - WHERE grns.grnno='" . $_GET['FromGRNNo'] ."'"; + FROM purchorderdetails INNER JOIN grns + ON purchorderdetails.podetailitem=grns.podetailitem + WHERE grns.grnno='" . $_GET['FromGRNNo'] ."'"; $ErrMsg = _('The search of the GRNs was unsuccessful') . ' - ' . _('the SQL statement returned the error'); $OrderResult = DB_query($SQL, $db, $ErrMsg); @@ -42,22 +42,22 @@ $ErrMsg = _('The order requested could not be retrieved') . ' - ' . _('the SQL returned the following error'); $OrderHeaderSQL = "SELECT purchorders.*, - suppliers.supplierid, - suppliers.suppname, - suppliers.currcode, - www_users.realname, - locations.locationname, - currencies.decimalplaces AS currdecimalplaces - FROM purchorders - INNER JOIN locations - ON locations.loccode=purchorders.intostocklocation - INNER JOIN suppliers - ON purchorders.supplierno = suppliers.supplierid - INNER JOIN currencies - ON suppliers.currcode = currencies.currabrev - LEFT JOIN www_users - ON purchorders.initiator=www_users.userid - WHERE purchorders.orderno = '" . $_GET['OrderNo'] ."'"; + suppliers.supplierid, + suppliers.suppname, + suppliers.currcode, + www_users.realname, + locations.locationname, + currencies.decimalplaces AS currdecimalplaces + FROM purchorders + INNER JOIN locations + ON locations.loccode=purchorders.intostocklocation + INNER JOIN suppliers + ON purchorders.supplierno = suppliers.supplierid + INNER JOIN currencies + ON suppliers.currcode = currencies.currabrev + LEFT JOIN www_users + ON purchorders.initiator=www_users.userid + WHERE purchorders.orderno = '" . $_GET['OrderNo'] ."'"; $GetOrdHdrResult = DB_query($OrderHeaderSQL,$db, $ErrMsg); @@ -69,9 +69,12 @@ prnMsg ( _('The order requested could not be retrieved') . ' - ' . _('the SQL returned either several purchase orders'), 'error'); } echo '<table class="table_index"> - <tr><td class="menu_group_item"> - <li><a href="'. $RootPath . '/PO_SelectPurchOrder.php">' . _('Outstanding Sales Orders') . '</a></li> - </td></tr></table>'; + <tr> + <td class="menu_group_item"> + <li><a href="'. $RootPath . '/PO_SelectPurchOrder.php">' . _('Outstanding Sales Orders') . '</a></li> + </td> + </tr> + </table>'; include('includes/footer.inc'); exit; @@ -84,32 +87,56 @@ echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/supplier.png" title="' . _('Purchase Order') . '" alt="" />' . ' ' . $Title . '</p>'; -echo '<table class="selection" cellpadding="2">'; -echo '<tr><th colspan="8"><b>'. _('Order Header Details'). '</b></th></tr>'; -echo '<tr><td style="text-align:left">' . _('Supplier Code'). '</td><td><a href="SelectSupplier.php?SupplierID='.$myrow['supplierid'].'">' . $myrow['supplierid'] . '</a></td> - <td style="text-align:left">' . _('Supplier Name'). '</td><td><a href="SelectSupplier.php?SupplierID='.$myrow['supplierid'].'">' . $myrow['suppname'] . '</a></td></tr>'; +echo '<table class="selection" cellpadding="2"> + <tr> + <th colspan="8"><b>'. _('Order Header Details'). '</b></th> + </tr> + <tr> + <td>' . _('Supplier Code'). '</td> + <td><a href="SelectSupplier.php?SupplierID='.$myrow['supplierid'].'">' . $myrow['supplierid'] . '</a></td> + <td>' . _('Supplier Name'). '</td> + <td><a href="SelectSupplier.php?SupplierID='.$myrow['supplierid'].'">' . $myrow['suppname'] . '</a></td> + </tr> + <tr> + <td>' . _('Ordered On'). '</td> + <td>' . ConvertSQLDate($myrow['orddate']) . '</td> + <td>' . _('Delivery Address 1'). '</td> + <td>' . $myrow['deladd1'] . '</td> + </tr> + <tr> + <td>' . _('Order Currency'). '</td> + <td>' . $myrow['currcode'] . '</td> + <td>' . _('Delivery Address 2'). '</td> + <td>' . $myrow['deladd2'] . '</td> + </tr> + <tr> + <td>' . _('Exchange Rate'). '</td> + <td>' . $myrow['rate'] . '</td> + <td>' . _('Delivery Address 3'). '</td> + <td>' . $myrow['deladd3'] . '</td> + </tr> + <tr> + <td>' . _('Deliver Into Location'). '</td> + <td>' . $myrow['locationname'] . '</td> + <td>' . _('Delivery Address 4'). '</td> + <td>' . $myrow['deladd4'] . '</td> + </tr> + <tr> + <td>' . _('Initiator'). '</td> + <td>' . $myrow['realname'] . '</td> + <td>' . _('Delivery Address 5'). '</td> + <td>' . $myrow['deladd5'] . '</td> + </tr> + <tr> + <td>' . _('Requisition Ref'). '.</td> + <td>' . $myrow['requisitionno'] . '</td> + <td>' . _('Delivery Address 6'). '</td> + <td>' . $myrow['deladd6'] . '</td> + </tr> + <tr> + <td>'. _('Printing') . '</td> + <td colspan="3">'; -echo '<tr><td style="text-align:left">' . _('Ordered On'). '</td><td>' . ConvertSQLDate($myrow['orddate']) . '</td> - <td style="text-align:left">' . _('Delivery Address 1'). '</td><td>' . $myrow['deladd1'] . '</td></tr>'; - -echo '<tr><td style="text-align:left">' . _('Order Currency'). '</td><td>' . $myrow['currcode'] . '</td> - <td style="text-align:left">' . _('Delivery Address 2'). '</td><td>' . $myrow['deladd2'] . '</td></tr>'; - -echo '<tr><td style="text-align:left">' . _('Exchange Rate'). '</td><td>' . $myrow['rate'] . '</td> - <td style="text-align:left">' . _('Delivery Address 3'). '</td><td>' . $myrow['deladd3'] . '</td></tr>'; - -echo '<tr><td style="text-align:left">' . _('Deliver Into Location'). '</td><td>' . $myrow['locationname'] . '</td> - <td style="text-align:left">' . _('Delivery Address 4'). '</td><td>' . $myrow['deladd4'] . '</td></tr>'; - -echo '<tr><td style="text-align:left">' . _('Initiator'). '</td><td>' . $myrow['realname'] . '</td> - <td style="text-align:left">' . _('Delivery Address 5'). '</td><td>' . $myrow['deladd5'] . '</td></tr>'; - -echo '<tr><td style="text-align:left">' . _('Requisition Ref'). '.</td><td>' . $myrow['requisitionno'] . '</td> - <td style="text-align:left">' . _('Delivery Address 6'). '</td><td>' . $myrow['deladd6'] . '</td></tr>'; - - -echo '<tr><td style="text-align:left">'. _('Printing') . '</td><td colspan="3">'; - if ($myrow['dateprinted'] == ''){ echo '<i>'. _('Not yet printed') . '</i> '; echo '[<a href="PO_PDFPurchOrder.php?OrderNo='. $_GET['OrderNo'] .'">'. _('Print') .'</a>]'; @@ -118,13 +145,18 @@ echo '[<a href="PO_PDFPurchOrder.php?OrderNo='. $_GET['OrderNo'] .'">'. _('Print a Copy') .'</a>]'; } -echo '</td></tr>'; -echo '<tr><td style="text-align:left">'. _('Status') . '</td><td>'. _($myrow['status']) . '</td></tr>'; +echo '</td> + </tr> + <tr> + <td>'. _('Status') . '</td> + <td>'. _($myrow['status']) . '</td> + </tr> + <tr> + <td>' . _('Comments'). '</td> + <td colspan="3">' . $myrow['comments'] . '</td> + </tr> + </table>'; -echo '<tr><td style="text-align:left">' . _('Comments'). '</td><td colspan="3">' . $myrow['comments'] . '</td></tr>'; - -echo '</table>'; - $CurrDecimalPlaces = $myrow['currdecimalplaces']; echo '<br />'; @@ -141,18 +173,20 @@ $LineItemsResult = DB_query($LineItemsSQL,$db, $ErrMsg); -echo '<table class="selection" cellpadding="0">'; -echo '<tr><th colspan="8"><b>'. _('Order Line Details'). '</b></th></tr>'; -echo '<tr> - <td>' . _('Item Code'). '</td> - <td>' . _('Item Description'). '</td> - <td>' . _('Ord Qty'). '</td> - <td>' . _('Qty Recd'). '</td> - <td>' . _('Qty Inv'). '</td> - <td>' . _('Ord Price'). '</td> - <td>' . _('Chg Price'). '</td> - <td>' . _('Reqd Date'). '</td> - </tr>'; +echo '<table class="selection" cellpadding="0"> + <tr> + <th colspan="8"><b>'. _('Order Line Details'). '</b></th> + </tr> + <tr> + <td>' . _('Item Code'). '</td> + <td>' . _('Item Description'). '</td> + <td>' . _('Ord Qty'). '</td> + <td>' . _('Qty Recd'). '</td> + <td>' . _('Qty Inv'). '</td> + <td>' . _('Ord Price'). '</td> + <td>' . _('Chg Price'). '</td> + <td>' . _('Reqd Date'). '</td> + </tr>'; $k =0; //row colour counter $OrderTotal=0; @@ -184,35 +218,37 @@ } printf ('<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 class="number">%s</td> - <td>%s</td> - </tr>' , - $myrow['itemcode'], - $myrow['itemdescription'], - locale_number_format($myrow['quantityord'],$DecimalPlaces), - locale_number_format($myrow['quantityrecd'],$DecimalPlaces), - locale_number_format($myrow['qtyinvoiced'],$DecimalPlaces), - locale_number_format($myrow['unitprice'],$CurrDecimalPlaces), - locale_number_format($myrow['actprice'],$CurrDecimalPlaces), - $DisplayReqdDate); + <td>%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td>%s</td> + </tr>' , + $myrow['itemcode'], + $myrow['itemdescription'], + locale_number_format($myrow['quantityord'],$DecimalPlaces), + locale_number_format($myrow['quantityrecd'],$DecimalPlaces), + locale_number_format($myrow['qtyinvoiced'],$DecimalPlaces), + locale_number_format($myrow['unitprice'],$CurrDecimalPlaces), + locale_number_format($myrow['actprice'],$CurrDecimalPlaces), + $DisplayReqdDate); } echo '<tr><td><br /></td> </tr> - <tr><td colspan="4" class="number">' . _('Total Order Value Excluding Tax') .'</td> - <td colspan="2" class="number">' . locale_number_format($OrderTotal,$CurrDecimalPlaces) . '</td></tr>'; -echo '<tr> - <td colspan="4" class="number">' . _('Total Order Value Received Excluding Tax') . '</td> - <td colspan="2" class="number">' . locale_number_format($RecdTotal,$CurrDecimalPlaces) . '</td></tr>'; -echo '</table>'; + <tr> + <td colspan="4" class="number">' . _('Total Order Value Excluding Tax') .'</td> + <td colspan="2" class="number">' . locale_number_format($OrderTotal,$CurrDecimalPlaces) . '</td> + </tr> + <tr> + <td colspan="4" class="number">' . _('Total Order Value Received Excluding Tax') . '</td> + <td colspan="2" class="number">' . locale_number_format($RecdTotal,$CurrDecimalPlaces) . '</td> + </tr> + </table> + <br />'; -echo '<br />'; - include ('includes/footer.inc'); ?> Modified: trunk/PO_SelectPurchOrder.php =================================================================== --- trunk/PO_SelectPurchOrder.php 2013-08-16 10:17:58 UTC (rev 6240) +++ trunk/PO_SelectPurchOrder.php 2013-08-17 08:07:47 UTC (rev 6241) @@ -24,9 +24,9 @@ } elseif (isset($_POST['SelectedSupplier'])) { $SelectedSupplier = $_POST['SelectedSupplier']; } -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; -echo '<div>'; -echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($_POST['ResetPart'])) { unset($SelectedStockItem); } @@ -115,7 +115,7 @@ if (isset($SelectedStockItem)) { echo _('For the part') . ':<b>' . $SelectedStockItem . '</b> ' . _('and') . ' <input type="hidden" name="SelectedStockItem" value="' . $SelectedStockItem . '" />'; } - echo _('Order Number') . ': <input type="text" name="OrderNumber" autofocus="autofocus" maxlength="8" size="9" /> ' . _('Into Stock Location') . ':<select name="StockLocation"> '; + echo _('Order Number') . ': <input type="integer" name="OrderNumber" autofocus="autofocus" maxlength="8" size="9" /> ' . _('Into Stock Location') . ':<select name="StockLocation"> '; $sql = "SELECT loccode, locationname FROM locations"; $resultStkLocs = DB_query($sql, $db); while ($myrow = DB_fetch_array($resultStkLocs)) { @@ -429,16 +429,16 @@ /*show a table of the orders returned by the SQL */ echo '<table cellpadding="2" width="90%" class="selection">'; $TableHeader = '<tr> - <th>' . _('View') . '</th> - <th>' . _('Supplier') . '</th> - <th>' . _('Currency') . '</th> - <th>' . _('Requisition') . '</th> - <th>' . _('Order Date') . '</th> - <th>' . _('Delivery Date') . '</th> - <th>' . _('Initiator') . '</th> - <th>' . _('Order Total') . '</th> - <th>' . _('Status') . '</th> - </tr>'; + <th class="ascending" onClick="SortSelect(this)">' . _('View') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Supplier') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Currency') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Requisition') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Order Date') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Delivery Date') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Initiator') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Order Total') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Status') . '</th> + </tr>'; echo $TableHeader; $j = 1; $k = 0; //row colour counter Modified: trunk/PricesByCost.php =================================================================== --- trunk/PricesByCost.php 2013-08-16 10:17:58 UTC (rev 6240) +++ trunk/PricesByCost.php 2013-08-17 08:07:47 UTC (rev 6241) @@ -147,18 +147,19 @@ echo '<div class="page_help_text">' . _('Items in') . ' ' . $CategoryText . ' ' . _('With Prices') . ' ' . $Comparator . '' . $_POST['Margin'] . ' ' . _('times') . ' ' . _('Cost in Price List') . ' ' . $SalesTypeRow['sales_type'] . '</div><br /><br />'; if ($numrow > 0) { //the number of prices returned from the main prices query is - echo '<table class="selection">'; - echo '<tr><th>' . _('Code') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Customer') . '</th> - <th>' . _('Branch') . '</th> - <th>' . _('Start Date') . '</th> - <th>' . _('End Date') . '</th> - <th>' . _('Cost') . '</th> - <th>' . _('GP %') . '</th> - <th>' . _('Price Proposed') . '</th> - <th>' . _('List Price') . '</th> - <tr>'; + echo '<table class="selection"> + <tr> + <th class="ascending" onClick="SortSelect(this)">' . _('Code') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Description') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Customer') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Branch') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Start Date') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('End Date') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Cost') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('GP %') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Price Proposed') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('List Price') . '</th> + <tr>'; $k = 0; //row colour counter echo '<form action="' .htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'" method="post" id="update">'; echo '<div>'; @@ -248,7 +249,8 @@ echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } echo '</select></td></tr>'; - echo '<tr><td>' . _('Price') . ' + echo '<tr> + <td>' . _('Price') . ' <select name="Comparator"> <option value="1">' . _('Less than or equal to') . '</option> <option value="2">' . _('Greater than or equal to') . '</option>'; @@ -260,7 +262,8 @@ if (!isset($_POST['Margin'])){ $_POST['Margin']=1; } - echo '<td><input type="text" class="number" name="Margin" maxlength="8" size="8" value="' .$_POST['Margin'] . '" /></td></tr>'; + echo '<td><input type="text" class="number" name="Margin" maxlength="8" size="8" value="' .$_POST['Margin'] . '" /></td> + </tr>'; $result = DB_query("SELECT typeabbrev, sales_type FROM salestypes", $db); echo '<tr><td>' . _('Sales Type') . '/' . _('Price List') . ':</td> <td><select name="SalesType">'; @@ -273,9 +276,11 @@ } //end while loop DB_data_seek($result, 0); $result = DB_query("SELECT currency, currabrev FROM currencies", $db); - echo '</select></td></tr> - <tr><td>' . _('Currency') . ':</td> - <td><select name="CurrCode">'; + echo '</select></td> + </tr> + <tr> + <td>' . _('Currency') . ':</td> + <td><select name="CurrCode">'; while ($myrow = DB_fetch_array($result)) { if (isset($_POST['CurrCode']) and $_POST['CurrCode'] == $myrow['currabrev']) { echo '<option selected="selected" value="' . $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; @@ -286,9 +291,10 @@ DB_data_seek($result, 0); echo '</select></td></tr>'; echo '</table> - <br /><div class="centre"><input type="submit" name="submit" value="' . _('Submit') . '" /></div>'; - echo '</div> - </form>'; + <br /> + <div class="centre"><input type="submit" name="submit" value="' . _('Submit') . '" /></div> + </div> + </form>'; } /*end of else not submit */ include ('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2013-08-16 10:17:58 UTC (rev 6240) +++ trunk/Prices_Customer.php 2013-08-17 08:07:47 UTC (rev 6241) @@ -252,8 +252,10 @@ echo '<tr><td>' . _('There are no special prices set up for this part') . '</td></tr>'; } else { /*THERE IS ALREADY A spl price setup */ - echo '<tr><th>' . _('Special Price') . - '</th><th>' . _('Branch') . '</th></tr>'; + echo '<tr> + <th>' . _('Special Price') . '</th> + <th>' . _('Branch') . '</th> + </tr>'; while ($myrow = DB_fetch_array($result)) { @@ -455,4 +457,4 @@ $OldStartDate = $myrow['startdate']; } // end of loop around duplicate no end date prices } -?> \ No newline at end of file +?> Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2013-08-16 10:17:58 UTC (rev 6240) +++ trunk/PurchData.php 2013-08-17 08:07:47 UTC (rev 6241) @@ -268,15 +268,15 @@ echo '<table cellpadding="2" class="selection">'; $TableHeader = '<tr> - <th>' . _('Supplier') . '</th> - <th>' . _('Price') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Supplier') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Price') . '</th> <th>' . _('Supplier Unit') . '</th> <th>' . _('Conversion Factor') . '</th> - <th>' . _('Cost Per Our Unit') . '</th> - <th>' . _('Currency') . '</th> - <th>' . _('Effective From') . '</th> - <th>' . _('Min Order Qty') . '</th> - <th>' . _('Lead Time') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Cost Per Our Unit') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Currency') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Effective From') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Min Order Qty') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Lead Time') . '</th> <th>' . _('Preferred') . '</th> </tr>'; echo $TableHeader; @@ -382,7 +382,7 @@ <td><input type="text" name="Keywords" size="20" maxlength="25" /></td> <td><b>' . _('OR') . '</b></td> <td>' . _('Text in Supplier') . ' <b>' . _('CODE') . '</b>:</td> - <td><input type="text" name="SupplierCode" size="20" maxlength="50" /></td> + <td><input type="text" name="SupplierCode" pattern="[0-9a-zA-Z_\-]*" size="20" maxlength="50" /></td> </tr> </table> <br /> @@ -466,12 +466,12 @@ <table cellpadding="2" colspan="7" class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $TableHeader = '<tr> - <th>' . _('Code') . '</th> - <th>' . _('Supplier Name') . '</th> - <th>' . _('Currency') . '</th> - <th>' . _('Address 1') . '</th> - <th>' . _('Address 2') . '</th> - <th>' . _('Address 3') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Code') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Supplier Name') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Currency') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Address 1') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Address 2') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Address 3') . '</th> </tr>'; echo $TableHeader; $k = 0; @@ -657,7 +657,7 @@ } echo '<tr> <td>' . _('Lead Time') . ' (' . _('in days from date of order') . '):</td> - <td><input type="text" class="number" name="LeadTime" maxlength="4" size="5" value="' . $_POST['LeadTime'] . '" /></td> + <td><input type="text" class="integer" name="LeadTime" maxlength="4" size="5" value="' . $_POST['LeadTime'] . '" /></td> </tr> <tr> <td>' . _('Preferred Supplier') . ':</td> @@ -696,11 +696,11 @@ echo '<table cellpadding="2" colspan="7" class="selection"> <tr> - <th>' . _('Discount Name') . '</th> - <th>' . _('Discount') . '<br />' . _('Value') . '</th> - <th>' . _('Discount') . '<br />' . _('Percent') . '</th> - <th>' . _('Effective From') . '</th> - <th>' . _('Effective To') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Discount Name') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Discount') . '<br />' . _('Value') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Discount') . '<br />' . _('Percent') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Effective From') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Effective To') . '</th> </tr>'; $k = 0; $i = 0; //DiscountCounter Modified: trunk/SalesCategories.php =================================================================== --- trunk/SalesCategories.php 2013-08-16 10:17:58 UTC (rev 6240) +++ trunk/SalesCategories.php 2013-08-17 08:07:47 UTC (rev 6241) @@ -505,10 +505,10 @@ <th colspan="4">'._('Inventory items for') . ' ' . $CategoryPath . '</th> </tr> <tr> - <th>' . _('Item') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Brand') . '</th> - <th>' . _('Featured') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Item') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Description') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Brand') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Featured') . '</th> </tr>'; $k=0; //row colour counter @@ -544,4 +544,4 @@ } include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/SuppTransGLAnalysis.php =================================================================== --- trunk/SuppTransGLAnalysis.php 2013-08-16 10:17:58 UTC (rev 6240) +++ trunk/SuppTransGLAnalysis.php 2013-08-17 08:07:47 UTC (rev 6241) @@ -104,12 +104,12 @@ <table class="selection">'; $TableHeader = '<tr> - <th>' . _('Account') . '</th> - <th>' . _('Name') . '</th> - <th>' . _('Amount') . '<br />' . _('in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Account') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Name') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Amount') . '<br />' . _('in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th> <th>' . _('Narrative') . '</th> - <th>' . _('Tag') . '</th> - </tr>'; + <th class="ascending" onclick="SortSelect(this)">' . _('Tag') . '</th> + </tr>'; echo $TableHeader; $TotalGLValue=0; $i=0; @@ -187,7 +187,7 @@ echo '<tr> <td>' . _('Account Code') . ':</td> - <td><input type="integer" pattern="[1-9][\d]{0,20}" title="'._('The input must be positive integer').'" placeholder="'._('Integer less than 20 digits').'" name="GLCode" size="21" maxlength="20" value="' . $_POST['GLCode'] . '" /> + <td><input type="text" pattern="[a-zA-Z0-9_\-]*{0,20}" title="'._('The input must be positive integer').'" name="GLCode" size="21" maxlength="20" value="' . $_POST['GLCode'] . '" /> <input type="hidden" name="JobRef" value="" /></td> </tr>'; echo '<tr> Modified: trunk/TaxAuthorityRates.php =================================================================== --- trunk/TaxAuthorityRates.php 2013-08-16 10:17:58 UTC (rev 6240) +++ trunk/TaxAuthorityRates.php 2013-08-17 08:07:47 UTC (rev 6241) @@ -84,9 +84,9 @@ <th colspan="3"><h3>' . _('Update') . ' ' . $myrow[0] . ' ' . _('Rates') . '</h3></th> </tr>'; $TableHeader = '<tr> - <th>' . _('Deliveries From') . '<br />' . _('Tax Province') . '</th> - <th>' . _('Tax Category') . '</th> - <th>' . _('Tax Rate') . ' %</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Deliveries From') . '<br />' . _('Tax Province') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Tax Category') . '</th> + <th class="ascending" onClick="SortSelect(this)">' . _('Tax Rate') . ' %</th> </tr>'; echo $TableHeader; $j = 1; |