Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0018612 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 09. Financial management | minor | always | 2011-09-26 13:46 | 2011-12-01 18:17 | |||
Reporter | mirurita | View Status | public | |||||
Assigned To | ioritzCia | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | 45ee9420aa7b | ||||
Projection | none | ETA | none | Target Version | 3.0MP6 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | ||||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0018612: Assets - create amortization process not calculating properly percetages/amounts | |||||||
Description | When defining a linear depreciation type with percentage and the start date is not the first day of the year (01-01-YYYY) the amounts and percentages are not properly calculated. | |||||||
Steps To Reproduce | 1) Go to Assets window 2) Create new Asset - Search Key: XX - Name: XX - Asset Category: Buildings - Depreciate: Yes - Depreciation Type: Linear - Calculate Type: Percentage - Annual Depreciation %: 50 - Purchase Date: 29-01-2010 - Depreciation Start Date: 29-01-2010 - Asset Value: 41064 - Depreciation Amt.: 41064 - Residual Asset Value: 0 - Previously Depreciated Amt: 0 3) Click on 'Create Amortization' button 4) See the Asset Amortization tab 2010 - 46.15 % - 18952.62 2011 - 50 % - 20532 2012 - 3.85 % - 1579.38 when it should be 2010 - 46.03 % - 18900.69 2011 - 50 % - 20532 2012 - 3.97 % - 1631.31 | |||||||
Proposed Solution | SELECT TO_DATE('31-12-2010', 'DD-MM-YYYY') - TO_DATE('01-01-2010', 'DD-MM-YYYY') from dual; -- returns 364 Number of days of the year: SELECT TO_DATE('01-01-2011', 'DD-MM-YYYY') - TO_DATE('01-01-2010', 'DD-MM-YYYY') from dual; -- returns 365 Change Line 215 v_Percentage:=to_number(to_number(TO_DATE('31-12-'||to_char(v_AMORTIZATIONSTARTDATE, 'YYYY'), 'DD-MM-YYYY') -v_AMORTIZATIONSTARTDATE) / (TO_DATE('01-01-'||to_char(to_number(to_char(v_AMORTIZATIONSTARTDATE, 'YYYY')) + 1), 'DD-MM-YYYY') -TO_DATE('01-01-'||to_char(v_AMORTIZATIONSTARTDATE, 'YYYY'), 'DD-MM-YYYY'))) * v_PercentageGeneral; | |||||||
Tags | No tags attached. | |||||||
Attached Files | Asset - create amortization.png [^] (91,944 bytes) 2011-09-26 13:46
| |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Notes | |
(0043141) hgbot (developer) 2011-11-24 10:34 |
Repository: erp/devel/pi Changeset: 45ee9420aa7bfe4d415e84edfcab146aa0432c65 Author: Ioritz Cia <ioritz.cia <at> openbravo.com> Date: Tue Nov 22 11:54:06 2011 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/45ee9420aa7bfe4d415e84edfcab146aa0432c65 [^] Fixes issue 18612: Assets - create amortization process not calculating properly percetages/amounts. --- M src-db/database/model/functions/A_ASSET_POST.xml --- |
(0043158) ioritzCia (developer) 2011-11-24 13:28 |
Test Plan: - Follow the steps to reproduce. - Try with other quantities and dates, insist on border dates as the first and the last days of the month and the dates around that ones. - Check that the percentage lost in the roundings gets recovered in the line of the last amortization. |
(0043434) hudsonbot (developer) 2011-11-30 12:29 |
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/01809c7b3135 [^] Maturity status: Test |
(0043660) mirurita (developer) 2011-12-01 18:17 |
Verified on revision 14787:d63e0b9b9bcc |
Issue History | |||
Date Modified | Username | Field | Change |
2011-09-26 13:46 | mirurita | New Issue | |
2011-09-26 13:46 | mirurita | Assigned To | => jonalegriaesarte |
2011-09-26 13:46 | mirurita | File Added: Asset - create amortization.png | |
2011-09-26 13:46 | mirurita | Modules | => Core |
2011-09-26 13:46 | mirurita | Resolution time | => 1322694000 |
2011-09-26 16:09 | mirurita | Target Version | => 3.0MP6 |
2011-09-26 17:22 | mirurita | Proposed Solution updated | |
2011-11-17 16:08 | jonalegriaesarte | Assigned To | jonalegriaesarte => ioritzCia |
2011-11-24 10:34 | hgbot | Checkin | |
2011-11-24 10:34 | hgbot | Note Added: 0043141 | |
2011-11-24 10:34 | hgbot | Status | new => resolved |
2011-11-24 10:34 | hgbot | Resolution | open => fixed |
2011-11-24 10:34 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/45ee9420aa7bfe4d415e84edfcab146aa0432c65 [^] |
2011-11-24 13:28 | ioritzCia | Note Added: 0043158 | |
2011-11-30 12:29 | hudsonbot | Checkin | |
2011-11-30 12:29 | hudsonbot | Note Added: 0043434 | |
2011-12-01 18:17 | mirurita | Note Added: 0043660 | |
2011-12-01 18:17 | mirurita | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |