Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030273Openbravo ERP09. Financial managementpublic2015-06-29 12:542015-08-20 23:16
maite 
AtulOpenbravo 
immediatemajoralways
closedfixed 
5
 
3.0PR15Q4 
vmromanos
Advanced Payables and Receivables Mngmt
Production - QA Approved
2015-01-13
3.0PR15Q2
https://code.openbravo.com/erp/devel/pi/rev/368eb470c2955fb9525c9e529591c2699122ef21 [^]
No
0030273: "Not Balance" error received when posting a transaction (although suspense balancing is not needed)
"Not Balance" error received when posting a transaction (although suspense balancing is not needed)
1. Access General Ledger Configuration window and General Accounts tab and leave "Suspense Balancing" field empty and uncheck "Suspense Balancing use" for España and International ledgers
2. Access "Cuenta de Banco" financial account and search Transaction with Line no 4800. Unpost transaction
3. Post transaction again and "Not Balanced" error will be raised

If you come back to General Ledger Configuration and mark "Suspense Balancing Use" and then try to post Transaction again it will be correctly posted (not using suspense balancing account)
1. Revert changeset https://code.openbravo.com/erp/devel/pi/rev/368eb470c2955fb9525c9e529591c2699122ef21 [^]

2. Replace this piece of code in DocFINFinAccTransaction.getBalance()

    // if payment IN/OUT is in Multi-Currency then get Multi-Currency amount field because
    // FIN_Payment line amount is in that currency.
    if (payment != null) {
      if (!payment.getAccount().getCurrency().getId()
          .equalsIgnoreCase(payment.getCurrency().getId())) {
        retValue = payment.getAmount();
      }
    }

by

    // if payment IN/OUT is in Multi-Currency then get Multi-Currency amount field because
    // FIN_Payment line amount is in that currency.
    if (payment != null) {
      if (!payment.getAccount().getCurrency().getId()
          .equalsIgnoreCase(payment.getCurrency().getId())) {
        retValue = payment.isReceipt() ? payment.getAmount() : payment.getAmount().negate();
      }
    }
No tags attached.
related to defect 0025173 closed pramakrishnan Openbravo ERP "Not Balance" error received when posting a multi-currency transaction (although suspense balancing no needs to be used) 
depends on backport 00303013.0PR15Q3 closed AtulOpenbravo Openbravo ERP "Not Balance" error received when posting a transaction (although suspense balancing is not needed) 
depends on backport 00303023.0PR15Q2.3 closed AtulOpenbravo Openbravo ERP "Not Balance" error received when posting a transaction (although suspense balancing is not needed) 
caused by defect 00272893.0PR15Q2 closed AtulOpenbravo Openbravo ERP "Not Balance" error received when posting a multi-currency OUT transaction (although suspense balancing no needs to be used) 
related to defect 0034585 closed alekosmp86 Modules "Not Balanced" error when posting a remittance (although suspense balancing account is not needed) 
Issue History
2015-06-29 12:54maiteNew Issue
2015-06-29 12:54maiteAssigned To => Triage Finance
2015-06-29 12:54maiteModules => Advanced Payables and Receivables Mngmt
2015-06-29 12:54maiteResolution time => 1435615200
2015-06-29 12:54maiteTriggers an Emergency Pack => No
2015-06-29 12:54maiteIssue Monitored: networkb
2015-06-30 12:05vmromanosTarget Version3.0PR15Q3 => 3.0PR15Q4
2015-07-01 12:42AtulOpenbravoAssigned ToTriage Finance => AtulOpenbravo
2015-07-01 12:42AtulOpenbravoStatusnew => scheduled
2015-07-02 12:20vmromanosRelationship addedrelated to 0025173
2015-07-02 12:20vmromanosRelationship addedcaused by 0027289
2015-07-02 12:26vmromanosRegression level => Production - QA Approved
2015-07-02 12:26vmromanosRegression date => 2015-01-13
2015-07-02 12:26vmromanosRegression introduced in release => 3.0PR15Q2
2015-07-02 12:26vmromanosRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/368eb470c2955fb9525c9e529591c2699122ef21 [^]
2015-07-02 12:26vmromanosNote Added: 0078625
2015-07-02 12:40vmromanosProposed Solution updated
2015-07-02 12:41vmromanosStatusscheduled => acknowledged
2015-07-02 12:41vmromanosStatusacknowledged => scheduled
2015-07-02 12:42vmromanosNote Edited: 0078625bug_revision_view_page.php?bugnote_id=0078625#r8967
2015-07-03 13:14AtulOpenbravoNote Added: 0078638
2015-07-03 13:16AtulOpenbravoNote Added: 0078639
2015-07-03 13:17AtulOpenbravoNote Edited: 0078638bug_revision_view_page.php?bugnote_id=0078638#r8976
2015-07-03 13:44AtulOpenbravoNote Edited: 0078639bug_revision_view_page.php?bugnote_id=0078639#r8978
2015-07-03 14:12AtulOpenbravoNote Edited: 0078639bug_revision_view_page.php?bugnote_id=0078639#r8980
2015-07-03 14:21AtulOpenbravoNote Edited: 0078639bug_revision_view_page.php?bugnote_id=0078639#r8981
2015-07-06 12:05hgbotCheckin
2015-07-06 12:05hgbotNote Added: 0078668
2015-07-06 12:05hgbotStatusscheduled => resolved
2015-07-06 12:05hgbotResolutionopen => fixed
2015-07-06 12:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/2cb16178b888c5ac391874ac17a4efb655aac788 [^]
2015-07-06 12:06vmromanosReview Assigned To => vmromanos
2015-07-06 12:06vmromanosNote Added: 0078671
2015-07-06 12:06vmromanosStatusresolved => closed
2015-08-20 23:16hudsonbotCheckin
2015-08-20 23:16hudsonbotNote Added: 0079472
2016-11-18 14:59maiteRelationship addedrelated to 0034585

