From: <dai...@us...> - 2010-05-29 21:41:43
|
Revision: 3476 http://web-erp.svn.sourceforge.net/web-erp/?rev=3476&view=rev Author: daintree Date: 2010-05-29 21:41:37 +0000 (Sat, 29 May 2010) Log Message: ----------- GL trans were set to posted at the time of creation so integrated GL was broken, reverted to creating gltrans with posted=0 Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/sql/mysql/upgrade3.11.1-3.12.sql Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2010-05-29 00:00:42 UTC (rev 3475) +++ trunk/ConfirmDispatch_Invoice.php 2010-05-29 21:41:37 UTC (rev 3476) @@ -1241,9 +1241,7 @@ periodno, account, narrative, - amount, - posted - ) + amount ) VALUES ( 10, " . $InvoiceNo . ", @@ -1251,9 +1249,7 @@ " . $PeriodNo . ", " . GetCOGSGLAccount($Area, $OrderLine->StockID, $_SESSION['Items']->DefaultSalesType, $db) . ", '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', - " . $OrderLine->StandardCost * $OrderLine->QtyDispatched . ", - 1 - )"; + " . $OrderLine->StandardCost * $OrderLine->QtyDispatched . " )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The cost of sales GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1269,9 +1265,7 @@ periodno, account, narrative, - amount, - posted - ) + amount ) VALUES ( 10, " . $InvoiceNo . ", @@ -1279,9 +1273,7 @@ " . $PeriodNo . ", " . $StockGLCode['stockact'] . ", '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', - " . (-$OrderLine->StandardCost * $OrderLine->QtyDispatched) . ", - 1 - )"; + " . (-$OrderLine->StandardCost * $OrderLine->QtyDispatched) . " )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock side of the cost of sales GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1300,9 +1292,7 @@ periodno, account, narrative, - amount, - posted - ) + amount ) VALUES ( 10, " . $InvoiceNo . ", @@ -1310,9 +1300,7 @@ " . $PeriodNo . ", " . $SalesGLAccounts['salesglcode'] . ", '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->Price . "', - " . (-$OrderLine->Price * $OrderLine->QtyDispatched/$_SESSION['CurrencyRate']) . ", - 1 - )"; + " . (-$OrderLine->Price * $OrderLine->QtyDispatched/$_SESSION['CurrencyRate']) . " )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales GL posting could not be inserted because'); $DbgMsg = '<br>' ._('The following SQL to insert the GLTrans record was used'); @@ -1327,9 +1315,7 @@ periodno, account, narrative, - amount, - posted - ) + amount ) VALUES ( 10, " . $InvoiceNo . ", @@ -1337,9 +1323,7 @@ " . $PeriodNo . ", " . $SalesGLAccounts['discountglcode'] . ", '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " @ " . ($OrderLine->DiscountPercent * 100) . "%', - " . ($OrderLine->Price * $OrderLine->QtyDispatched * $OrderLine->DiscountPercent/$_SESSION['CurrencyRate']) . ", - 1 - )"; + " . ($OrderLine->Price * $OrderLine->QtyDispatched * $OrderLine->DiscountPercent/$_SESSION['CurrencyRate']) . " )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales discount GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1362,9 +1346,7 @@ periodno, account, narrative, - amount, - posted - ) + amount ) VALUES ( 10, " . $InvoiceNo . ", @@ -1372,9 +1354,7 @@ " . $PeriodNo . ", " . $_SESSION['CompanyRecord']['debtorsact'] . ", '" . $_SESSION['Items']->DebtorNo . "', - " . (($_SESSION['Items']->total + $_SESSION['Items']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate']) . ", - 1 - )"; + " . (($_SESSION['Items']->total + $_SESSION['Items']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate']) . " )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The total debtor GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the total debtors control GLTrans record was used'); @@ -1391,9 +1371,7 @@ periodno, account, narrative, - amount, - posted - ) + amount ) VALUES ( 10, " . $InvoiceNo . ", @@ -1401,9 +1379,7 @@ " . $PeriodNo . ", " . $_SESSION['CompanyRecord']['freightact'] . ", '" . $_SESSION['Items']->DebtorNo . "', - " . (-($_SESSION['Items']->FreightCost)/$_SESSION['CurrencyRate']) . ", - 1 - )"; + " . (-($_SESSION['Items']->FreightCost)/$_SESSION['CurrencyRate']) . " )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The freight GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1418,9 +1394,7 @@ periodno, account, narrative, - amount, - posted - ) + amount ) VALUES ( 10, " . $InvoiceNo . ", @@ -1428,9 +1402,7 @@ " . $PeriodNo . ", " . $TaxGLCodes[$TaxAuthID] . ", '" . $_SESSION['Items']->DebtorNo . "', - " . (-$TaxAmount/$_SESSION['CurrencyRate']) . ", - 1 - )"; + " . (-$TaxAmount/$_SESSION['CurrencyRate']) . " )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The tax GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); Modified: trunk/sql/mysql/upgrade3.11.1-3.12.sql =================================================================== --- trunk/sql/mysql/upgrade3.11.1-3.12.sql 2010-05-29 00:00:42 UTC (rev 3475) +++ trunk/sql/mysql/upgrade3.11.1-3.12.sql 2010-05-29 21:41:37 UTC (rev 3476) @@ -19,7 +19,7 @@ UPDATE `www_users` SET `modulesallowed`=(SELECT insert(`modulesallowed`, 15,0,"1,")); INSERT INTO `config` (`confname`, `confvalue`) VALUES ('FrequentlyOrderedItems',0); -ALTER TABLE `www_users` CHANGE COLUMN `language` `language` varchar(10) NOT NULL DEFAULT 'en_GB'; +ALTER TABLE `www_users` CHANGE COLUMN `language` `language` varchar(10) NOT NULL DEFAULT 'en_GB.utf8'; ALTER TABLE `assetmanager` ADD COLUMN `disposalvalue` int(11) NOT NULL DEFAULT 0; ALTER TABLE `currencies` ADD COLUMN `decimalplaces` tinyint(3) NOT NULL DEFAULT 2 AFTER `hundredsname`; ALTER TABLE `fixedassetlocations` ADD COLUMN `parentlocationid` char(6) DEFAULT ''; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |