Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0009626Openbravo ERP09. Financial managementpublic2009-06-25 11:232009-07-16 17:55
networkb 
eduardo_Argal 
immediateminoralways
closedfixed 
5
2.40MP3 
pi 
Core
No
0009626: Conversion rate is not applied to witholding when posting cancelled payment from bank statement
A partner has defined a withholding for purchasing invoices.
The official Currency of the Client is, for example, Euros. However, the business partner purchase price list, uses, other currency, for example, USD.

A new purchase is created, for this partner, selecting the witholding.
Complete and post it.

Create a new Bank statement for this payment. Complete it and post it.

Go to cancelled payment (linked to bank statement line) and post it.

It appears a line in the gl journal, with "Suspense Balancing", whos amount is the same that witholding conversion rate.

(See the attached picture)
Create a withholding in Master Data Management > Businness Partner Category > Witholding. Set 10, as rate.

Link this witholding to a business partner (provider), in Master Data Management > Business Partner > Witholding tab.

Go to Master Data Management > Business Partner > Vendor/Credit Tab. Here, link to Purchase Price List. Change its currency to USD.

Go to General Setup > Conversion rate. Generate one from USD to EUR from 01-01-2000 to 01-01-2030. Multiplied by 0.5
Generate other one from EUR to USD (same dates, Multiplied by 2)

Create a new purchase invoice (with lines). Select the business partner, and witholding.
Complete it and post it.

Create a new Bank Statement an includes the invoice. Complete and post it.

Go to its lines, and press "Linked items". Go to its Cancelled payment.

In cancelled payment, to its Header and post it.

The final gl journal is not correct
No tags attached.
depends on backport 0009695 closed eduardo_Argal Conversion rate is not applied to witholding when posting cancelled payment from bank statement 
png Pantallazo-1.png (204,070) 2009-06-25 11:23
https://issues.openbravo.com/file_download.php?file_id=1462&type=bug
png
Issue History
2009-06-25 11:23networkbNew Issue
2009-06-25 11:23networkbAssigned To => rafaroda
2009-06-25 11:23networkbFile Added: Pantallazo-1.png
2009-06-25 15:41williams-tegikIssue Monitored: williams-tegik
2009-06-25 17:29rafarodaNote Added: 0017594
2009-06-25 17:29rafarodaAssigned Torafaroda => eduardo_Argal
2009-06-26 18:28williams-tegikNote Added: 0017624
2009-06-26 18:30williams-tegikNote Added: 0017625
2009-06-26 18:31williams-tegikNote Deleted: 0017624
2009-06-26 18:54williams-tegikNote Added: 0017626
2009-06-29 13:20psarobeStatusnew => scheduled
2009-06-29 13:20psarobefix_in_branch => pi
2009-07-10 21:51hgbotCheckin
2009-07-10 21:51hgbotNote Added: 0018124
2009-07-10 21:51hgbotStatusscheduled => resolved
2009-07-10 21:51hgbotResolutionopen => fixed
2009-07-10 21:51hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/786b89452eb130058f1b542b4602d3919ba69326 [^]
2009-07-16 13:34sureshbabuStatusresolved => closed
2009-07-16 13:34sureshbabuNote Added: 0018315
2009-07-16 13:34sureshbabuFixed in Version => pi
2009-07-16 17:55anonymoussf_bug_id0 => 2822574

Notes
(0017594)
rafaroda   
2009-06-25 17:29   
Eduardo,

Could you please analyze this defect?

Thanks.
(0017625)
williams-tegik   
2009-06-26 18:30   
Sure Rafa,

We have reproduced every time times and this occurs in the purchase process of any invoice in a foreign currency (different from our accounting) that has a retention.. this at the moment of the settlement of the bank statement.

So conditions are:
-Purchase Invoice
-Purchase Invoice in a foreign currency , different from our accounting.
-It has a retention
-Pay the debt from a bank statement
-Post the automatic generated settlement of the bank statement.


What happens
 
When you create the bank statement of that payment and post it, everything seems to work fine, but in the settlement of that bank statement the retention is posted in the foreign currency quantity as local currency... you will see this better in an example.

Premises of example
-Accounting books in MXN, local currency
-To simplify, products will NOT have taxes.
-the Product A bought in the invoice, has a purchase price list of 100 USD.
-We have a retention in the system of 10%
-Conversion rate of purschase invoice date 10 MXN per USD
-Conversion rate of bank statement 10 MXN per USD


Process

1.Purchase Invoice to vendro X of prouct A, whit the retention of 10% applied.
*Scince we are applying a retention of 10%, the payment generated is of 90 USD,
*Accounting as foollows

               Vendor 1000
Porudcts 1000


So far so good, as expected.

2. Process bank statement to process the payment of the 90 USD,from a Bank in local currency MXN (If you process it from a bank in other currency then you will mix this bug to another one already reported, issue 0009532 )
                   
                        Bank 900
Bank in transit 900


So far so good.

3. Then we post the automatic generated settlement

                       Bank in transit 900
                       Retention 10
Vendor 1000
                       Suspense Balancing 90

***Notice that the system is posting the amount in the retention in USD as if they were MXN, .. in other words the system is not converting this 10 USD into 100 MXN, . as expected.

Because of this, the system obviously cannot balance the post.

--------------

This bug and the 0009532 are critical for us and I think for every other customer that purchases or sells in other currency (A lot of companies do.)
(0017626)
williams-tegik   
2009-06-26 18:54   
Please reconsider the severity of this bug, I think it must be MAJOR are not MINOR.

Thank you.
(0018124)
hgbot   
2009-07-10 21:51   
Repository: erp/devel/pi
Changeset: 786b89452eb130058f1b542b4602d3919ba69326
Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com>
Date: Fri Jul 10 21:36:24 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/786b89452eb130058f1b542b4602d3919ba69326 [^]

Fixes bug 0009626: Conversion rate is not applied to witholding when posting cancelled payment from bank statement

---
M src/org/openbravo/erpCommon/ad_forms/DocLinePayment_data.xsql
M src/org/openbravo/erpCommon/ad_forms/DocPayment.java
---
(0018315)
sureshbabu   
2009-07-16 13:34   
Tested as per the steps given in the issue, final posting of cancelled payment from bank statement is balanced