Old FixedAssets code does not work on PostgreSQL

Description

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.

Environment

PostgreSQL

Activity

Show:
Aidas Kasparas
September 1, 2014, 3:49 PM

Hi, Suman,

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?

SumanR
September 1, 2014, 2:52 PM

Hi,
Can you please update reproducable steps.

Thanks
Suman

Aidas Kasparas
December 3, 2012, 3:13 PM

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.

Aidas Kasparas
November 26, 2012, 7:59 AM

Corrected migration scripts. Added part to move defined depreciation parameters from GardenWorld to System.

Aidas Kasparas
November 26, 2012, 7:17 AM

Corrected patch. Previous contained erroneus SQL (extra AND).

Assignee

SumanR

Reporter

Aidas Kasparas

Labels

Components

Affects versions

Priority

Major