weberp-svn Mailing List for Web-based Business Accounting and ERP
Brought to you by:
sotandeka,
tim_schofield
You can subscribe to this list here.
2011 |
Jan
(486) |
Feb
(106) |
Mar
(375) |
Apr
(242) |
May
(67) |
Jun
(170) |
Jul
(1936) |
Aug
(633) |
Sep
(147) |
Oct
(103) |
Nov
(63) |
Dec
(39) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2012 |
Jan
(78) |
Feb
(78) |
Mar
(32) |
Apr
(161) |
May
(221) |
Jun
(377) |
Jul
(115) |
Aug
(108) |
Sep
(18) |
Oct
|
Nov
|
Dec
|
From: <tim...@us...> - 2012-09-10 15:27:01
|
Revision: 9596 http://weberp.svn.sourceforge.net/weberp/?rev=9596&view=rev Author: tim_schofield Date: 2012-09-10 15:26:50 +0000 (Mon, 10 Sep 2012) Log Message: ----------- Remove new icon Removed Paths: ------------- trunk/css/silverwolf/images/spreadsheet.png Deleted: trunk/css/silverwolf/images/spreadsheet.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-09-10 15:25:25
|
Revision: 9595 http://weberp.svn.sourceforge.net/weberp/?rev=9595&view=rev Author: tim_schofield Date: 2012-09-10 15:25:15 +0000 (Mon, 10 Sep 2012) Log Message: ----------- Add new icon Added Paths: ----------- trunk/css/silverwolf/images/spreadsheet.png Added: trunk/css/silverwolf/images/spreadsheet.png =================================================================== (Binary files differ) Property changes on: trunk/css/silverwolf/images/spreadsheet.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-09-07 15:20:23
|
Revision: 9594 http://weberp.svn.sourceforge.net/weberp/?rev=9594&view=rev Author: tim_schofield Date: 2012-09-07 15:20:13 +0000 (Fri, 07 Sep 2012) Log Message: ----------- Escape the COOKIE array Modified Paths: -------------- trunk/includes/session.inc Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2012-09-07 11:48:29 UTC (rev 9593) +++ trunk/includes/session.inc 2012-09-07 15:20:13 UTC (rev 9594) @@ -52,8 +52,8 @@ foreach ($_POST as $key => $value) { if (gettype($value) != 'array') { if(get_magic_quotes_gpc()) { - $_POST['name'] = stripslashes($_POST['name']); - $_REQUEST['name'] = stripslashes($_REQUEST['name']); + $_POST[$key] = stripslashes($_POST[$value]); + $_REQUEST[$key] = stripslashes($_REQUEST[$value]); } $_REQUEST[$key] = DB_escape_string($value); $_POST[$key] = DB_escape_string($value); @@ -67,6 +67,17 @@ } } + /* iterate through all elements of the $_COOKIE array and DB_escape_string them + to limit possibility for SQL injection attacks and cross scripting attacks + */ + foreach ($_COOKIE as $key => $value) { + if(get_magic_quotes_gpc()) { + $_COOKIE[$key]=stripslashes($value); + $_REQUEST[$key]=stripslashes($value); + } + $_COOKIE[$key] = DB_escape_string($value); + } + /* iterate through all elements of the $_GET array and DB_escape_string them to limit possibility for SQL injection attacks and cross scripting attacks */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-09-07 11:48:35
|
Revision: 9593 http://weberp.svn.sourceforge.net/weberp/?rev=9593&view=rev Author: tim_schofield Date: 2012-09-07 11:48:29 +0000 (Fri, 07 Sep 2012) Log Message: ----------- Escape the REQUEST array as well as the POST and GET arrays Modified Paths: -------------- trunk/includes/session.inc Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2012-09-06 09:18:12 UTC (rev 9592) +++ trunk/includes/session.inc 2012-09-07 11:48:29 UTC (rev 9593) @@ -53,7 +53,9 @@ if (gettype($value) != 'array') { if(get_magic_quotes_gpc()) { $_POST['name'] = stripslashes($_POST['name']); + $_REQUEST['name'] = stripslashes($_REQUEST['name']); } + $_REQUEST[$key] = DB_escape_string($value); $_POST[$key] = DB_escape_string($value); } else { foreach ($value as $key1 => $value1) { @@ -70,6 +72,7 @@ */ foreach ($_GET as $key => $value) { if (gettype($value) != 'array') { + $_REQUEST[$key] = DB_escape_string($value); $_GET[$key] = DB_escape_string($value); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-09-06 09:18:19
|
Revision: 9592 http://weberp.svn.sourceforge.net/weberp/?rev=9592&view=rev Author: tim_schofield Date: 2012-09-06 09:18:12 +0000 (Thu, 06 Sep 2012) Log Message: ----------- Pak Ricard: Fix SQL for All Locations and Stock category Modified Paths: -------------- trunk/NoSalesItems.php Modified: trunk/NoSalesItems.php =================================================================== --- trunk/NoSalesItems.php 2012-09-06 09:18:02 UTC (rev 9591) +++ trunk/NoSalesItems.php 2012-09-06 09:18:12 UTC (rev 9592) @@ -2,8 +2,6 @@ /* $Id: NoSalesItems.php 2012-05-12 Kapal Laut $*/ -/* Session started in session.inc for password checking and authorisation level check -config.php is in turn included in session.inc*/ include ('includes/session.inc'); $title = _('No Sales Items Searching'); include ('includes/header.inc'); @@ -11,19 +9,17 @@ echo '<div class="centre"><p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('No Sales Items') . '" alt="" />' . ' ' . _('No Sales Items') . '</p></div>'; echo '<div class="page_help_text">' . _('List of items with stock available during the last X days at the selected locations but did not sell any quantity during these X days.'). '<br />'. _( 'This list gets the no selling items, items at the location just wasting space, or need a price reduction, etc.') . '<br />'. _('Stock available during the last X days means there was a stock movement that produced that item into that location before that day, and no other positive stock movement has been created afterwards. No sell any quantity means, there is no sales order for that item from that location.') . '</div>'; -//check if input already - echo '<br />'; echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?name="SelectCustomer" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; - //to view store location + //select location echo '<tr> - <td>'._('Select Location') . '</td> - <td>:</td> - <td><select name="Location[]" multiple="multiple"> - <option value="All" selected="selected">' . _('All') . '</option>';; + <td>'._('Select Location') . '</td> + <td>:</td> + <td><select name="Location[]" multiple="multiple"> + <option value="All" selected="selected">' . _('All') . '</option>';; $sql = "SELECT loccode,locationname FROM locations ORDER BY locationname"; $locationresult = DB_query($sql, $db); @@ -94,57 +90,90 @@ </div><br /> </form>'; } else { - // everything below here to view NumberOfNoSalesItems on selected location $FromDate = FormatDateForSQL(DateAdd(Date($_SESSION['DefaultDateFormat']),'d', -filter_number_input($_POST['NumberOfDays']))); - $SQL = "SELECT stockmaster.stockid, + if ($_POST['StockCat']=='All'){ + $WhereStockCat = ""; + }else{ + $WhereStockCat = " AND stockmaster.categoryid = '" . $_POST['StockCat'] ."'"; + } + + if ($_POST['Location'][0] == 'All') { + $SQL = "SELECT stockmaster.stockid, stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces, - locstock.quantity, - locations.locationname - FROM stockmaster,locstock,locations - WHERE stockmaster.stockid = locstock.stockid - AND (locstock.loccode = locations.loccode)"; - if ($_POST['Location'][0] == 'All') { - $WhereLocation = ' '; - } elseif (sizeof($_POST['Location']) == 1) { - $WhereLocation = " AND locstock.loccode ='" . $_POST['Location'][0] . "' "; - } else { - $WhereLocation = " AND locstock.loccode IN("; - $commactr = 0; - foreach ($_POST['Location'] as $key => $value) { - $WhereLocation .= "'" . $value . "'"; - $commactr++; - if ($commactr < sizeof($_POST['Location'])) { - $WhereLocation .= ","; - } // End of if - } // End of foreach - $WhereLocation .= ')'; - } - $SQL = $SQL . $WhereLocation. " AND (locstock.quantity > 0) + stockmaster.units + FROM stockmaster,locstock + WHERE stockmaster.stockid = locstock.stockid ". + $WhereStockCat . " + AND (locstock.quantity > 0) AND NOT EXISTS ( - SELECT * - FROM salesorderdetails, salesorders - WHERE stockmaster.stockid = salesorderdetails.stkcode - AND (salesorders.fromstkloc = locstock.loccode) - AND (salesorderdetails.orderno = salesorders.orderno) - AND salesorderdetails.actualdispatchdate > '" . $FromDate . "') + SELECT * + FROM salesorderdetails, salesorders + WHERE stockmaster.stockid = salesorderdetails.stkcode + AND (salesorderdetails.orderno = salesorders.orderno) + AND salesorderdetails.actualdispatchdate > '" . $FromDate . "') AND NOT EXISTS ( - SELECT * - FROM stockmoves - WHERE stockmoves.loccode = locstock.loccode - AND stockmoves.stockid = stockmaster.stockid - AND stockmoves.trandate >= '" . $FromDate . "' - ) + SELECT * + FROM stockmoves + WHERE stockmoves.stockid = stockmaster.stockid + AND stockmoves.trandate >= '" . $FromDate . "') AND EXISTS ( - SELECT * - FROM stockmoves - WHERE stockmoves.loccode = locstock.loccode - AND stockmoves.stockid = stockmaster.stockid - AND stockmoves.trandate < '" . $FromDate . "' - AND stockmoves.qty >0) "; - $SQL = $SQL. "ORDER BY stockmaster.stockid"; + SELECT * + FROM stockmoves + WHERE stockmoves.stockid = stockmaster.stockid + AND stockmoves.trandate < '" . $FromDate . "' + AND stockmoves.qty >0) + GROUP BY stockmaster.stockid + ORDER BY stockmaster.stockid"; + }else{ + $WhereLocation = ''; + if (sizeof($_POST['Location']) == 1) { + $WhereLocation = " AND locstock.loccode ='" . $_POST['Location'][0] . "' "; + } else { + $WhereLocation = " AND locstock.loccode IN("; + $commactr = 0; + foreach ($_POST['Location'] as $key => $value) { + $WhereLocation .= "'" . $value . "'"; + $commactr++; + if ($commactr < sizeof($_POST['Location'])) { + $WhereLocation .= ","; + } // End of if + } // End of foreach + $WhereLocation .= ')'; + } + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.units, + locstock.quantity, + locations.locationname + FROM stockmaster,locstock,locations + WHERE stockmaster.stockid = locstock.stockid + AND (locstock.loccode = locations.loccode)". + $WhereLocation . + $WhereStockCat . " + AND (locstock.quantity > 0) + AND NOT EXISTS ( + SELECT * + FROM salesorderdetails, salesorders + WHERE stockmaster.stockid = salesorderdetails.stkcode + AND (salesorders.fromstkloc = locstock.loccode) + AND (salesorderdetails.orderno = salesorders.orderno) + AND salesorderdetails.actualdispatchdate > '" . $FromDate . "') + AND NOT EXISTS ( + SELECT * + FROM stockmoves + WHERE stockmoves.loccode = locstock.loccode + AND stockmoves.stockid = stockmaster.stockid + AND stockmoves.trandate >= '" . $FromDate . "') + AND EXISTS ( + SELECT * + FROM stockmoves + WHERE stockmoves.loccode = locstock.loccode + AND stockmoves.stockid = stockmaster.stockid + AND stockmoves.trandate < '" . $FromDate . "' + AND stockmoves.qty >0) + ORDER BY stockmaster.stockid"; + } $result = DB_query($SQL, $db); echo '<p class="page_title_text" align="center"><strong>' . _('No Sales Items') . '</strong></p>'; echo '<table class="selection">'; @@ -179,22 +208,41 @@ $QOH = $QOHRow['totalquantity']; $CodeLink = InternalLink($rootpath, 'SelectProduct.php?StockID=' . $myrow['stockid'], $myrow['stockid']); - printf('<td class="number">%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td>%s</td> - </tr>', - $i, - $myrow['locationname'], - $CodeLink, - $myrow['description'], - locale_number_format($myrow['quantity'], $myrow['decimalplaces']), //on hand on location selected only - locale_number_format($QOH, $myrow['decimalplaces']), // total on hand - $myrow['units'] //unit - ); + if ($_POST['Location'][0] == 'All') { + printf('<td class="number">%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td>%s</td> + </tr>', + $i, + 'All', + $CodeLink, + $myrow['description'], + $QOH, //on hand on ALL locations + $QOH, // total on hand + $myrow['units'] //unit + ); + }else{ + printf('<td class="number">%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td>%s</td> + </tr>', + $i, + $myrow['locationname'], + $CodeLink, + $myrow['description'], + $myrow['quantity'], //on hand on location selected only + $QOH, // total on hand + $myrow['units'] //unit + ); + } $i++; } echo '</table>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-09-06 09:18:11
|
Revision: 9591 http://weberp.svn.sourceforge.net/weberp/?rev=9591&view=rev Author: tim_schofield Date: 2012-09-06 09:18:02 +0000 (Thu, 06 Sep 2012) Log Message: ----------- SecurityTokens.php-Make some changes for new layout structure Modified Paths: -------------- trunk/SecurityTokens.php Modified: trunk/SecurityTokens.php =================================================================== --- trunk/SecurityTokens.php 2012-09-06 09:17:52 UTC (rev 9590) +++ trunk/SecurityTokens.php 2012-09-06 09:18:02 UTC (rev 9591) @@ -41,30 +41,41 @@ unset($description); unset($_POST['TokenID']); } -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Print') . '" alt="" />' . ' ' . $title . '</p>'; echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" name="form">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<br /><table class="selection"><tr>'; +echo '<table class="selection"><tr>'; +echo '<tr> + <th class="header" colspan="2"><img src="'.$rootpath.'/css/'.$theme.'/images/security.png" title="' . _('Print') . '" alt="" />' . ' ' . $title . '</th> + </tr>'; - if (isset($_GET['Action']) and $_GET['Action']=='edit') { echo '<td>'. _('Description') . '</td> - <td><input type="text" size="30" maxlength="30" name="Description" value="'.$description.'" /></td><td> + <td><input type="text" size="30" maxlength="30" name="Description" value="'.$description.'" /></td></tr> <input type="hidden" name="TokenID" value="'.$_GET['SelectedToken'].'" />'; - echo '<button type="submit" name="update">' . _('Update') . '</button>'; + echo '</table>'; + echo '<div class="centre"> + <button type="submit" name="update">' . _('Update') . '</button> + </div>'; } else { - echo '<td>'._('Token ID') . '<td><input type="text" name="TokenID" value="'.$_POST['TokenID'].'" /></td></tr> - <tr><td>'. _('Description') . '</td><td><input type="text" size="70" maxlength="255" name="Description" value="'.$description.'" /></td><td>'; - echo '<button type="submit" name="submit">' . _('Insert') . '</button>'; + echo '<td>'._('Token ID') . '<td><input type="text" name="TokenID" value="" /></td></tr> + <tr> + <td>'. _('Description') . '</td><td><input type="text" size="70" maxlength="255" name="Description" value="" /></td> + </tr>'; + echo '</table>'; + echo '<div class="centre"> + <button type="submit" name="submit">' . _('Insert') . '</button> + </div>'; } -echo '</td></tr></table><p></p>'; - echo '</form>'; echo '<table class="selection">'; + +echo '<tr> + <th class="header" colspan="3"><img src="'.$rootpath.'/css/'.$theme.'/images/token.png" title="' . _('Current Tokens') . '" alt="" />' . ' ' . _('Current Tokens') . '</th> + </tr>'; echo '<tr><th>'. _('Token ID') .'</th>'; echo '<th>'. _('Description'). '</th>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-09-06 09:18:03
|
Revision: 9590 http://weberp.svn.sourceforge.net/weberp/?rev=9590&view=rev Author: tim_schofield Date: 2012-09-06 09:17:52 +0000 (Thu, 06 Sep 2012) Log Message: ----------- PDFPriceList.php-Make some changes for new layout structure Modified Paths: -------------- trunk/PDFPriceList.php Modified: trunk/PDFPriceList.php =================================================================== --- trunk/PDFPriceList.php 2012-09-06 09:17:42 UTC (rev 9589) +++ trunk/PDFPriceList.php 2012-09-06 09:17:52 UTC (rev 9590) @@ -244,8 +244,6 @@ $title= _('Price Listing'); include('includes/header.inc'); - echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Price List') . '" alt="" />' . ' ' . _('Print a price list') . '</p>'; - if (!isset($_POST['FromCriteria']) or !isset($_POST['ToCriteria'])) { /*if $FromCriteria is not set then show a form to allow input */ @@ -253,8 +251,18 @@ echo '<form onsubmit="return SubmitForm(this, \'\')" action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . ' method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection"><tr><td>'. _('From Inventory Category Code') .':</font></td><td><select name=FromCriteria>'; + echo '<table class="selection">'; + echo '<tr> + <th colspan="2" class="header"> + <img src="' . $rootpath . '/css/' . $theme . '/images/lists.png" title="' . _('Price List') . '" alt="" />' . ' ' . _('Print a price list') . ' + </th> + </tr>'; + + echo '<tr> + <td>'. _('From Inventory Category Code') .':</td> + <td><select name=FromCriteria>'; + $sql="SELECT categoryid, categorydescription FROM stockcategory ORDER BY categoryid"; $CatResult= DB_query($sql,$db); While ($myrow = DB_fetch_array($CatResult)){ @@ -297,7 +305,7 @@ <td><input type="text" size="11" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveDate" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td> </tr>'; - echo '</table><br /><div class="centre"><button type="submit" name="PrintPDF">'. _('Print PDF'). '</button></div>'; + echo '</table><div class="centre"><button type="submit" name="PrintPDF">'. _('Print PDF'). '</button></div>'; } include('includes/footer.inc'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-09-06 09:17:53
|
Revision: 9589 http://weberp.svn.sourceforge.net/weberp/?rev=9589&view=rev Author: tim_schofield Date: 2012-09-06 09:17:42 +0000 (Thu, 06 Sep 2012) Log Message: ----------- OrderDetails.php-Make some changes for new layout structure Modified Paths: -------------- trunk/OrderDetails.php Modified: trunk/OrderDetails.php =================================================================== --- trunk/OrderDetails.php 2012-09-06 09:17:32 UTC (rev 9588) +++ trunk/OrderDetails.php 2012-09-06 09:17:42 UTC (rev 9589) @@ -53,13 +53,16 @@ $GetOrdHdrResult = DB_query($OrderHeaderSQL,$db, $ErrMsg, $DbgMsg); if (DB_num_rows($GetOrdHdrResult)==1) { - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Order Details') . '" alt="" />' . ' ' . $title . '</p>'; $myrow = DB_fetch_array($GetOrdHdrResult); $CustomerCurrency=$myrow['currcode']; echo '<table class="selection">'; - echo '<tr><th colspan="4" class="header">'._('Order Header Details For Order No').' '.$_GET['OrderNumber'].'</th></tr>'; echo '<tr> + <th colspan="4" class="header"> + <img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Order Details') . '" alt="" />'._('Order Header Details For Order No').' '.$_GET['OrderNumber'].' + </th> + </tr>'; + echo '<tr> <th style="text-align: left">' . _('Customer Code') . ':</th> <td class="OddTableRows"><font>' . InternalLink($rootpath, 'SelectCustomer.php?Select=' . $myrow['debtorno'], $myrow['debtorno']) . '</td> <th style="text-align: left">' . _('Customer Name') . ':</th><td><font>' . $myrow['name'] . '</td> @@ -149,8 +152,12 @@ $OrderTotalWeight = 0; echo '<br /><table cellpadding="2" class="selection">'; - echo '<tr><th colspan="9" class="header">'._('Order Line Details For Order No').' '.$_GET['OrderNumber'].'</th></tr>'; echo '<tr> + <th colspan="9" class="header"> + <img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Order Details') . '" alt="" />'._('Order Line Details For Order No').' '.$_GET['OrderNumber'].' + </th> + </tr>'; + echo '<tr> <th>' . _('Item Code') . '</th> <th>' . _('Item Description') . '</th> <th>' . _('Quantity') . '</th> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-09-06 09:17:43
|
Revision: 9588 http://weberp.svn.sourceforge.net/weberp/?rev=9588&view=rev Author: tim_schofield Date: 2012-09-06 09:17:32 +0000 (Thu, 06 Sep 2012) Log Message: ----------- GLTrialBalance.php-Make some changes for new layout structure Modified Paths: -------------- trunk/GLTrialBalance.php Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2012-09-06 09:17:23 UTC (rev 9587) +++ trunk/GLTrialBalance.php 2012-09-06 09:17:32 UTC (rev 9588) @@ -18,10 +18,9 @@ $_POST['SelectADifferentPeriod']=_('Select A Different Period'); } -if ((! isset($_POST['FromPeriod']) AND ! isset($_POST['ToPeriod'])) OR isset($_POST['SelectADifferentPeriod'])){ +if ((! isset($_POST['FromPeriod']) AND ! isset($_POST['ToPeriod'])) OR isset($_POST['SelectADifferentPeriod']) or (isset($_POST['PrintPDF']) and $_POST['PrintPDF']=='PrintPDF')){ include ('includes/header.inc'); - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Trial Balance') . '" alt="" />' . ' ' . $title . '</p>'; echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -36,7 +35,12 @@ $period=GetPeriod($FromDate, $db); /*Show a form to allow input of criteria for TB to show */ - echo '<table class="selection"><tr><td>' . _('Select Period From:') . '</td><td><select name="FromPeriod">'; + echo '<table class="selection">'; + echo '<tr> + <th class="header" colspan="2"><img src="'.$rootpath.'/css/'.$theme.'/images/balance.png" title="' . _('Trial Balance') . '" alt="" />' . ' ' . $title . '</th> + </tr> + <tr> + <td>' . _('Select Period From:') . '</td><td><select name="FromPeriod">'; $nextYear = date('Y-m-d',strtotime('+1 Year')); $sql = "SELECT periodno, lastdate_in_period @@ -88,17 +92,19 @@ echo '<option value ="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } - echo '</select></td></tr></table><br />'; + echo '</select></td></tr></table>'; - echo '<div class="centre"><button type="submit" name="ShowTB">' . _('Show Trial Balance') .'</button>'; - echo '<button type="submit" name="PrintPDF">'._('PrintPDF').'</button></div><br />'; + echo '<div class="centre"><button type="submit" name="ShowTB" onclick="ChangeButtonValue(this, this.name)">' . _('Show Trial Balance') .'</button>'; + echo '<button type="submit" name="PrintPDF" onclick="ChangeButtonValue(this, this.name)">'._('PrintPDF').'</button></div>'; /*Now do the posting while the user is thinking about the period to select*/ include ('includes/GLPostings.inc'); -} else if (isset($_POST['PrintPDF'])) { +} +if (isset($_POST['PrintPDF']) and $_POST['PrintPDF']=='PrintPDF') { + include('includes/PDFStarter.php'); $pdf->addInfo('Title', _('Trial Balance') ); @@ -376,7 +382,7 @@ $pdf->OutputF($_SESSION['DatabaseName'] . '_GL_Trial_Balance_' . Date('Y-m-d_h-m-s') . '.pdf'); $pdf->__destruct(); exit; -} else { +} else if (isset($_POST['ShowTB']) and $_POST['ShowTB']=='ShowTB'){ include('includes/header.inc'); echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; @@ -425,13 +431,20 @@ _('No general ledger accounts were returned by the SQL because'), _('The SQL that failed was:')); - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Trial Balance') . '" alt="" />' . ' ' . _('Trial Balance Report') . '</p>'; - /*show a table of the accounts info returned by the SQL Account Code , Account Name , Month Actual, Month Budget, Period Actual, Period Budget */ echo '<table cellpadding="2" class="selection">'; - echo '<tr><th colspan="6" class="header">'. _('Trial Balance for the month of ') . $PeriodToDate . _(' and for the ') . $NumberOfMonths . _(' months to ') . $PeriodToDate .'</th></tr>'; + echo '<tr> + <th colspan="6" class="header"> + <img src="'.$rootpath.'/css/'.$theme.'/images/balance.png" title="" alt="" />'. + _('Trial Balance for the month of ') . $PeriodToDate . _(' and for the ') . $NumberOfMonths . _(' months to ') . $PeriodToDate .' + <a onClick="PrintTable(this)" class="tooltip"> + <img class="PrinterIcon" src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="" alt="" /> + <span class="custom info"><em>' . _('Information') . '</em>' . _('Click here to make a pdf of this table. A copy will be held in your spool queue.') . '</span> + </a> + </th> + </tr>'; $TableHeader = '<tr> <th>' . _('Account') . '</th> <th>' . _('Account Name') . '</th> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-09-06 09:17:34
|
Revision: 9587 http://weberp.svn.sourceforge.net/weberp/?rev=9587&view=rev Author: tim_schofield Date: 2012-09-06 09:17:23 +0000 (Thu, 06 Sep 2012) Log Message: ----------- Improvements for new layout Modified Paths: -------------- trunk/GLJournal.php Modified: trunk/GLJournal.php =================================================================== --- trunk/GLJournal.php 2012-09-06 09:17:13 UTC (rev 9586) +++ trunk/GLJournal.php 2012-09-06 09:17:23 UTC (rev 9587) @@ -233,7 +233,6 @@ $_SESSION['JournalDetail']->JnlDate = Date($_SESSION['DefaultDateFormat'],mktime(0,0,0,date('m'),0,date('Y'))); } -echo '<br />'; echo '<table class="selection"> <tr> <th colspan="5" class="header"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Journal Header') . '" alt="" />' . _('Journal Header') . '</th> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-09-06 09:17:23
|
Revision: 9586 http://weberp.svn.sourceforge.net/weberp/?rev=9586&view=rev Author: tim_schofield Date: 2012-09-06 09:17:13 +0000 (Thu, 06 Sep 2012) Log Message: ----------- Improvements for new layout Modified Paths: -------------- trunk/DailySalesInquiry.php Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2012-09-06 09:17:01 UTC (rev 9585) +++ trunk/DailySalesInquiry.php 2012-09-06 09:17:13 UTC (rev 9586) @@ -6,10 +6,6 @@ $title = _('Daily Sales Inquiry'); include('includes/header.inc'); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Daily Sales') . '" alt="" />' . ' ' . _('Daily Sales') . '</p>'; -echo '<div class="page_help_text">' . _('Select the month to show daily sales for') . '</div> - <br />'; - echo '<form onsubmit="return SubmitForm(this, \'\')" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -20,8 +16,15 @@ $EndDateSQL = $myrow['lastdate_in_period']; } -echo '<table class="selection"> - <tr> +echo '<table class="selection">'; + +echo '<tr> + <th class="header" colspan="4"> + <img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Select the month to show daily sales for') . '" alt="" />' . ' ' . _('Select the month to show daily sales for') . ' + </th> + </tr>'; + +echo '<tr> <td>' . _('Month to Show') . ':</td> <td><select tabindex="1" name="MonthToShow" onChange="ReloadForm(ShowResults)">'; @@ -58,12 +61,10 @@ echo '</tr> </table> - <br /> <div class="centre"> <button tabindex="4" type="submit" name="ShowResults">' . _('Show Daily Sales For The Selected Month') . '</button> </div> - </form> - <br />'; + </form>'; /*Now get and display the sales data returned */ if (mb_strpos($EndDateSQL,'/')) { $Date_Array = explode('/',$EndDateSQL); @@ -100,6 +101,11 @@ echo '<table class="selection"> <tr> + <th class="header" colspan="7"> + <img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Daily Sales For') . ' ' . MonthAndYearFromSQLDate($EndDateSQL) . '" alt="" />' . _('Daily Sales For') . ' ' . MonthAndYearFromSQLDate($EndDateSQL) . ' + </th> + </tr> + <tr> <th style="width: 14%">' . _('Sunday') . '</th> <th style="width: 14%">' . _('Monday') . '</th> <th style="width: 14%">' . _('Tuesday') . '</th> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-09-06 09:17:11
|
Revision: 9585 http://weberp.svn.sourceforge.net/weberp/?rev=9585&view=rev Author: tim_schofield Date: 2012-09-06 09:17:01 +0000 (Thu, 06 Sep 2012) Log Message: ----------- Improvements for new layout Modified Paths: -------------- trunk/DailyBankTransactions.php Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2012-09-06 09:16:51 UTC (rev 9584) +++ trunk/DailyBankTransactions.php 2012-09-06 09:17:01 UTC (rev 9585) @@ -97,7 +97,10 @@ <th colspan="9" class="header"> <img src="'.$rootpath.'/css/'.$theme.'/images/bank.png" title="' . _('Bank Transactions') . '" alt="" />' . _('Account Transactions For').' '.$BankDetailRow['bankaccountname'].' '._('Between').' '.$_POST['FromTransDate'] . ' ' . _('and') . ' ' . $_POST['ToTransDate'] . ' - <img onClick="PrintTable(this)" class="PrinterIcon" src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print this table') . '" alt="" /> + <a onClick="PrintTable(this)" class="tooltip"> + <img class="PrinterIcon" src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="" alt="" /> + <span class="custom info"><em>' . _('Information') . '</em>' . _('Click here to make a pdf of this table. A copy will be held in your spool queue.') . '</span> + </a> </th> </tr>'; echo '<tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-09-06 09:17:02
|
Revision: 9584 http://weberp.svn.sourceforge.net/weberp/?rev=9584&view=rev Author: tim_schofield Date: 2012-09-06 09:16:51 +0000 (Thu, 06 Sep 2012) Log Message: ----------- Improvements for new layout Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2012-09-06 09:16:39 UTC (rev 9583) +++ trunk/Customers.php 2012-09-06 09:16:51 UTC (rev 9584) @@ -213,7 +213,6 @@ $ErrMsg = _('The customer could not be updated because'); $result = DB_query($sql,$db,$ErrMsg); prnMsg( _('Customer updated'),'success'); - echo '<br />'; } else { //it is a new customer /* set the DebtorNo if $AutoDebtorNo in config.php has been set to @@ -302,7 +301,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg( _('This customer cannot be deleted because there are transactions that refer to it'),'warn'); - echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('transactions against this customer'); + echo _('There are') . ' ' . $myrow[0] . ' ' . _('transactions against this customer'); } else { $sql= "SELECT COUNT(*) FROM salesorders WHERE debtorno='" . $_POST['DebtorNo'] . "'"; @@ -311,7 +310,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg( _('Cannot delete the customer record because orders have been created against it'),'warn'); - echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('orders against this customer'); + echo _('There are') . ' ' . $myrow[0] . ' ' . _('orders against this customer'); } else { $sql= "SELECT COUNT(*) FROM salesanalysis WHERE cust='" . $_POST['DebtorNo'] . "'"; $result = DB_query($sql,$db); @@ -319,7 +318,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg( _('Cannot delete this customer record because sales analysis records exist for it'),'warn'); - echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('sales analysis records against this customer'); + echo _('There are') . ' ' . $myrow[0] . ' ' . _('sales analysis records against this customer'); } else { $sql= "SELECT COUNT(*) FROM custbranch WHERE debtorno='" . $_POST['DebtorNo'] . "'"; $result = DB_query($sql,$db); @@ -327,7 +326,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg(_('Cannot delete this customer because there are branch records set up against it'),'warn'); - echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('branch records relating to this customer'); + echo _('There are') . ' ' . $myrow[0] . ' ' . _('branch records relating to this customer'); } } } @@ -444,7 +443,7 @@ $DataError =0; - echo '<br /><table class="selection" cellspacing="4"> + echo '<table class="selection" cellspacing="4"> <tr> <th colspan="4" class="header"> <img width="24px" src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Customer Details') . '" alt="" />' . _('Customer Details') . ' @@ -457,29 +456,52 @@ /* if $AutoDebtorNo in config.php has not been set or if it has been set to a number less than one, then provide an input box for the DebtorNo to manually assigned */ if ($_SESSION['AutoDebtorNo']==0) { - echo '<tr><td>' . _('Customer Code') . ':</td><td><input tabindex="1" type="text" name="DebtorNo" size="11" maxlength="10" /></td></tr>'; + echo '<tr> + <td>' . _('Customer Code') . ':</td> + <td><input tabindex="1" type="text" name="DebtorNo" size="11" maxlength="10" /></td> + </tr>'; } - echo '<tr><td>' . _('Customer Name') . ':</td> - <td><input tabindex="2" type="text" name="CustName" size="42" maxlength="40" /></td></tr>'; - echo '<tr><td>' . _('Telephone') . ':</td> - <td><input tabindex="2" type="text" name="Phone" size="30" maxlength="40" /></td></tr>'; - echo '<tr><td>' . _('Facsimile') . ':</td> - <td><input tabindex="2" type="text" name="Fax" size="30" maxlength="40" /></td></tr>'; - echo '<tr><td>' . _('Email Address') . ':</td> - <td><input tabindex="2" type="text" name="Email" size="30" maxlength="40" /></td></tr>'; - echo '<tr><td>' . _('Address Line 1 (Street)') . ':</td> - <td><input tabindex="3" type="text" name="Address1" size="42" maxlength="40" /></td></tr>'; - echo '<tr><td>' . _('Address Line 2 (Suburb/City)') . ':</td> - <td><input tabindex="4" type="text" name="Address2" size="42" maxlength="40" /></td></tr>'; - echo '<tr><td>' . _('Address Line 3 (State/Province)') . ':</td> - <td><input tabindex="5" type="text" name="Address3" size="42" maxlength="40" /></td></tr>'; - echo '<tr><td>' . _('Address Line 4 (Postal Code)') . ':</td> - <td><input tabindex="6" type="text" name="Address4" size="42" maxlength="40" /></td></tr>'; - echo '<tr><td>' . _('Address Line 5') . ':</td> - <td><input tabindex="7" type="text" name="Address5" size="22" maxlength="20" /></td></tr>'; - echo '<tr><td>' . _('Address Line 6') . ':</td> - <td><input tabindex="8" type="text" name="Address6" size="17" maxlength="15" /></td></tr>'; + echo '<tr> + <td>' . _('Customer Name') . ':</td> + <td><input tabindex="2" type="text" name="CustName" size="42" maxlength="40" /></td> + </tr>'; + echo '<tr> + <td>' . _('Telephone') . ':</td> + <td><input tabindex="2" type="text" name="Phone" size="30" maxlength="40" /></td> + </tr>'; + echo '<tr> + <td>' . _('Facsimile') . ':</td> + <td><input tabindex="2" type="text" name="Fax" size="30" maxlength="40" /></td> + </tr>'; + echo '<tr> + <td>' . _('Email Address') . ':</td> + <td><input tabindex="2" type="text" name="Email" size="30" maxlength="40" /></td> + </tr>'; + echo '<tr> + <td>' . _('Address Line 1 (Street)') . ':</td> + <td><input tabindex="3" type="text" name="Address1" size="42" maxlength="40" /></td> + </tr>'; + echo '<tr> + <td>' . _('Address Line 2 (Suburb/City)') . ':</td> + <td><input tabindex="4" type="text" name="Address2" size="42" maxlength="40" /></td> + </tr>'; + echo '<tr> + <td>' . _('Address Line 3 (State/Province)') . ':</td> + <td><input tabindex="5" type="text" name="Address3" size="42" maxlength="40" /></td> + </tr>'; + echo '<tr> + <td>' . _('Address Line 4 (Postal Code)') . ':</td> + <td><input tabindex="6" type="text" name="Address4" size="42" maxlength="40" /></td> + </tr>'; + echo '<tr> + <td>' . _('Address Line 5') . ':</td> + <td><input tabindex="7" type="text" name="Address5" size="22" maxlength="20" /></td> + </tr>'; + echo '<tr> + <td>' . _('Address Line 6') . ':</td> + <td><input tabindex="8" type="text" name="Address6" size="17" maxlength="15" /></td> + </tr>'; echo '</table></td><td><table style="background: transparent">'; @@ -596,15 +618,14 @@ echo'</table></td></tr></table>'; if ($DataError ==0){ - echo '<br /> - <div class="centre"> - <button tabindex="20" type="submit" name="submit"> - <img src="'.$rootpath.'/css/'.$theme.'/images/tick.png" title="' . _('Save') . '" alt="" class="ButtonIcon" />' . _('Add New Customer') . ' - </button> - <button tabindex="21" type="submit" name="reset"> - <img src="'.$rootpath.'/css/'.$theme.'/images/cross.png" title="' . _('Save') . '" alt="" class="ButtonIcon" />' . _('Cancel') . ' - </button> - </div>'; + echo '<div class="centre"> + <button tabindex="20" type="submit" name="submit"> + <img src="'.$rootpath.'/css/'.$theme.'/images/tick.png" title="' . _('Save') . '" alt="" class="ButtonIcon" />' . _('Add New Customer') . ' + </button> + <button tabindex="21" type="submit" name="reset"> + <img src="'.$rootpath.'/css/'.$theme.'/images/cross.png" title="' . _('Save') . '" alt="" class="ButtonIcon" />' . _('Cancel') . ' + </button> + </div>'; } echo '</form>'; @@ -651,8 +672,7 @@ $myrow = DB_fetch_array($result); /* if $AutoDebtorNo in config.php has not been set or if it has been set to a number less than one, then display the DebtorNo */ - echo '<br /> - <table class="selection" cellspacing="4">'; + echo '<table class="selection" cellspacing="4">'; echo '<tr> <th colspan="4" class="header"> <img width="24px" src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Customer Details') . '" alt="" /> @@ -897,7 +917,7 @@ echo '</select></td></tr>'; } - echo '</table></td></tr></table><br />'; + echo '</table></td></tr></table>'; $sql = "SELECT contid, debtorno, @@ -1011,7 +1031,7 @@ Where debtorno='".$DebtorNo."' and contid='".$Edit."'"; $resultupcc = DB_query($SQLupdatecc,$db); - echo '<br />'.$SQLupdatecc; + echo $SQLupdatecc; echo '<meta http-equiv="Refresh" content="0; url="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo='.$DebtorNo.'&ID='.$ID.'" />'; } if (isset($_GET['delete'])) { @@ -1021,7 +1041,7 @@ $resultupcc = DB_query($SQl,$db); echo '<meta http-equiv="Refresh" content="0; url=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo='.$DebtorNo.'">'; - echo '<br />'.$SQl; + echo $SQl; prnMsg('Contact Deleted','success'); } @@ -1031,10 +1051,10 @@ <button type="submit" name="reset"> <img src="'.$rootpath.'/css/'.$theme.'/images/tick.png" title="' . _('Cancel') . '" alt="" class="ButtonIcon" />' . _('Cancel') . '</button></div></form>'; } else if (!isset($_GET['Modify'])){ - echo '<br /><div class="centre"><button type="submit" name="submit"> + echo '<div class="centre"><button type="submit" name="submit"> <img src="'.$rootpath.'/css/'.$theme.'/images/tick.png" title="' . _('Save') . '" alt="" class="ButtonIcon" />' . _('Update Customer') . '</button>'; echo ' <button type="submit" name="delete" onclick="return confirm(\'' . _('Are You Sure?') . '\');"> - <img src="'.$rootpath.'/css/'.$theme.'/images/cross.png" title="' . _('Delete') . '" alt="" class="ButtonIcon" />' . _('Delete Customer') . '</button></div><br /></form>'; + <img src="'.$rootpath.'/css/'.$theme.'/images/cross.png" title="' . _('Delete') . '" alt="" class="ButtonIcon" />' . _('Delete Customer') . '</button></div></form>'; } else { echo '</form>'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-09-06 09:16:50
|
Revision: 9583 http://weberp.svn.sourceforge.net/weberp/?rev=9583&view=rev Author: tim_schofield Date: 2012-09-06 09:16:39 +0000 (Thu, 06 Sep 2012) Log Message: ----------- Improvements for new layout Modified Paths: -------------- trunk/BankAccounts.php Modified: trunk/BankAccounts.php =================================================================== --- trunk/BankAccounts.php 2012-09-03 15:57:12 UTC (rev 9582) +++ trunk/BankAccounts.php 2012-09-06 09:16:39 UTC (rev 9583) @@ -87,8 +87,7 @@ bankaddress='" . $_POST['BankAddress'] . "', invoice ='" . $_POST['DefAccount'] . "' WHERE accountcode = '" . $SelectedBankAccount . "'"; - prnMsg(_('Note that it is not possible to change the currency of the account once there are transactions against it'),'warn'); - echo '<br />'; + prnMsg(_('Note that it is not possible to change the currency of the account once there are transactions against it'),'info'); } else { $sql = "UPDATE bankaccounts SET bankaccountname='" . $_POST['BankAccountName'] . "', bankaccountcode='" . $_POST['BankAccountCode'] . "', @@ -128,7 +127,6 @@ $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); prnMsg($msg,'success'); - echo '<br />'; unset($_POST['AccountCode']); unset($_POST['BankAccountName']); unset($_POST['BankAccountCode']); @@ -153,7 +151,7 @@ if ($myrow['accounts']>0) { $CancelDelete = 1; prnMsg(_('Cannot delete this bank account because transactions have been created using this account'),'warn'); - echo '<br /> ' . _('There are') . ' ' . $myrow['accounts'] . ' ' . _('transactions with this bank account code'); + echo _('There are') . ' ' . $myrow['accounts'] . ' ' . _('transactions with this bank account code'); } if (!$CancelDelete) { @@ -167,7 +165,6 @@ } /* Always show the list of accounts */ -if (!isset($SelectedBankAccount)) { $sql = "SELECT bankaccounts.accountcode, bankaccounts.bankaccountcode, chartmaster.accountname, @@ -181,7 +178,7 @@ ON bankaccounts.accountcode = chartmaster.accountcode"; $ErrMsg = _('The bank accounts set up could not be retrieved because'); - $DbgMsg = _('The SQL used to retrieve the bank account details was') . '<br />' . $sql; + $DbgMsg = _('The SQL used to retrieve the bank account details was') . $sql; $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); echo '<table class="selection">'; @@ -203,44 +200,37 @@ $k=0; //row colour counter while ($myrow = DB_fetch_array($result)) { - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k++; - } - if ($myrow['invoice']==0) { - $DefaultBankAccount=_('No'); - } elseif ($myrow['invoice']==1) { - $DefaultBankAccount=_('Fall Back Default'); - } elseif ($myrow['invoice']==2) { - $DefaultBankAccount=_('Currency Default'); - } - echo '<td>' . $myrow['accountcode'] . '<br />' . $myrow['accountname'] . '</td> - <td>' . $myrow['bankaccountname'] . '</td> - <td>' . $myrow['bankaccountcode'] . '</td> - <td>' . $myrow['bankaccountnumber'] . '</td> - <td>' . $myrow['bankaddress'] . '</td> - <td>' . $myrow['currcode'] . '</td> - <td>' . $DefaultBankAccount . '</td> - <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedBankAccount=' . $myrow['accountcode'], _('Edit')) . '</td> - <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedBankAccount=' . $myrow['accountcode'] . '&delete=1', _('Delete')) . '</td> - </tr>'; - + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; } - //END WHILE LIST LOOP + if ($myrow['invoice']==0) { + $DefaultBankAccount=_('No'); + } elseif ($myrow['invoice']==1) { + $DefaultBankAccount=_('Fall Back Default'); + } elseif ($myrow['invoice']==2) { + $DefaultBankAccount=_('Currency Default'); + } + echo '<td>' . $myrow['accountcode'] . '<br />' . $myrow['accountname'] . '</td> + <td>' . $myrow['bankaccountname'] . '</td> + <td>' . $myrow['bankaccountcode'] . '</td> + <td>' . $myrow['bankaccountnumber'] . '</td> + <td>' . $myrow['bankaddress'] . '</td> + <td>' . $myrow['currcode'] . '</td> + <td>' . $DefaultBankAccount . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedBankAccount=' . $myrow['accountcode'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedBankAccount=' . $myrow['accountcode'] . '&delete=1', _('Delete')) . '</td> + </tr>'; - - echo '</table>'; } +//END WHILE LIST LOOP -if (isset($SelectedBankAccount)) { - echo '<br />'; - echo '<div class="centre"><p>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Show All Bank Accounts Defined')) . '</p></div>'; - echo '<br />'; -} +echo '</table>'; + echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -324,7 +314,7 @@ <td>' . _('Bank Account Code') . ': </td> <td> <a class="tooltip"> - <span class="custom info"><img src="'.$rootpath.'/css/'.$theme.'/images/Info.png" height="48" width="48" /><em>' . _('Information') . '</em>' . _('Account Code is for SWIFT or BSB type Bank Codes.') . '</span> + <span class="custom info"><em>' . _('Information') . '</em>' . _('Account Code is for SWIFT or BSB type Bank Codes.') . '</span> <input tabindex="3" type="text" name="BankAccountCode" value="' . $_POST['BankAccountCode'] . '" size="40" maxlength="50" /> </a> </td> @@ -363,7 +353,7 @@ <td>' . _('Default for Invoices') . ': </td> <td> <a class="tooltip"> - <span class="custom info"><img src="'.$rootpath.'/css/'.$theme.'/images/Info.png" height="48" width="48" /><em>' . _('Information') . '</em>' . _('Set Default for Invoices to "Currency Default" or "Fallback Default" to print Account details on Invoices (only one account can be set to "Fall Back Default").') . '</span> + <span class="custom info"><em>' . _('Information') . '</em>' . _('Set Default for Invoices to "Currency Default" or "Fallback Default" to print Account details on Invoices (only one account can be set to "Fall Back Default").') . '</span> <select tabindex="6" name="DefAccount">'; if (!isset($_POST['DefAccount']) OR $_POST['DefAccount']==''){ @@ -387,16 +377,21 @@ <option value="1">'._('Fall Back Default').'</option>'; } }//end while loop + + echo '</select></a></td>'; + + echo '</tr></table> + <div class="centre"><button tabindex="7" type="submit" name="submit">'. _('Update Information') .'</button></div>'; } else { echo '<option value="1">'._('Fall Back Default').'</option> <option value="2">'._('Currency Default') . '</option> <option value="0">'._('No').'</option>'; -} -echo '</select></a></td>'; + echo '</select></a></td>'; -echo '</tr></table> - <div class="centre"><button tabindex="7" type="submit" name="submit">'. _('Enter Information') .'</button></div>'; + echo '</tr></table> + <div class="centre"><button tabindex="7" type="submit" name="submit">'. _('Enter Information') .'</button></div>'; +} echo '</form>'; include('includes/footer.inc'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-09-03 15:57:21
|
Revision: 9582 http://weberp.svn.sourceforge.net/weberp/?rev=9582&view=rev Author: tim_schofield Date: 2012-09-03 15:57:12 +0000 (Mon, 03 Sep 2012) Log Message: ----------- Thomas Timothy Lie: Fix more typos in gettext strings Modified Paths: -------------- trunk/ContractBOM.php trunk/Z_ChangeStockCode.php trunk/includes/PDFSuppTransListingPageHeader.inc Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2012-09-03 12:29:41 UTC (rev 9581) +++ trunk/ContractBOM.php 2012-09-03 15:57:12 UTC (rev 9582) @@ -158,7 +158,7 @@ if($_SESSION['Contract'.$identifier]->Status!=2){ $_SESSION['Contract'.$identifier]->Remove_ContractComponent($_GET['Delete']); } else { - prnMsg( _('The contract BOM cannot be alterned because the customer has already placed the order'),'warn'); + prnMsg( _('The contract BOM cannot be altered because the customer has already placed the order'),'warn'); } } Modified: trunk/Z_ChangeStockCode.php =================================================================== --- trunk/Z_ChangeStockCode.php 2012-09-03 12:29:41 UTC (rev 9581) +++ trunk/Z_ChangeStockCode.php 2012-09-03 15:57:12 UTC (rev 9582) @@ -228,7 +228,7 @@ echo '<br />' . _('Changing the contract BOM table records'); $sql = "UPDATE contractbom SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to contract BOM records failed'); + $ErrMsg = _('The SQL to update the contract BOM records failed'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); echo ' ... ' . _('completed'); Modified: trunk/includes/PDFSuppTransListingPageHeader.inc =================================================================== --- trunk/includes/PDFSuppTransListingPageHeader.inc 2012-09-03 12:29:41 UTC (rev 9581) +++ trunk/includes/PDFSuppTransListingPageHeader.inc 2012-09-03 15:57:12 UTC (rev 9582) @@ -12,13 +12,13 @@ Switch ($_POST['TransType']) { case 20: - $TransType=_('Suppier Invoices'); + $TransType=_('Supplier Invoices'); break; case 21: - $TransType=_('Suppier Credit Notes'); + $TransType=_('Supplier Credit Notes'); break; case 22: - $TransType=_('Suppier Payments'); + $TransType=_('Supplier Payments'); } $XPos = $Left_Margin; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Tu...@us...> - 2012-09-03 12:29:47
|
Revision: 9581 http://weberp.svn.sourceforge.net/weberp/?rev=9581&view=rev Author: TurboPT Date: 2012-09-03 12:29:41 +0000 (Mon, 03 Sep 2012) Log Message: ----------- Remove extra closing ). Modified Paths: -------------- trunk/CustomerTransInquiry.php Modified: trunk/CustomerTransInquiry.php =================================================================== --- trunk/CustomerTransInquiry.php 2012-09-03 12:28:08 UTC (rev 9580) +++ trunk/CustomerTransInquiry.php 2012-09-03 12:29:41 UTC (rev 9581) @@ -135,7 +135,7 @@ <td class="number">' . locale_number_format($myrow['rate'],4) . '</td> <td class="number">' . locale_money_format($myrow['totalamt'],$myrow['currcode']) . '</td> <td>' . $myrow['currcode'] . '</td> - <td>' . InternalLink($rootpath, 'PrintCustTrans.php?FromTransNo=' . $myrow['transno'] . '&InvOrCredit=Credit">', '<img src="' . $rootpath.'/css/'.$theme.'/images/preview.gif') . '" title="' . _('Click to preview the credit') . '" />') . '</td> + <td>' . InternalLink($rootpath, 'PrintCustTrans.php?FromTransNo=' . $myrow['transno'] . '&InvOrCredit=Credit">', '<img src="' . $rootpath.'/css/'.$theme.'/images/preview.gif' . '" title="' . _('Click to preview the credit') . '" />') . '</td> </tr>'; } else { /* otherwise */ echo '<td>' . $myrow['typename'] . '</td> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Tu...@us...> - 2012-09-03 12:28:14
|
Revision: 9580 http://weberp.svn.sourceforge.net/weberp/?rev=9580&view=rev Author: TurboPT Date: 2012-09-03 12:28:08 +0000 (Mon, 03 Sep 2012) Log Message: ----------- Add missing concat before closing div tag. Modified Paths: -------------- trunk/Customers.php Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2012-09-01 07:20:03 UTC (rev 9579) +++ trunk/Customers.php 2012-09-03 12:28:08 UTC (rev 9580) @@ -279,7 +279,7 @@ echo '<div class="centre">' . _('You should automatically be forwarded to the entry of a new Customer Branch page') . '. ' . _('If this does not happen') .' (' . _('if the browser does not support META Refresh') . ') ' . - InternalLink($rootpath, 'CustomerBranches.php?DebtorNo=' . $_POST['DebtorNo'], $_POST['DebtorNo']) '</div>'; + InternalLink($rootpath, 'CustomerBranches.php?DebtorNo=' . $_POST['DebtorNo'], $_POST['DebtorNo']) . '</div>'; include('includes/footer.inc'); exit; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-09-01 07:20:10
|
Revision: 9579 http://weberp.svn.sourceforge.net/weberp/?rev=9579&view=rev Author: tim_schofield Date: 2012-09-01 07:20:03 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Carlos Rubio: AccountGroups.php now has option to move to alternative accountgroups Modified Paths: -------------- trunk/AccountGroups.php Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2012-08-30 19:14:05 UTC (rev 9578) +++ trunk/AccountGroups.php 2012-09-01 07:20:03 UTC (rev 9579) @@ -42,6 +42,15 @@ $Errors = array(); +if (isset($_POST['MoveGroup'])) { + $sql="UPDATE chartmaster SET group_='" . $_POST['DestinyAccountGroup'] . "' WHERE group_='" . $_POST['OriginalAccountGroup'] . "'"; + $ErrMsg = _('An error occurred in moving the account group'); + $DbgMsg = _('The SQL that was used to moving the account group was'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Review Account Groups') . '</a></div>'; + prnMsg( _('All accounts in the account group:') . ' ' . $_POST['OriginalAccountGroup'] . ' ' . _('have been changed to the account group:') . ' ' . $_POST['DestinyAccountGroup'],'success'); +} + if (isset($_POST['submit'])) { //initialise no input errors assumed initially before we test @@ -104,7 +113,7 @@ $_POST['SequenceInTB'] = $ParentGroupRow['sequenceintb']; $_POST['PandL'] = $ParentGroupRow['pandl']; $_POST['SectionInAccounts']= $ParentGroupRow['sectioninaccounts']; - prnMsg(_('Since this account group is a child group, the sequence in the trial balance, the section in the accounts and whether or not the account group appears in the balance sheet or profit and loss account are all properties inherited from the parent account group. Any changes made to these fields will have no effect.'),'warn'); + prnMsg(_('Since this account group is a child group, the sequence in the trial balance, the section in the accounts and whether or not the account group appears in the balance sheet or profit and loss account are all properties inherited from the parent account group. Any changes made to these fields will have no effect.'),'info'); } } if (!ctype_digit($_POST['SectionInAccounts'])) { @@ -193,6 +202,31 @@ echo '<br />' . _('There are') . ' ' . $myrow['groups'] . ' ' . _('general ledger accounts that refer to this account group'); } else { + echo '<br /><form method="post" id="AccountGroups" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; + echo '<input type="hidden" name="OriginalAccountGroup" value="' . $_GET['SelectedAccountGroup'] . '" />'; + echo '<tr> + <td>' . _('Parent Group') . ':' . '</td> + <td><select tabindex="2" ' . (in_array('ParentGroupName',$Errors) ? 'class="selecterror"' : '' ) . ' name="DestinyAccountGroup">'; + + $sql = "SELECT groupname FROM accountgroups"; + $GroupResult = DB_query($sql, $db,$ErrMsg,$DbgMsg); + while ($GroupRow = DB_fetch_array($GroupResult) ) { + + if (isset($_POST['ParentGroupName']) AND $_POST['ParentGroupName']==$RroupRow['groupname']) { + echo '<option selected="selected" value="'.htmlentities($GroupRow['groupname'], ENT_QUOTES,'UTF-8').'">' .htmlentities($GroupRow['groupname'], ENT_QUOTES,'UTF-8'). '</option>'; + } else { + echo '<option value="'.htmlentities($GroupRow['groupname'], ENT_QUOTES,'UTF-8').'">' .htmlentities($GroupRow['groupname'], ENT_QUOTES,'UTF-8').'</option>'; + } + } + echo '</select>'; + echo '</td></tr>'; + echo '<tr> + <td colspan="2"><div class="centre"><input tabindex="6" type="submit" name="MoveGroup" value="' . _('Move Group') . '" /></div></td> + </tr>'; + $sql = "SELECT COUNT(groupname) groupnames FROM accountgroups WHERE parentgroupname = '" . $_GET['SelectedAccountGroup'] . "'"; $ErrMsg = _('An error occurred in retrieving the parent group information'); $DbgMsg = _('The SQL that was used to retrieve the information was'); @@ -336,7 +370,7 @@ <td><input tabindex="1" readonly="true" type="text" name="GroupName" size="50" maxlength="50" value="' . $_POST['GroupName'] . '" /></td> </tr>'; - } else { //end of if $_POST['SelectedAccountGroup'] only do the else when a new record is being entered + } elseif (!isset($_POST['MoveGroup'])) { //end of if $_POST['SelectedAccountGroup'] only do the else when a new record is being entered if (!isset($_POST['SelectedAccountGroup'])){ $_POST['SelectedAccountGroup']=''; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-30 19:14:12
|
Revision: 9578 http://weberp.svn.sourceforge.net/weberp/?rev=9578&view=rev Author: tim_schofield Date: 2012-08-30 19:14:05 +0000 (Thu, 30 Aug 2012) Log Message: ----------- Thomas Timothy Lie: Fix more typos in gettext strings Modified Paths: -------------- trunk/BOMExtendedQty.php trunk/BOMIndentedReverse.php trunk/ConfirmDispatch_Invoice.php trunk/CounterSales.php trunk/FixedAssetLocations.php trunk/GLProfit_Loss.php trunk/Labels.php trunk/MRP.php trunk/MRPCalendar.php trunk/PurchData.php trunk/WOSerialNos.php trunk/reportwriter/languages/en_US/reports.php Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/BOMExtendedQty.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -27,7 +27,7 @@ part char(20), extendedqpa double, sortpart text) DEFAULT CHARSET=utf8"; - $ErrMsg = _('The SQL to to create passbom failed with the message'); + $ErrMsg = _('The SQL to create passbom failed with the message'); $result = DB_query($sql,$db,$ErrMsg); $sql = "CREATE TEMPORARY TABLE tempbom ( Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/BOMIndentedReverse.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -28,7 +28,7 @@ part char(20), sortpart text) DEFAULT CHARSET=utf8"; - $ErrMsg = _('The SQL to to create passbom failed with the message'); + $ErrMsg = _('The SQL to create passbom failed with the message'); $result = DB_query($sql,$db,$ErrMsg); $sql = "CREATE TEMPORARY TABLE tempbom ( Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/ConfirmDispatch_Invoice.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -1446,7 +1446,7 @@ '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', '" . -$DisposalRow['cost'] . "')"; - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The reversal of asset cost on dispoal GL posting could not be inserted because'); + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The reversal of asset cost on disposal GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/CounterSales.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -906,7 +906,7 @@ WHERE custbranch.debtorno ='". $_SESSION['Items'.$identifier]->DebtorNo . "' AND custbranch.branchcode = '" . $_SESSION['Items'.$identifier]->Branch . "'"; - $ErrMsg = _('We were unable to load the area where the sale is to from the custbranch table'); + $ErrMsg = _('We were unable to load the area from the custbranch table where the sale is to'); $Result = DB_query($SQL,$db, $ErrMsg); $myrow = DB_fetch_row($Result); $Area = $myrow[0]; Modified: trunk/FixedAssetLocations.php =================================================================== --- trunk/FixedAssetLocations.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/FixedAssetLocations.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -73,7 +73,7 @@ $result = DB_query($sql,$db); $myrow=DB_fetch_row($result); if ($myrow[0]>0) { - prnMsg(_('You have assets in this location location so it cannot be removed'), 'warn'); + prnMsg(_('You have assets in this location so it cannot be removed'), 'warn'); $InputError=1; } if ($InputError==0) { Modified: trunk/GLProfit_Loss.php =================================================================== --- trunk/GLProfit_Loss.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/GLProfit_Loss.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -17,7 +17,7 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . _('Print Profit and Loss Report') . '</p>'; - echo '<div class="page_help_text">' . _('Profit and loss statement (P&L), also called an Income Statment, or Statement of Operations, this is the statement that indicates how the revenue (money received from the sale of products and services before expenses are taken out, also known as the "top line") is transformed into the net income (the result after all revenues and expenses have been accounted for, also known as the "bottom line").') . '<br />' + echo '<div class="page_help_text">' . _('Profit and loss statement (P&L), also called an Income Statement, or Statement of Operations, this is the statement that indicates how the revenue (money received from the sale of products and services before expenses are taken out, also known as the "top line") is transformed into the net income (the result after all revenues and expenses have been accounted for, also known as the "bottom line").') . '<br />' . _('The purpose of the income statement is to show whether the company made or lost money during the period being reported.') . '<br />' . _('The P&L represents a period of time. This contrasts with the Balance Sheet, which represents a single moment in time.') . '<br />' . _('webERP is an "accrual" based system (not a "cash based" system). Accrual systems include items when they are invoiced to the customer, and when expenses are owed based on the supplier invoice date.') . '</div>'; Modified: trunk/Labels.php =================================================================== --- trunk/Labels.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/Labels.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -42,7 +42,7 @@ WHERE labelfieldid='" . $_POST['LabelFieldID' . $i] . "'", $db); } else { - prnMsg (_('Entries for Vertical Position, Horizonal Position, and Font Size must be integers.'),'error'); + prnMsg (_('Entries for Vertical Position, Horizontal Position, and Font Size must be integers.'),'error'); } } } @@ -406,7 +406,7 @@ FROM labelfields WHERE labelid = '" . $SelectedLabelID . "' ORDER BY vpos DESC"; - $ErrMsg = _('Could note get the label fields because'); + $ErrMsg = _('Could not get the label fields because'); $result = DB_query($SQL,$db,$ErrMsg); $i=0; echo '<table class="selection"> @@ -416,7 +416,7 @@ <tr> <th>' . _('Field') . '</th> <th>' . _('Vertical') . '<br />' . _('Position') . '<br />(VPos)</th> - <th>' . _('Horizonal') . '<br />' . _('Position') . '<br />(HPos)</th> + <th>' . _('Horizontal') . '<br />' . _('Position') . '<br />(HPos)</th> <th>' . _('Font Size') . '</th> <th>' . _('Bar-code') . '</th> </tr>'; Modified: trunk/MRP.php =================================================================== --- trunk/MRP.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/MRP.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -23,7 +23,7 @@ $sql = "CREATE TEMPORARY TABLE passbom (part char(20), sortpart text) DEFAULT CHARSET=utf8"; - $ErrMsg = _('The SQL to to create passbom failed with the message'); + $ErrMsg = _('The SQL to create passbom failed with the message'); $result = DB_query($sql,$db,$ErrMsg); $sql = "CREATE TEMPORARY TABLE tempbom (parent char(20), Modified: trunk/MRPCalendar.php =================================================================== --- trunk/MRPCalendar.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/MRPCalendar.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -81,7 +81,7 @@ manufacturingflag smallint(6) NOT NULL default '1', INDEX (daynumber), PRIMARY KEY (calendardate)) DEFAULT CHARSET=utf8"; - $ErrMsg = _('The SQL to to create passbom failed with the message'); + $ErrMsg = _('The SQL to create passbom failed with the message'); $result = DB_query($sql,$db,$ErrMsg); $i = 0; Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/PurchData.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -98,7 +98,7 @@ WHERE purchdata.stockid='".$StockID."' AND purchdata.supplierno='".$SupplierID."' AND purchdata.effectivefrom < '" . FormatDateForSQL($_POST['EffectiveFrom']) . "'"; - $ErrMsg = _('The preferred supplier details could not be update because'); + $ErrMsg = _('The preferred supplier details could not be updated because'); $DbgMsg = _('The SQL that failed was'); $UpdResult = DB_query($sql, $db, $ErrMsg, $DbgMsg); prnMsg(_('Supplier preferred flag has been updated'), 'success'); Modified: trunk/WOSerialNos.php =================================================================== --- trunk/WOSerialNos.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/WOSerialNos.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -264,7 +264,7 @@ WHERE wo='" . $WO . "' AND stockid='" . $StockID . "'"; -$ErrMsg = _('Could note get the work order serial/batch items'); +$ErrMsg = _('Could not get the work order serial/batch items'); $WOSerialNoResult = DB_query($sql,$db,$ErrMsg); if (DB_num_rows($WOSerialNoResult)==0){ Modified: trunk/reportwriter/languages/en_US/reports.php =================================================================== --- trunk/reportwriter/languages/en_US/reports.php 2012-08-30 09:10:56 UTC (rev 9577) +++ trunk/reportwriter/languages/en_US/reports.php 2012-08-30 19:14:05 UTC (rev 9578) @@ -37,8 +37,8 @@ define('RPT_RPTBROWSE',_('Or browse for a report to upload.')); // Error messages for importing reports -define('RPT_IMP_ERMSG1',_('The filesize exceeds the upload_max_filesize directive in you php.ini settings.')); -define('RPT_IMP_ERMSG2',_('The filesize exceeds the MAX_FLE_SIZE directive in the webERP form.')); +define('RPT_IMP_ERMSG1',_('The filesize exceeds the upload_max_filesize directive in your php.ini settings.')); +define('RPT_IMP_ERMSG2',_('The filesize exceeds the MAX_FILE_SIZE directive in the webERP form.')); define('RPT_IMP_ERMSG3',_('The file was not completely uploaded. Please retry.')); define('RPT_IMP_ERMSG4',_('No file was selected to upload.')); define('RPT_IMP_ERMSG5',_('Unknown php upload error, php returned error # ')); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-30 09:11:02
|
Revision: 9577 http://weberp.svn.sourceforge.net/weberp/?rev=9577&view=rev Author: tim_schofield Date: 2012-08-30 09:10:56 +0000 (Thu, 30 Aug 2012) Log Message: ----------- Exson: fixed sql problem reported bymodpr0be Modified Paths: -------------- trunk/WorkOrderEntry.php Modified: trunk/WorkOrderEntry.php =================================================================== --- trunk/WorkOrderEntry.php 2012-08-29 19:39:01 UTC (rev 9576) +++ trunk/WorkOrderEntry.php 2012-08-30 09:10:56 UTC (rev 9577) @@ -36,7 +36,7 @@ // check for new or modify condition if (isset($_REQUEST['WO']) and $_REQUEST['WO']!=''){ // modify - $_POST['WO'] = $_REQUEST['WO']; + $_POST['WO'] = (int)$_REQUEST['WO']; $EditingExisting = true; } else { // new This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-29 19:39:07
|
Revision: 9576 http://weberp.svn.sourceforge.net/weberp/?rev=9576&view=rev Author: tim_schofield Date: 2012-08-29 19:39:01 +0000 (Wed, 29 Aug 2012) Log Message: ----------- Improvements to table printing functions Modified Paths: -------------- trunk/PrintTable.php trunk/css/silverwolf/sub.css trunk/javascripts/FormFunctions.js Modified: trunk/PrintTable.php =================================================================== --- trunk/PrintTable.php 2012-08-28 09:06:05 UTC (rev 9575) +++ trunk/PrintTable.php 2012-08-29 19:39:01 UTC (rev 9576) @@ -37,16 +37,19 @@ $pdf->RoundRectangle($Left_Margin-5, $YPos-5, $Page_Width-$Left_Margin-$Right_Margin, ($line_height*1), 10); +$BottomOfTitle=$YPos-5-($line_height*3); + $ColumnNames=explode('</th>', $_POST['Columns']); $ColumnWidths=explode('px', $_POST['ColumnWidths']); +$ColumnAligns=explode('x', $_POST['ColumnAligns']); $TotalWidth=0; for ($i=0; $i<count($ColumnWidths); $i++) { $TotalWidth+=$ColumnWidths[$i]; } -for ($i=0; $i<count($ColumnWidths); $i++) { - $LeftOvers = $pdf->addTextWrap($XPos,$YPos-$line_height,$Page_Width-$Left_Margin,$FontSize, strip_tags($ColumnNames[$i]), 'centre'); +for ($i=0; $i<count($ColumnWidths)-1; $i++) { + $LeftOvers = $pdf->addTextWrap($XPos,$YPos-$line_height,$ColumnWidths[$i],$FontSize, strip_tags($ColumnNames[$i]), $ColumnAligns[$i]); $XPos+=($Page_Width-$Left_Margin-$Right_Margin)*($ColumnWidths[$i]/$TotalWidth); } @@ -62,12 +65,19 @@ $ColumnValues=explode('</td>', $Row[$row]); $XPos=$Left_Margin; $YPos-=$line_height; - for ($i=0; $i<count($ColumnWidths); $i++) { - $LeftOvers = $pdf->addTextWrap($XPos,$YPos-$line_height,$Page_Width-$Left_Margin,$FontSize, strip_tags($ColumnValues[$i]), 'centre'); + for ($i=0; $i<count($ColumnWidths)-1; $i++) { + if ($ColumnAligns[$i]=='right') { + $Align='right'; + } else { + $Align='left'; + } + $LeftOvers = $pdf->addTextWrap($XPos,$YPos-$line_height,$ColumnWidths[$i],$FontSize, strip_tags($ColumnValues[$i]), $Align, 0); $XPos+=($Page_Width-$Left_Margin-$Right_Margin)*($ColumnWidths[$i]/$TotalWidth); } } +$pdf->RoundRectangle($Left_Margin-5, $BottomOfTitle, $Page_Width-$Left_Margin-$Right_Margin, $BottomOfTitle-$YPos+$line_height, 10); + $pdf->OutputF($_SESSION['DatabaseName'] . '_TablePrint_' . date('Y-m-d_h-m-s') . '.pdf'); $pdf->__destruct(); Modified: trunk/css/silverwolf/sub.css =================================================================== --- trunk/css/silverwolf/sub.css 2012-08-28 09:06:05 UTC (rev 9575) +++ trunk/css/silverwolf/sub.css 2012-08-29 19:39:01 UTC (rev 9576) @@ -708,10 +708,11 @@ font-family: Calibri, Tahoma, Geneva, sans-serif; position: absolute; left: 1em; top: 2em; z-index: 99; margin-left: 0; width: 250px; + text-shadow: 0px 0px #324D5D; + text-align: left; + font-size: 12px; } .tooltip:hover img { - border: 0; margin: -10px 0 0 -55px; - float: left; position: absolute; } .tooltip:hover em { font-family: Candara, Tahoma, Geneva, sans-serif; font-size: 1.2em; font-weight: bold; Modified: trunk/javascripts/FormFunctions.js =================================================================== --- trunk/javascripts/FormFunctions.js 2012-08-28 09:06:05 UTC (rev 9575) +++ trunk/javascripts/FormFunctions.js 2012-08-29 19:39:01 UTC (rev 9576) @@ -198,6 +198,7 @@ } function OpenSearchWindow(TargetURL, CallingURL) { + alert(CallingURL); document.getElementById("SearchMask").setAttribute("class", "mask"); document.getElementById("SearchWindow").setAttribute("class", "searchwindow"); if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari @@ -243,19 +244,30 @@ function PrintTable(t) { var rows=new Array(); var columnWidths=''; + var columnAligns=''; var PostData=''; parentElem=t.parentNode; row=parentElem.parentNode; table=row.parentNode; + for (var i = 0; i < table.rows.length; i++) { + if(table.rows[i].cells[0].tagName=='TD') { + MainRow=i; + } + if(table.rows[i].cells[0].tagName=='TH' && table.rows[i].cells[0].className!='header') { + HeaderRow=i; + } + } header=table.rows[0].cells[0].innerHTML; PostData=PostData+'Header'+'='+header+'&'; - columns=table.rows[1].innerHTML; + columns=table.rows[HeaderRow].innerHTML; PostData=PostData+'Columns'+'='+columns+'&'; - for (var i = 0; i < table.rows[1].cells.length; i++) { - s=getComputedStyle(table.rows[1].cells[i], null); + for (var i = 0; i < table.rows[MainRow].cells.length; i++) { + s=getComputedStyle(table.rows[MainRow].cells[i], null); columnWidths=columnWidths+s.width; + columnAligns=columnAligns+s.textAlign+'x'; } PostData=PostData+'ColumnWidths'+'='+columnWidths+'&'; + PostData=PostData+'ColumnAligns'+'='+columnAligns+'&'; for (var i = 2; i < table.rows.length; i++) { PostData=PostData+'Row'+(i-2)+'='+table.rows[i].innerHTML+'&'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-28 09:06:12
|
Revision: 9575 http://weberp.svn.sourceforge.net/weberp/?rev=9575&view=rev Author: tim_schofield Date: 2012-08-28 09:06:05 +0000 (Tue, 28 Aug 2012) Log Message: ----------- Replace <a tags with new InternalLink() function Modified Paths: -------------- trunk/AddCustomerContacts.php trunk/AddCustomerNotes.php trunk/AddCustomerTypeNotes.php trunk/BOMs.php Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2012-08-28 02:48:46 UTC (rev 9574) +++ trunk/AddCustomerContacts.php 2012-08-28 09:06:05 UTC (rev 9575) @@ -146,7 +146,7 @@ echo '<td>'.$myrow['contactname'].'</td> <td>'.$myrow['role'].'</td> <td>'.$myrow['phoneno'].'</td> - <td><a href=mailto:'.$myrow['email'].'>'.$myrow['email'].'</a></td> + <td>'.$myrow['email'].'</td> <td>'.$myrow['notes'].'</td> <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Id='.$myrow['contid'].'&DebtorNo='.$myrow['debtorno'].'"', _('Edit')) .' </td> <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Id='.$myrow['contid'].'&DebtorNo='.$myrow['debtorno'].'&delete=1', _('Delete')). '</td></tr>'; Modified: trunk/AddCustomerNotes.php =================================================================== --- trunk/AddCustomerNotes.php 2012-08-28 02:48:46 UTC (rev 9574) +++ trunk/AddCustomerNotes.php 2012-08-28 09:06:05 UTC (rev 9575) @@ -132,7 +132,7 @@ } echo '<td>'.ConvertSQLDate($myrow['date']).'</td> <td>'.$myrow['note'].'</td> - <td><a href="'.$myrow['href'].'">'.$myrow['href'].'</a></td> + <td>'.$myrow['href'].'</td> <td>'.$myrow['priority'].'</td> <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Id='.$myrow['noteid'].'&DebtorNo='.$myrow['debtorno'], _('Edit')).' </td> <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Id='.$myrow['noteid'].'&DebtorNo='.$myrow['debtorno'].'&delete=1', _('Delete')). '</td></tr>'; Modified: trunk/AddCustomerTypeNotes.php =================================================================== --- trunk/AddCustomerTypeNotes.php 2012-08-28 02:48:46 UTC (rev 9574) +++ trunk/AddCustomerTypeNotes.php 2012-08-28 09:06:05 UTC (rev 9575) @@ -125,30 +125,19 @@ echo '<tr class="EvenTableRows">'; $k=1; } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%sId=%s&DebtorType=%s">'. _('Edit').' </td> - <td><a href="%sId=%s&DebtorType=%s&delete=1">'. _('Delete'). '</td></tr>', - $myrow['date'], - $myrow['note'], - $myrow['href'], - $myrow['priority'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['noteid'], - $myrow['typeid'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['noteid'], - $myrow['typeid']); - + echo '<td>' . $myrow['date'] . '</td> + <td>' . $myrow['note'] . '</td> + <td>' . $myrow['href'] . '</td> + <td>' . $myrow['priority'] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Id=' . $myrow['noteid'] . '&DebtorType=' . $myrow['typeid'], _('Edit')) . ' </td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Id=' . $myrow['noteid'] . '&DebtorType=' . $myrow['typeid'] . '&delete=1', _('Delete')). '</td></tr>'; } //END WHILE LIST LOOP echo '</table>'; } if (isset($Id)) { echo '<div class="centre"> - <a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?DebtorType=' . $DebtorType . '">' . _('Review all notes for this Customer Type') .'</a> + ' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF']) . '?DebtorType=' . $DebtorType, _('Review all notes for this Customer Type')) .' </div>'; } Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2012-08-28 02:48:46 UTC (rev 9574) +++ trunk/BOMs.php 2012-08-28 09:06:05 UTC (rev 9575) @@ -112,11 +112,11 @@ $Level1 = str_repeat('- ',$Level-1).$Level; if( $myrow[7]=='B' OR $myrow[7]=='K' OR $myrow[7]=='D') { - $DrillText = '%s%s'; + $DrillText = $DrillLink.$DrillID; $DrillLink = '<div class="centre">'._('No lower levels').'</div>'; $DrillID=''; } else { - $DrillText = '<a href="%s&Select=%s">' . _('Drill Down'); + $DrillText = InternalLink('', $DrillLink . '&Select=' . $DrillID, _('Drill Down')); $DrillLink = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?'; $DrillID=$myrow[0]; } @@ -135,39 +135,20 @@ } else { $QuantityOnHand = number_format($myrow[10],$myrow[11]); } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td><a href="%sSelect=%s&SelectedComponent=%s">' . _('Edit') . '</a></td> + echo '<td>' . $Level1 . '</td> + <td>' . $myrow[0] . '</td> + <td>' . $myrow[1] . '</td> + <td>' . $myrow[2] . '</td> + <td>' . $myrow[3] . '</td> + <td class="number">' . $myrow[4] . '</td> + <td>' . ConvertSQLDate($myrow[5]) . '</td> + <td>' . ConvertSQLDate($myrow[6]) . '</td> + <td>' . $AutoIssue . '</td> + <td class="number">' . $QuantityOnHand . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select=' . $Parent . '&SelectedComponent=' . $myrow[0], _('Edit')) . '</td> <td>'.$DrillText.'</a></td> - <td><a href="%sSelect=%s&SelectedComponent=%s&delete=1&ReSelect=%s">' . _('Delete') . '</a></td> - </tr>', - $Level1, - $myrow[0], - $myrow[1], - $myrow[2], - $myrow[3], - $myrow[4], - ConvertSQLDate($myrow[5]), - ConvertSQLDate($myrow[6]), - $AutoIssue, - $QuantityOnHand, - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $Parent, - $myrow[0], - $DrillLink, - $DrillID, - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $Parent, - $myrow[0], - $UltimateParent); + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select=' . $Parent . '&SelectedComponent=' . $myrow[0] . '&delete=1&ReSelect=' . $UltimateParent, _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP } //end of function DisplayBOMItems This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-28 02:48:52
|
Revision: 9574 http://weberp.svn.sourceforge.net/weberp/?rev=9574&view=rev Author: tim_schofield Date: 2012-08-28 02:48:46 +0000 (Tue, 28 Aug 2012) Log Message: ----------- Replace <a tags with new InternalLink() function Modified Paths: -------------- trunk/AgedDebtors.php trunk/AgedSuppliers.php trunk/Areas.php trunk/BackupDatabase.php Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2012-08-27 22:22:14 UTC (rev 9573) +++ trunk/AgedDebtors.php 2012-08-28 02:48:46 UTC (rev 9574) @@ -363,7 +363,7 @@ $title = _('Aged Customer Account Analysis') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg(_('The details of outstanding transactions for customer') . ' - ' . $AgedAnalysis['debtorno'] . ' ' . _('could not be retrieved because') . ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . _('The SQL that failed was') . '<br />' . $sql; } @@ -428,7 +428,7 @@ $title = _('Aged Customer Account Analysis') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg(_('There are no customers with balances meeting the criteria specified to list'),'info'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } else { Modified: trunk/AgedSuppliers.php =================================================================== --- trunk/AgedSuppliers.php 2012-08-27 22:22:14 UTC (rev 9573) +++ trunk/AgedSuppliers.php 2012-08-28 02:48:46 UTC (rev 9574) @@ -108,7 +108,7 @@ $title = _('Aged Supplier Account Analysis') . ' - ' . _('Problem Report') ; include('includes/header.inc'); prnMsg(_('The Supplier details could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $SQL; } @@ -192,7 +192,7 @@ $title = _('Aged Supplier Account Analysis - Problem Report'); include('includes/header.inc'); prnMsg(_('The details of outstanding transactions for Supplier') . ' - ' . $AgedAnalysis['supplierid'] . ' ' . _('could not be retrieved because') . ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . _('The SQL that failed was') . '<br />' . $sql; } Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2012-08-27 22:22:14 UTC (rev 9573) +++ trunk/Areas.php 2012-08-28 02:48:46 UTC (rev 9574) @@ -175,7 +175,7 @@ //end of ifs and buts! if (isset($SelectedArea)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Review Areas Defined') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Review Areas Defined')) . '</div>'; } Modified: trunk/BackupDatabase.php =================================================================== --- trunk/BackupDatabase.php 2012-08-27 22:22:14 UTC (rev 9573) +++ trunk/BackupDatabase.php 2012-08-28 02:48:46 UTC (rev 9574) @@ -37,7 +37,7 @@ exec($Command,$CommandOutput, $ReturnValue); if ($ReturnValue ==0) { - prnMsg(_('The backup file has now been created. You must now download this to your computer because in case the web-server has a disk failure the backup would then not on the same machine. Use the link below') . '<br /><br /><a href="' . $BackupFile . '">' . _('Download the backup file to your locale machine') . '</a>','success'); + prnMsg(_('The backup file has now been created. You must now download this to your computer because in case the web-server has a disk failure the backup would then not on the same machine. Use the link below') . '<br />' . InternalLink('', $BackupFile, _('Download the backup file to your locale machine')),'success'); prnMsg(_('Once you have downloaded the database backup file to your local machine you should use the link below to delete it - backup files can consume a lot of space on your hosting account and will accumulate if not deleted - they also contain sensitive information which would otherwise be available for others to download!'),'info'); echo '<br /> <br /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-27 22:22:21
|
Revision: 9573 http://weberp.svn.sourceforge.net/weberp/?rev=9573&view=rev Author: tim_schofield Date: 2012-08-27 22:22:14 +0000 (Mon, 27 Aug 2012) Log Message: ----------- Replace <a tags with new InternalLink() function Modified Paths: -------------- trunk/BOMExtendedQty.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/BOMInquiry.php trunk/BOMListing.php trunk/BOMs.php trunk/BankReconciliation.php trunk/ConfirmDispatchControlled_Invoice.php trunk/ConfirmDispatch_Invoice.php trunk/ContractBOM.php trunk/ContractOtherReqts.php trunk/Contracts.php trunk/CounterSales.php Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2012-08-27 20:03:59 UTC (rev 9572) +++ trunk/BOMExtendedQty.php 2012-08-27 22:22:14 UTC (rev 9573) @@ -152,7 +152,7 @@ if (DB_error_no($db) !=0) { prnMsg( _('The Quantiy Extended BOM Listing could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $sql; } Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2012-08-27 20:03:59 UTC (rev 9572) +++ trunk/BOMIndented.php 2012-08-27 22:22:14 UTC (rev 9573) @@ -151,7 +151,7 @@ $title = _('Indented BOM Listing') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The Indented BOM Listing could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />'.$sql; } Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2012-08-27 20:03:59 UTC (rev 9572) +++ trunk/BOMIndentedReverse.php 2012-08-27 22:22:14 UTC (rev 9573) @@ -153,7 +153,7 @@ $title = _('Indented BOM Listing') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg( _('The Indented BOM Listing could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />'.$sql; } Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2012-08-27 20:03:59 UTC (rev 9572) +++ trunk/BOMInquiry.php 2012-08-27 22:22:14 UTC (rev 9573) @@ -78,7 +78,7 @@ $k++; } - $ComponentLink = '<a href="'.$rootpath.'/SelectProduct.php?StockID=' . $myrow['component'] . '">' . $myrow['component'] . '</a>'; + $ComponentLink = InternalLink($rootpath, 'SelectProduct.php?StockID=' . $myrow['component'], $myrow['component']); /* Component Code Description Quantity Std Cost* Total Cost */ printf('<td>%s</td> Modified: trunk/BOMListing.php =================================================================== --- trunk/BOMListing.php 2012-08-27 20:03:59 UTC (rev 9572) +++ trunk/BOMListing.php 2012-08-27 22:22:14 UTC (rev 9573) @@ -45,7 +45,7 @@ $title = _('Bill of Materials Listing') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg(_('The Bill of Material listing could not be retrieved by the SQL because'),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />' . $SQL; } Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2012-08-27 20:03:59 UTC (rev 9572) +++ trunk/BOMs.php 2012-08-27 22:22:14 UTC (rev 9573) @@ -413,7 +413,7 @@ break; } - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Select a Different BOM') . '</a></div><br />'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Select a Different BOM')) . '</div><br />'; echo '<table class="selection">'; // Display Manufatured Parent Items $sql = "SELECT bom.parent, @@ -432,8 +432,7 @@ if( DB_num_rows($result) > 0 ) { echo '<tr><td><div class="centre">'._('Manufactured parent items').' : '; while ($myrow = DB_fetch_array($result)){ - echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select='.$myrow['parent'].'">'. - $myrow['description'].' ('.$myrow['parent'].')</a>'; + echo (($ix)?', ':'').InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select='.$myrow['parent'], $myrow['description'].' ('.$myrow['parent'].')'); $ix++; } //end while loop echo '</div></td></tr>'; @@ -453,8 +452,7 @@ echo (($reqnl)?'<br />':'').'<tr><td><div class="centre">'._('Assembly parent items').' : '; $ix = 0; while ($myrow = DB_fetch_array($result)){ - echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select='.$myrow['parent'].'">'. - $myrow['description'].' ('.$myrow['parent'].')</a>'; + echo (($ix)?', ':'').InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select='.$myrow['parent'], $myrow['description'].' ('.$myrow['parent'].')') . '</a>'; $ix++; } //end while loop echo '</div></td></tr>'; @@ -473,8 +471,7 @@ echo (($reqnl)?'<br />':'').'<tr><td><div class="centre">'._('Kit sets').' : '; $ix = 0; while ($myrow = DB_fetch_array($result)){ - echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select='.$myrow['parent'].'">'. - $myrow['description'].' ('.$myrow['parent'].')</a>'; + echo (($ix)?', ':''). InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select='.$myrow['parent'], $myrow['description'].' ('.$myrow['parent'].')'); $ix++; } //end while loop echo '</div></td></tr>'; @@ -493,8 +490,7 @@ echo (($reqnl)?'<br />':'').'<tr><td><div class="centre">'._('Phantom').' : '; $ix = 0; while ($myrow = DB_fetch_array($result)){ - echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select='.$myrow['parent'].'">'. - $myrow['description'].' ('.$myrow['parent'].')</a>'; + echo (($ix)?', ':'').InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Select='.$myrow['parent'], $myrow['description'].' ('.$myrow['parent'].')'); $ix++; } //end while loop echo '</div></td></tr>'; @@ -653,7 +649,7 @@ if (DB_num_rows($result)==0){ prnMsg( _('There are no work centres set up yet') . '. ' . _('Please use the link below to set up work centres') . '.','warn'); - echo '<a href="'.$rootpath.'/WorkCentres.php">' . _('Work Centre Maintenance') . '</a></td></tr></table><br />'; + echo InternalLink($rootpath, 'WorkCentres.php', _('Work Centre Maintenance')) . '</td></tr></table><br />'; include('includes/footer.inc'); exit; } Modified: trunk/BankReconciliation.php =================================================================== --- trunk/BankReconciliation.php 2012-08-27 20:03:59 UTC (rev 9572) +++ trunk/BankReconciliation.php 2012-08-27 22:22:14 UTC (rev 9573) @@ -108,7 +108,7 @@ if (DB_num_rows($AccountsResults)==0){ echo '</select></td></tr></table><br />' . _('Bank Accounts have not yet been defined') . '. ' . _('You must first') . - '<a href="' . $rootpath . '/BankAccounts.php">' . _('define the bank accounts') . '</a>' . ' ' . _('and general ledger accounts to be affected') . '.'; + InternalLink($rootpath, 'BankAccounts.php', _('define the bank accounts')) . ' ' . _('and general ledger accounts to be affected') . '.'; include('includes/footer.inc'); exit; } else { Modified: trunk/ConfirmDispatchControlled_Invoice.php =================================================================== --- trunk/ConfirmDispatchControlled_Invoice.php 2012-08-27 20:03:59 UTC (rev 9572) +++ trunk/ConfirmDispatchControlled_Invoice.php 2012-08-27 22:22:14 UTC (rev 9573) @@ -14,12 +14,11 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="" alt="" />' . ' ' . $title . '</p>'; if (isset($_GET['LineNo'])){ - $LineNo = (int)$_GET['LineNo']; + $LineNo = (int)$_GET['LineNo']; } elseif (isset($_POST['LineNo'])){ - $LineNo = (int)$_POST['LineNo']; + $LineNo = (int)$_POST['LineNo']; } else { - echo '<div class="centre"><a href="' . $rootpath . '/ConfirmDispatch_Invoice.php">'. - _('Select a line item to invoice').'</a><br />'; + echo '<div class="centre">' . InternalLink($rootpath, 'ConfirmDispatch_Invoice.php', _('Select a line item to invoice')) . '<br />'; echo '<br />'; prnMsg( _('This page can only be opened if a line item on a sales order to be invoiced has been selected') . '. ' . _('Please do that first'),'error'); echo '</div>'; @@ -29,8 +28,7 @@ if (!isset($_SESSION['Items']) OR !isset($_SESSION['ProcessingOrder'])) { /* This page can only be called with a sales order number to invoice */ - echo '<div class="centre"><a href="' . $rootpath . '/SelectSalesOrder.php">'. _('Select a sales order to invoice'). - '</a><br />'; + echo '<div class="centre">' . InternalLink($rootpath, 'SelectSalesOrder.php', _('Select a sales order to invoice')); prnMsg( _('This page can only be opened if a sales order and line item has been selected Please do that first'),'error'); echo '</div>'; include('includes/footer.inc'); @@ -44,8 +42,7 @@ //Make sure this item is really controlled if ( $LineItem->Controlled != 1 ){ - echo '<div class="centre"><a href="' . $rootpath . '/ConfirmDispatch_Invoice.php">'. _('Back to the Sales Order'). '</a></div>'; - echo '<br />'; + echo '<div class="centre">' . InternalLink($rootpath, 'ConfirmDispatch_Invoice.php', _('Back to the Sales Order')) . '</div>'; prnMsg( _('The line item must be defined as controlled to require input of the batch numbers or serial numbers being sold'),'error'); include('includes/footer.inc'); exit; @@ -72,7 +69,7 @@ of the item selected for dispatch */ $_SESSION['Items']->LineItems[$LineNo]->QtyDispatched = $TotalQuantity; -echo '<br /><div style="text-align: right"><a href="'. $rootpath. '/ConfirmDispatch_Invoice.php">'. _('Back to Confirmation of Dispatch') . '/' . _('Invoice'). '</a></div>'; +echo '<br /><div style="text-align: right">' . InternalLink($rootpath, 'ConfirmDispatch_Invoice.php', _('Back to Confirmation of Dispatch') . '/' . _('Invoice')) . '</div>'; include('includes/footer.inc'); exit; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2012-08-27 20:03:59 UTC (rev 9572) +++ trunk/ConfirmDispatch_Invoice.php 2012-08-27 22:22:14 UTC (rev 9573) @@ -17,7 +17,7 @@ if (!isset($_GET['OrderNumber']) and !isset($_SESSION['ProcessingOrder'])) { /* This page can only be called with an order number for invoicing*/ - echo '<div class="centre"><a href="' . $rootpath . '/SelectSalesOrder.php">' . _('Select a sales order to invoice'). '</a></div>'; + echo '<div class="centre">' . InternalLink($rootpath, 'SelectSalesOrder.php', _('Select a sales order to invoice')) . '</div>'; echo '<br /><br />'; prnMsg( _('This page can only be opened if an order has been selected Please select an order first from the delivery details screen click on Confirm for invoicing'), 'error' ); include ('includes/footer.inc'); @@ -327,7 +327,7 @@ echo '<td class="number">' . $LnItm->QtyDispatched . '</td>'; } else { echo '<td class="number"><input type="hidden" name="' . $LnItm->LineNumber . '_QtyDispatched" value="' .$LnItm->QtyDispatched . '" /> - <a href="' . $rootpath .'/ConfirmDispatchControlled_Invoice.php?LineNo='. $LnItm->LineNumber.'">' .$LnItm->QtyDispatched . '</a></td>'; + ' . InternalLink($rootpath, 'ConfirmDispatchControlled_Invoice.php?LineNo='. $LnItm->LineNumber, $LnItm->QtyDispatched) . '</td>'; } } else { if (isset($_POST['ProcessInvoice'])) { @@ -395,13 +395,13 @@ if ($LnItm->Controlled==1){ if (!isset($_POST['ProcessInvoice'])) { - echo '<td><a href="' . $rootpath . '/ConfirmDispatchControlled_Invoice.php?LineNo='. $LnItm->LineNumber.'">'; if ($LnItm->Serialised==1){ - echo _('Enter Serial Numbers'); + $Caption = _('Enter Serial Numbers'); } else { /*Just batch/roll/lot control */ - echo _('Enter Batch/Roll/Lot #'); + $Caption = _('Enter Batch/Roll/Lot #'); } - echo '</a></td>'; + echo '<td>' . InternalLink($rootpath, 'ConfirmDispatchControlled_Invoice.php?LineNo='. $LnItm->LineNumber, $Caption); + echo '</td>'; } } echo '</tr>'; @@ -432,8 +432,8 @@ } else { $FreightCost =0; } - if (!is_numeric($BestShipper)){ - $SQL = "SELECT shipper_id FROM shippers WHERE shipper_id=" . $_SESSION['Default_Shipper']; + if (!is_numeric($BestShipper)){ + $SQL = "SELECT shipper_id FROM shippers WHERE shipper_id=" . $_SESSION['Default_Shipper']; $ErrMsg = _('There was a problem testing for a default shipper because'); $TestShipperExists = DB_query($SQL,$db, $ErrMsg); if (DB_num_rows($TestShipperExists)==1){ @@ -447,7 +447,7 @@ $BestShipper = $ShipperReturned[0]; } else { prnMsg( _('There are no shippers defined') . '. ' . _('Please use the link below to set up shipping freight companies, the system expects the shipping company to be selected or a default freight company to be used'),'error'); - echo '<a href="' . $rootpath . 'Shippers.php">'. _('Enter') . '/' . _('Amend Freight Companies'). '</a>'; + echo InternalLink($rootpath, 'Shippers.php', _('Enter') . '/' . _('Amend Freight Companies')); } } } @@ -701,15 +701,15 @@ _('the session shows quantity of'). ' ' . $_SESSION['Items']->LineItems[$myrow['orderlineno']]->Quantity . ' ' . _('and quantity invoice of'). ' ' . $_SESSION['Items']->LineItems[$myrow['orderlineno']]->QtyInv; - prnMsg( _('This order has been changed or invoiced since this delivery was started to be confirmed') . ' ' . _('Processing halted.') . ' ' . _('To enter and confirm this dispatch, it must be re-selected and re-read again to update the changes made by the other user'), 'error'); - echo '<br />'; + prnMsg( _('This order has been changed or invoiced since this delivery was started to be confirmed') . ' ' . _('Processing halted.') . ' ' . _('To enter and confirm this dispatch, it must be re-selected and re-read again to update the changes made by the other user'), 'error'); + echo '<br />'; - echo '<div class="centre"><a href="'. $rootpath . '/SelectSalesOrder.php?">'. _('Select a sales order for confirming deliveries and invoicing'). '</a></div>'; + echo '<div class="centre">' . InternalLink($rootpath, 'SelectSalesOrder.php', _('Select a sales order for confirming deliveries and invoicing')) . '</div>'; - unset($_SESSION['Items']->LineItems); - unset($_SESSION['Items']); - unset($_SESSION['ProcessingOrder']); - include('includes/footer.inc'); + unset($_SESSION['Items']->LineItems); + unset($_SESSION['Items']); + unset($_SESSION['ProcessingOrder']); + include('includes/footer.inc'); exit; } } /*loop through all line items of the order to ensure none have been invoiced since started looking at this order*/ @@ -930,7 +930,7 @@ /* Need to get the current location quantity will need it later for the stock movement */ - $SQL="SELECT locstock.quantity + $SQL="SELECT locstock.quantity FROM locstock WHERE locstock.stockid='" . $OrderLine->StockID . "' AND loccode= '" . $_SESSION['Items']->Location . "'"; @@ -938,8 +938,8 @@ $Result = DB_query($SQL, $db, $ErrMsg); if (DB_num_rows($Result)==1){ - $LocQtyRow = DB_fetch_row($Result); - $QtyOnHandPrior = $LocQtyRow[0]; + $LocQtyRow = DB_fetch_row($Result); + $QtyOnHandPrior = $LocQtyRow[0]; } else { /* There must be some error this should never happen */ $QtyOnHandPrior = 0; @@ -977,7 +977,7 @@ $StandardCost += ($AssParts['standard'] * $AssParts['quantity']) ; /* Need to get the current location quantity will need it later for the stock movement */ - $SQL="SELECT locstock.quantity + $SQL="SELECT locstock.quantity FROM locstock WHERE locstock.stockid='" . $AssParts['component'] . "' AND loccode= '" . $_SESSION['Items']->Location . "'"; @@ -985,9 +985,9 @@ $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Can not retrieve assembly components location stock quantities because '); $DbgMsg = _('The SQL that failed was'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); - if (DB_num_rows($Result)==1){ - $LocQtyRow = DB_fetch_row($Result); - $QtyOnHandPrior = $LocQtyRow[0]; + if (DB_num_rows($Result)==1){ + $LocQtyRow = DB_fetch_row($Result); + $QtyOnHandPrior = $LocQtyRow[0]; } else { /*There must be some error this should never happen */ $QtyOnHandPrior = 0; @@ -1053,7 +1053,7 @@ $OrderLine->StandardCost=0; } if ($MBFlag=='B' OR $MBFlag=='M'){ - $SQL = "INSERT INTO stockmoves (stockid, + $SQL = "INSERT INTO stockmoves (stockid, type, transno, loccode, @@ -1089,7 +1089,7 @@ '" . $OrderLine->ConversionFactor . "' )"; } 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 + // 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)) { $OrderLine->StandardCost=0; } @@ -1159,7 +1159,7 @@ if ($OrderLine->Controlled ==1){ foreach($OrderLine->SerialItems as $Item){ - /*We need to add the StockSerialItem record and + /*We need to add the StockSerialItem record and The StockSerialMoves as well */ $SQL = "UPDATE stockserialitems SET quantity= quantity - " . $Item->BundleQty . " @@ -1624,12 +1624,14 @@ echo '<br /><div class="centre">'; if ($_SESSION['InvoicePortraitFormat']==0){ - echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="">' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTrans.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Landscape') . ')</a><br /><br />'; + echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="">' . ' ' . + InternalLink($rootpath, 'PrintCustTrans.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True', _('Print this invoice'). ' (' . _('Landscape') . ')' ); } else { - echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="">' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTransPortrait.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Portrait') . ')</a><br /><br />'; + echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="">' . ' ' . + InternalLink($rootpath, 'PrintCustTransPortrait.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True', _('Print this invoice'). ' (' . _('Portrait') . ')' ); } - echo '<a href="'.$rootpath.'/SelectSalesOrder.php">'. _('Select another order for invoicing'). '</a><br /><br />'; - echo '<a href="'.$rootpath.'/SelectOrderItems.php?NewOrder=Yes">'._('Sales Order Entry').'</a></div><br />'; + echo InternalLink($rootpath, 'SelectSalesOrder.php', _('Select another order for invoicing')); + echo InternalLink($rootpath, 'SelectOrderItems.php?NewOrder=Yes', _('Sales Order Entry')); /*end of process invoice */ Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2012-08-27 20:03:59 UTC (rev 9572) +++ trunk/ContractBOM.php 2012-08-27 22:22:14 UTC (rev 9573) @@ -38,7 +38,7 @@ if (isset($_POST['BackToHeader'])){ echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/Contracts.php?identifier='.$identifier. '" />'; echo '<br />'; - prnMsg(_('You should automatically be forwarded to the Contract page. If this does not happen perhaps the browser does not support META Refresh') . '<a href="' . $rootpath . '/Contracts.php?identifier='.$identifier . '">' . _('click here') . '</a> ' . _('to continue'),'info'); + prnMsg(_('You should automatically be forwarded to the Contract page. If this does not happen perhaps the browser does not support META Refresh') . InternalLink($rootpath, 'Contracts.php?identifier='.$identifier, _('click here') . '</a> ' . _('to continue')),'info'); include('includes/footer.inc'); exit; } @@ -268,7 +268,7 @@ <td>' . $ContractComponent->UOM . '</td> <td class="number">' . locale_number_format($ContractComponent->ItemCost,4) . '</td> <td class="number">' . $DisplayLineTotal . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier. '&Delete=' . $ContractComponent->ComponentID . '">' . _('Delete') . '</a></td></tr>'; + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier. '&Delete=' . $ContractComponent->ComponentID, _('Delete')) . '</td></tr>'; $TotalCost += $LineTotal; } @@ -324,7 +324,7 @@ <td><input type="text" name="StockCode" size="15" maxlength="18" value="' . $_POST['StockCode'] . '" /></td> </tr> <tr><td></td> - <td><font size="3"><b>' . _('OR') . ' </b></font><a target="_blank" href="'.$rootpath.'/Stocks.php?">' . _('Create a New Stock Item') . '</a></td></tr> + <td><font size="3"><b>' . _('OR') . ' </b></font>' . InternalLink($rootpath, 'Stocks.php', _('Create a New Stock Item')) . '</td></tr> </table><br /> <div class="centre"><button type="submit" name="Search">' . _('Search Now') . '</button> </div><br />'; Modified: trunk/ContractOtherReqts.php =================================================================== --- trunk/ContractOtherReqts.php 2012-08-27 20:03:59 UTC (rev 9572) +++ trunk/ContractOtherReqts.php 2012-08-27 22:22:14 UTC (rev 9573) @@ -40,7 +40,8 @@ if (isset($_POST['BackToHeader'])){ echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/Contracts.php?identifier='.$identifier. '" />'; echo '<br />'; - prnMsg(_('You should automatically be forwarded to the Contract page. If this does not happen perhaps the browser does not support META Refresh') . '<a href="' . $rootpath . '/Contracts.php?identifier='.$identifier . '">' . _('click here') . '</a> ' . _('to continue'),'info'); + prnMsg(_('You should automatically be forwarded to the Contract page. If this does not happen perhaps the browser does not support META Refresh') . + InternalLink($rootpath, 'Contracts.php?identifier='.$identifier, _('click here')) . _('to continue'),'info'); include('includes/footer.inc'); exit; } @@ -116,7 +117,7 @@ <td><input type="text" class="number" name="Qty' . $ContractReqtID . '" size="11" value="' . locale_number_format($ContractComponent->Quantity,2) . '" /></td> <td><input type="text" class="number" name="CostPerUnit' . $ContractReqtID . '" size="11" value="' . locale_money_format($ContractComponent->CostPerUnit,$_SESSION['Contract'.$identifier]->CurrCode) . '" /></td> <td class="number">' . $DisplayLineTotal . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier. '&Delete=' . $ContractReqtID . '">' . _('Delete') . '</a></td></tr>'; + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier. '&Delete=' . $ContractReqtID, _('Delete')) . '</td></tr>'; $TotalCost += $LineTotal; } Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2012-08-27 20:03:59 UTC (rev 9572) +++ trunk/Contracts.php 2012-08-27 22:22:14 UTC (rev 9573) @@ -84,7 +84,7 @@ echo '<meta http-equiv="refresh" content="0; url=' . $rootpath . '/ContractBOM.php?identifier='.$identifier. '" />'; echo '<br />'; prnMsg(_('You should automatically be forwarded to the entry of the Contract line items page') . '. ' . - _('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' . '<a href="' . $rootpath . '/ContractBOM.php?identifier='.$identifier . '">' . _('click here') . '</a> ' . _('to continue'),'info'); + _('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' . InternalLink($rootpath, 'ContractBOM.php?identifier='.$identifier, _('click here')) . _('to continue'),'info'); include('includes/footer.inc'); exit; } @@ -93,13 +93,13 @@ echo '<br />'; prnMsg(_('You should automatically be forwarded to the entry of the Contract requirements page') . '. ' . _('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' . - '<a href="' . $rootpath . '/ContractOtherReqts.php?identifier=' . $identifier . '">' . _('click here') . '</a> ' . _('to continue'),'info'); + InternalLink($rootpath, 'ContractOtherReqts.php?identifier=' . $identifier, _('click here')) . _('to continue'),'info'); include('includes/footer.inc'); exit; } } /* end of if going to contract BOM or contract requriements */ -echo '<a href="'. $rootpath . '/SelectContract.php">'. _('Back to Contract Selection'). '</a><br />'; +echo InternalLink($rootpath, 'SelectContract.php', _('Back to Contract Selection')) . '<br />'; //attempting to upload the drawing image file if (isset($_FILES['Drawing']) AND $_FILES['Drawing']['name'] !='' AND $_SESSION['Contract'.$identifier]->ContractRef!='') { @@ -129,7 +129,7 @@ if ($UploadTheFile=='Yes'){ $result = move_uploaded_file($_FILES['Drawing']['tmp_name'], $filename); - $message = ($result)?_('File url') . '<a href="' . $filename . '">' . $filename . '</a>' : _('Something is wrong with uploading the file'); + $message = ($result)?_('File url') . InternalLink('', $filename, $filename) : _('Something is wrong with uploading the file'); } } @@ -376,7 +376,7 @@ $DbgMsg = _('The SQL that failed to update the quotation was'); $UpdQuoteResult = DB_query($sql,$db,$ErrMsg,$DbgMsg); prnMsg(_('The contract quotation has been updated based on the new contract cost and margin'),'success'); - echo '<br /><a href="' .$rootpath . '/SelectSalesOrder.php?OrderNumber=' . $_SESSION['Contract'.$identifier]->OrderNo . '&Quotations=Quotes_Only">' . _('Go to Quotation') . ' ' . $_SESSION['Contract'.$identifier]->OrderNo . '</a>'; + echo '<br />' . InternalLink($rootpath, 'SelectSalesOrder.php?OrderNumber=' . $_SESSION['Contract'.$identifier]->OrderNo . '&Quotations=Quotes_Only', _('Go to Quotation') . ' ' . $_SESSION['Contract'.$identifier]->OrderNo); } if ($ExistingContract['status'] == 0 AND $_POST['Status']==1){ @@ -595,7 +595,7 @@ $_SESSION['Contract'.$identifier]->Status=1; $_SESSION['Contract'.$identifier]->OrderNo=$OrderNo; prnMsg(_('The contract has been made into quotation number') . ' ' . $OrderNo,'info'); - echo '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?OrderNumber=' . $OrderNo . '&Quotations=Quotes_Only">' . _('Go to quotation number:') . ' ' . $OrderNo . '</a>'; + echo '<br />' . InternalLink($rootpath, 'SelectSalesOrder.php?OrderNumber=' . $OrderNo . '&Quotations=Quotes_Only', _('Go to quotation number:') . ' ' . $OrderNo); } //end of if making a quotation @@ -727,7 +727,7 @@ } } - echo '</select><a target="_blank" href="'. $rootpath . '/StockCategories.php">' . _('Add or Modify Contract Categories') . '</a></td></tr>'; + echo '</select>' . InternalLink($rootpath, 'StockCategories.php', _('Add or Modify Contract Categories')) . '</td></tr>'; $sql = "SELECT loccode, locationname FROM locations"; $ErrMsg = _('The stock locations could not be retrieved because'); @@ -751,7 +751,7 @@ if (DB_num_rows($result)==0){ prnMsg( _('There are no work centres set up yet') . '. ' . _('Please use the link below to set up work centres'),'warn'); - echo '<br /><a href="'.$rootpath.'/WorkCentres.php">' . _('Work Centre Maintenance') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'WorkCentres.php', _('Work Centre Maintenance')); include('includes/footer.inc'); exit; } @@ -830,7 +830,7 @@ if ($_SESSION['Contract'.$identifier]->Status >=1) { echo '<tr> <td>' . _('Quotation Reference/Sales Order No') . ':</td> - <td><a href="' . $rootpath . '/SelectSalesOrder.php?OrderNumber=' . $_SESSION['Contract'.$identifier]->OrderNo . '&Quotations=Quotes_Only">' . $_SESSION['Contract'.$identifier]->OrderNo . '</a></td> + <td>' . InternalLink($rootpath, 'SelectSalesOrder.php?OrderNumber=' . $_SESSION['Contract'.$identifier]->OrderNo . '&Quotations=Quotes_Only', $_SESSION['Contract'.$identifier]->OrderNo) . '</td> </tr>'; } if ($_SESSION['Contract'.$identifier]->Status!=2 and isset($_SESSION['Contract'.$identifier]->WO)) { Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2012-08-27 20:03:59 UTC (rev 9572) +++ trunk/CounterSales.php 2012-08-27 22:22:14 UTC (rev 9573) @@ -243,7 +243,7 @@ echo '<br /><br />'; prnMsg(_('This sale has been cancelled as requested'),'success'); - echo '<br /><br /><a href="' .htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Start a new Counter Sale') . '</a>'; + echo InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Start a new Counter Sale')); include('includes/footer.inc'); exit; @@ -668,7 +668,7 @@ echo '<input type="hidden" name="POLine_' . $OrderLine->LineNumber . '" value="" />'; echo '<input type="hidden" name="ItemDue_' . $OrderLine->LineNumber . '" value="'.$OrderLine->ItemDue.'" />'; - echo '<td><a target="_blank" href="' . $rootpath . '/StockStatus.php?identifier='.$identifier . '&StockID=' . $OrderLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo . '">' . $OrderLine->StockID . '</a></td> + echo '<td>' . InternalLink($rootpath, 'StockStatus.php?identifier='.$identifier . '&StockID=' . $OrderLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo, $OrderLine->StockID) . '</td> <td>' . $OrderLine->ItemDescription . '</td>'; echo '<td><input class="number" tabindex="2" type="text" name="Quantity_' . ($OrderLine->LineNumber) . '" size="6" maxlength="6" value="' . locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces) . '" /></td>'; @@ -720,7 +720,7 @@ $_SESSION['Items'.$identifier]->TaxGLCodes=$TaxGLCodes; echo '<td class="number">' . locale_money_format($TaxLineTotal ,$_SESSION['Items'.$identifier]->DefaultCurrency) . '</td>'; echo '<td class="number">' . locale_money_format($SubTotal + $TaxLineTotal ,$_SESSION['Items'.$identifier]->DefaultCurrency) . '</td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . _('Delete') . '</a></td></tr>'; + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier . '&Delete=' . $OrderLine->LineNumber, _('Delete')) . '</td></tr>'; if ($_SESSION['AllowOrderLineItemNarrative'] == 1){ echo $RowStarter; @@ -1893,11 +1893,11 @@ echo '<br /><div class="centre">'; if ($_SESSION['InvoicePortraitFormat']==0){ - echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a target="_blank" href="'.$rootpath.'/PDFReceipt.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this receipt'). '</a><br /><br />'; + echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . InternalLink($rootpath, 'PDFReceipt.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True', _('Print this receipt')) . '<br /><br />'; } else { - echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a target="_blank" href="'.$rootpath.'/PDFReceipt.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this receipt'). '</a><br /><br />'; + echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . InternalLink($rootpath, 'PDFReceipt.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True', _('Print this receipt')) . '<br /><br />'; } - echo '<br /><a href="' .htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Start a new Counter Sale') . '</a></div>'; + echo '<br />' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Start a new Counter Sale')) . '</div>'; } // There were input errors so don't process nuffin This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-08-27 20:04:07
|
Revision: 9572 http://weberp.svn.sourceforge.net/weberp/?rev=9572&view=rev Author: tim_schofield Date: 2012-08-27 20:03:59 +0000 (Mon, 27 Aug 2012) Log Message: ----------- Replace <a tags with new InternalLink() function Modified Paths: -------------- trunk/CreditItemsControlled.php trunk/Credit_Invoice.php trunk/Currencies.php trunk/CustEDISetup.php trunk/CustLoginSetup.php trunk/CustomerAllocations.php trunk/CustomerBranches.php trunk/CustomerReceipt.php trunk/CustomerTransInquiry.php trunk/Customers.php trunk/DailyBankTransactions.php trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/Departments.php trunk/DiscountCategories.php trunk/DiscountMatrix.php Modified: trunk/CreditItemsControlled.php =================================================================== --- trunk/CreditItemsControlled.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/CreditItemsControlled.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -25,11 +25,11 @@ if (isset($_GET['LineNo'])){ - $LineNo = $_GET['LineNo']; + $LineNo = $_GET['LineNo']; } elseif (isset($_POST['LineNo'])){ - $LineNo = $_POST['LineNo']; + $LineNo = $_POST['LineNo']; } else { - echo '<div class="centre"><a href="' . $rootpath . '/' . $CreditLink . '">'. _('Select Credit Items'). '</a><br /><br />'; + echo '<div class="centre">' . InternalLink($rootpath, $CreditLink, _('Select Credit Items')); prnMsg( _('This page can only be opened if a Line Item on a credit note has been selected.') . ' ' . _('Please do that first'), 'error'); echo '</div>'; include('includes/footer.inc'); @@ -40,7 +40,7 @@ if (!isset($_SESSION['CreditItems'])) { /* This page can only be called with a credit note entry part entered */ - echo '<div class="centre"><a href="' . $rootpath . '/' . $CreditLink . '">'. _('Select Credit Items'). '</a><br /><br />'; + echo '<div class="centre">' . InternalLink($rootpath, $CreditLink, _('Select Credit Items')); prnMsg( _('This page can only be opened if a controlled credit note line item has been selected.') . ' ' . _('Please do that first'),'error'); echo '</div>'; include('includes/footer.inc'); @@ -53,7 +53,7 @@ //Make sure this item is really controlled if ( $LineItem->Controlled != 1 ){ - echo '<div class="centre"><a href="' . $rootpath . '/' . $CreditLink . '">'. _('Back to Credit Note Entry').'</a></div>'; + echo '<div class="centre">' . InternalLink($rootpath, $CreditLink, _('Back to Credit Note Entry')) . '</div>'; echo '<br />'; prnMsg( _('Notice') . ' - ' . _('The line item must be defined as controlled to require input of the batch numbers or serial numbers being credited'),'warn'); include('includes/footer.inc'); @@ -73,7 +73,7 @@ echo '<input type="hidden" name="CreditInvoice" value="Yes" />'; } -echo '<br /><a href="' . $rootpath . '/' . $CreditLink . '">'. _('Back to Credit Note Entry'). '</a>'; +echo '<br />' . InternalLink($rootpath, $CreditLink, _('Back to Credit Note Entry')); echo '<br /><font size="2"><b>'. _('Credit of Controlled Item'). ' ' . $LineItem->StockID . ' - ' . $LineItem->ItemDescription . ' '. _('from') .' '. $_SESSION['CreditItems']->CustomerName . '</b></font></div>'; Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/Credit_Invoice.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -189,7 +189,7 @@ } else { /* there are no stock movement records created for that invoice */ - echo '<div class="centre"><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a></div>'; + echo '<div class="centre">' . InternalLink($rootpath, 'index.php', _('Back to the menu')) . '</div>'; prnMsg( _('There are no line items that were retrieved for this invoice') . '. ' . _('The automatic credit program can not create a credit note from this invoice'),'warn'); include('includes/footer.inc'); exit; @@ -320,7 +320,7 @@ if ($LnItm->Controlled==1){ - echo '<td><input type="hidden" name="Quantity_' . $LnItm->LineNumber .'" value="' . $LnItm->QtyDispatched . '" /><a href="'.$rootpath.'/CreditItemsControlled.php?LineNo=' . $LnItm->LineNumber . '&CreditInvoice=Yes>' . $LnItm->QtyDispatched . '</a></td>'; + echo '<td><input type="hidden" name="Quantity_' . $LnItm->LineNumber .'" value="' . $LnItm->QtyDispatched . '" />' . InternalLink($rootpath, 'CreditItemsControlled.php?LineNo=' . $LnItm->LineNumber . '&CreditInvoice=Yes', $LnItm->QtyDispatched) . '</td>'; } else { @@ -387,7 +387,7 @@ echo '<td class="number">' . $DisplayTaxAmount . '</td> <td class="number">' . $DisplayGrossLineTotal . '</td> - <td><a href="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $LnItm->LineNumber . '">' . _('Delete') . '</a></td></tr>'; + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $LnItm->LineNumber, _('Delete')) . '</td></tr>'; echo '<tr'.$RowStarter . '><td colspan="12"><textarea tabindex="'.$j.'" name="Narrative_' . $LnItm->LineNumber . '" cols=100% rows=1>' . $LnItm->Narrative . '</textarea><br /><hr></td></tr>'; $j++; @@ -1463,9 +1463,9 @@ echo '<div class="centre">'._('Credit Note number') . ' ' . $CreditNo . ' ' . _('has been processed'); if ($_SESSION['InvoicePortraitFormat']==0){ - echo '<br/><a href="'. $rootpath . '/PrintCustTrans.php?FromTransNo=' . $CreditNo . '&InvOrCredit=Credit&PrintPDF=True">' . _('Print this credit note') . '</a>'; + echo '<br/>' . InternalLink($rootpath, 'PrintCustTrans.php?FromTransNo=' . $CreditNo . '&InvOrCredit=Credit&PrintPDF=True', _('Print this credit note')); } else { - echo '<br/><a href="'. $rootpath . '/PrintCustTransPortrait.php?FromTransNo=' . $CreditNo . '&InvOrCredit=Credit&PrintPDF=True">' . _('Print this credit note') . '</a>'; + echo '<br/>' . InternalLink($rootpath, 'PrintCustTransPortrait.php?FromTransNo=' . $CreditNo . '&InvOrCredit=Credit&PrintPDF=True', _('Print this credit note')); } echo '</div>'; /*end of process credit note */ Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/Currencies.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -234,62 +234,30 @@ } if ($myrow[1]!=$FunctionalCurrency){ - printf('<td><img src="%s" /></td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td><a href="%s&SelectedCurrency=%s">%s</a></td> - <td><a href="%s&SelectedCurrency=%s&delete=1">%s</a></td> - <td><a href="%s/ExchangeRateTrend.php?%s">' . _('Graph') . '</a></td> - </tr>', - $ImageFile, - $myrow['currabrev'], - $myrow['currency'], - $myrow['country'], - $myrow['hundredsname'], - locale_number_format($myrow['decimalplaces'],0), - locale_number_format($myrow['rate'],5), - locale_number_format(GetCurrencyRate($myrow['currabrev'],$CurrencyRatesArray),5), - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['currabrev'], - _('Edit'), - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['currabrev'], - _('Delete'), - $rootpath, - 'CurrencyToShow=' . $myrow['currabrev']); + echo '<td><img src="' . $ImageFile . '" /></td> + <td>' . $myrow['currabrev'] . '</td> + <td>' . $myrow['currency'] . '</td> + <td>' . $myrow['country'] . '</td> + <td>' . $myrow['hundredsname'] . '</td> + <td class="number">' . locale_number_format($myrow['decimalplaces'],0) . '</td> + <td class="number">' . locale_number_format($myrow['rate'],5) . '</td> + <td class="number">' . locale_number_format(GetCurrencyRate($myrow['currabrev'],$CurrencyRatesArray),5) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedCurrency=' . $myrow['currabrev'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedCurrency=' . $myrow['currabrev'] . '&delete=1', _('Delete')) . '</td> + <td>' . InternalLink($rootpath, 'ExchangeRateTrend.php?CurrencyToShow=' . $myrow['currabrev'], _('Graph')) . '</td> + </tr>'; } else { - printf('<td><img src="%s" /></td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td colspan="2">%s</td> - <td><a href="%s&SelectedCurrency=%s">%s</a></td> - <td><a href="%s/ExchangeRateTrend.php?%s">' . _('Graph') . '</a></td> - </tr>', - $ImageFile, - $myrow['currabrev'], - $myrow['currency'], - $myrow['country'], - $myrow['hundredsname'], - $myrow['decimalplaces'], - 1, - _('Functional Currency'), - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['currabrev'], - _('Edit'), - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['currabrev'], - _('Delete'), - $rootpath, - 'CurrencyToShow=' . $myrow['currabrev']); + echo '<td><img src="' . $ImageFile . '" /></td> + <td>' . $myrow['currabrev'] . '</td> + <td>' . $myrow['currency'] . '</td> + <td>' . $myrow['country'] . '</td> + <td>' . $myrow['hundredsname'] . '</td> + <td class="number">' . $myrow['decimalplaces'] . '</td> + <td class="number">1</td> + <td colspan="2">' . _('Functional Currency') . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedCurrency=' . $myrow['currabrev'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?ExchangeRateTrend.php?' . $myrow['currabrev'], _('Graph')) . '</td> + </tr>'; } } //END WHILE LIST LOOP @@ -298,7 +266,7 @@ if (isset($SelectedCurrency)) { - echo '<div class="centre"><a href="' .htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'._('Show all currency definitions').'</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Show all currency definitions')) . '</div>'; } echo '<br />'; Modified: trunk/CustEDISetup.php =================================================================== --- trunk/CustEDISetup.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/CustEDISetup.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -6,7 +6,7 @@ $title = _('Customer EDI Set Up'); include('includes/header.inc'); -echo '<a href="' . $rootpath . '/SelectCustomer.php">' . _('Back to Customers') . '</a><br />'; +echo InternalLink($rootpath, 'SelectCustomer.php', _('Back to Customers')) . '<br />'; if (isset($Errors)) { unset($Errors); @@ -106,7 +106,7 @@ echo '<option selected="True" value="1">'._('Enabled') . '</option>'; } -echo '</select><a href="'.$rootpath.'/EDIMessageFormat.php?MessageType=INVOIC&PartnerCode=' . $_SESSION['CustomerID'] . '">'._('Create') . '/' . _('Edit Invoice Message Format').'</a></td></tr>'; +echo '</select>' . InternalLink($rootpath, 'EDIMessageFormat.php?MessageType=INVOIC&PartnerCode=' . $_SESSION['CustomerID'], _('Create') . '/' . _('Edit Invoice Message Format')) . '</td></tr>'; echo '<tr><td>'._('Enable Receiving of EDI Orders').':</td> <td><select tabindex="2" name="EDIOrders">'; Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/CustLoginSetup.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -19,7 +19,7 @@ _('Petty Cash'), _('Setup')); -echo '<a href="' . $rootpath . '/SelectCustomer.php">' . _('Back to Customers') . '</a><br />'; +echo InternalLink($rootpath, 'SelectCustomer.php', _('Back to Customers')) . '<br />'; $sql="SELECT name FROM debtorsmaster @@ -275,35 +275,20 @@ /*The SecurityHeadings array is defined in config.php */ - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%sSelectedUser=%s">' . _('Edit') . '</a></td> - <td><a href="%sSelectedUser=%s&delete=1">' . _('Delete') . '</a></td> - </tr>', - $myrow[0], - $myrow[1], - $myrow[2], - $myrow[3], - $myrow[4], - $myrow[5], - $LastVisitDate, - $SecurityRoles[($myrow[7])], - $myrow[8], - $myrow[9], - $myrow[10], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow[0], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow[0]); + echo '<td>' . $myrow[0] . '</td> + <td>' . $myrow[1] . '</td> + <td>' . $myrow[2] . '</td> + <td>' . $myrow[3] . '</td> + <td>' . $myrow[4] . '</td> + <td>' . $myrow[5] . '</td> + <td>' . $LastVisitDate . '</td> + <td>' . $SecurityRoles[($myrow[7])] . '</td> + <td>' . $myrow[8] . '</td> + <td>' . $myrow[9] . '</td> + <td>' . $myrow[10] . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedUser=' . $myrow[0], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedUser=' . $myrow[0] . '&delete=1', _('Delete')) . '</td> + </tr>'; } //END WHILE LIST LOOP echo '</table><br />'; @@ -311,7 +296,7 @@ if (isset($SelectedUser)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'">' . _('Review Existing Users') . '</a></div><br />'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Review Existing Users')) . '</div><br />'; } echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/CustomerAllocations.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -489,7 +489,7 @@ <td>' . ConvertSQLDate($myrow['trandate']) . '</td> <td class="number">' . locale_money_format($myrow['total'],$myrow['currcode']) . '</td> <td class="number">' . locale_money_format($myrow['total']-$myrow['alloc'],$myrow['currcode']) . '</td>'; - echo '<td><a href=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'). '?AllocTrans=' . $myrow['id'] . '>' . _('Allocate') . '</a></td></tr>'; + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'). '?AllocTrans=' . $myrow['id'], _('Allocate')) . '</td></tr>'; } DB_free_result($result); echo '</table><br />'; @@ -529,7 +529,7 @@ $k=0; while ($myrow = DB_fetch_array($result)) { - $allocate = '<a href=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'). '?AllocTrans=' . $myrow['id'] . '>' . _('Allocate') . '</a>'; + $allocate = InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'). '?AllocTrans=' . $myrow['id'], _('Allocate')); if ( $curDebtor != $myrow['debtorno'] ) { if ( $curTrans > 1 ) { Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/CustomerBranches.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -31,9 +31,6 @@ $SelectedBranch = mb_strtoupper($_POST['SelectedBranch']); } -// This link is already available on the menu on this page -//echo "<a href='" . $rootpath . '/SelectCustomer.php'>" . _('Back to Customers') . '</a><br />'; - if (isset($Errors)) { unset($Errors); } @@ -238,7 +235,7 @@ )"; } echo '<br />'; - $msg = _('Customer branch').' <b>' . $_POST['BranchCode'] . ': ' . $_POST['BrName'] . ' </b>'._('has been added, add another branch, or return to') . '<a href="index.php">'._('Main Menu') . '</a>'; + $msg = _('Customer branch').' <b>' . $_POST['BranchCode'] . ': ' . $_POST['BrName'] . ' </b>'._('has been added, add another branch, or return to') . InternalLink('', 'index.php', _('Main Menu')); //run the SQL from either of the above possibilites @@ -396,39 +393,23 @@ } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="Mailto:%s">%s</a></td> - <td>%s</td> - <td>%s</td> - <td><a href="%s?DebtorNo=%s&SelectedBranch=%s">%s</td> - <td><a href="%s?DebtorNo=%s&SelectedBranch=%s&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this branch?') . '");\'>%s</td></tr>', - $myrow[10], - $myrow[2], - $myrow[5], - $myrow[3], - $myrow[4], - $myrow[6], - $myrow[7], - $myrow[8], - $myrow[8], - $myrow[9], - ($myrow[11]?_('No'):_('Yes')), - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), - $DebtorNo, - urlencode($myrow[1]), - _('Edit'), - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), - $DebtorNo, - urlencode($myrow[1]), - _('Delete Branch')); - if ($myrow[11]){ $TotalDisable++; } - else { $TotalEnable++; } + echo '<td>' . $myrow[10] . '</td> + <td>' . $myrow[2] . '</td> + <td>' . $myrow[5] . '</td> + <td>' . $myrow[3] . '</td> + <td>' . $myrow[4] . '</td> + <td>' . $myrow[6] . '</td> + <td>' . $myrow[7] . '</td> + <td>' . $myrow[8] . '</td> + <td>' . $myrow[9] . '</td> + <td>' . ($myrow[11]?_('No'):_('Yes')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo=' . $DebtorNo . '&SelectedBranch=' . urlencode($myrow[1]), _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo=' . $DebtorNo . '&SelectedBranch=' . urlencode($myrow[1]) . '&delete=yes', _('Delete Branch')) . '</td></tr>'; + if ($myrow[11]){ + $TotalDisable++; + } else { + $TotalEnable++; + } } while ($myrow = DB_fetch_row($result)); //END WHILE LIST LOOP @@ -539,7 +520,7 @@ echo '<p Class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Change Details for Branch'). ' '. $SelectedBranch . '</p>'; if (isset($SelectedBranch)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo=' . $DebtorNo. '">' . _('Show all branches defined for'). ' '. $DebtorNo . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo=' . $DebtorNo, _('Show all branches defined for'). ' '. $DebtorNo) . '</div>'; } echo '<br /><table class="selection">'; echo '<tr><th colspan="2"><div class="centre"><b>'._('Change Branch').'</b></th></tr>'; @@ -589,7 +570,7 @@ if (DB_num_rows($result)==0){ echo '</table>'; prnMsg(_('There are no sales people defined as yet') . ' - ' . _('customer branches must be allocated to a sales person') . '. ' . _('Please use the link below to define at least one sales person'),'error'); - echo '<p align="center"><a href="' . $rootpath . '/SalesPeople.php?">'._('Define Sales People') . '</a></p>'; + echo '<p align="center">' . InternalLink($rootpath, 'SalesPeople.php', _('Define Sales People')) . '</p>'; include('includes/footer.inc'); exit; } @@ -651,7 +632,7 @@ if (DB_num_rows($result)==0){ echo '</table>'; prnMsg(_('There are no areas defined as yet') . ' - ' . _('customer branches must be allocated to an area') . '. ' . _('Please use the link below to define at least one sales area'),'error'); - echo '<br /><a href="'.$rootpath.'/Areas.php?">'._('Define Sales Areas').'</a>'; + echo '<br />' . InternalLink($rootpath, 'Areas.php', _('Define Sales Areas')); include('includes/footer.inc'); exit; } @@ -676,7 +657,7 @@ if (DB_num_rows($result)==0){ echo '</table>'; prnMsg(_('There are no stock locations defined as yet') . ' - ' . _('customer branches must refer to a default location where stock is normally drawn from') . '. ' . _('Please use the link below to define at least one stock location'),'error'); - echo '<br /><a href="'.$rootpath.'/Locations.php?">'._('Define Stock Locations').'</a>'; + echo '<br />' . InternalLink($rootpath, 'Locations.php', _('Define Stock Locations')); include('includes/footer.inc'); exit; } @@ -726,7 +707,7 @@ echo '<td><input tabindex="17" type="text" name="FaxNo" size="22" maxlength="20" value="'. $_POST['FaxNo'].'" /></td></tr>'; if (!isset($_POST['Email'])) {$_POST['Email']='';} - echo '<tr><td>'.(($_POST['Email']) ? '<a href="Mailto:'.$_POST['Email'].'">'._('Email').':</a>' : _('Email').':').'</td>'; + echo '<tr><td>'.(($_POST['Email']) ? _('Email') : _('Email').':').'</td>'; //only display email link if there is an email address echo '<td><input tabindex="18" type="text" name="Email" size="56" maxlength="55" value="'. $_POST['Email'].'" /></td></tr>'; Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/CustomerReceipt.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -231,8 +231,7 @@ $k=0; //Table row counter for row styles $CustomerReceiptCounter=1; //Count lines of customer receipts in this batch - echo '<br /><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Allocate') . '" alt="" />' . - ' ' . _('Summary of Receipt Batch').'</p><br />'; + echo '<br /><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Allocate') . '" alt="" />' . ' ' . _('Summary of Receipt Batch').'</p><br />'; echo '<table class="selection"><tr><th>'._('Batch Number').'</th> <th>'._('Date Banked').'</th> @@ -261,7 +260,7 @@ <td class="number">'.locale_money_format($ReceiptItem->Amount/$_SESSION['ReceiptBatch']->ExRate/$_SESSION['ReceiptBatch']->FunctionalExRate,$_SESSION['ReceiptBatch']->Currency) .'</td>'; if ($ReceiptItem->GLCode ==''){ - echo '<td><a target="_blank" href="' . $rootpath . '/PDFReceipt.php?BatchNumber=' . $_SESSION['ReceiptBatch']->BatchNo. '&ReceiptNumber='.$CustomerReceiptCounter.'">'._('Print a Customer Receipt').'</a></td></tr>'; + echo '<td>' . InternalLink($rootpath, 'PDFReceipt.php?BatchNumber=' . $_SESSION['ReceiptBatch']->BatchNo. '&ReceiptNumber='.$CustomerReceiptCounter, _('Print a Customer Receipt')) . '</td></tr>'; $CustomerReceiptCounter += 1; } @@ -532,10 +531,10 @@ prnMsg( _('Receipt batch') . ' ' . $_SESSION['ReceiptBatch']->BatchNo . ' ' . _('has been successfully entered into the database'),'success'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . - '<a href="' . $rootpath . '/PDFBankingSummary.php?BatchNo=' . $_SESSION['ReceiptBatch']->BatchNo . '">' . _('Print PDF Batch Summary') . '</a></p>'; + InternalLink($rootpath, 'PDFBankingSummary.php?BatchNo=' . $_SESSION['ReceiptBatch']->BatchNo, _('Print PDF Batch Summary')) . '</p>'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/allocation.png" title="' . _('Allocate') . '" alt="" />' . ' ' . - '<a href="' . $rootpath . '/CustomerAllocations.php">' . _('Allocate Receipts') . '</a></p>'; - echo '<p class="page_title_text">•<a href="' . $rootpath . '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer">' . _('Enter Receipts') . '</a></p>'; + InternalLink($rootpath, 'CustomerAllocations.php', _('Allocate Receipts')) . '</p>'; + echo '<p class="page_title_text">•' . InternalLink($rootpath, 'CustomerReceipt.php?NewReceipt=Yes&Type=Customer', _('Enter Receipts')) . '</p>'; unset($_SESSION['ReceiptBatch']); include('includes/footer.inc'); exit; @@ -748,7 +747,7 @@ if (DB_num_rows($AccountsResults)==0){ echo '</select></td></tr></table><br />'; - prnMsg(_('Bank Accounts have not yet been defined') . '. ' . _('You must first') . ' ' . '<a href="' . $rootpath . '/BankAccounts.php">' . _('define the bank accounts') . '</a>' . _('and general ledger accounts to be affected'),'info'); + prnMsg(_('Bank Accounts have not yet been defined') . '. ' . _('You must first') . ' ' . InternalLink($rootpath, 'BankAccounts.php', _('define the bank accounts')) . _('and general ledger accounts to be affected'),'info'); include('includes/footer.inc'); exit; } else { @@ -1051,7 +1050,7 @@ <td class="number" width="10%">' . locale_money_format($ReceiptItem->Amount, $_SESSION['ReceiptBatch']->Currency) . '</td> <td class="number" width="10%">' . locale_money_format($ReceiptItem->Discount,$_SESSION['ReceiptBatch']->Currency) . '</td> <td class="number" width="10%">' . $ReceiptItem->tag . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $ReceiptItem->ID . '&Type='.$_GET['Type'].'">' . _('Delete') . '</a></td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $ReceiptItem->ID . '&Type='.$_GET['Type'], _('Delete')) . '</td> </tr>'; $BatchTotal= $BatchTotal + $ReceiptItem->Amount; } Modified: trunk/CustomerTransInquiry.php =================================================================== --- trunk/CustomerTransInquiry.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/CustomerTransInquiry.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -106,68 +106,49 @@ $k++; } - $format_base = '<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td width="200">%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td>%s</td>'; + $format_base = ''; if ($_POST['TransType']==10){ /* invoices */ - printf($format_base.' - <td><a target="_blank" href="%s/PrintCustTrans.php?FromTransNo=%s&InvOrCredit=Invoice"><img src="%s" title="' . _('Click to preview the invoice') . '" /></a></td> - </tr>', - $myrow['typename'], - $myrow['transno'], - ConvertSQLDate($myrow['trandate']), - $myrow['debtorno'], - $myrow['branchcode'], - $myrow['reference'], - $myrow['invtext'], - $myrow['order_'], - locale_number_format($myrow['rate'],4), - locale_money_format($myrow['totalamt'],$myrow['currcode']), - $myrow['currcode'], - $rootpath, - $myrow['transno'], - $rootpath.'/css/'.$theme.'/images/preview.gif'); + echo '<td>' . $myrow['typename'] . '</td> + <td>' . $myrow['transno'] . '</td> + <td>' . ConvertSQLDate($myrow['trandate']) . '</td> + <td>' . $myrow['debtorno'] . '</td> + <td>' . $myrow['branchcode'] . '</td> + <td>' . $myrow['reference'] . '</td> + <td width="200">' . $myrow['invtext'] , '</td> + <td>' . $myrow['order_'] . '</td> + <td class="number">' . locale_number_format($myrow['rate'],4) . '</td> + <td class="number">' . locale_money_format($myrow['totalamt'],$myrow['currcode']) . '</td> + <td>' . $myrow['currcode'] . '</td> + <td>' . InternalLink($rootpath, 'PrintCustTrans.php?FromTransNo=' . $myrow['transno'] . '&InvOrCredit=Invoice"', '<img src="' . $rootpath.'/css/'.$theme.'/images/preview.gif' . '" title="' . _('Click to preview the invoice') . '" />') . '</td> + </tr>'; } elseif ($_POST['TransType']==11){ /* credit notes */ - printf($format_base.' - <td><a target="_blank" href="%s/PrintCustTrans.php?FromTransNo=%s&InvOrCredit=Credit"><img src="%s" title="' . _('Click to preview the credit') . '" /></a></td> - </tr>', - $myrow['typename'], - $myrow['transno'], - ConvertSQLDate($myrow['trandate']), - $myrow['debtorno'], - $myrow['branchcode'], - $myrow['reference'], - $myrow['invtext'], - $myrow['order_'], - locale_number_format($myrow['rate'],4), - locale_money_format($myrow['totalamt'],$myrow['currcode']), - $myrow['currcode'], - $rootpath, - $myrow['transno'], - $rootpath.'/css/'.$theme.'/images/preview.gif'); + echo '<td>' . $myrow['typename'] . '</td> + <td>' . $myrow['transno'] . '</td> + <td>' . ConvertSQLDate($myrow['trandate']) . '</td> + <td>' . $myrow['debtorno'] . '</td> + <td>' . $myrow['branchcode'] . '</td> + <td>' . $myrow['reference'] . '</td> + <td width="200">' . $myrow['invtext'] . '</td> + <td>' . $myrow['order_'] . '</td> + <td class="number">' . locale_number_format($myrow['rate'],4) . '</td> + <td class="number">' . locale_money_format($myrow['totalamt'],$myrow['currcode']) . '</td> + <td>' . $myrow['currcode'] . '</td> + <td>' . InternalLink($rootpath, 'PrintCustTrans.php?FromTransNo=' . $myrow['transno'] . '&InvOrCredit=Credit">', '<img src="' . $rootpath.'/css/'.$theme.'/images/preview.gif') . '" title="' . _('Click to preview the credit') . '" />') . '</td> + </tr>'; } else { /* otherwise */ - printf($format_base . '</tr>', - $myrow['typename'], - $myrow['transno'], - ConvertSQLDate($myrow['trandate']), - $myrow['debtorno'], - $myrow['branchcode'], - $myrow['reference'], - $myrow['invtext'], - $myrow['order_'], - locale_number_format($myrow['rate'],4), - locale_money_format($myrow['totalamt'],$myrow['currcode']), - $myrow['currcode']); + echo '<td>' . $myrow['typename'] . '</td> + <td>' . $myrow['transno'] . '</td> + <td>' . ConvertSQLDate($myrow['trandate']) . '</td> + <td>' . $myrow['debtorno'] . '</td> + <td>' . $myrow['branchcode'] . '</td> + <td>' . $myrow['reference'] . '</td> + <td width="200">' . $myrow['invtext'] . '</td> + <td>' . $myrow['order_'] . '</td> + <td class="number">' . locale_number_format($myrow['rate'],4) . '</td> + <td class="number">' . locale_money_format($myrow['totalamt'],$myrow['currcode']) . '</td> + <td>' . $myrow['currcode'] . '</td></tr>'; } } Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/Customers.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -279,7 +279,7 @@ echo '<div class="centre">' . _('You should automatically be forwarded to the entry of a new Customer Branch page') . '. ' . _('If this does not happen') .' (' . _('if the browser does not support META Refresh') . ') ' . - '<a href="' . $rootpath . '/CustomerBranches.php?DebtorNo=' . $_POST['DebtorNo'] . '"></a></div>'; + InternalLink($rootpath, 'CustomerBranches.php?DebtorNo=' . $_POST['DebtorNo'], $_POST['DebtorNo']) '</div>'; include('includes/footer.inc'); exit; @@ -418,7 +418,7 @@ $myrow=DB_fetch_row($result); if ($myrow[0]==0) { prnMsg( _('In order to create a new customer you must first set up at least one sales type/price list').'<br />'. - _('Click').' '.'<a target="_blank" href="' . $rootpath . '/SalesTypes.php">' . _('here').' ' . '</a>'._('to set up your price lists'),'warning').'<br />'; + _('Click').' '. InternalLink($rootpath, 'SalesTypes.php', _('here')).' ' . '</a>'._('to set up your price lists'),'warning').'<br />'; $SetupErrors += 1; } $sql="SELECT COUNT(typeid) @@ -427,12 +427,12 @@ $myrow=DB_fetch_row($result); if ($myrow[0]==0) { prnMsg( _('In order to create a new customer you must first set up at least one customer type').'<br />'. - _('Click').' '.'<a target="_blank" href="' . $rootpath . '/CustomerTypes.php">' . _('here').' ' . '</a>'._('to set up your customer types'),'warning'); + _('Click').' '. InternalLink($rootpath, 'CustomerTypes.php', _('here')) . _('to set up your customer types'),'warning'); $SetupErrors += 1; } if ($SetupErrors>0) { - echo '<br /><div class="centre"><a href="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'" >'._('Click here to continue').'</a></div>'; + echo '<br /><div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('Click here to continue')) . '</div>'; include('includes/footer.inc'); exit; } @@ -487,7 +487,7 @@ $result=DB_query("SELECT typeabbrev, sales_type FROM salestypes",$db); if (DB_num_rows($result)==0){ $DataError =1; - echo '<a href="SalesTypes.php?" target="_parent">Setup Types</a>'; + echo InternalLink('', 'SalesTypes.php?', _('Setup Types')); echo '<tr><td colspan="2">' . prnMsg(_('No sales types/price lists defined'),'error') . '</td></tr>'; } else { echo '<tr><td>' . _('Sales Type/Price List') . ':</td> @@ -504,7 +504,7 @@ $result=DB_query("SELECT typeid, typename FROM debtortype",$db); if (DB_num_rows($result)==0){ $DataError =1; - echo '<a href="SalesTypes.php" target="_parent">' . _('Setup Types') . '</a>'; + echo InternalLink('', 'SalesTypes.php', _('Setup Types')); echo '<tr><td colspan="2">' . prnMsg(_('No Customer types/price lists defined'),'error') . '</td></tr>'; } else { echo '<tr><td>' . _('Customer Type') . ':</td> @@ -943,35 +943,19 @@ } if (isset($_GET['Modify'])) { - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - </tr>', - $myrow['contactname'], - $myrow['role'], - $myrow['phoneno'], - $myrow['notes'], - $myrow['contid'], - $myrow['debtorno'], - $myrow['debtorno']); + echo '<td>' . $myrow['contactname'] . '</td> + <td>' . $myrow['role'] . '</td> + <td>' . $myrow['phoneno'] . '</td> + <td>' . $myrow['notes'] . '</td> + </tr>'; } else { - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="AddCustomerContacts.php?Id=%s&DebtorNo=%s">'. _('Edit'). '</a></td> - <td><a href="%sID=%s&DebtorNo=%s&delete=1">'. _('Delete'). '</a></td> - </tr>', - $myrow['contactname'], - $myrow['role'], - $myrow['phoneno'], - $myrow['notes'], - $myrow['contid'], - $myrow['debtorno'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', - $myrow['contid'], - $myrow['debtorno']); + echo '<td>' . $myrow['contactname'] . '</td> + <td>' . $myrow['role'] . '</td> + <td>' . $myrow['phoneno'] . '</td> + <td>' . $myrow['notes'] . '</td> + <td>' . InternalLink('', 'AddCustomerContacts.php?Id=' . $myrow['contid'] . '&DebtorNo=' . $myrow['debtorno'], _('Edit')) . '</td> + <td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?ID=' . $myrow['contid'] . '&DebtorNo=' . $myrow['debtorno'] . '&delete=1', _('Delete')) . '</td> + </tr>'; } }//END WHILE LIST LOOP echo '</table>'; Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/DailyBankTransactions.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -31,7 +31,7 @@ if (DB_num_rows($AccountsResults)==0){ echo '</select></td></tr></table>'; - prnMsg( _('Bank Accounts have not yet been defined. You must first') . ' <a href="' . $rootpath . '/BankAccounts.php">' . _('define the bank accounts') . '</a> ' . _('and general ledger accounts to be affected'),'warn'); + prnMsg( _('Bank Accounts have not yet been defined. You must first') . InternalLink($rootpath, 'BankAccounts.php', _('define the bank accounts')) . _('and general ledger accounts to be affected'),'warn'); include('includes/footer.inc'); exit; } else { Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/DebtorsAtPeriodEnd.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -58,7 +58,7 @@ $title = _('Customer Balances') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg(_('The customer details could not be retrieved by the SQL because') . DB_error_msg($db),'error'); - echo '<br /><a href="'.$rootpath.'/index.php">' . _('Back to the menu') . '</a>'; + echo '<br />' . InternalLink($rootpath, 'index.php', _('Back to the menu')); if ($debug==1){ echo '<br />'.$SQL; } @@ -70,7 +70,7 @@ $title = _('Customer Balances') . ' - ' . _('Problem Report'); include('includes/header.inc'); prnMsg(_('The customer details listing has no clients to report on'),'warn'); - echo '<br /><a href="'.$rootpath.'/index.php">' . _('Back to the menu') . '</a>'; + echo InternalLink($rootpath, 'index.php', _('Back to the menu')); include('includes/footer.inc'); exit; } Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/DeliveryDetails.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -243,7 +243,7 @@ $BestShipper = $ShipperReturned[0]; } else { prnMsg(_('We have a problem') . ' - ' . _('there are no shippers defined'). '. ' . _('Please use the link below to set up shipping or freight companies') . ', ' . _('the system expects the shipping company to be selected or a default freight company to be used'),'error'); - echo '<a href="' . $rootpath . 'Shippers.php">'. _('Enter') . '/' . _('Amend Freight Companies') .'</a>'; + echo InternalLink($rootpath, 'Shippers.php', _('Enter') . '/' . _('Amend Freight Companies')); } } if (isset($_SESSION['Items'.$identifier]->ShipVia) AND $_SESSION['Items'.$identifier]->ShipVia!=''){ @@ -258,7 +258,8 @@ if(isset($_POST['MakeRecurringOrder']) AND ! $InputErrors){ echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/RecurringSalesOrders.php?identifier='.$identifier . '&NewRecurringOrder=Yes">'; - prnMsg(_('You should automatically be forwarded to the entry of recurring order details page') . '. ' . _('If this does not happen') . '(' . _('if the browser does not support META Refresh') . ') ' ."<a href='" . $rootpath . '/RecurringOrders.php?identifier='.$identifier . "&NewRecurringOrder=Yes'>". _('click here') .'</a> '. _('to continue'),'info'); + prnMsg(_('You should automatically be forwarded to the entry of recurring order details page') . '. ' . _('If this does not happen') . '(' . _('if the browser does not support META Refresh') . ') ' . + InternalLink($rootpath, 'RecurringOrders.php?identifier='.$identifier . '&NewRecurringOrder=Yes', _('click here')) . _('to continue'),'info'); include('includes/footer.inc'); exit; } @@ -267,7 +268,8 @@ if (isset($_POST['BackToLineDetails'])){ echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/SelectOrderItems.php?identifier='.$identifier . '">'; - prnMsg(_('You should automatically be forwarded to the entry of the order line details page') . '. ' . _('If this does not happen') . '(' . _('if the browser does not support META Refresh') . ') ' ."<a href='" . $rootpath . '/SelectOrderItems.php?identifier='.$identifier . "'>". _('click here') .'</a> '. _('to continue'),'info'); + prnMsg(_('You should automatically be forwarded to the entry of the order line details page') . '. ' . _('If this does not happen') . '(' . _('if the browser does not support META Refresh') . ') ' . + InternalLink($rootpath, 'SelectOrderItems.php?identifier='.$identifier, _('click here')) . _('to continue'),'info'); include('includes/footer.inc'); exit; @@ -599,21 +601,21 @@ echo '<br /><table class="selection"> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" /></td> - <td>' . ' ' . '<a target="_blank" href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $OrderNo . '">'. _('Print packing slip') . ' (' . _('Preprinted stationery') . ')' .'</a></td> + <td>' . ' ' . InternalLink($rootpath, 'PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $OrderNo, _('Print packing slip') . ' (' . _('Preprinted stationery') . ')') . '</td> </tr>'; echo '<tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" /></td> - <td>' . ' ' . '<a target="_blank" href="' . $rootpath . '/PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $OrderNo . '">'. _('Print packing slip') . ' (' . _('Laser') . ')' .'</a></td> + <td>' . ' ' . InternalLink($rootpath, 'PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $OrderNo, _('Print packing slip') . ' (' . _('Laser') . ')') .'</td> </tr>'; echo '<tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt="" /></td> - <td>' . ' ' . '<a href="' . $rootpath . '/ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $OrderNo .'">'. _('Confirm Dispatch and Produce Invoice') .'</a></td> + <td>' . ' ' . InternalLink($rootpath, 'ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $OrderNo, _('Confirm Dispatch and Produce Invoice')) . '</td> </tr>'; //Add option to Print Sales Orders or Proforma invoice echo '<tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/pdf.png" title="' . _('Sales Order') . '" alt="" /></td> - <td>' . ' ' . '<a href="' . $rootpath . '/PrintSalesOrder_generic.php?identifier='.$identifier . '&TransNo=' . $OrderNo .'">'. _('Print Sales Order / Pro-forma Invoice') .'</a></td> + <td>' . ' ' . InternalLink($rootpath, 'PrintSalesOrder_generic.php?identifier='.$identifier . '&TransNo=' . $OrderNo, _('Print Sales Order / Pro-forma Invoice')) .'</td> </tr>'; echo '</table>'; @@ -622,20 +624,20 @@ echo '<br /><table class="selection"> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt="" /></td> - <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotation.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Landscape)') .'</a></td> + <td>' . ' ' . InternalLink($rootpath, 'PDFQuotation.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo, _('Print Quotation (Landscape)')) . '</td> </tr> </table>'; echo '<br /><table class="selection"> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt="" /></td> - <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotationPortrait.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Portrait)') .'</a></td> + <td>' . ' ' . InternalLink($rootpath, 'PDFQuotationPortrait.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo, _('Print Quotation (Portrait)')) .'</td> </tr> </table>'; } echo '<br /><table class="selection"> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt="" /></td> - <td>' . ' ' . '<a href="'. $rootpath .'/SelectOrderItems.php?identifier='.$identifier . '&NewOrder=Yes">'. _('Add Another Sales Order') .'</a></td> + <td>' . ' ' . InternalLink($rootpath, 'SelectOrderItems.php?identifier='.$identifier . '&NewOrder=Yes', _('Add Another Sales Order')) .'</td> </tr> </table>'; } else { @@ -817,13 +819,13 @@ echo '<br /><table class="selection"> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td> - <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotation.php?identifier='.$identifier . '&QuotationNo=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Print Quotation (Landscape)') .'</a></td> + <td>' . ' ' . InternalLink($rootpath, 'PDFQuotation.php?identifier='.$identifier . '&QuotationNo=' . $_SESSION['ExistingOrder'.$identifier], _('Print Quotation (Landscape)')) .'</td> </tr> </table>'; echo '<br /><table class="selection"> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt="" /></td> - <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotationPortrait.php?identifier='.$identifier . '&QuotationNo=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Print Quotation (Portrait)') .'</a></td> + <td>' . ' ' . InternalLink($rootpath, 'PDFQuotationPortrait.php?identifier='.$identifier . '&QuotationNo=' . $_SESSION['ExistingOrder'.$identifier], _('Print Quotation (Portrait)')) .'</td> </tr> </table>'; }else{ @@ -834,19 +836,19 @@ <table class="selection"> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" /></td> - <td><a target="_blank" href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Print packing slip - pre-printed stationery') .'</a></td> + <td>' . InternalLink($rootpath, 'PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'.$identifier], _('Print packing slip - pre-printed stationery')) .'</td> </tr>'; echo '<tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" /></td> - <td><a target="_blank" href="' . $rootpath . '/PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Print packing slip') . ' (' . _('Laser') . ')' .'</a></td> + <td>' . InternalLink($rootpath, 'PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'.$identifier], _('Print packing slip') . ' (' . _('Laser') . ')') .'</td> </tr>'; echo '<tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt="" /></td> - <td><a href="' . $rootpath .'/ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Confirm Order Delivery Quantities and Produce Invoice') .'</a></td> + <td>' . InternalLink($rootpath, 'ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $_SESSION['ExistingOrder'.$identifier], _('Confirm Order Delivery Quantities and Produce Invoice')) . '</td> </tr>'; echo '<tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt="" /></td> - <td><a href="' . $rootpath .'/SelectSalesOrder.php?identifier='.$identifier . '">'. _('Select A Different Order') .'</a></td> + <td>' . InternalLink($rootpath, 'SelectSalesOrder.php?identifier='.$identifier, _('Select A Different Order')) .'</td> </tr> </table>'; }//end of print orders Modified: trunk/Departments.php =================================================================== --- trunk/Departments.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/Departments.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -188,8 +188,8 @@ echo '<td>' . $myrow['description'] . '</td>'; echo '<td>' . $myrow['authoriser'] . '</td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedDepartmentID=' . $myrow['departmentid'] . '">' . _('Edit') . '</a></td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedDepartmentID=' . $myrow['departmentid'] . '&delete=1">' . _('Delete') .'</a></td>'; + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedDepartmentID=' . $myrow['departmentid'], _('Edit')) . '</td>'; + echo '<td>' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedDepartmentID=' . $myrow['departmentid'] . '&delete=1', _('Delete')) .'</td>'; echo '</tr>'; } //END WHILE LIST LOOP @@ -198,7 +198,7 @@ if (isset($SelectedDepartmentID)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('View all Departments') . '</a></div>'; + echo '<div class="centre">' . InternalLink('', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), _('View all Departments')) . '</div>'; } echo '<br />'; Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/DiscountCategories.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -213,14 +213,10 @@ } $DeleteURL = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=yes&StockID=' . $myrow['stockid'] . '&DiscountCategory=' . $myrow['discountcategory']; - printf('<td>%s</td> - <td>%s - %s</td> - <td><a href="%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this discount category?') . '\');">'. _('Delete') .'</td> - </tr>', - $myrow['discountcategory'], - $myrow['stockid'], - $myrow['description'], - $DeleteURL); + echo '<td>' . $myrow['discountcategory'] . '</td> + <td>' . $myrow['stockid'] . ' - ' . $myrow['description'] . '</td> + <td>' . InternalLink('', $DeleteURL, _('Delete')) .'</td> + </tr>'; } Modified: trunk/DiscountMatrix.php =================================================================== --- trunk/DiscountMatrix.php 2012-08-27 12:53:29 UTC (rev 9571) +++ trunk/DiscountMatrix.php 2012-08-27 20:03:59 UTC (rev 9572) @@ -174,17 +174,12 @@ } $DeleteURL = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=yes&SalesType=' . $myrow['salestype'] . '&DiscountCategory=' . $myrow['discountcategory'] . '&QuantityBreak=' . $myrow['quantitybreak']; - printf('<td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td><a href="%s">' . _('Delete') . '</td> - </tr>', - $myrow['sales_type'], - $myrow['discountcategory'], - $myrow['quantitybreak'], - $myrow['discountrate']*100 , - $DeleteURL); + echo '<td>' . $myrow['sales_type'] . '</td> + <td>' . $myrow['discountcategory'] . '</td> + <td class="number">' . $myrow['quantitybreak'] . '</td> + <td class="number">' . $myrow['discountrate']*100 . '</td> + <td>' . InternalLink('', $DeleteURL, _('Delete')) . '</td> + </tr>'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |