Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033301Openbravo ERP09. Financial managementpublic2016-06-17 10:542016-06-30 19:13
maite 
Sanjota 
urgentmajoralways
closedfixed 
5
 
3.0PR16Q3 
aferraz
Core
No
0033301: Extra "Asset Amortization" record with total amount of 0 when Asset defined as "Every Month Is 30 Day"= NO
Extra "Asset Amortization" record with total amount of 0 when Asset defined as "Every Month Is 30 Day"= NO. In case it is defined with "Every Month Is 30 Day"= YES then no extra line is created
1. Access Asset window and create record as follows:
 - Depreciate= yes
 - Depreciation type= linear
 - Calculate type= time
 - Amortize= monthly
 - Usable life-months=120
 - Every month is 30 days= NO
 - Purchase date= 19-01-2015
 - Depreciation start date= 19-01-2015
 - Asset value= 33.82
2. Run Create Amortization process and realize that 121 records have been created in Asset Amortization tab (instead of 120) and that last one hast amount of 0

NOTE: if you delete "Asset Amortization" records, set Every month is 30 days= YES and run process again then 120 records are created
No tags attached.
? 33301.sql (90) 2016-06-30 12:42
https://issues.openbravo.com/file_download.php?file_id=9600&type=bug
Issue History
2016-06-17 10:54maiteNew Issue
2016-06-17 10:54maiteAssigned To => Triage Finance
2016-06-17 10:54maiteModules => Core
2016-06-17 10:54maiteResolution time => 1467842400
2016-06-17 10:54maiteTriggers an Emergency Pack => No
2016-06-17 10:54maiteIssue Monitored: networkb
2016-06-17 14:58aferrazAssigned ToTriage Finance => markmm82
2016-06-23 12:30aferrazAssigned Tomarkmm82 => Sanjota
2016-06-23 23:33SanjotaFile Added: 33301Script.sql
2016-06-23 23:37SanjotaNote Added: 0087863
2016-06-23 23:38SanjotaNote Edited: 0087863bug_revision_view_page.php?bugnote_id=0087863#r12479
2016-06-27 12:14psanjuanNote Edited: 0087863bug_revision_view_page.php?bugnote_id=0087863#r12519
2016-06-27 12:14psanjuanNote Added: 0087969
2016-06-30 12:41aferrazFile Deleted: 33301Script.sql
2016-06-30 12:42aferrazFile Added: 33301.sql
2016-06-30 12:43hgbotCheckin
2016-06-30 12:43hgbotNote Added: 0088091
2016-06-30 12:43hgbotStatusnew => resolved
2016-06-30 12:43hgbotResolutionopen => fixed
2016-06-30 12:43hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9a7e4cc7bd8fd9e7ae4a647b0852c48905cbf47e [^]
2016-06-30 12:43hgbotCheckin
2016-06-30 12:43hgbotNote Added: 0088092
2016-06-30 12:44aferrazReview Assigned To => aferraz
2016-06-30 12:44aferrazNote Added: 0088093
2016-06-30 12:44aferrazStatusresolved => closed
2016-06-30 12:44aferrazFixed in Version => 3.0PR16Q3
2016-06-30 12:44aferrazNote Added: 0088094
2016-06-30 19:13hudsonbotCheckin
2016-06-30 19:13hudsonbotNote Added: 0088119
2016-06-30 19:13hudsonbotCheckin
2016-06-30 19:13hudsonbotNote Added: 0088120

Notes
(0087863)
Sanjota   
2016-06-23 23:37   
(edited on: 2016-06-27 12:14)
Test Plan:
1. Access Asset window and create record as follows:
 - Depreciate= yes
 - Depreciation type= linear
 - Calculate type= time
 - Amortize= monthly
 - Usable life-months=120
 - Every month is 30 days= NO
 - Purchase date= 19-01-2015
 - Depreciation start date= 19-01-2015
 - Asset value= 33.82
2. Run Create Amortization process and Observe that 120 records have been created in Asset Amortization tab without having any line with amount=0.
3.- Set Sum function for columns "Amortization Percentage" and "Amortization Amount"
4. Check that "Amortization Percentage" = 100.00 and Amortization Amount = 33.82


NOTE: if you delete now "Asset Amortization" records, and set Every month is 30 days= YES and run process again then 121 records are created without any line with amount =0

Check that:
- monthly amortization percentage is 0.83 but first one (0.35) as depreciation start date = 19-01-2015 and last one (0.88)
- "Amortization Percentage" = 100.00
- and Amortization Amount = 33.82

Also Please find attached script "33301Script.sql", to delete already existing lines with amount=0

(0087969)
psanjuan   
2016-06-27 12:14   
Test plan above verified.

Issue can be code reviewed and closed.
(0088091)
hgbot   
2016-06-30 12:43   
Repository: erp/devel/pi
Changeset: 9a7e4cc7bd8fd9e7ae4a647b0852c48905cbf47e
Author: Sanjota <sanjota.nelagi <at> promantia.com>
Date: Fri Jun 24 02:49:55 2016 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/9a7e4cc7bd8fd9e7ae4a647b0852c48905cbf47e [^]

Fixes issue 33301: Extra "Asset Amortization" record with total amount of 0

Extra "Asset Amortization" record with total amount of 0 when Asset defined as "Every Month Is 30 Day"= NO.
In case it is defined with "Every Month Is 30 Day"= YES then no extra line is created

---
M src/org/openbravo/erpCommon/ad_process/assets/AssetLinearDepreciationMethodProcess.java
---
(0088092)
hgbot   
2016-06-30 12:43   
Repository: erp/devel/pi
Changeset: edafa9b0e0b0dae2b69d1986792598d9de5df942
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Jun 30 12:42:50 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/edafa9b0e0b0dae2b69d1986792598d9de5df942 [^]

Related to issue 33301: Code review improvements

---
M src/org/openbravo/erpCommon/ad_process/assets/AssetLinearDepreciationMethodProcess.java
---
(0088093)
aferraz   
2016-06-30 12:44   
Code review + Testing OK
(0088094)
aferraz   
2016-06-30 12:44   
Attached script to delete wrong data.
(0088119)
hudsonbot   
2016-06-30 19:13   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/afefea138cd1 [^]
Maturity status: Test
(0088120)
hudsonbot   
2016-06-30 19:13   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/afefea138cd1 [^]
Maturity status: Test