From: <rc...@us...> - 2014-08-30 15:03:26
|
Revision: 6857 http://sourceforge.net/p/web-erp/reponame/6857 Author: rchacon Date: 2014-08-30 15:03:16 +0000 (Sat, 30 Aug 2014) Log Message: ----------- In TaxAuthorities.php, adds $ViewTopic and $BookMark, completes table headings, formats number columns to fix sort order, and minor improvements. Modified Paths: -------------- trunk/TaxAuthorities.php trunk/doc/Change.log Modified: trunk/TaxAuthorities.php =================================================================== --- trunk/TaxAuthorities.php 2014-08-29 22:33:40 UTC (rev 6856) +++ trunk/TaxAuthorities.php 2014-08-30 15:03:16 UTC (rev 6857) @@ -1,33 +1,32 @@ <?php - /* $Id$*/ include('includes/session.inc'); $Title = _('Tax Authorities'); +$ViewTopic = 'Tax';// Filename in ManualContents.php's TOC. +$BookMark = 'TaxAuthorities';// Anchor's id in the manual's html document. include('includes/header.inc'); +echo '<p class="page_title_text"><img alt="" src="' . $RootPath . '/css/' . $Theme . + '/images/maintenance.png" title="' . + _('Tax Authorities') . '" />' . ' ' . + _('Tax Authorities') . '</p>'; -echo '<p class="page_title_text"> - <img src="'.$RootPath.'/css/'.$Theme.'/images/maintenance.png" title="' . _('Supplier Types') - . '" alt="" />' . $Title. ' - </p>'; - -if (isset($_POST['SelectedTaxAuthID'])){ +if(isset($_POST['SelectedTaxAuthID'])) { $SelectedTaxAuthID =$_POST['SelectedTaxAuthID']; -} elseif(isset($_GET['SelectedTaxAuthID'])){ +} elseif(isset($_GET['SelectedTaxAuthID'])) { $SelectedTaxAuthID =$_GET['SelectedTaxAuthID']; } +if(isset($_POST['submit'])) { -if (isset($_POST['submit'])) { - /* actions to take once the user has clicked the submit button ie the page has called itself with some user input */ - if ( trim( $_POST['Description'] ) == '' ) { + if( trim( $_POST['Description'] ) == '' ) { $InputError = 1; prnMsg( _('The tax type description may not be empty'), 'error'); } - if (isset($SelectedTaxAuthID)) { + if(isset($SelectedTaxAuthID)) { /*SelectedTaxAuthID could also exist if submit had not been clicked this code would not run in this case cos submit is false of course see the @@ -48,7 +47,7 @@ $msg = _('The tax authority for record has been updated'); - } elseif ($InputError !=1) { + } elseif($InputError !=1) { /*Selected tax authority is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new tax authority form */ @@ -92,7 +91,7 @@ $InsertResult = DB_query($sql,$db); } //run the SQL from either of the above possibilites - if (isset($InputError) and $InputError !=1) { + if(isset($InputError) and $InputError !=1) { unset( $_POST['TaxGLCode']); unset( $_POST['PurchTaxGLCode']); unset( $_POST['Description']); @@ -101,7 +100,7 @@ prnMsg($msg); -} elseif (isset($_GET['delete'])) { +} elseif(isset($_GET['delete'])) { //the link to delete a selected record was clicked instead of the submit button // PREVENT DELETES IF DEPENDENT RECORDS IN OTHER TABLES @@ -112,7 +111,7 @@ $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); - if ($myrow[0]>0) { + if($myrow[0]>0) { prnmsg(_('Cannot delete this tax authority because there are tax groups defined that use it'),'warn'); } else { /*Cascade deletes in TaxAuthLevels */ @@ -123,7 +122,7 @@ } // end of related records testing } -if (!isset($SelectedTaxAuthID)) { +if(!isset($SelectedTaxAuthID)) { /* It could still be the second time the page has been run and a record has been selected for modification - SelectedTaxAuthID will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters then none of the above are true and the list of tax authorities will be displayed with links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ @@ -151,11 +150,12 @@ <th class="ascending" >' . _('Bank Account') . '</th> <th class="ascending" >' . _('Bank Act Type') . '</th> <th class="ascending" >' . _('Bank Swift') . '</th> + <th colspan="4">' . _('Maintenance') . '</th> </tr>'; $k=0; - while ($myrow = DB_fetch_row($result)) { + while($myrow = DB_fetch_row($result)) { - if ($k==1){ + if($k==1) { echo '<tr class="EvenTableRows">'; $k=0; } else { @@ -163,14 +163,14 @@ $k++; } - printf('<td>%s</td> + printf('<td class="number">%s</td> <td>%s</td> + <td class="number">%s</td> + <td class="number">%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> - <td>%s</td> - <td>%s</td> <td><a href="%sSelectedTaxAuthID=%s">' . _('Edit') . '</a></td> <td><a href="%sSelectedTaxAuthID=%s&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this tax authority?') . '\');">' . _('Delete') . '</a></td> <td><a href="%sTaxAuthority=%s">' . _('Edit Rates') . '</a></td> @@ -200,19 +200,19 @@ -if (isset($SelectedTaxAuthID)) { +if(isset($SelectedTaxAuthID)) { echo '<div class="centre"> <a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">' . _('Review all defined tax authority records') . '</a> </div> - <br />'; - } + <br />'; +} echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -if (isset($SelectedTaxAuthID)) { +if(isset($SelectedTaxAuthID)) { //editing an existing tax authority $sql = "SELECT taxglcode, @@ -250,7 +250,7 @@ ORDER BY accountcode"; $result = DB_query($SQL,$db); -if (!isset($_POST['Description'])) { +if(!isset($_POST['Description'])) { $_POST['Description']=''; } echo '<table class="selection"> @@ -262,8 +262,8 @@ <td>' . _('Input tax GL Account') . ':</td> <td><select name="PurchTaxGLCode">'; -while ($myrow = DB_fetch_array($result)) { - if (isset($_POST['PurchTaxGLCode']) and $myrow['accountcode']==$_POST['PurchTaxGLCode']) { +while($myrow = DB_fetch_array($result)) { + if(isset($_POST['PurchTaxGLCode']) and $myrow['accountcode']==$_POST['PurchTaxGLCode']) { echo '<option selected="selected" value="'; } else { echo '<option value="'; @@ -281,8 +281,8 @@ <td>' . _('Output tax GL Account') . ':</td> <td><select name="TaxGLCode">'; -while ($myrow = DB_fetch_array($result)) { - if (isset($_POST['TaxGLCode']) and $myrow['accountcode']==$_POST['TaxGLCode']) { +while($myrow = DB_fetch_array($result)) { + if(isset($_POST['TaxGLCode']) and $myrow['accountcode']==$_POST['TaxGLCode']) { echo '<option selected="selected" value="'; } else { echo '<option value="'; @@ -291,16 +291,16 @@ } //end while loop -if (!isset($_POST['Bank'])) { +if(!isset($_POST['Bank'])) { $_POST['Bank']=''; } -if (!isset($_POST['BankAccType'])) { +if(!isset($_POST['BankAccType'])) { $_POST['BankAccType']=''; } -if (!isset($_POST['BankAcc'])) { +if(!isset($_POST['BankAcc'])) { $_POST['BankAcc']=''; } -if (!isset($_POST['BankSwift'])) { +if(!isset($_POST['BankSwift'])) { $_POST['BankSwift']=''; } @@ -328,7 +328,7 @@ <div class="centre"> <input type="submit" name="submit" value="' . _('Enter Information') . '" /> </div> - </div> + </div> </form>'; include('includes/footer.inc'); Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2014-08-29 22:33:40 UTC (rev 6856) +++ trunk/doc/Change.log 2014-08-30 15:03:16 UTC (rev 6857) @@ -1,5 +1,6 @@ webERP Change Log +30/8/14 RChacon: In TaxAuthorities.php, adds $ViewTopic and $BookMark, completes table headings, formats number columns to fix sort order, and minor improvements. 30/8/14 Phil: WorkOrderEntry.php didn't handle no item returned from search correctly - fixed. 29/8/14 RChacon: In TaxAuthorityRates.php and TaxCategories.php: adds $ViewTopic and $BookMark; Uses gettext() to translate 'Exempt', 'Freight' and 'Handling'. 29/8/14 Exson: Fixed the StockLocStatus Serial Number link column shift problem. |