Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0003655Openbravo ERP09. Financial managementpublic2008-03-25 11:012008-06-12 09:44
cromero 
cromero 
normalminoralways
closedfixed 
5
 
2.35MP4 
No
Core
No
0003655: Asset amortization plan miscalculation
Reference to bug:
0002724

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.
blocks defect 0002724 closed cromero Asset amortization plan miscalculation 
Issue History

Notes
(0007244)
user71   
2005-06-01 00:00   
(edited on: 2008-06-12 09:44)
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=1925008 [^]
(0004108)
cromero   
2008-03-25 11:03   
(edited on: 2008-06-12 09:27)
Logged In: YES
user_id=1500614
Originator: YES

Fixed in the branch in revision 2993

A_Asset_Post function modified for PostgreSQL: Added explicit to_number() cast to interval
(0004109)
plujan   
2008-04-14 13:36   
(edited on: 2008-06-12 09:27)
Logged In: YES
user_id=1759992
Originator: NO

I walked trought described steps and I get the same issue (see screenshot).
(0004110)
plujan   
2008-04-14 13:36   
(edited on: 2008-06-12 09:27)
Logged In: YES
user_id=1759992
Originator: NO

File Added: 235mp3-Assets-Screenshot.JPG
(0004111)
cromero   
2008-04-23 00:50   
(edited on: 2008-06-12 09:27)
Logged In: YES
user_id=1500614
Originator: YES

Fixed with revision 3720 in the 2.3x branch