From: <ex...@us...> - 2016-04-12 01:36:13
|
Revision: 7491 http://sourceforge.net/p/web-erp/reponame/7491 Author: exsonqu Date: 2016-04-12 01:36:11 +0000 (Tue, 12 Apr 2016) Log Message: ----------- Modified Paths: -------------- trunk/SelectProduct.php trunk/sql/mysql/upgrade4.12.3-4.13.sql Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2016-04-11 02:00:42 UTC (rev 7490) +++ trunk/SelectProduct.php 2016-04-12 01:36:11 UTC (rev 7491) @@ -4,6 +4,7 @@ $PricesSecurity = 12;//don't show pricing info unless security token 12 available to user $SuppliersSecurity = 9; //don't show supplier purchasing info unless security token 9 available to user +$CostSecurity = 18; //don't show cost info unless security token 18 available to user include ('includes/session.inc'); $Title = _('Search Inventory Items'); @@ -174,6 +175,7 @@ $Price = $PriceRow[1]; echo '<td class="select" colspan="2" style="text-align:right">' . locale_number_format($Price, $_SESSION['CompanyRecord']['decimalplaces']) . '</td>'; } + if (in_array($CostSecurity,$_SESSION['AllowedPageSecurityTokens'])) { echo '<th class="number">' . _('Cost') . ':</th> <td class="select" style="text-align:right">' . locale_number_format($Cost, $_SESSION['StandardCostDecimalPlaces']) . '</td> <th class="number">' . _('Gross Profit') . ':</th> @@ -183,8 +185,9 @@ } else { echo _('N/A'); } - echo '</td> - </tr>'; + echo '</td>'; + } + echo '</tr>'; } //end of if PricesSecuirty allows viewing of prices echo '</table>'; //end of first nested table // Item Category Property mod: display the item properties Modified: trunk/sql/mysql/upgrade4.12.3-4.13.sql =================================================================== --- trunk/sql/mysql/upgrade4.12.3-4.13.sql 2016-04-11 02:00:42 UTC (rev 7490) +++ trunk/sql/mysql/upgrade4.12.3-4.13.sql 2016-04-12 01:36:11 UTC (rev 7491) @@ -54,6 +54,7 @@ ALTER table pctabs DROP FOREIGN KEY `pctabs_ibfk_4`; ALTER table pctabs CHANGE authorizer authorizer varchar(100); ALTER table pctabs CHANGE assigner assigner varchar(100); +INSERT INTO securitytokens VALUES(18,'Cost authority'); -- Update version number: UPDATE config SET confvalue='4.13' WHERE confname='VersionNumber'; |