Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0002724Openbravo ERP09. Financial managementpublic2008-03-15 23:292008-06-12 09:43
user71 
cromero 
normalminoralways
closedfixed 
5
 
2.40alpha-r2 
No
Core
No
0002724: Asset amortization plan miscalculation
Steps to reproduce the issue:

1. Create a new asset
No mather what info you input, but set:
 Depreciate=true
 Depreciation Type = Linear
 Calculate Type = Time
 Amortize = Yearly
 Usable Life - Years = 3
 Purchase Date = 01-02-2008
 Cancellation Date = <leave empty>
 Depreciation Start Date = 01-01-2008
 Depreciation End Date = 31-12-2010
 Asset Value = 1660.63
 Residual Asset Value = 0.0
 Depreciation Amt. = 1660.63
 Previously Depreciated Amt. = 0
 
2. Make sure the Asset Category selected has the options Owned and Depreciate both equal to true (selected)

3. Push the Create Amortization button

You can see the issue in the Asset Amortization tab.
The periods were miscalculated. The first one starts on
 31-12-2009, when it should starts on 31-12-2008.

Moreover, there are an almost empty amortization schedule by 31-12-2012 with 0.00000000000000000000000000000000001 as depreciation value.

As far as I can see here there are two issues:
1. miscalculation of the periods.
2. miscalculation of the depreciation percentage per period.

R2.35MP1
Linux Ubuntu 7.10
Postgres 8.2

No tags attached.
depends on backport 0003655 closed cromero Asset amortization plan miscalculation 
Issue History

Notes
(0006313)
user71   
2005-06-01 00:00   
(edited on: 2008-06-12 09:43)
This bug was originally reported in SourceForge bug tracker and then migrated to Mantis.

You can see the original bug report in:
https://sourceforge.net/support/tracker.php?aid=1915013 [^]
(0003337)
cromero   
2008-03-25 11:07   
(edited on: 2008-06-12 09:25)
Logged In: YES
user_id=1500614
Originator: NO

Fixed in the trunk in revision 2994.

Added explicit to_number() cast to interval for PostgreSQL
(0003338)
cromero   
2008-04-16 18:58   
(edited on: 2008-06-12 09:25)
Logged In: YES
user_id=1500614
Originator: NO

Fixed in the trunk in revision 3516