From: <ex...@us...> - 2014-09-30 08:54:37
|
Revision: 6903 http://sourceforge.net/p/web-erp/reponame/6903 Author: exsonqu Date: 2014-09-30 08:54:33 +0000 (Tue, 30 Sep 2014) Log Message: ----------- 30/09/14 Exson: Fixed the purchase order details status to be right when the PO is recovered from Cancelled status. Modified Paths: -------------- trunk/PO_Header.php Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2014-09-29 10:54:14 UTC (rev 6902) +++ trunk/PO_Header.php 2014-09-30 08:54:33 UTC (rev 6903) @@ -154,6 +154,9 @@ if ($_POST['Status']=='Completed' OR $_POST['Status']=='Cancelled' OR $_POST['Status']=='Rejected') { $SQL = "UPDATE purchorderdetails SET completed=1 WHERE orderno='" . $_SESSION['ExistingOrder'] . "'"; $UpdateResult =DB_query($SQL,$db,$ErrMsg); + } else {//To ensure that the purchorderdetails status is correct when it is recovered from a cancelled orders + $SQL = "UPDATE purchorderdetails SET completed=0 WHERE orderno='" . $_SESSION['ExistingOrder'] . "'"; + $UpdateResult = DB_query($SQL,$db,$ErrMsg); } } //$OKToUpdateStatus == 1 } //end if there is actually a status change the class Status != the POST['Status'] |