|
From: <rc...@us...> - 2014-06-24 20:33:34
|
Revision: 6778
http://sourceforge.net/p/web-erp/reponame/6778
Author: rchacon
Date: 2014-06-24 20:33:25 +0000 (Tue, 24 Jun 2014)
Log Message:
-----------
Add $ViewTopic, $BookMark to Prices.php and minor improvements.
Modified Paths:
--------------
trunk/Prices.php
trunk/doc/Change.log
Modified: trunk/Prices.php
===================================================================
--- trunk/Prices.php 2014-06-23 16:16:05 UTC (rev 6777)
+++ trunk/Prices.php 2014-06-24 20:33:25 UTC (rev 6778)
@@ -1,50 +1,49 @@
<?php
-
/* $Id$*/
include('includes/session.inc');
-
$Title = _('Item Prices');
+$ViewTopic = 'Prices';
+/*$BookMark = '';// Anchor's id in the manual's html document.*/
+include('includes/header.inc');
+echo '<p class="page_title_text"><img alt="" src="' . $RootPath . '/css/' . $Theme .
+ '/images/money_add.png" title="' .
+ _('Search') . '" />' . ' ' .
+ $Title . '</p>';
-include('includes/header.inc');
+echo '<a href="' . $RootPath . '/SelectProduct.php">' . _('Back to Items') . '</a><br />';
+
include('includes/SQL_CommonFunctions.inc');
//initialise no input errors assumed initially before we test
$InputError = 0;
-
-if (isset($_GET['Item'])){
+if (isset($_GET['Item'])) {
$Item = trim(mb_strtoupper($_GET['Item']));
-}elseif (isset($_POST['Item'])){
+} elseif (isset($_POST['Item'])) {
$Item = trim(mb_strtoupper($_POST['Item']));
}
-if (!isset($_POST['TypeAbbrev']) OR $_POST['TypeAbbrev']==''){
+if (!isset($_POST['TypeAbbrev']) OR $_POST['TypeAbbrev']=='') {
$_POST['TypeAbbrev'] = $_SESSION['DefaultPriceList'];
}
-if (!isset($_POST['CurrAbrev'])){
+if (!isset($_POST['CurrAbrev'])) {
$_POST['CurrAbrev'] = $_SESSION['CompanyRecord']['currencydefault'];
}
-echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . $Title . '</p>';
-
-echo '<a href="' . $RootPath . '/SelectProduct.php">' . _('Back to Items') . '</a><br />';
-
-
$result = DB_query("SELECT stockmaster.description,
stockmaster.mbflag
FROM stockmaster
WHERE stockmaster.stockid='".$Item."'",$db);
$myrow = DB_fetch_row($result);
-if (DB_num_rows($result)==0){
+if (DB_num_rows($result)==0) {
prnMsg( _('The part code entered does not exist in the database') . '. ' . _('Only valid parts can have prices entered against them'),'error');
$InputError=1;
}
-
-if (!isset($Item)){
+if (!isset($Item)) {
echo '<p>';
prnMsg (_('An item must first be selected before this page is called') . '. ' . _('The product selection page should call this page with a valid product code'),'error');
include('includes/footer.inc');
@@ -53,7 +52,7 @@
$PartDescription = $myrow[0];
-if ($myrow[1]=='K'){
+if ($myrow[1]=='K') {
prnMsg(_('The part selected is a kit set item') .', ' . _('these items explode into their components when selected on an order') . ', ' . _('prices must be set up for the components and no price can be set for the whole kit'),'error');
exit;
}
@@ -293,18 +292,17 @@
echo '<tr><td>' . _('Currency') . ':</td>
<td><select name="CurrAbrev">';
while ($myrow = DB_fetch_array($result)) {
- echo '<option';
+ echo '<option ';
if ($myrow['currabrev']==$_POST['CurrAbrev']) {
- echo ' selected="selected"';
+ echo 'selected="selected" ';
}
- echo ' value="' . $myrow['currabrev'] . '">' . $CurrencyName[$myrow['currabrev']] . '</option>';
-} // End while loop
+ echo 'value="' . $myrow['currabrev'] . '">' . $CurrencyName[$myrow['currabrev']] . '</option>';
+}// End while loop
+echo '</select></td></tr>';
DB_free_result($result);
-echo '</select></td>
- </tr>
- <tr>
+echo '<tr>
<td>' . _('Sales Type Price List') . ':</td>
<td><select name="TypeAbbrev">';
@@ -312,16 +310,14 @@
$result = DB_query($SQL,$db);
while ($myrow = DB_fetch_array($result)) {
+ echo '<option ';
if ($myrow['typeabbrev']==$_POST['TypeAbbrev']) {
- echo '<option selected="selected" value="';
- } else {
- echo '<option value="';
+ echo 'selected="selected" ';
}
- echo $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>';
+ echo 'value="' . $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>';
+}// End while loop
+echo '</select></td></tr>';
-} //end while loop
-echo '</select></td></tr>';
-
DB_free_result($result);
if (!isset($_POST['StartDate'])){
@@ -431,4 +427,4 @@
} // end function ReSequenceEffectiveDates
-?>
\ No newline at end of file
+?>
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2014-06-23 16:16:05 UTC (rev 6777)
+++ trunk/doc/Change.log 2014-06-24 20:33:25 UTC (rev 6778)
@@ -1,4 +1,5 @@
webERP Change Log
+24/06/14 RChacon: Add $ViewTopic, $BookMark to Prices.php and minor improvements.
23/06/14 Tim: Fixed the GL account validation pop up error in MiscFunctions.js.
23/06/14 Exson: Fixed the bug that the sales order line's quantity will be update to zero but it show no change in appearance in SelectOrderItems.php.
22/06/14 Tim: Replace now() with CURRENT_TIMESTAMP in MRP.php to get time stamp to meet ANSI standard.
|