Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0037156Openbravo ERP09. Financial managementpublic2017-10-24 13:452018-01-08 18:19
ngarcia 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
3.0PR18Q1 
dmiguelez
Core
No
0037156: Cannot unpost a financial account transaction reconciled with a previous period's date: c_period_id is null in fact_acct
Cannot unpost a financial account transaction reconciled with a previous period's date: c_period_id is null in fact_acct
As group admin role:
   Create a financial account transaction with today's date in a financial account with matching algorithm not defined (in order to manually reconcile it)
   Process it and post it
   Launch Reconcile process and change statement date to a month before
   Remove the Hide Transactions after statement date option and select previously created transaction
   Set an ending balance and reconcile

   Try to unpost the financial account (selecting the option of Delete accounting entry) and check the following error message is shown:
   "Period Closed. It is not possible to unpost a document in a closed period"
The problem is in TransactionsDao.getPeriod function, it does not return any period and null is set in TransactionsDao.updateAccountingDate function. The date filters are wrong.

Moreover, the TransactionsDao.getPeriod is not filtering the result by org or calendar. Check if DALUtils.getPeriodByDate function could be used in this case
No tags attached.
related to defect 0037219 closed AtulOpenbravo Remove function getPeriod from TransactionsDao class 
Issue History
2017-10-24 13:45ngarciaNew Issue
2017-10-24 13:45ngarciaAssigned To => Triage Finance
2017-10-24 13:45ngarciaModules => Core
2017-10-24 13:45ngarciaTriggers an Emergency Pack => No
2017-10-24 13:56ngarciaIssue Monitored: networkb
2017-10-24 15:59ngarciaProposed Solution updated
2017-10-24 19:30AtulOpenbravoAssigned ToTriage Finance => AtulOpenbravo
2017-10-24 19:30AtulOpenbravoStatusnew => scheduled
2017-10-25 00:19eugeniIssue Monitored: eugeni
2017-11-03 13:30dmiguelezRelationship addedrelated to 0037219
2017-11-06 08:34AtulOpenbravoNote Added: 0100271
2017-11-06 09:16hgbotCheckin
2017-11-06 09:16hgbotNote Added: 0100277
2017-11-06 09:16hgbotStatusscheduled => resolved
2017-11-06 09:16hgbotResolutionopen => fixed
2017-11-06 09:16hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/28d8fe1517d7212b0ac707cfad8f555c510002ae [^]
2017-11-06 10:37dmiguelezReview Assigned To => dmiguelez
2017-11-06 10:37dmiguelezNote Added: 0100282
2017-11-06 10:37dmiguelezStatusresolved => closed
2018-01-03 12:38hudsonbotCheckin
2018-01-03 12:38hudsonbotNote Added: 0101374
2018-01-08 18:19dmiguelezFixed in Version => 3.0PR18Q1

Notes
(0100271)
AtulOpenbravo   
2017-11-06 08:34   
Test Plan
- Login as International Group Admin role.
- Navigate to Financial Account: Bank Account 1, set Matching Algorithm as blank.
- Create a transaction in "Bank Account 1" with Type= BP Withdrawal,
  Trans Date = Acct Date = today's date, GLItem: Salaries, Withdrawal Amount = 100,
- Process it and post it.
- Launch Reconcile process and change statement date to a month before = todays date - 30
- Remove the Hide Transactions after statement date option and select previously created transaction
- Set an ending balance = (starting balance - 100)
  for eg: Starting Bal= 4473292.33, Ending Balance = 4473192.33
- Click on reconcile.
- Realize that previous financial transaction account date is updated with statement date.
- Search for the above transactionand try to unpost it. (selecting the option of Delete accounting entry)
- Realize document is unposted successfully.
(0100277)
hgbot   
2017-11-06 09:16   
Repository: erp/devel/pi
Changeset: 28d8fe1517d7212b0ac707cfad8f555c510002ae
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Mon Nov 06 11:45:05 2017 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/28d8fe1517d7212b0ac707cfad8f555c510002ae [^]

Fixes Issue 37156, 37219:Cannot unpost a financial account transaction
reconciled with a previous period's date: c_period_id is null in
fact_acct

** Use AccDefUtility.getCurrentPeriod to get the perid for
financial account transaction date.
** Removed public getPeriod method.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/TransactionsDao.java
---
(0100282)
dmiguelez   
2017-11-06 10:37   
Code Review + Testing Ok
(0101374)
hudsonbot   
2018-01-03 12:38   
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/c81e0d3cbab5 [^]
Maturity status: Test