Notes
(0078625)
vmromanos   
2015-07-02 12:26   
(edited on: 2015-07-02 12:42)
Regression explanation:

0025173 wrongly fixes the original issue:
It doesn't take into account the payment's sign (payment in/out). Here is the initial root cause of the regression

0027289 wrongly changes from subtracting to adding the amounts, as a consequence of the resolution of 0025173

(0078638)
AtulOpenbravo   
2015-07-03 13:14   
(edited on: 2015-07-03 13:17)
Test Plan
- Access General Ledger Configuration window and General Accounts tab and leave "Suspense Balancing" field empty and uncheck "Suspense Balancing use" for España and International ledgers.
- Access "Cuenta de Banco" financial account and search Transaction with Line no 4800. Unpost transaction.
- Post transaction and check that posting is successful.

(0078639)
AtulOpenbravo   
2015-07-03 13:16   
(edited on: 2015-07-03 14:21)
Alternative test plans
A ] Payment Out
- Access "General Ledger Configuration" window and "General Accounts" tab. Configure both accounting schemas with "Suspense Balancing Use" unmarked
- Configure "Transferencia" payment method as "Make Payments in Multiple Currency".
- Register Payment OUT for "Alimentos y Supermercados" for any amount, "Transferencia" payment method and USD currency. "Add details" and select any GL Item and "Process and Withdraw".
- Access already created multi-currency transaction and post it.
- Check that Posting is successful.

B ] Payment In

- Access "General Ledger Configuration" window and "General Accounts" tab. Configure both accounting schemas with "Suspense Balancing Use" unmarked
- Configure "Transferencia" payment method mark "Receive Payments in Multiple Currency" = Yes, mark Automatic Deposit = No.
- Register Payment IN for "Hoteles Buenas Noches, S.A." for any amount, "Transferencia" payment method and USD currency. Using "Add details" select any GL Item, select action as "Process Received Payments".
- Navigate to Financial Account "Cuento de Banco" Transaction tab.
- Create New record select the previously created payment in the selector, save record and process it.
- Post the transaction and check that it is successful.
- Unpost and re-post the document and check that it is successful.

C ] Add a transaction in Financial Account
- Access "General Ledger Configuration" window and "General Accounts" tab. Configure both accounting schemas with "Suspense Balancing Use" unmarked
- Navigate to Financial Account "Cuento de Banco" Transaction tab.
- Create New Record, select Transaction Type "Withdrawal", G/L Item "Sueldos y salarios", Amount = 10000, Process and Post the transaction.
- Check that Posting is successful.

(0078668)
hgbot   
2015-07-06 12:05   
Repository: erp/devel/pi
Changeset: 2cb16178b888c5ac391874ac17a4efb655aac788
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Thu Jul 02 22:07:27 2015 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/2cb16178b888c5ac391874ac17a4efb655aac788 [^]

Fixes Issue 30273:"Not Balance" error received when posting a transaction
(although suspense balancing is not needed)

Fix takes into account the payment's sign (payment in/out).

---
M src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
---
(0078671)
vmromanos   
2015-07-06 12:06   
Code review + testing OK
(0079472)
hudsonbot   
2015-08-20 23:16   
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/8c91718397a5 [^]
Maturity status: Test