Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035566Openbravo ERP09. Financial managementpublic2017-03-20 10:422017-03-25 01:51
maite 
mcobas 
urgentmajoralways
closedfixed 
5
 
3.0PR17Q2 
aferraz
Core
No
0035566: Currency conversion problem in Matched Inv when product is configured as "Book Using Purchase Order Price"
Purchase Order's currency is not considered when posting a Matched Invoice document referring product defined as "Book Using Purchase Order Price"
0. Define "Telefonia" product ad "Expense type" and "Book Using Purchase Order Price"
1. Create new price list in MXN currency for "España" organization. Create pricelist version. Add "Telefonia" product and set price of 5
2. Register Purchase Order for "España" organization using previous price list, so document's currency is MXN. Add line with "Telefonia" productm qty=1 and process
3. Register Goods REceipt for "España" organization. Run "Create lines from" process and select rpevious order. Process. Try to post receipt and "Document currency cannot be converted to the Accounting Schema currency."
4. Access Conversion Rate window and define conversion between EUR and USD for document's date and rate=2
5. Access Goods REceipt and realize that you are able to post it and accounting entry is generated using rate=2, which IS NOT CORRECT
6. Register Purchase Invoice document for "España" organization, using previous price list, so document's currency is MXN. Run "Create Lines from" process and select previous receipt. Define conversion rate in Exchange Rates tab to be able to process the invoice: MXN to EUR --> rate= 1 and MXN to USD --> rate =3
Process and post invoice. Proper conversion rate will be used
7. Access Matched Invoice window and filter by previous invoice or receipt documentno. Post matched invoice and realize that rate=2 is used, which IS NOT CORRECT (as this is rate defined between EUR and USD but not between MXN and USD)
No tags attached.
related to defect 0035499 closed mcobas Currency conversion problem when product is configured as "Book Using Purchase Order Price" 
Issue History
2017-03-20 10:42maiteNew Issue
2017-03-20 10:42maiteAssigned To => Triage Finance
2017-03-20 10:42maiteModules => Core
2017-03-20 10:42maiteResolution time => 1491170400
2017-03-20 10:42maiteTriggers an Emergency Pack => No
2017-03-20 10:43maiteRelationship addedrelated to 0035499
2017-03-20 10:43maiteIssue Monitored: networkb
2017-03-20 19:27markmm82Assigned ToTriage Finance => mcobas
2017-03-20 19:34mcobasStatusnew => scheduled
2017-03-23 15:49mcobasNote Added: 0095537
2017-03-23 17:38hgbotCheckin
2017-03-23 17:38hgbotNote Added: 0095542
2017-03-23 17:38hgbotStatusscheduled => resolved
2017-03-23 17:38hgbotResolutionopen => fixed
2017-03-23 17:38hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c58496414ce7fa4c112a1ffe8188f27bf2c0f64e [^]
2017-03-23 17:38hgbotCheckin
2017-03-23 17:38hgbotNote Added: 0095544
2017-03-23 17:40aferrazReview Assigned To => aferraz
2017-03-23 17:40aferrazNote Added: 0095546
2017-03-23 17:40aferrazStatusresolved => closed
2017-03-23 17:40aferrazFixed in Version => 3.0PR17Q2
2017-03-25 01:51hudsonbotCheckin
2017-03-25 01:51hudsonbotNote Added: 0095575
2017-03-25 01:51hudsonbotCheckin
2017-03-25 01:51hudsonbotNote Added: 0095577

Notes
(0095537)
mcobas   
2017-03-23 15:49   
1. Configure "Telefonia" Product as "Expense type" and "Book using Purchase Order price".
2. Create new price list in MXN currency for "España" organization. Create Price List Version.
   2.1. Add "Telefonia" product and set price of 5.
3. Create Purchase Order for "España" organization using previous price list.
   3.1. Add line with "Telefonia" productm qty=1 and process.
4. Register Goods Receipt for "España" organization.
   4.1. Run "Create lines from" process and select previous order. Process.
   4.2. Run "Post" process.
   4.3. Notice that a message is show: "Document currency cannot be converted to the Accounting Schema currency.".
5. Access Conversion Rate window and define conversion between EUR and USD for document's date and rate=2.
6. Access to the previous Goods Receipt and run "Post" process.
   6.1. Notice that a message is show: "Document currency cannot be converted to the Accounting Schema currency.".
7. Access Conversion Rate window and define conversion between MXN and USD for document's date and rate=2.
8. Access to the previous Goods Receipt and run "Post" process.
9. Notice that open a new screen named "Journal Entries Report" which shows the ledger entries created for the document.
10. Create conversion rate in Exchange Rates : MXN to EUR --> rate= 1 and MXN to USD --> rate =3
11. Register Purchase Invoice document for "España" organization, using previous price list.
    10.1. Run "Create Lines from" process and select previous receipt.
    10.2. Process and post invoice.
12. Access Matched Invoice window and filter by previous invoice or receipt documentno or "España" organization.
    12.1 Post matched invoice.
    12.2 Go to Accounting tab notice that post is correct and rate defined between MXN and USD
(0095542)
hgbot   
2017-03-23 17:38   
Repository: erp/devel/pi
Changeset: c58496414ce7fa4c112a1ffe8188f27bf2c0f64e
Author: Miguel <martencobasmiguel <at> gmail.com>
Date: Thu Mar 23 10:47:27 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/c58496414ce7fa4c112a1ffe8188f27bf2c0f64e [^]

Fixes issue 35566: Incorrect posting of a Matched Invoice document.

When posting a Matched Invoice document referring product defined
as "Book Using Purchase Order Price", the currency being taken into
account corresponds to the legal entity to which the document belongs instead
of the Purchase Order's currency.

Now when you post a Matched Invoice document referring to a product defined
as "Book Using Purchase Order Price", take into account the Purchase Order's
currency.

---
M src/org/openbravo/erpCommon/ad_forms/DocMatchInv.java
---
(0095544)
hgbot   
2017-03-23 17:38   
Repository: erp/devel/pi
Changeset: b1948c9bd671794f5e2d452694f056d66984b16c
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Mar 23 17:37:27 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/b1948c9bd671794f5e2d452694f056d66984b16c [^]

Related to issue 35499 & Related to issue 35566: Code review improvements

Get currency from order line only in case product is defined as Book Using Purchase Order Price.

---
M src/org/openbravo/erpCommon/ad_forms/DocInOut.java
M src/org/openbravo/erpCommon/ad_forms/DocLineInOut_data.xsql
M src/org/openbravo/erpCommon/ad_forms/DocMatchInv.java
---
(0095546)
aferraz   
2017-03-23 17:40   
Code review + Testing OK
(0095575)
hudsonbot   
2017-03-25 01:51   
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/a169bf5db5fd [^]
Maturity status: Test
(0095577)
hudsonbot   
2017-03-25 01:51   
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/a169bf5db5fd [^]
Maturity status: Test