From: <dai...@us...> - 2010-12-19 03:37:15
|
Revision: 4187 http://web-erp.svn.sourceforge.net/web-erp/?rev=4187&view=rev Author: daintree Date: 2010-12-19 03:37:08 +0000 (Sun, 19 Dec 2010) Log Message: ----------- Fixed asset disposals Modified Paths: -------------- trunk/doc/Change.log.html trunk/doc/Manual/ManualFixedAssets.html trunk/sql/mysql/upgrade3.11.1-4.00.sql Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-12-19 01:10:36 UTC (rev 4186) +++ trunk/doc/Change.log.html 2010-12-19 03:37:08 UTC (rev 4187) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p>/</p> +<p>19/12/10 Phil: SelectOrderItems.php ConfirmDispatch_Invoice.php add code to handle asset disposals. <p>14/12/10 Phil: modify purchasing scripts for coding conventions/readability</p> <p>11/12/10 Phil: Have populated the new field stockcheckdate in stockcheckfreeze and modified PDFStockCheckComparison to use this field when posting the GL - stockmoves need to be on the current day otherwise historical balances will all need to be updated. But narrative shows the date of the stock check for which the adjustment is being made</p> <p>9/12/10 James Murray: highlighted a bug in SupplierInvoice.php (and also in SupplierCredit.php) where the due date of the invoice/credit was not calculated correctly based on the terms - it was picking up the current date rather than the invoice/credit date. Now fixed</p> Modified: trunk/doc/Manual/ManualFixedAssets.html =================================================================== --- trunk/doc/Manual/ManualFixedAssets.html 2010-12-19 01:10:36 UTC (rev 4186) +++ trunk/doc/Manual/ManualFixedAssets.html 2010-12-19 03:37:08 UTC (rev 4187) @@ -40,6 +40,10 @@ <br><br> The depreciation run must be run monthly to create the general ledger journals for depreciation at the rates and depreciation methods defined for the assets. In addition to the general ledger journals a log of the depreciation transactions is also created. The depreciation run checks the last month it was run and defaults to run for the following month ... in this way every time it is run it is self evident whether it has been run for the month under review. There is no functionality to reverse a depreciation run. <br><br> +<font size="+1"><b>Fixed Asset Disposals</b></font> +<br><br> +To dispose of a fixed - an invoice is raised for a fixed asset in the usual order entry screen. Instead of selecting a stock item, there is a button that allows a fixed asset to be selected. By selecting a fixed asset to be sold, the system creates a stock item for the fixed asset. When the sales order is confirmed for invoicing and if the debtors ledger is integrated into the general ledger then entries to dispose of the asset to the general ledger accounts defined in the fixed asset category of the asset are created. The fixed asset transaction is created for the disposal and the fixed asset updated to show the date it was disposed and the proceeds on the disposal. +<br><br> <font size="+1"><b>Fixed Asset Schedule</b></font> <br><br> The fixed asset schedule requires the entry of a starting date and an end date. The script can produce a pdf report, comma separated values for importing into a spreadsheet, or just view in html on screen. It shows the cost b/fwd at the start date, the total of any additions subsequent to the start date, the depreciation brought forward and the depreciation charged over the period, together with the carried forward cost, accumulated depreciation and net book value. Modified: trunk/sql/mysql/upgrade3.11.1-4.00.sql =================================================================== --- trunk/sql/mysql/upgrade3.11.1-4.00.sql 2010-12-19 01:10:36 UTC (rev 4186) +++ trunk/sql/mysql/upgrade3.11.1-4.00.sql 2010-12-19 03:37:08 UTC (rev 4187) @@ -103,27 +103,7 @@ ALTER TABLE woserialnos CONVERT TO CHARACTER SET utf8; ALTER TABLE www_users CONVERT TO CHARACTER SET utf8; -CREATE TABLE IF NOT EXISTS `fixedassetlocations` ( - `locationid` char(6) NOT NULL default '', - `locationdescription` char(20) NOT NULL default '', - `parentlocationid` char(6) DEFAULT '', - PRIMARY KEY (`locationid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -DROP TABLE IF EXISTS `assetmanager`; - -CREATE TABLE `assetmanager` ( - `id` int(11) NOT NULL auto_increment, - `stockid` varchar(20) NOT NULL default '', - `serialno` varchar(30) NOT NULL default '', - `location` varchar(15) NOT NULL default '', - `cost` double NOT NULL default '0', - `depn` double NOT NULL default '0', - `datepurchased` date NOT NULL default '0000-00-00', - `disposalvalue` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - 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.utf8'; @@ -437,20 +417,6 @@ ADD `minimumvalue` DOUBLE NOT NULL DEFAULT -999999999, ADD `numericvalue` TINYINT NOT NULL DEFAULT 0 ; -RENAME TABLE assetmanager to fixedassets; -ALTER TABLE fixedassets ADD COLUMN `assetcategoryid` varchar(6) NOT NULL DEFAULT ''; -ALTER TABLE fixedassets ADD COLUMN `description` varchar(50) NOT NULL DEFAULT ''; -ALTER TABLE fixedassets ADD COLUMN `longdescription` text NOT NULL; -ALTER TABLE fixedassets ADD COLUMN `depntype` int NOT NULL DEFAULT 1; -ALTER TABLE fixedassets ADD COLUMN `depnrate` double NOT NULL; -ALTER TABLE fixedassets ADD COLUMN `barcode` VARCHAR( 30 ) NOT NULL; -ALTER TABLE fixedassets ADD COLUMN `disposaldate` DATE NOT NULL DEFAULT '0000-00-00'; -ALTER TABLE `fixedassets` CHANGE `depn` `accumdepn` DOUBLE NOT NULL DEFAULT '0'; -ALTER TABLE `fixedassets` CHANGE `location` `assetlocation` VARCHAR( 6 ) NOT NULL DEFAULT ''; -ALTER TABLE `fixedassets` CHANGE `disposalvalue` `disposalproceeds` DOUBLE NOT NULL DEFAULT '0' - -UPDATE fixedassets INNER JOIN stockmaster ON fixedassets.stockid=stockmaster.stockid SET assetcategoryid=stockmaster.categoryid, fixedassets.description=stockmaster.description, fixedassets.longdescription=stockmaster.longdescription; - CREATE TABLE IF NOT EXISTS `fixedassetcategories` ( `categoryid` char(6) NOT NULL DEFAULT '', `categorydescription` char(20) NOT NULL DEFAULT '', @@ -463,27 +429,25 @@ PRIMARY KEY (`categoryid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -INSERT INTO fixedassetcategories (categoryid, categorydescription, costact, depnact, disposalact, accumdepnact) SELECT categoryid, categorydescription, stockact, adjglact, materialuseagevarac, wipact FROM stockcategory WHERE stocktype='A'; +CREATE TABLE IF NOT EXISTS `fixedassets` ( + `assetid` int(11) NOT NULL AUTO_INCREMENT, + `serialno` varchar(30) NOT NULL DEFAULT '', + `barcode` varchar(20) NOT NULL, + `assetlocation` varchar(6) NOT NULL DEFAULT '', + `cost` double NOT NULL DEFAULT '0', + `accumdepn` double NOT NULL DEFAULT '0', + `datepurchased` date NOT NULL DEFAULT '0000-00-00', + `disposalproceeds` double NOT NULL DEFAULT '0', + `assetcategoryid` varchar(6) NOT NULL DEFAULT '', + `description` varchar(50) NOT NULL DEFAULT '', + `longdescription` text NOT NULL, + `depntype` int(11) NOT NULL DEFAULT '1', + `depnrate` double NOT NULL, + `disposaldate` date NOT NULL DEFAULT '0000-00-00' + PRIMARY KEY (`assetid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -DELETE locstock.* FROM locstock INNER JOIN stockmaster ON locstock.stockid=stockmaster.stockid INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid WHERE stockcategory.stocktype='A'; -DELETE stockitemproperties.* FROM stockitemproperties INNER JOIN stockmaster ON stockitemproperties.stockid=stockmaster.stockid INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid WHERE stockcategory.stocktype='A'; - -DELETE stockserialmoves.* FROM stockserialmoves, stockmoves, -stockmaster,stockcategory WHERE stockserialmoves.stockmoveno=stockmoves.stkmoveno AND -stockmoves.stockid = stockmaster.stockid AND stockmaster.categoryid = stockcategory.categoryid AND stockcategory.stocktype = 'A'; - -DELETE stockserialitems.* FROM stockserialitems, stockmaster, stockcategory -WHERE stockserialitems.stockid = stockmaster.stockid AND stockmaster.categoryid=stockcategory.categoryid AND stocktype='A'; - -DELETE stockmoves . * FROM stockmoves, stockmaster, stockcategory WHERE stockmoves.stockid = stockmaster.stockid AND stockmaster.categoryid = stockcategory.categoryid AND stockcategory.stocktype = 'A'; - -DELETE stockmaster.* FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid WHERE stockcategory.stocktype='A'; - -ALTER TABLE `fixedassets` CHANGE `id` `assetid` INT( 11 ) NOT NULL AUTO_INCREMENT ; -DELETE FROM stockcategory WHERE stocktype='A'; -ALTER TABLE `fixedassets` DROP `stockid`; - INSERT INTO `systypes` (`typeid`, `typename`, `typeno`) VALUES ('41', 'Asset Addition', '1'); INSERT INTO `systypes` (`typeid`, `typename`, `typeno`) VALUES ('42', 'Asset Category Change', '1'); INSERT INTO `systypes` (`typeid`, `typename`, `typeno`) VALUES ('43', 'Delete w/down asset', '1'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |