Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0012250Openbravo ERP09. Financial managementpublic2010-02-12 17:192010-03-10 18:30
networkb 
dalsasua 
immediatemajoralways
closedfixed 
5
2.50MP11 
2.50MP122.50MP12 
Core
No
0012250: The posting process on the Matched Invoices window does not work properly.
The posting process on the Matched Invoices window does not work properly.
If the invoice is created using a purchasing list price in a foreign currency
the posting process does not convert the amount to the system currency.
Besides one of the gl journal uses an incorrect account. (the proper account should be "fixed assets" defined on product category accounting tab instead of expenses account used)
Using a application with EURO as system currency (an standar application with sample data):
-Create conversion rate from EUR to USD with multiplier rate 1.5
-Create a conersion rate from USD to EUR with divide rate 1.5
-Create a price list for purchasing in USD
-Create a new product. Add a price using the created pricelist in USD with price 150. Add a cost to the product.
-Create a new Purchase Order using the pricelist in USD created previously.
-Create a line with the product created. Qty=1, price=150 tax=exempt.
-Complete the order.
-Execute the process "pending goods receipt" to create a receipt for the order created in a previous step.
-Complete and post the receipt. (to be able to post the receipt you should activate the m_inout table for posting, and add a cost to the product used. The cost in EUR is 100)
*See the receipt.png file from the attached compressed file
-Create a purchase invoice using the partner used on the order and on the receipt. Use also the price list in USD.
-Use the create lines from to select the line of the shipment created on a previous step.
-Complete and post the invoice.
*See the invoice.png file from the attached compressed file
-Finally go to the Matched Invoices window and select the entry for the invoice created.
-Post it.
*See the matchinvoice.png file from the attached compressed file
In red appears the account that is not correct. It should be the
the 350 account that is used in the gl_journal shown after post the receipt.
In blue is the row that is incorrect. This is because the amount has not converted from USD to EUR.

The DocMatchInv.java and DocMatchinv_data.xsql files does not do any conversion.
No tags attached.
zip files.zip (45,254) 2010-02-12 17:19
https://issues.openbravo.com/file_download.php?file_id=2207&type=bug
Issue History
2010-02-12 17:19networkbNew Issue
2010-02-12 17:19networkbAssigned To => dalsasua
2010-02-12 17:19networkbFile Added: files.zip
2010-02-12 18:04dalsasuaSeveritycritical => major
2010-02-12 18:06dalsasuaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=24#r24
2010-02-12 18:19dalsasuaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=25#r25
2010-02-15 11:58dalsasuaStatusnew => scheduled
2010-02-15 11:58dalsasuaNote Added: 0024263
2010-02-15 11:58dalsasuafix_in_branch => pi
2010-02-15 11:59dalsasuaNote Edited: 0024263bug_revision_view_page.php?bugnote_id=0024263#r33
2010-02-15 16:02hgbotCheckin
2010-02-15 16:02hgbotNote Added: 0024275
2010-02-15 16:02hgbotStatusscheduled => resolved
2010-02-15 16:02hgbotResolutionopen => fixed
2010-02-15 16:02hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/dc25d171ca9529b04710cd11fa0c78c00b07a819 [^]
2010-02-18 00:30hudsonbotCheckin
2010-02-18 00:30hudsonbotNote Added: 0024518
2010-02-18 12:52sureshbabuNote Added: 0024589
2010-02-18 12:52sureshbabuStatusresolved => closed
2010-02-18 12:52sureshbabuFixed in Version => 2.50MP12
2010-02-19 00:01anonymoussf_bug_id0 =>
2010-03-10 18:30anonymoussf_bug_id => 2968060

Notes
(0024263)
dalsasua   
2010-02-15 11:58   
(edited on: 2010-02-15 11:59)
After having a look to the whole process, and to the code, I founded the issue with the currency conversion, and this is going to be fixed in following hours.

About the account to use, actual behavior is the desired one: use goods receipts as a perpetual inventory method. If user wants to use another account, can implement easily an accounting template.

(0024275)
hgbot   
2010-02-15 16:02   
Repository: erp/devel/pi
Changeset: dc25d171ca9529b04710cd11fa0c78c00b07a819
Author: David Alsasua <david.alsasua <at> openbravo.com>
Date: Mon Feb 15 16:02:58 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/dc25d171ca9529b04710cd11fa0c78c00b07a819 [^]

fixes issue 12250. getConvertedAmount is now used in DocMatchInv.java

---
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/erpCommon/ad_forms/DocMatchInv.java
M src/org/openbravo/erpCommon/ad_forms/DocMatchInv_data.xsql
---
(0024518)
hudsonbot   
2010-02-18 00:30   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/dc25d171ca95 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/7c1b489fb0a0 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.16459.obx [^]
(0024589)
sureshbabu   
2010-02-18 12:52   
Tested