|
From: <dai...@us...> - 2014-01-31 22:17:00
|
Revision: 6554
http://sourceforge.net/p/web-erp/reponame/6554
Author: daintree
Date: 2014-01-31 22:16:56 +0000 (Fri, 31 Jan 2014)
Log Message:
-----------
Muthu: added sequence to BOMs.php
Modified Paths:
--------------
trunk/BOMs.php
trunk/doc/Change.log
trunk/sql/mysql/upgrade4.11.2-4.11.3.sql
Modified: trunk/BOMs.php
===================================================================
--- trunk/BOMs.php 2014-01-31 09:08:12 UTC (rev 6553)
+++ trunk/BOMs.php 2014-01-31 22:16:56 UTC (rev 6554)
@@ -17,8 +17,7 @@
// retrive all children of parent
$c_result = DB_query("SELECT parent,
component
- FROM bom WHERE parent='" . $Parent. "'"
- ,$db);
+ FROM bom WHERE parent='" . $Parent. "' ORDER BY sequence ASC" ,$db);
if (DB_num_rows($c_result) > 0) {
while ($row = DB_fetch_array($c_result)) {
@@ -70,7 +69,8 @@
function DisplayBOMItems($UltimateParent, $Parent, $Component,$Level, $db) {
global $ParentMBflag;
- $sql = "SELECT bom.component,
+ $sql = "SELECT bom.sequence,
+ bom.component,
stockmaster.description as itemdescription,
locations.locationname,
locations.loccode,
@@ -143,6 +143,7 @@
<td>%s</td>
<td>%s</td>
<td>%s</td>
+ <td>%s</td>
<td class="number">%s</td>
<td>%s</td>
<td>%s</td>
@@ -153,6 +154,7 @@
<td><a href="%s&Select=%s&SelectedComponent=%s&delete=1&ReSelect=%s&Location=%s&WorkCentre=%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this component from the bill of material?') . '\');">' . _('Delete') . '</a></td>
</tr>',
$Level1,
+ $myrow['sequence'],
$myrow['component'],
$myrow['itemdescription'],
$myrow['locationname'],
@@ -289,7 +291,8 @@
if (isset($SelectedParent) AND isset($SelectedComponent) AND $InputError != 1) {
- $sql = "UPDATE bom SET workcentreadded='" . $_POST['WorkCentreAdded'] . "',
+ $sql = "UPDATE bom SET sequence='" . $_POST['Sequence'] . "',
+ workcentreadded='" . $_POST['WorkCentreAdded'] . "',
loccode='" . $_POST['LocCode'] . "',
effectiveafter='" . $EffectiveAfterSQL . "',
effectiveto='" . $EffectiveToSQL . "',
@@ -328,7 +331,8 @@
if (DB_num_rows($result)==0) {
- $sql = "INSERT INTO bom (parent,
+ $sql = "INSERT INTO bom (sequence,
+ parent,
component,
workcentreadded,
loccode,
@@ -336,7 +340,8 @@
effectiveafter,
effectiveto,
autoissue)
- VALUES ('".$SelectedParent."',
+ VALUES ('" . $_POST['Sequence'] . "',
+ '".$SelectedParent."',
'" . $_POST['Component'] . "',
'" . $_POST['WorkCentreAdded'] . "',
'" . $_POST['LocCode'] . "',
@@ -550,6 +555,7 @@
$TableHeader = '<tr>
<th>' . _('Level') . '</th>
+ <th>' . _('Sequence') . '</th>
<th>' . _('Code') . '</th>
<th>' . _('Description') . '</th>
<th>' . _('Location') . '</th>
@@ -595,7 +601,8 @@
if (isset($_GET['SelectedComponent']) AND $InputError !=1) {
//editing a selected component from the link to the line item
- $sql = "SELECT loccode,
+ $sql = "SELECT sequence,
+ loccode,
effectiveafter,
effectiveto,
workcentreadded,
@@ -608,6 +615,7 @@
$result = DB_query($sql, $db);
$myrow = DB_fetch_array($result);
+ $_POST['Sequence'] = $myrow['sequence'];
$_POST['LocCode'] = $myrow['loccode'];
$_POST['EffectiveAfter'] = ConvertSQLDate($myrow['effectiveafter']);
$_POST['EffectiveTo'] = ConvertSQLDate($myrow['effectiveto']);
@@ -630,7 +638,7 @@
</tr>';
} else { //end of if $SelectedComponent
-
+ $_POST['Sequence'] = 0;
echo '<input type="hidden" name="SelectedParent" value="' . $SelectedParent . '" />';
/* echo "Enter the details of a new component in the fields below. <br />Click on 'Enter Information' to add the new component, once all fields are completed.";
*/
@@ -681,8 +689,12 @@
echo '</select></td>
</tr>';
}
-
echo '<tr>
+ <td>' . _('Sequence in BOM') . ':</td>
+ <td><input type="text" class="integer" required="required" size="5" name="Sequence" value="' . $_POST['Sequence'] . '" /></td>
+ </tr>';
+
+ echo '<tr>
<td>' . _('Location') . ': </td>
<td><select tabindex="2" name="LocCode">';
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2014-01-31 09:08:12 UTC (rev 6553)
+++ trunk/doc/Change.log 2014-01-31 22:16:56 UTC (rev 6554)
@@ -1,6 +1,8 @@
webERP Change Log
+
+31/1/14 Muthu: Added sequence field to BOMs.php
+30/1/14 gilberto dos santos alves: Updated pt_BR and also applied to pt_PT translation since pt_PT translation was quite old
28/01/14 Exson: Update the hold reason table default data dissallowinvoice to make customers' credit on watch is workable.
-30/1/14 gilberto dos santos alves: Updated pt_BR and also applied to pt_PT translation since this was quite old
24/1/14 Andrew Galuski: Display serial items on GRN printouts
23/1/14 Phil: Fixed incompatible error traps on hyphens between new customers and new branches. Now both allow hyphens. Also prevented deletion of the last customer branch. Customer branches are now deleted when a customer is attempted to be deleted provided there are no dependent records.
19/01/14 Exson: Add sales man login control and modify the PDF to download to harmony with other files and solve backward failure problem in PrintCustStatements.php.
Modified: trunk/sql/mysql/upgrade4.11.2-4.11.3.sql
===================================================================
--- trunk/sql/mysql/upgrade4.11.2-4.11.3.sql 2014-01-31 09:08:12 UTC (rev 6553)
+++ trunk/sql/mysql/upgrade4.11.2-4.11.3.sql 2014-01-31 22:16:56 UTC (rev 6554)
@@ -21,4 +21,6 @@
DELETE FROM scripts WHERE script='ReportletContainer.php';
DELETE FROM scripts WHERE script='SystemCheck.php';
UPDATE holdreasons set dissallowinvoices=2 WHERE reasoncode=20;
+ALTER table stockmoves CHANGE reference reference varchar(100) NOT NULL DEFAULT '';
+ALTER TABLE bom ADD COLUMN sequence INT(11) NOT NULL DEFAULT 0 AFTER parent;
UPDATE config SET confvalue='4.11.3' WHERE confname='VersionNumber';
|