Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0032280
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementmajoralways2016-02-18 17:342016-03-17 10:56
ReporterngarciaView Statuspublic 
Assigned ToAtulOpenbravo 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision216fb4e6048c
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tovmromanos
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0032280: Amortization Process / Unprocess should only update Fully Depreciated field of the assets included on it and need the update

DescriptionAmortization Process / Unprocess should only update Fully Depreciated field of the assets included on it and need the update. Currently it is updating all of them
Steps To ReproduceAs group admin role:
   Create three assets: Depreciated, NotDepreciated and Amortized
   Configure the depreciation of Depreciated and Amortized and create its amortization
   Update through database the IsFullyDepreciated to 'N' to the NotDepreciated asset (in order to see the update done by the process)
   Update through database the IsFullyDepreciated to 'Y' to the Depreciated asset (in order to see the update done by the process)

   Navigate to the amortization of one of the lines of the Amortized asset
   Process it and check the IsFullyDepreciated field has changed for the other two assets: Depreciated ('N') and Not Depreciated ('Y')
Proposed SolutionAdd a filter to the following two updates to update only the assets included in the amortization being processed and also to update the ones that have different value in the isfullydepreciated field than the one set:

      UPDATE a_asset
        SET IsFullyDepreciated='Y',Updated=TO_DATE(NOW()),UpdatedBy='100'
      WHERE COALESCE(DepreciatedPlan, -1)=COALESCE(DepreciatedValue, -2) ;

      
      UPDATE a_asset
        SET IsFullyDepreciated='N',Updated=TO_DATE(NOW()),UpdatedBy='100'
      WHERE DepreciatedPlan<>DepreciatedValue;
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0029091 closedjorge-garcia Fully depreciated field is not updated when unprocessing an asset amortization 

-  Notes
(0084419)
AtulOpenbravo (developer)
2016-02-23 11:38
edited on: 2016-02-23 11:38

Test Plan
- Login as F&B International Group admin role.
- Create three assets: Depreciated, NotDepreciated and Amortized
- Configure the depreciation of Depreciated and Amortized and create its amortization.
- Update through database the IsFullyDepreciated to 'N' to the NotDepreciated asset (in order to see the update done by the process).
- Update through database the IsFullyDepreciated to 'Y' to the Depreciated asset (in order to see the update done by the process).
- Navigate to the amortization of one of the lines of the Amortized asset.
- Process it.
- Check the IsFullyDepreciated field for "Not Depreciated" asset is not updated and it is same as ('N') previous value.

(0084453)
psanjuan (manager)
2016-02-24 09:55

Issue Verified.
(0084454)
psanjuan (manager)
2016-02-24 10:21
edited on: 2016-02-24 10:22

Test Plan above verified

Values does not change now in the database, after running amortization for other assets than 2 ones below.

select value, isfullydepreciated, depreciatedplan, depreciatedvalue, updated
from a_asset
where a_asset_id in
('EE21580379FB4D5889059A46A6DE59FF',
'221DB1350A974132930164537D8B81D2')

update a_asset
set isfullydepreciated = 'N'
where a_asset_id =
'EE21580379FB4D5889059A46A6DE59FF'

update a_asset
set isfullydepreciated = 'Y'
where a_asset_id =
'221DB1350A974132930164537D8B81D2'

Records keep as:
"NotDepreciated";"N";0;0
"Depreciated";"Y";10000;0

Issue can be code reviewed and closed.

(0084466)
hgbot (developer)
2016-02-24 15:33

Repository: erp/devel/pi
Changeset: 216fb4e6048c4546b3ade9e36c58dc27f810d900
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Feb 23 16:05:13 2016 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/216fb4e6048c4546b3ade9e36c58dc27f810d900 [^]

Fixes Issue 32280:Amortization Process / Unprocess should only update Fully
Depreciated field of the assets included on it and need the update

Condition added in update query to only update those assets record on which
amortization process is being called

---
M src-db/database/model/functions/A_AMORTIZATION_PROCESS.xml
---
(0084467)
vmromanos (developer)
2016-02-24 15:33

Code review + testing OK
(0085166)
hudsonbot (developer)
2016-03-17 10:56

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/b22fb0500156 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2016-02-18 17:34 ngarcia New Issue
2016-02-18 17:34 ngarcia Assigned To => Triage Finance
2016-02-18 17:34 ngarcia Modules => Core
2016-02-18 17:34 ngarcia Triggers an Emergency Pack => No
2016-02-18 17:34 ngarcia Issue Monitored: networkb
2016-02-18 17:44 ngarcia Relationship added related to 0029091
2016-02-23 11:38 AtulOpenbravo Note Added: 0084419
2016-02-23 11:38 AtulOpenbravo Note Edited: 0084419 View Revisions
2016-02-23 11:43 AtulOpenbravo Assigned To Triage Finance => AtulOpenbravo
2016-02-23 11:43 AtulOpenbravo Status new => scheduled
2016-02-24 09:55 psanjuan Note Added: 0084453
2016-02-24 10:21 psanjuan Note Added: 0084454
2016-02-24 10:22 psanjuan Note Edited: 0084454 View Revisions
2016-02-24 15:33 hgbot Checkin
2016-02-24 15:33 hgbot Note Added: 0084466
2016-02-24 15:33 hgbot Status scheduled => resolved
2016-02-24 15:33 hgbot Resolution open => fixed
2016-02-24 15:33 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/216fb4e6048c4546b3ade9e36c58dc27f810d900 [^]
2016-02-24 15:33 vmromanos Review Assigned To => vmromanos
2016-02-24 15:33 vmromanos Note Added: 0084467
2016-02-24 15:33 vmromanos Status resolved => closed
2016-03-17 10:56 hudsonbot Checkin
2016-03-17 10:56 hudsonbot Note Added: 0085166


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker