From: <ex...@us...> - 2013-08-20 07:48:03
|
Revision: 6270 http://sourceforge.net/p/web-erp/reponame/6270 Author: exsonqu Date: 2013-08-20 07:47:56 +0000 (Tue, 20 Aug 2013) Log Message: ----------- 20/8/2013 Exson: html5 compatible and table sortable for SuppContractChgs.php,SuppCreditGRNs.php,SuppFixedAssetChgs.php,SuppInvGRNs.php, SupplierAllocations.php Modified Paths: -------------- trunk/SuppContractChgs.php trunk/SuppCreditGRNs.php trunk/SuppFixedAssetChgs.php trunk/SuppInvGRNs.php trunk/SupplierAllocations.php Modified: trunk/SuppContractChgs.php =================================================================== --- trunk/SuppContractChgs.php 2013-08-20 04:30:16 UTC (rev 6269) +++ trunk/SuppContractChgs.php 2013-08-20 07:47:56 UTC (rev 6270) @@ -75,10 +75,10 @@ echo '<table class="selection">'; $TableHeader = '<tr> - <th>' . _('Contract') . '</th> - <th>' . _('Amount') . '</th> - <th>' . _('Narrative') . '</th> - <th>' . _('Anticipated') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Contract') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Amount') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Narrative') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Anticipated') . '</th> </tr>'; echo $TableHeader; @@ -103,7 +103,7 @@ } -echo '<tr> +echo '</table><table class="selection"><tr> <td class="number">' . _('Total') . ':</td> <td class="number">' . locale_number_format($TotalContractsValue,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> </tr> @@ -162,14 +162,14 @@ } echo '<tr> <td>' . _('Amount') . ':</td> - <td><input type="text" name="Amount" size="12" maxlength="11" value="' . locale_number_format($_POST['Amount'],$_SESSION['CompanyRecord']['decimalplaces']) . '" /></td> + <td><input type="text" class="number" pattern="(?!^[-]?0[.,]0*$).{1,11}" title="'._('Amount must be numeric').'" placeholder="'._('Non zero amount').'" name="Amount" size="12" maxlength="11" value="' . locale_number_format($_POST['Amount'],$_SESSION['CompanyRecord']['decimalplaces']) . '" /></td> </tr>'; echo '<tr> <td>' . _('Narrative') . ':</td> <td><input type="text" name="Narrative" size="42" maxlength="40" value="' . $_POST['Narrative'] . '" /></td> </tr>'; echo '<tr> - <td>' . _('Aniticpated Cost') . ':</td> + <td>' . _('Anticipated Cost') . ':</td> <td>'; if (isset($_POST['AnticipatedCost']) AND $_POST['AnticipatedCost']==1){ echo '<input type="checkbox" name="AnticipatedCost" checked />'; @@ -186,4 +186,4 @@ echo '</div> </form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/SuppCreditGRNs.php =================================================================== --- trunk/SuppCreditGRNs.php 2013-08-20 04:30:16 UTC (rev 6269) +++ trunk/SuppCreditGRNs.php 2013-08-20 07:47:56 UTC (rev 6270) @@ -85,7 +85,7 @@ echo '<table class="selection">'; echo '<tr> <th colspan="6"><h3>' . _('Credits Against Goods Received Selected') . '</h3></th> - </tr>'; + </tr></table><table class="selection">'; $TableHeader = '<tr> <th>' . _('GRN') . '</th> <th>' . _('Item Code') . '</th> @@ -177,20 +177,20 @@ echo '<input type="text" name="Show_Since" maxlength="11" size="12" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" value="' . $_POST['Show_Since'] . '" /> <input type="submit" name="FindGRNs" value="' . _('Display GRNs') . '" /> <h3> ' . _('From') . ' ' . $_SESSION['SuppTrans']->SupplierName . '</h3></th> - </tr>'; + </tr></table><table class="selection">'; if (DB_num_rows($GRNResults)>0){ $TableHeader = '<tr> - <th>' . _('GRN') . '</th> - <th>' . _('Order') . '</th> - <th>' . _('Item Code') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Delivered') . '</th> - <th>' . _('Total Qty') . '<br />' . _('Received') . '</th> - <th>' . _('Qty Invoiced') . '</th> - <th>' . _('Qty Yet') . '<br />' . _('invoice') . '</th> - <th>' . _('Price') . '<br />' . $_SESSION['SuppTrans']->CurrCode . '</th> - <th>' . _('Line Value') . '<br />' . _('In') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('GRN') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Order') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Item Code') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Description') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Delivered') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Total Qty') . '<br />' . _('Received') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Qty Invoiced') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Qty Yet') . '<br />' . _('invoice') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Price') . '<br />' . $_SESSION['SuppTrans']->CurrCode . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Line Value') . '<br />' . _('In') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th> </tr>'; echo $TableHeader; @@ -293,9 +293,9 @@ <td>' . $_POST['GRNNo'] . '</td> <td>' . $myrow['itemcode'] . ' ' . $myrow['itemdescription'] . '</td> <td class="number">' . locale_number_format($myrow['qtyostdg'],$myrow['decimalplaces']) . '</td> - <td><input type="text" name="This_QuantityCredited" value="' . locale_number_format($myrow['qtyostdg'],$myrow['decimalplaces']) . '" size="11" maxlength="10" /></td> + <td><input type="text" class="number" name="This_QuantityCredited" value="' . locale_number_format($myrow['qtyostdg'],$myrow['decimalplaces']) . '" size="11" maxlength="10" /></td> <td class="number">' . locale_number_format($Price,$_SESSION['SuppTrans']->CurrDecimalPlaces) . '</td> - <td><input type="text" name="ChgPrice" value="' . locale_number_format($Price,$_SESSION['SuppTrans']->CurrDecimalPlaces) . '" size="11" maxlength="10" /></td> + <td><input type="text" class="number" name="ChgPrice" value="' . locale_number_format($Price,$_SESSION['SuppTrans']->CurrDecimalPlaces) . '" size="11" maxlength="10" /></td> </tr> </table>'; Modified: trunk/SuppFixedAssetChgs.php =================================================================== --- trunk/SuppFixedAssetChgs.php 2013-08-20 04:30:16 UTC (rev 6269) +++ trunk/SuppFixedAssetChgs.php 2013-08-20 07:47:56 UTC (rev 6270) @@ -74,9 +74,9 @@ echo '</p></div>'; echo '<table class="selection">'; $TableHeader = '<tr> - <th>' . _('Asset ID') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Amount') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Asset ID') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Description') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Amount') . '</th> </tr>'; echo $TableHeader; @@ -93,7 +93,7 @@ } -echo '<tr> +echo '</table><table class="selection"><tr> <td class="number"><h4>' . _('Total') . ':</h4></td> <td class="number"><h4>' . locale_number_format($TotalAssetValue,$_SESSION['SuppTrans']->CurrDecimalPlaces) . '</h4></td> </tr> @@ -120,7 +120,7 @@ echo '<tr> <td>' . _('Enter Asset ID') . ':</td> - <td><input type="text" name="AssetID" size="5" maxlength="6" value="' . $_POST['AssetID'] . '" /> <a href="FixedAssetItems.php" target="_blank">'. _('New Fixed Asset') . '</a></td> + <td><input type="text" class="integer" pattern="[^-]{1,5}" name="AssetID" title="'._('The Asset ID should be positive integer').'" size="7" maxlength="6" placeholder="'._('Postive integer').'" value="' . $_POST['AssetID'] . '" /> <a href="FixedAssetItems.php" target="_blank">'. _('New Fixed Asset') . '</a></td> </tr>'; echo '<tr> <td><b>' . _('OR') .' </b>'. _('Select from list') . ':</td> @@ -151,7 +151,7 @@ } echo '<tr> <td>' . _('Amount') . ':</td> - <td><input type="text" class="number" name="Amount" size="12" maxlength="11" value="' . locale_number_format($_POST['Amount'],$_SESSION['SuppTrans']->CurrDecimalPlaces) . '" /></td> + <td><input type="text" class="number" pattern="(?!^-?0[,.]0*$).{1,11}" title="'._('The amount must be numeric and cannot be zero').'" name="Amount" size="12" maxlength="11" value="' . locale_number_format($_POST['Amount'],$_SESSION['SuppTrans']->CurrDecimalPlaces) . '" /></td> </tr>'; echo '</table>'; @@ -163,4 +163,4 @@ echo '</div> </form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/SuppInvGRNs.php =================================================================== --- trunk/SuppInvGRNs.php 2013-08-20 04:30:16 UTC (rev 6269) +++ trunk/SuppInvGRNs.php 2013-08-20 07:47:56 UTC (rev 6270) @@ -118,9 +118,9 @@ echo '<table class="selection"> <tr> <th colspan="6"><h3>' . _('Invoiced Goods Received Selected') . '</h3></th> - </tr>'; + </tr></table>'; -$tableheader = '<tr> +$tableheader = '<table class="selection"><tr> <th>' . _('Sequence') . ' #</th> <th>' . _('Item Code') . '</th> <th>' . _('Description') . '</th> @@ -149,11 +149,7 @@ $TotalValueCharged = $TotalValueCharged + ($EnteredGRN->ChgPrice * $EnteredGRN->This_QuantityInv); - $i++; - if ($i>15){ - $i=0; - echo $tableheader; - } + } echo '<tr> @@ -297,19 +293,19 @@ echo '<table class="selection"> <tr> <th colspan="10"><h3>' . _('Goods Received Yet to be Invoiced From') . ' ' . $_SESSION['SuppTrans']->SupplierName.'</h3></th> - </tr>'; + </tr></table>'; - $tableheader = '<tr> - <th>' . _('Select') . '</th> - <th>' . _('Sequence') . ' #</th> - <th>' . _('Order') . '</th> - <th>' . _('Item Code') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Total Qty Received') . '</th> - <th>' . _('Qty Already Invoiced') . '</th> - <th>' . _('Qty Yet To Invoice') . '</th> - <th>' . _('Order Price in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th> - <th>' . _('Line Value in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th> + $tableheader = '<table><tr> + <th class="ascending" onclick="SortSelect(this)">' . _('Select') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Sequence') . ' #</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Order') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Item Code') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Description') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Total Qty Received') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Qty Already Invoiced') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Qty Yet To Invoice') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Order Price in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Line Value in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th> </tr>'; $i = 0; $POs = array(); @@ -345,11 +341,8 @@ <td class="number">' . locale_number_format($GRNTmp->OrderPrice,$_SESSION['SuppTrans']->CurrDecimalPlaces) . '</td> <td class="number">' . locale_number_format($GRNTmp->OrderPrice * ($GRNTmp->QtyRecd - $GRNTmp->Prev_QuantityInv),$_SESSION['SuppTrans']->CurrDecimalPlaces) . '</td> </tr>'; - $i++; - if ($i>15){ - $i=0; + } - } echo '</table>'; echo '<br /> <div class="centre"> @@ -364,4 +357,4 @@ echo '</div> </form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/SupplierAllocations.php =================================================================== --- trunk/SupplierAllocations.php 2013-08-20 04:30:16 UTC (rev 6269) +++ trunk/SupplierAllocations.php 2013-08-20 07:47:56 UTC (rev 6270) @@ -451,13 +451,13 @@ echo '<table class="selection">'; $TableHeader = '<tr> - <th>' . _('Type') . '</th> - <th>' . _('Trans') . '<br />' . _('Number') . '</th> - <th>' . _('Trans') .'<br />' . _('Date') . '</th> - <th>' . _('Supp') . '<br />' . _('Ref') . '</th> - <th>' . _('Total') . '<br />' . _('Amount') .'</th> - <th>' . _('Yet to') . '<br />' . _('Allocate') . '</th> - <th>' . _('This') . '<br />' . _('Allocation') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Type') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Trans') . '<br />' . _('Number') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Trans') .'<br />' . _('Date') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Supp') . '<br />' . _('Ref') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Total') . '<br />' . _('Amount') .'</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Yet to') . '<br />' . _('Allocate') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('This') . '<br />' . _('Allocation') . '</th> </tr>'; $k = 0; $Counter = 0; @@ -693,4 +693,4 @@ echo '</div> </form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> |