From: <ice...@us...> - 2013-08-27 01:53:45
|
Revision: 6295 http://sourceforge.net/p/web-erp/reponame/6295 Author: icedlava Date: 2013-08-27 01:53:41 +0000 (Tue, 27 Aug 2013) Log Message: ----------- Allow display of new component form after deletion of BOM component - else too much work to get back to item to add one. Modified Paths: -------------- trunk/BOMs.php Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2013-08-27 01:44:57 UTC (rev 6294) +++ trunk/BOMs.php 2013-08-27 01:53:41 UTC (rev 6295) @@ -390,8 +390,8 @@ UpdateCost($db, $ComponentArray[0]); prnMsg(_('The component part') . ' - ' . $SelectedComponent . ' - ' . _('has been deleted from this BOM'),'success'); - // Now reselect - + // Now reset to enable New Component Details to display after delete + unset($_GET['SelectedComponent']); } elseif (isset($SelectedParent) AND !isset($SelectedComponent) AND ! isset($_POST['submit'])) { @@ -586,9 +586,8 @@ } echo '</table> <br />'; + /* We do want to show the new component entry form in any case - it is a lot of work to get back to it otherwise if we need to add */ - if (! isset($_GET['delete'])) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select=' . $SelectedParent .'">'; echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -793,7 +792,6 @@ </div> </form>'; - } //end if record deleted no point displaying form to add record // end of BOM maintenance code - look at the parent selection form if not relevant // ---------------------------------------------------------------------------------- |