Old FixedAssets code does not work on PostgreSQL
While trying to use old FixedAssets (FA) code on PostgreSQL database, numerous problems were found:
use of unsupported construct ROWNUM=1;
incorect record was selected from A_Depreciation_Build table (worked on Oracle only by accident);
wrong RecordSet was closed in the loop;
not supported stored procedure AD_Sequence_Next was called;
IDs in the A_Depreciation table were changed to system ones, but in field's displaylogic old ID still used.
All these problems are fixed by patch and migration scripts attached. With these patches we were able to achieve correct calculation of depreciation. Tested only on postgresql.
Are you requesting document with all the steps to show how present code is working wrong and improved code works better, right?
Well, we have slight problem. This bug is old (20 months+) – I have to remember everything. This bug is big – patch contains fixes for 7 problems, and you most likely want every aspect of every of these 7 problems to be documented. And this deals with OLD FIxedAssets code (just before Red1 enhancements) you and your friends write in http://blogs.walkingtree.in/2012/11/25/asset-management-in-adempiere/ .
So, work is big. Maybe it is not worth doing if FixedAssets branch was integrated into main codebase. What's the status?
Can you please update reproducable steps.
Another correction for path. Extra problems fixed:
CreateGLAssets used ID from wrong table (GL_Journal insted of GL_JournalBatch)
ImportFAJournal2 tried to import all journals not just selected one.
Corrected migration scripts. Added part to move defined depreciation parameters from GardenWorld to System.
Corrected patch. Previous contained erroneus SQL (extra AND).