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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0021679
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementcriticalalways2012-09-18 16:032012-09-26 17:33
ReporterxabiermerinoView Statuspublic 
Assigned ToSandrahuguet 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revision957e0383b0af
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version3.0MP14SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression levelProduction - QA Approved
Regression date2012-05-28
Regression introduced in release
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/d73979000468 [^]
Triggers an Emergency Packyes
Summary

0021679: The Acct Server process does not post reconciliations

DescriptionThe Acct Server process sets reconciliations 'Disabled for accounting'.

The problem is that, in the method 'documentGetPeriod' of the DocFINReconciliation, the organization used is *.
Steps To Reproduce- As admin go to Financial Account
- Select 'Cuenta Banco' and go to Payment method
- Introduce account to be able to post reconciliations
- Go to Reconciliations and post the last one
- Unpost it
- Wait some second until the process will executed
- Refresh the reconciliation
- realize that the reconciliation is 'Disabled for accounting'
Proposed Solution--- a/src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
+++ b/src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
@@ -1076,7 +1077,7 @@
       }
       // Exists line in closed period
       for (FIN_FinaccTransaction line : transactionsToBePosted) {
- Period linePeriod = documentGetPeriod(line.getDateAcct());
+ Period linePeriod = documentGetPeriod(line.getDateAcct(), reconciliation.getOrganization());
         if (linePeriod == null) {
           setStatus(STATUS_PeriodClosed);
           return false;
@@ -1469,19 +1470,21 @@
     return account;
   }
 
- Period documentGetPeriod(Date date) {
+ Period documentGetPeriod(Date date, Organization organization) {
     OBCriteria<PeriodControl> obCriteria = OBDal.getInstance().createCriteria(PeriodControl.class);
     obCriteria.createAlias(PeriodControl.PROPERTY_PERIOD, "p");
     obCriteria.createAlias("p." + Period.PROPERTY_YEAR, "y");
     obCriteria.add(Restrictions.eq(PeriodControl.PROPERTY_PERIODSTATUS, "O"));
     obCriteria.add(Restrictions.eq(PeriodControl.PROPERTY_DOCUMENTCATEGORY,
         AcctServer.DOCTYPE_Reconciliation));
- obCriteria.add(Restrictions.eq("y." + Year.PROPERTY_CALENDAR, getCalendar(AD_Org_ID)));
+ obCriteria.add(Restrictions.eq("y." + Year.PROPERTY_CALENDAR, getCalendar(organization.getId())));
     obCriteria.add(Restrictions.in(PeriodControl.PROPERTY_ORGANIZATION + "."
         + Organization.PROPERTY_ID, OBContext.getOBContext().getOrganizationStructureProvider()
- .getNaturalTree(AD_Org_ID)));
+ .getNaturalTree(organization.getId())));
     obCriteria.add(Restrictions.le("p." + Period.PROPERTY_STARTINGDATE, date));
     obCriteria.add(Restrictions.ge("p." + Period.PROPERTY_ENDINGDATE, date));
+ obCriteria.add(Restrictions.eq("p." + Period.PROPERTY_CLIENT, organization.getClient()));
+ obCriteria.setFilterOnReadableClients(false);
     obCriteria.setFilterOnReadableOrganization(false);
     List<PeriodControl> lines = obCriteria.list();
     return lines.size() == 0 ? null : lines.get(0).getPeriod();
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0052213)
Sandrahuguet (developer)
2012-09-18 18:42
edited on: 2012-09-19 12:38

Test Plan.
-Go to Financial Account, select Cuenta de banco
-Navigate to Payment Method
-Select Tranferencia
  ·Upon Withdrawal Use= Withdrawn Payment Account
  ·Upon Reconciliation Use= In Transit Payment Account
-Select last reconciliation
-Unpost and delete accounting
-Notice that the button says 'Post'
-Go to process request
-Select F&B International Group and Unschedule process
-Go to reconciliation and refresh
-Notice that the reconciliation is posted and the button says 'Unpost'

(0052221)
hgbot (developer)
2012-09-19 12:39

Repository: erp/devel/pi
Changeset: 571b10dd474d7c9952e802253344e089910aa975
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Tue Sep 18 18:35:14 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/571b10dd474d7c9952e802253344e089910aa975 [^]

Fixed bug 21679 The acct server process does not post reconciliations

---
M src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
---
(0052222)
dmiguelez (developer)
2012-09-19 12:39

Code Review + Testing OK
(0052663)
hgbot (developer)
2012-09-26 17:16

Repository: erp/devel/pi
Changeset: 957e0383b0af496969886791a34b48ac53f47ca5
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Tue Sep 18 18:35:14 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/957e0383b0af496969886791a34b48ac53f47ca5 [^]

Fixed bug 21679 The acct server process does not post reconciliations

---
M src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
---
(0052784)
hudsonbot (developer)
2012-09-26 17:19

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/b780e90c6452 [^]

Maturity status: Test

- Issue History
Date Modified Username Field Change
2012-09-18 16:03 xabiermerino New Issue
2012-09-18 16:03 xabiermerino Assigned To => dmiguelez
2012-09-18 16:03 xabiermerino Modules => Core
2012-09-18 16:05 xabiermerino Regression level => Production - QA Approved
2012-09-18 16:05 xabiermerino Regression date => 2012-05-28
2012-09-18 16:05 xabiermerino Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/d73979000468 [^]
2012-09-18 18:32 Sandrahuguet Assigned To dmiguelez => Sandrahuguet
2012-09-18 18:32 Sandrahuguet Status new => scheduled
2012-09-18 18:32 Sandrahuguet fix_in_branch => pi
2012-09-18 18:42 Sandrahuguet Note Added: 0052213
2012-09-19 12:38 dmiguelez Note Edited: 0052213 View Revisions
2012-09-19 12:39 hgbot Checkin
2012-09-19 12:39 hgbot Note Added: 0052221
2012-09-19 12:39 hgbot Status scheduled => resolved
2012-09-19 12:39 hgbot Resolution open => fixed
2012-09-19 12:39 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/571b10dd474d7c9952e802253344e089910aa975 [^]
2012-09-19 12:39 dmiguelez Closed by => dmiguelez
2012-09-19 12:39 dmiguelez Note Added: 0052222
2012-09-19 12:39 dmiguelez Status resolved => closed
2012-09-26 17:16 hgbot Checkin
2012-09-26 17:16 hgbot Note Added: 0052663
2012-09-26 17:16 hgbot Status closed => resolved
2012-09-26 17:16 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/571b10dd474d7c9952e802253344e089910aa975 [^] => http://code.openbravo.com/erp/devel/pi/rev/957e0383b0af496969886791a34b48ac53f47ca5 [^]
2012-09-26 17:19 hudsonbot Checkin
2012-09-26 17:19 hudsonbot Note Added: 0052784
2012-09-26 17:33 gorka_gil Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker