|
From: <dai...@us...> - 2011-08-07 10:17:58
|
Revision: 4653
http://web-erp.svn.sourceforge.net/web-erp/?rev=4653&view=rev
Author: daintree
Date: 2011-08-07 10:17:52 +0000 (Sun, 07 Aug 2011)
Log Message:
-----------
now disables transactions on items flagged as obsolete (discontinued)
Modified Paths:
--------------
trunk/SelectProduct.php
trunk/doc/Change.log
Modified: trunk/SelectProduct.php
===================================================================
--- trunk/SelectProduct.php 2011-08-07 04:37:32 UTC (rev 4652)
+++ trunk/SelectProduct.php 2011-08-07 10:17:52 UTC (rev 4653)
@@ -70,7 +70,12 @@
$Its_A_Dummy = false;
$Its_A_Kitset = false;
$Its_A_Labour_Item = false;
- echo '<table width="90%"><tr><th colspan="3"><img src="' . $rootpath . '/css/' . $theme . '/images/inventory.png" title="' . _('Inventory') . '" alt="" /><b>' . ' ' . $StockID . ' - ' . $myrow['description'] . '</b></th></tr>';
+ if ($myrow['discontinued']==1){
+ $ItemStatus = '<font class="bad">' ._('Obsolete') . '</font>';
+ } else {
+ $ItemStatus = '';
+ }
+ echo '<table width="90%"><tr><th colspan="3"><img src="' . $rootpath . '/css/' . $theme . '/images/inventory.png" title="' . _('Inventory') . '" alt="" /><b>' . ' ' . $StockID . ' - ' . $myrow['description'] . ' ' . $ItemStatus . '</b></th></tr>';
echo '<tr><td width="40%" valign="top">
<table align="left">'; //nested table
@@ -412,14 +417,16 @@
wikiLink('Product', $StockID);
echo '</td><td valign="top" class="select">';
/* Stock Transactions */
-if ($Its_A_Kitset_Assembly_Or_Dummy == False) {
+if ($Its_A_Kitset_Assembly_Or_Dummy == false AND $myrow['discontinued']==0) {
echo '<a href="' . $rootpath . '/StockAdjustments.php?StockID=' . $StockID . '">' . _('Quantity Adjustments') . '</a><br />';
echo '<a href="' . $rootpath . '/StockTransfers.php?StockID=' . $StockID . '">' . _('Location Transfers') . '</a><br />';
//show the item image if it has been uploaded
if( isset($StockID) and file_exists($_SESSION['part_pics_dir'] . '/' .$StockID.'.jpg') ) {
echo '<div class="centre"><img src="GetStockImage.php?automake=1&textcolor=FFFFFF&bgcolor=CCCCCC&StockID=' . $StockID . '&text=&width=120&height=120">';
}
- if (($myrow['mbflag'] == 'B') AND (in_array($SuppliersSecurity, $_SESSION['AllowedPageSecurityTokens']))){
+ if (($myrow['mbflag'] == 'B')
+ AND (in_array($SuppliersSecurity, $_SESSION['AllowedPageSecurityTokens']))
+ AND $myrow['discontinued']==0){
echo '<br />';
$SuppResult = DB_query("SELECT suppliers.suppname,
suppliers.supplierid,
@@ -542,6 +549,7 @@
SUM(locstock.quantity) AS qoh,
stockmaster.units,
stockmaster.mbflag,
+ stockmaster.discontinued,
stockmaster.decimalplaces
FROM stockmaster
LEFT JOIN stockcategory
@@ -553,6 +561,7 @@
stockmaster.description,
stockmaster.units,
stockmaster.mbflag,
+ stockmaster.discontinued,
stockmaster.decimalplaces
ORDER BY stockmaster.stockid";
} else {
@@ -561,6 +570,7 @@
SUM(locstock.quantity) AS qoh,
stockmaster.units,
stockmaster.mbflag,
+ stockmaster.discontinued,
stockmaster.decimalplaces
FROM stockmaster,
locstock
@@ -571,6 +581,7 @@
stockmaster.description,
stockmaster.units,
stockmaster.mbflag,
+ stockmaster.discontinued,
stockmaster.decimalplaces
ORDER BY stockmaster.stockid";
}
@@ -580,6 +591,7 @@
$SQL = "SELECT stockmaster.stockid,
stockmaster.description,
stockmaster.mbflag,
+ stockmaster.discontinued,
SUM(locstock.quantity) AS qoh,
stockmaster.units,
stockmaster.decimalplaces
@@ -593,12 +605,14 @@
stockmaster.description,
stockmaster.units,
stockmaster.mbflag,
+ stockmaster.discontinued,
stockmaster.decimalplaces
ORDER BY stockmaster.stockid";
} else {
$SQL = "SELECT stockmaster.stockid,
stockmaster.description,
stockmaster.mbflag,
+ stockmaster.discontinued,
sum(locstock.quantity) as qoh,
stockmaster.units,
stockmaster.decimalplaces
@@ -611,6 +625,7 @@
stockmaster.description,
stockmaster.units,
stockmaster.mbflag,
+ stockmaster.discontinued,
stockmaster.decimalplaces
ORDER BY stockmaster.stockid";
}
@@ -619,6 +634,7 @@
$SQL = "SELECT stockmaster.stockid,
stockmaster.description,
stockmaster.mbflag,
+ stockmaster.discontinued,
SUM(locstock.quantity) AS qoh,
stockmaster.units,
stockmaster.decimalplaces
@@ -631,12 +647,14 @@
stockmaster.description,
stockmaster.units,
stockmaster.mbflag,
+ stockmaster.discontinued,
stockmaster.decimalplaces
ORDER BY stockmaster.stockid";
} else {
$SQL = "SELECT stockmaster.stockid,
stockmaster.description,
stockmaster.mbflag,
+ stockmaster.discontinued,
SUM(locstock.quantity) AS qoh,
stockmaster.units,
stockmaster.decimalplaces
@@ -648,6 +666,7 @@
stockmaster.description,
stockmaster.units,
stockmaster.mbflag,
+ stockmaster.discontinued,
stockmaster.decimalplaces
ORDER BY stockmaster.stockid";
}
@@ -732,11 +751,18 @@
} else {
$qoh = number_format($myrow['qoh'], $myrow['decimalplaces']);
}
+ if ($myrow['discontinued']==1){
+ $ItemStatus = '<font class="bad">' . _('Obsolete') . '</font>';
+ } else {
+ $ItemStatus ='';
+ }
+
echo '<td><input type="submit" name="Select" value="' . $myrow['stockid'] . '" /></td>
<td>'.$myrow['description'].'</td>
<td class="number">' . $qoh . '</td>
<td>' . $myrow['units'] . '</td>
<td><a target="_blank" href="' . $rootpath . '/StockStatus.php?StockID=' . $myrow['stockid'].'">' . _('View') . '</a></td>
+ <td>' . $ItemStatus . '</td>
</tr>';
$j++;
if ($j == 20 AND ($RowIndex + 1 != $_SESSION['DisplayRecordsMax'])) {
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2011-08-07 04:37:32 UTC (rev 4652)
+++ trunk/doc/Change.log 2011-08-07 10:17:52 UTC (rev 4653)
@@ -1,5 +1,6 @@
webERP Change Log
+7/8/11 Phil: SelectProduct.php now disables transactions on items flagged as obsolete (discontinued). Also obsolete items are shown as such in the selection list - suggested by Klaus (opto)
7/8/11 Ricard: Corrected INNER JOIN ON clause in sql used in InventoryQuantities.php script
7/8/11 Klaus: Added docuwiki links to WikiLinks function in MiscFunctions.php and allow Docuwiki option in SystemParameters.php
6/8/11 Ricard: SalesInquiry.php fix wording of labels to be more consistent with the rest of webERP
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|