Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036670Openbravo ERP09. Financial managementpublic2017-08-18 13:032017-09-21 16:49
ngarcia 
markmm82 
urgentminoralways
closedfixed 
5
 
3.0PR17Q4 
aferraz
Core
No
0036670: Process failed during execution when posting a reconciliation and there does not exists currency conversion
Process failed during execution when posting a reconciliation and there does not exists currency conversion
As group admin role:
   Create a new Payment Method:
      Payment In Allowed: Y
      Receive Payment in Multiple Currencies: Y
      Upon Receipt Use: empty
      Upon Deposit Use: empty
      Upon Reconciliation Use: Cleared Payment Account

   Create a new Financial Account:
      Currency: EUR

   Add the previously created payment method to it
   Create a new Price List and version:
      Sales Price List: Y
      Currency: USD
   Add a product to it

   Unschedule the Acct Server Process

   Create a Sales Invoice, select the previously created Payment Method and Price List
   Add a product to it and complete it
   Add a exchange rate to it
   Post it

   Add Payment to it and change its Payment date (set a date previous to the invoice date)
   Process and deposit it

   Go to Financial Account and Reconcile the associated transaction

   Deactivate the conversion between USD and EUR

   Try to post the reconciliation and check the following error is shown:
      "Process failed during execution"

   instead of
      "Document currency cannot be converted to the Accounting Schema currency."

   The log shows:

   
WARN org.openbravo.erpCommon.ad_forms.AcctServer - javax.servlet.ServletException: @CODE=0@ERROR: @NoConversionRate@ (USD-$) @to@ (EUR-€) @ForDate@ '18-08-2017', @Client@ 'F&B International Group' @And@ @ACCS_AD_ORG_ID_D@ 'F&B España, S.A'.
WARN org.openbravo.erpCommon.ad_forms.AcctServer - Accounting process failed. RecordID: C7647209D5DB4ABDA882F171908BCC78 - TableId: B1B7075C46934F0A9FD4C4D0F1457B42
java.lang.NumberFormatException
    at java.math.BigDecimal.<init>(BigDecimal.java:545)
    at java.math.BigDecimal.<init>(BigDecimal.java:739)
    at org.openbravo.erpCommon.ad_forms.FactLine.roundToCurrencyPrecision(FactLine.java:852)
    at org.openbravo.erpCommon.ad_forms.Fact.createLine(Fact.java:295)
    at org.openbravo.erpCommon.ad_forms.DocFINReconciliation.createFactPaymentDetails(DocFINReconciliation.java:
No tags attached.
related to defect 00285073.0PR15Q2 closed aferraz Wrong error message shown when trying to post a reconciliation with a payment method not included in the financial account 
Issue History
2017-08-18 13:03ngarciaNew Issue
2017-08-18 13:03ngarciaAssigned To => Triage Finance
2017-08-18 13:03ngarciaModules => Core
2017-08-18 13:03ngarciaResolution time => 1504821600
2017-08-18 13:03ngarciaTriggers an Emergency Pack => No
2017-08-18 13:03ngarciaIssue Monitored: networkb
2017-08-18 13:04ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15652#r15652
2017-08-18 13:44aferrazRelationship addedrelated to 0028507
2017-08-18 13:54aferrazNote Added: 0098547
2017-08-18 13:54aferrazAssigned ToTriage Finance => markmm82
2017-08-18 13:54aferrazSeveritymajor => minor
2017-08-18 13:54aferrazNote Edited: 0098547bug_revision_view_page.php?bugnote_id=0098547#r15654
2017-08-18 16:11markmm82Statusnew => scheduled
2017-08-21 11:20ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15655#r15655
2017-08-21 16:19markmm82Note Added: 0098561
2017-08-22 14:21hgbotCheckin
2017-08-22 14:21hgbotNote Added: 0098578
2017-08-22 14:21hgbotStatusscheduled => resolved
2017-08-22 14:21hgbotResolutionopen => fixed
2017-08-22 14:21hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/fc4957d9cf68a7e5203502dc210a8100d181d1ff [^]
2017-08-22 14:27aferrazReview Assigned To => aferraz
2017-08-22 14:27aferrazNote Added: 0098579
2017-08-22 14:27aferrazStatusresolved => closed
2017-08-22 14:27aferrazFixed in Version => 3.0PR17Q4
2017-09-21 16:49hudsonbotCheckin
2017-09-21 16:49hudsonbotNote Added: 0099318

Notes
(0098547)
aferraz   
2017-08-18 13:54   
Moved to minor as per Bug Reporting Guidelines [1]:
  - Minor: do not result in failure but causes the system to show incorrect, incomplete, or inconsistent results.

[1] http://wiki.openbravo.com/wiki/Bug_Reporting_Guidelines#How_to_Choose_the_Right_Severity [^]

(0098561)
markmm82   
2017-08-21 16:19   
Test Plan:

As group admin role:
   Create a new Payment Method:
      Payment In Allowed: Y
      Receive Payment in Multiple Currencies: Y
      Upon Receipt Use: empty
      Upon Deposit Use: empty
      Upon Reconciliation Use: Cleared Payment Account

   Create a new Financial Account:
      Currency: EUR

   Add the previously created payment method to it
   Create a new Price List and version:
      Sales Price List: Y
      Currency: USD
   Add a product to it

   Unschedule the Acct Server Process

   Create a Sales Invoice, select the previously created Payment Method and Price List
   Add a product to it and complete it
   Add a exchange rate to it
   Post it

   Add Payment to it and change its Payment date (set a date previous to the invoice date)
   Process and deposit it

   Go to Financial Account and Reconcile the associated transaction

   Deactivate the conversion between USD and EUR

   Try to post the reconciliation and check the following error is shown:
      "Document currency cannot be converted to the Accounting Schema currency."

   Reactivate the conversion between USD and EUR

   Try to post the reconciliation and notice process is successfull.
(0098578)
hgbot   
2017-08-22 14:21   
Repository: erp/devel/pi
Changeset: fc4957d9cf68a7e5203502dc210a8100d181d1ff
Author: Mark <markmm82 <at> gmail.com>
Date: Mon Aug 21 10:14:39 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/fc4957d9cf68a7e5203502dc210a8100d181d1ff [^]

Fixes issue 36670: Process failed during execution when posting reconciliation

When does not exist currency conversion a "Process failed during execution" message
was shown instead of "Document currency cannot be converted to the Accounting Schema
currency." during execution when posting a reconciliation.

Problem was that FactLine.convertByRate() and FactLine.convert() methods return was not checked when calling them from FactLine.createLine() method.
Now, when they return false, document is set to not convertible status.

---
M src/org/openbravo/erpCommon/ad_forms/Fact.java
M src/org/openbravo/erpCommon/ad_forms/FactLine.java
---
(0098579)
aferraz   
2017-08-22 14:27   
Code review + Testing OK
(0099318)
hudsonbot   
2017-09-21 16:49   
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/9750b78d3e5c [^]
Maturity status: Test