From: <tim...@us...> - 2009-12-04 11:52:17
|
Revision: 3142 http://web-erp.svn.sourceforge.net/web-erp/?rev=3142&view=rev Author: tim_schofield Date: 2009-12-04 11:51:33 +0000 (Fri, 04 Dec 2009) Log Message: ----------- Correction to produce sales order correctly Modified Paths: -------------- trunk/SpecialOrder.php trunk/doc/Change.log.html Modified: trunk/SpecialOrder.php =================================================================== --- trunk/SpecialOrder.php 2009-12-04 10:21:45 UTC (rev 3141) +++ trunk/SpecialOrder.php 2009-12-04 11:51:33 UTC (rev 3142) @@ -424,8 +424,9 @@ $result =DB_query($sql,$db,$ErrMsg,$DbgMsg,true); $BranchDetails=DB_fetch_array($result); - - $HeaderSQL = "INSERT INTO salesorders (debtorno, + $OrderNo=GetNextTransNo (30, $db); + $HeaderSQL = "INSERT INTO salesorders (orderno, + debtorno, branchcode, customerref, orddate, @@ -442,7 +443,7 @@ contactemail, fromstkloc, deliverydate) - VALUES ('" . $_SESSION['SPL']->CustomerID . "', + VALUES (".$OrderNo.",'" . $_SESSION['SPL']->CustomerID . "', '" . $_SESSION['SPL']->BranchCode . "', '". $_SESSION['SPL']->CustRef ."', '" . Date("Y-m-d") . "', @@ -461,17 +462,17 @@ '" . $OrderDate . "')"; $ErrMsg = _('The sales order cannot be added because'); - $InsertQryResult = DB_query($HeaderSQL,$db,$ErrMsg); + $InsertQryResult = DB_query($HeaderSQL,$db,$ErrMsg, $DbMsg); // $SalesOrderNo = DB_Last_Insert_ID($db,'salesorders','orderno'); - $SalesOrderNo = GetNextTransNo(30, $db); +// $SalesOrderNo = GetNextTransNo(30, $db); $StartOf_LineItemsSQL = "INSERT INTO salesorderdetails (orderno, stkcode, unitprice, quantity, orderlineno) - VALUES (" . $SalesOrderNo; + VALUES (" . $OrderNo; $ErrMsg = _('There was a problem inserting a line into the sales order because'); Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2009-12-04 10:21:45 UTC (rev 3141) +++ trunk/doc/Change.log.html 2009-12-04 11:51:33 UTC (rev 3142) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p> +<p>04/12/09 Tim: SpecialOrder.php - Correction to produce sales order correctly <p>04/12/09 Tim: WriteForm.inc - Change to make the file name have a default extension of pdf as per suggestion from Javier <p>04/12/09 Tim: WriteReport.inc - Change to make the file name have a default extension of pdf as per suggestion from Javier <p>04/12/09 Tim: ConfirmDispatch_Invoice.php - Items are posted directly to the GL so posted should be immediately set to 1. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |