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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0042495
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementminoralways2019-12-09 22:312019-12-26 15:16
Reportermatias-bernalView Statuspublic 
Assigned ToAtulOpenbravo 
PrioritynormalResolutionopenFixed in Version
StatusscheduledFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0042495: Can not unpost invoices when exists an leaf organization and it is not ready

DescriptionWhen you created a new organization child of another legal with accounting and this new organization is not set ready, you can not unpost invoices because the field ad_periodcontrolallowed_org_id in ad_org table is null, and a null pointer exeption is thrown in deleted method of class org.openbravo.financial.ResetAccounting.
Steps To Reproduce1) Create a new organization child of an organization legal with accounting, but not set ready this new organization. (see attachment 13396_00.png)

2) Create a new sales invoice using parent legal with accounting organization, comple and post them. (see attachment 13396_01.png)

3)Unpost this sales order using delete accounting entry check. (see attachment 13396_03.png)

Then this procces returns an error (see attachment 13396_04.png)
Proposed SolutionCheck in method delete in class org.openbravo.financial.ResetAccounting when you get the child tree (new OrganizationStructureProvider().getChildTree(adOrgId, true)) organization exclude not ready organizations

Set<String> orgIds = StringUtils.equals(org.getOrganizationType().getId(), "0")
          ? getLegalOrBusinessOrgsChilds(client, adOrgId)
          : new OrganizationStructureProvider().getChildTree(adOrgId, true);

or exclude not ready organization or use a coalesce in query

            String myQuery1 = "select ad_org_id, ad_periodcontrolallowed_org_id from ad_org where ad_org_id in (:orgIds)";

when it's code try get ad_periodcontrolallowed_org_id value.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0116369)
AtulOpenbravo (developer)
2019-12-17 09:34

Test Plan
- Login as F&B International Group Admin role
- Using Initial Organization Setup, create a Test Org with type Generic and Parent as F&B US inc, do not include accounting file, do not select any reference data, do not select any accounting dimension
- Navigate to Organization window, do not set this organization as ready.
- Create a Sales invoice in F&B US Inc organization with Today's date as invoice and accounting date, select any business partner and select any product in line, set Quantity = 10.
- Complete and Post the Sales Invoice.
- Navigate to Reset Accounting process, select client F&B International Group, F&B US Inc as Organization, C_Invoice (Purchase Invoice - Sales Invoice) in the table, Starting Date = Today's date
- Click on Done, realize that process is completed successfully.

- Issue History
Date Modified Username Field Change
2019-12-09 22:31 matias-bernal New Issue
2019-12-09 22:31 matias-bernal Assigned To => Triage Finance
2019-12-09 22:31 matias-bernal Modules => Core
2019-12-09 22:31 matias-bernal Resolution time => 1577674800
2019-12-09 22:31 matias-bernal Triggers an Emergency Pack => No
2019-12-10 18:55 dmiguelez Assigned To Triage Finance => AtulOpenbravo
2019-12-17 09:34 AtulOpenbravo Status new => scheduled
2019-12-17 09:34 AtulOpenbravo Note Added: 0116369
2019-12-18 17:46 dmiguelez Resolution time 1577674800 => 1577660400
2019-12-18 17:46 dmiguelez Severity major => minor
2019-12-26 15:16 ngarcia Resolution time 1577660400 =>


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker