Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0018612 | Openbravo ERP | 09. Financial management | public | 2011-09-26 13:46 | 2011-12-01 18:17 |
Reporter | mirurita | ||||
Assigned To | ioritzCia | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | 3.0MP6 | Fixed in Version | |||
Merge Request Status | |||||
Review Assigned To | |||||
OBNetwork customer | |||||
Web browser | |||||
Modules | Core | ||||
Support ticket | |||||
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; | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | Asset - create amortization.png (91,944) 2011-09-26 13:46 https://issues.openbravo.com/file_download.php?file_id=4592&type=bug | ||||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|