From: <Ex...@us...> - 2012-04-01 16:40:00
|
Revision: 5190 http://web-erp.svn.sourceforge.net/web-erp/?rev=5190&view=rev Author: ExsonQu Date: 2012-04-01 16:39:53 +0000 (Sun, 01 Apr 2012) Log Message: ----------- 2/4/2012 Exson: Fixed sql error for CopyBOM.php and header already sent by errors. Modified Paths: -------------- trunk/CopyBOM.php Modified: trunk/CopyBOM.php =================================================================== --- trunk/CopyBOM.php 2012-04-01 16:35:32 UTC (rev 5189) +++ trunk/CopyBOM.php 2012-04-01 16:39:53 UTC (rev 5190) @@ -6,10 +6,10 @@ */ /* $Id$*/ +$title = _('Copy a BOM to New Item Code'); + include('includes/session.inc'); -$title = _('Copy a BOM to New Item Code'); - include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); @@ -29,14 +29,40 @@ if($type == 'N') { /* duplicate rows into stockmaster */ - $sql = "INSERT INTO stockmaster + $sql = "INSERT INTO stockmaster( stockid, + categoryid, + description, + longdescription, + units, + mbflag, + actualcost, + lastcost, + materialcost, + labourcost, + overheadcost, + lowestlevel, + discontinued, + controlled, + eoq, + volume, + kgs, + barcode, + discountcategory, + taxcatid, + serialised, + appendfile, + perishable, + decimalplaces, + nextserialno, + pansize, + shrinkfactor, + netweight ) SELECT '".$newstkid."' AS stockid, categoryid, description, longdescription, units, mbflag, - lastcurcostdate, actualcost, lastcost, materialcost, @@ -117,12 +143,12 @@ UpdateCost($db, $newstkid); header('Location: BOMs.php?Select='.$newstkid); + ob_end_flush(); } else { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Contract') . '" alt="" />' . ' ' . $title . '</p>'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; - echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $sql = "SELECT stockid, @@ -142,8 +168,8 @@ echo '</select></td> </tr>'; echo '<tr> - <td><input type="radio" name="type" value="N" />' . _(' To New Stock ID') . '</td>'; - echo '<td><input type="text" maxlength="20" name="tostkid" /></td></tr>'; + <td><input type="radio" name="type" value="N" checked="" />' . _(' To New Stock ID') . '</td></td><td>'; + echo '<input type="text" maxlength="20" name="tostkid" /></td></tr>'; $sql = "SELECT stockid, description @@ -154,19 +180,16 @@ if (DB_num_rows($result) > 0) { echo '<tr> - <td><input type="radio" name="type" value="E" />'._('To Existing Stock ID') . '</td>'; - echo '<td><select name="exstkid">'; + <td><input type="radio" name="type" value="E" />'._('To Existing Stock ID') . '</td><td>'; + echo '<select name="exstkid">'; while($row = DB_fetch_row($result)) { echo '<option value="'.$row[0].'">'.$row[0].' -- '.$row[1].'</option>'; } - echo '</select></td>'; - echo '</tr>'; + echo '</select>'; } echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="Submit" value="Submit" /></div> - </div> - </form>'; + echo '<br /><div class="centre"><input type="submit" name="Submit" value="Submit" /></div></form>'; include('includes/footer.inc'); } -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |