Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0021679 | Openbravo ERP | 09. Financial management | public | 2012-09-18 16:03 | 2012-09-26 17:33 |
Reporter | xabiermerino | ||||
Assigned To | Sandrahuguet | ||||
Priority | immediate | Severity | critical | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | 3.0MP14 | ||||
Target Version | Fixed in Version | ||||
Merge Request Status | |||||
Review Assigned To | |||||
OBNetwork customer | OBPS | ||||
Web browser | |||||
Modules | Core | ||||
Support ticket | |||||
Regression level | Production - QA Approved | ||||
Regression date | 2012-05-28 | ||||
Regression introduced in release | |||||
Regression introduced by commit | https://code.openbravo.com/erp/devel/pi/rev/d73979000468 [^] | ||||
Triggers an Emergency Pack | yes | ||||
Summary | 0021679: The Acct Server process does not post reconciliations | ||||
Description | The 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(); | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
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:03 | xabiermerino | OBNetwork customer | => Yes | ||
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 | bug_revision_view_page.php?bugnote_id=0052213#r3870 | ||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|