Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030212Openbravo ERP09. Financial managementpublic2015-06-19 12:362015-06-25 18:00
ngarcia 
aferraz 
urgentmajoralways
closedfixed 
5
 
 
vmromanos
Core
No
0030212: Wrong error message shown when posting an invoice with a deferred revenue in a closed period
Wrong error message shown when posting an invoice with a deferred revenue in a closed period
As group admin role:
   Create a new product
   Set it as Deferred Revenue:
      Revenue Plan Type: Monthly
      Period Number: 12
      Default Period: Current Month
   Create a Sales Invoice with a date of the previous month
   Add the previously created product and check the Starting period is filled with the previous month
   Change the invoice date to the current month
   Check the Starting period is not updated
   Complete it
   Go to Open/close period control window and close the period for AR Invoice and the period shown in the Starting period of the sales invoice line
   Try to post the invoice and check you get the following error:
      Process failed during execution
   The log shows:
      java.lang.IllegalStateException: DocInvoice - Error getting next year period
    at org.openbravo.erpCommon.ad_forms.DocInvoice.calculateAccDefPlan(DocInvoice.java:1197)
    at org.openbravo.erpCommon.ad_forms.DocInvoice.createAccDefRevenueFact(DocInvoice.java:1139)
    at org.openbravo.erpCommon.ad_forms.DocInvoice.createFact(DocInvoice.java:509)
No tags attached.
Issue History
2015-06-19 12:36ngarciaNew Issue
2015-06-19 12:36ngarciaAssigned To => Triage Finance
2015-06-19 12:36ngarciaModules => Core
2015-06-19 12:36ngarciaResolution time => 1437256800
2015-06-19 12:36ngarciaTriggers an Emergency Pack => No
2015-06-19 13:11ngarciaIssue Monitored: networkb
2015-06-23 18:42aferrazAssigned ToTriage Finance => aferraz
2015-06-23 18:43aferrazStatusnew => scheduled
2015-06-23 18:44aferrazNote Added: 0078457
2015-06-25 11:19vmromanosNote Edited: 0078457bug_revision_view_page.php?bugnote_id=0078457#r8894
2015-06-25 11:32hgbotCheckin
2015-06-25 11:32hgbotNote Added: 0078499
2015-06-25 11:32hgbotStatusscheduled => resolved
2015-06-25 11:32hgbotResolutionopen => fixed
2015-06-25 11:32hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/dbdd3e64a7d145560ffd33d19e69586e4be399d5 [^]
2015-06-25 11:32vmromanosReview Assigned To => vmromanos
2015-06-25 11:32vmromanosNote Added: 0078500
2015-06-25 11:32vmromanosStatusresolved => closed
2015-06-25 18:00hudsonbotCheckin
2015-06-25 18:00hudsonbotNote Added: 0078518

Notes
(0078457)
aferraz   
2015-06-23 18:44   
(edited on: 2015-06-25 11:19)
Test plan:

As group admin role:
   Create a new product
   Set it as Deferred Revenue:
      Revenue Plan Type: Monthly
      Period Number: 12
      Default Period: Current Month
   Create a Sales Invoice with a date of the previous month
   Add the previously created product and check the Starting period is filled with the previous month
   Change the invoice date to the current month
   Check the Starting period is not updated
   Complete it
   Go to Open/close period control window and close only the period shown in the Starting period of the sales invoice line
   Try to post the invoice and check you get the following error:
      The Period does not exist or it is not opened
   The log shows:
      ERROR org.openbravo.base.exception.OBException - @PeriodNotAvailable@
org.openbravo.base.exception.OBException: @PeriodNotAvailable@
    at org.openbravo.erpCommon.ad_forms.DocInvoice.calculateAccDefPlan(DocInvoice.java:1198)

(0078499)
hgbot   
2015-06-25 11:32   
Repository: erp/devel/pi
Changeset: dbdd3e64a7d145560ffd33d19e69586e4be399d5
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Jun 23 18:35:47 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/dbdd3e64a7d145560ffd33d19e69586e4be399d5 [^]

Fixes issue 30212: Wrong error message when posting an invoice

Wrong error message was shown when posting an invoice with a deferred revenue in a closed period.
Now, PeriodNotAvailable error message will be shown.

---
M src/org/openbravo/erpCommon/ad_forms/AcctServer.java
M src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
---
(0078500)
vmromanos   
2015-06-25 11:32   
Code review + testing OK
(0078518)
hudsonbot   
2015-06-25 18:00   
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/65f6b2e875a7 [^]
Maturity status: Test