From: <dai...@us...> - 2012-02-20 09:24:54
|
Revision: 4935 http://web-erp.svn.sourceforge.net/web-erp/?rev=4935&view=rev Author: daintree Date: 2012-02-20 09:24:43 +0000 (Mon, 20 Feb 2012) Log Message: ----------- review Modified Paths: -------------- trunk/StockAdjustmentsControlled.php Modified: trunk/StockAdjustmentsControlled.php =================================================================== --- trunk/StockAdjustmentsControlled.php 2012-02-20 07:43:39 UTC (rev 4934) +++ trunk/StockAdjustmentsControlled.php 2012-02-20 09:24:43 UTC (rev 4935) @@ -10,8 +10,14 @@ /* Session started in header.inc for password checking and authorisation level check */ include('includes/header.inc'); +if (empty($_GET['identifier'])) { + /*unique session identifier to ensure that there is no conflict with other stock adjustment sessions on the same machine */ + $identifier=date('U'); +} else { + $identifier=$_GET['identifier']; +} -if (!isset($_SESSION['Adjustment'])) { +if (!isset($_SESSION['Adjustment'.$identifier])) { /* This page can only be called when a stock adjustment is pending */ echo '<div class="centre"><a href="' . $rootpath . '/StockAdjustments.php?NewAdjustment=Yes">'. _('Enter A Stock Adjustment'). '</a><br />'; prnMsg( _('This page can only be opened if a stock adjustment for a controlled item has been entered').'<br />','error'); @@ -19,14 +25,14 @@ include('includes/footer.inc'); exit; } -if (isset($_SESSION['Adjustment'])){ +if (isset($_SESSION['Adjustment'.$identifier])){ if (isset($_GET['AdjType']) and $_GET['AdjType']!=''){ - $_SESSION['Adjustment']->AdjustmentType = $_GET['AdjType']; + $_SESSION['Adjustment'.$identifier]->AdjustmentType = $_GET['AdjType']; } } /*Save some typing by referring to the line item class object in short form */ -$LineItem = $_SESSION['Adjustment']; +$LineItem = $_SESSION['Adjustment'.$identifier]; //Make sure this item is really controlled if ( $LineItem->Controlled != 1 ){ @@ -44,7 +50,7 @@ echo '<br /><font size="2"><b>'. _('Adjustment of controlled item').' ' . $LineItem->StockID . ' - ' . $LineItem->ItemDescription ; /** vars needed by InputSerialItem : **/ -$LocationOut = $_SESSION['Adjustment']->StockLocation; +$LocationOut = $_SESSION['Adjustment'.$identifier]->StockLocation; $StockID = $LineItem->StockID; if ($LineItem->AdjustmentType == 'ADD'){ echo '<br />'. _('Adding Items').'...'; @@ -66,7 +72,7 @@ /*TotalQuantity set inside this include file from the sum of the bundles of the item selected for adjusting */ -$_SESSION['Adjustment']->Quantity = $TotalQuantity; +$_SESSION['Adjustment'.$identifier]->Quantity = $TotalQuantity; /*Also a multi select box for adding bundles to the adjustment without keying, showing only when keying */ include('includes/footer.inc'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |