From: <dai...@us...> - 2010-08-27 21:24:16
|
Revision: 3700 http://web-erp.svn.sourceforge.net/web-erp/?rev=3700&view=rev Author: daintree Date: 2010-08-27 21:24:10 +0000 (Fri, 27 Aug 2010) Log Message: ----------- Marcos fix to assembly components stock quantities in stockmoves Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/doc/Change.log.html Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2010-08-27 10:06:07 UTC (rev 3699) +++ trunk/ConfirmDispatch_Invoice.php 2010-08-27 21:24:10 UTC (rev 3700) @@ -977,34 +977,34 @@ $AssParts['standard']=0; } $SQL = "INSERT INTO stockmoves ( - stockid, - type, - transno, - loccode, - trandate, - debtorno, - branchcode, - prd, - reference, - qty, - standardcost, - show_on_inv_crds, - newqoh - ) VALUES ( - '" . $AssParts['component'] . "', - 10, - '" . $InvoiceNo . "', - '" . $_SESSION['Items']->Location . "', - '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', - '" . $PeriodNo . "', - '" . _('Assembly') . ': ' . $OrderLine->StockID . ' ' . _('Order') . ': ' . $_SESSION['ProcessingOrder'] . "', - '" . -$AssParts['quantity'] * $OrderLine->QtyDispatched . "', - '" . $AssParts['standard'] . "', - 0, - newqoh-" . ($AssParts['quantity'] * $OrderLine->QtyDispatched) . "' - )"; + stockid, + type, + transno, + loccode, + trandate, + debtorno, + branchcode, + prd, + reference, + qty, + standardcost, + show_on_inv_crds, + newqoh + ) VALUES ( + '" . $AssParts['component'] . "', + 10, + '" . $InvoiceNo . "', + '" . $_SESSION['Items']->Location . "', + '" . $DefaultDispatchDate . "', + '" . $_SESSION['Items']->DebtorNo . "', + '" . $_SESSION['Items']->Branch . "', + '" . $PeriodNo . "', + '" . _('Assembly') . ': ' . $OrderLine->StockID . ' ' . _('Order') . ': ' . $_SESSION['ProcessingOrder'] . "', + '" . -$AssParts['quantity'] * $OrderLine->QtyDispatched . "', + '" . $AssParts['standard'] . "', + 0, + '" . ($QtyOnHandPrior - $AssParts['quantity'] * $OrderLine->QtyDispatched) . "' + )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement records for the assembly components of'). ' '. $OrderLine->StockID . ' ' . _('could not be inserted because'); $DbgMsg = _('The following SQL to insert the assembly components stock movement records was used'); @@ -1012,9 +1012,9 @@ $SQL = "UPDATE locstock - SET quantity = locstock.quantity - " . $AssParts['quantity'] * $OrderLine->QtyDispatched . " - WHERE locstock.stockid = '" . $AssParts['component'] . "' - AND loccode = '" . $_SESSION['Items']->Location . "'"; + SET quantity = locstock.quantity - " . $AssParts['quantity'] * $OrderLine->QtyDispatched . " + WHERE locstock.stockid = '" . $AssParts['component'] . "' + AND loccode = '" . $_SESSION['Items']->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Location stock record could not be updated for an assembly component because'); $DbgMsg = _('The following SQL to update the locations stock record for the component was used'); @@ -1165,37 +1165,37 @@ /*Insert Sales Analysis records */ $SQL="SELECT COUNT(*), - salesanalysis.stockid, - salesanalysis.stkcategory, - salesanalysis.cust, - salesanalysis.custbranch, - salesanalysis.area, - salesanalysis.periodno, - salesanalysis.typeabbrev, - salesanalysis.salesperson - FROM salesanalysis, - custbranch, - stockmaster - WHERE salesanalysis.stkcategory=stockmaster.categoryid - AND salesanalysis.stockid=stockmaster.stockid - AND salesanalysis.cust=custbranch.debtorno - AND salesanalysis.custbranch=custbranch.branchcode - AND salesanalysis.area=custbranch.area - AND salesanalysis.salesperson=custbranch.salesman - AND salesanalysis.typeabbrev ='" . $_SESSION['Items']->DefaultSalesType . "' - AND salesanalysis.periodno='" . $PeriodNo . "' - AND salesanalysis.cust " . LIKE . " '" . $_SESSION['Items']->DebtorNo . "' - AND salesanalysis.custbranch " . LIKE . " '" . $_SESSION['Items']->Branch . "' - AND salesanalysis.stockid " . LIKE . " '" . $OrderLine->StockID . "' - AND salesanalysis.budgetoractual=1 - GROUP BY salesanalysis.stockid, - salesanalysis.stkcategory, - salesanalysis.cust, - salesanalysis.custbranch, - salesanalysis.area, - salesanalysis.periodno, - salesanalysis.typeabbrev, - salesanalysis.salesperson"; + salesanalysis.stockid, + salesanalysis.stkcategory, + salesanalysis.cust, + salesanalysis.custbranch, + salesanalysis.area, + salesanalysis.periodno, + salesanalysis.typeabbrev, + salesanalysis.salesperson + FROM salesanalysis, + custbranch, + stockmaster + WHERE salesanalysis.stkcategory=stockmaster.categoryid + AND salesanalysis.stockid=stockmaster.stockid + AND salesanalysis.cust=custbranch.debtorno + AND salesanalysis.custbranch=custbranch.branchcode + AND salesanalysis.area=custbranch.area + AND salesanalysis.salesperson=custbranch.salesman + AND salesanalysis.typeabbrev ='" . $_SESSION['Items']->DefaultSalesType . "' + AND salesanalysis.periodno='" . $PeriodNo . "' + AND salesanalysis.cust " . LIKE . " '" . $_SESSION['Items']->DebtorNo . "' + AND salesanalysis.custbranch " . LIKE . " '" . $_SESSION['Items']->Branch . "' + AND salesanalysis.stockid " . LIKE . " '" . $OrderLine->StockID . "' + AND salesanalysis.budgetoractual=1 + GROUP BY salesanalysis.stockid, + salesanalysis.stkcategory, + salesanalysis.cust, + salesanalysis.custbranch, + salesanalysis.area, + salesanalysis.periodno, + salesanalysis.typeabbrev, + salesanalysis.salesperson"; $ErrMsg = _('The count of existing Sales analysis records could not run because'); $DbgMsg = '<br>'. _('SQL to count the no of sales analysis records'); Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-08-27 10:06:07 UTC (rev 3699) +++ trunk/doc/Change.log.html 2010-08-27 21:24:10 UTC (rev 3700) @@ -1,8 +1,11 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> + +<p> 28/8/10 Marcos Garcia Trejo: Fix ConfirmDispatchInvoice.php assembly components new qty on hand </p> <p>27/08/10 Tim: Add in rfequisition number into purchase order prints.</p> <p>21/08/10 Phil: Fix bugs introduced by Paul's patch prnMsg= should be prnMsg() BOMs.php also did in Contracts.php</p> <p>21/08/10 Phil: Contract closing changes all the contracts scripts</p> +>>>>>>> .r3699 <p>20/08/10 Paul Thursby: More $msg cleanup. Unused eliminated; Others replaced with prnMsg().</p> <p>15/08/10 Phil: Decided to have contracts as part of orders module since not really enough links to warrant a new module changes to index.php WWW_Users.php and sql upgrade.</p> <p>15/08/10 Phil: New script for ContractCosting.php comparison of contract costs budgeted vs incurred. Lot of work on contracts</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |