Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028389Openbravo ERP04. Warehouse managementpublic2014-12-11 14:282014-12-30 23:28
psanjuan 
umartirena 
urgentmajoralways
closedfixed 
20Ubuntu 8.04.1
 
 
aferraz
Core
No
0028389: [Costing] Landed Cost Cost posting is not correct in case there is a conversion matching caused by an exchange rate
[Costing] Landed Cost Cost posting is not correct in case there is a conversion matching caused by an exchange rate entered at purchase invoice level.
In QA testing client create a new product named "Costing 28157B". Select a Purchase price list in EUR and enter a unit/list price = 100 eur.

Create another product named "Cost USD". Select a Purchase Price List in USD. Enter a unit/list price = 50 USD.

Go to Landed Cost type window and create a new one related to this product for Spain Org.

Make sure you have a system conversion rate between USD and EUR, let's say = 0.4, in "Conversion Rate" window. And EUR to USD = 2.5

Go to Goods receipt and create a new one for Spain org dated on 12/11/2014. Enter the product, enter an amount = 1 and select an storage bin. Complete the receipt.

Go to process request window and run costing background process.

Go back to the receipt and post it. Realize that the value post is 100.00

Go to Product window and realize that the cost of the product and the cost of the transaction is 100

Go to landed cost window and create a new one for Spain org, dated on 15/11/2014

Navigate to Cost tab and enter landed cost type "Cost USD". Enter an amount = 50. Currency = USD.

Go to Receipt window and select the receipt just created.

Process and post landed cost. Realize that posting is:
D: Product asset 20.00 € (50 USD*0.4)
C: Landed Cost expense account 20.00 € (50 USD*0.4) - this entry with no accounting dimensions

Go to Product window and realize that the cost of the product and the cost of the transaction is now 120 which is correct.

Go to purchase invoice window and create a new one for Spain org, dated on 30/11/2014. Select a USA Vendor.

Go to lines and enter the product "Cost USD", enter qty = 1, price should be equal to 50 USD.
Go to exchange rate tab an enter a new conversion rate = 0.6
Realize that foreign amount is 30 EUR.

Complete and Post the invoice.

In the purchase invoice line click on the process button "Match LC Cost". Select the landed cost and enter a matched amount = 50
Select "Is matching adjusted" and "Process matching" check-boxes.
Press OK/Done.

A new cost adjustment is created for an amount of 25.00 USD that is 10 € (30€-20€) x 2.5 USD/EUR

Go to Product window and realize that the cost of the product and the cost of the transaction is now 130 which is correct.

Go back to landed cost window, tab "Cost", sub-tab "Matched Amount".
There you can see there are two lines:
* one set to "Conversion Matching" = NO for an amount of 50 USD
* another one set to "Conversion Matching" = YES for an amount of 25 USD

Post Landed Cost cost. Realize that the posting shown is:
D: Product Asset 20 €
D: Expense Cost 10 €
C: Expense Cost 20 €
C: Expense Cost 10 €

Above posting is not correct.
C: Expense Cost USD (40 = 100*0.4)
Correct posting should be:

D: Product Asset 10 € - as product asset total value is 120 + 10
D: Expense Cost 20 € - with no accounting dimensions
C: Expense Cost 20 € - with accounting dimensions
C: Expense Cost 10 € - with accounting dimensions
No tags attached.
related to defect 0028157 closed umartirena [Costing] Landed Cost calculation does not take into account exchange rate at purchase invoice (landed cost invoice) level 
Issue History
2014-12-11 14:28psanjuanNew Issue
2014-12-11 14:28psanjuanAssigned To => dmiguelez
2014-12-11 14:28psanjuanModules => Core
2014-12-11 14:28psanjuanTriggers an Emergency Pack => No
2014-12-11 14:29psanjuanRelationship addedrelated to 0028157
2014-12-11 14:30psanjuanAssigned Todmiguelez => malsasua
2014-12-11 14:30psanjuanSummary[Costing] Landed Cost Cost posting is not correct in case there is a conversion matching. => [Costing] Landed Cost Cost posting is not correct in case there is a conversion matching caused by an exchange rate
2014-12-11 14:30psanjuanDescription Updatedbug_revision_view_page.php?rev_id=7250#r7250
2014-12-11 14:42psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7252#r7252
2014-12-11 14:42psanjuanProposed Solution updated
2014-12-16 18:35hgbotCheckin
2014-12-16 18:35hgbotNote Added: 0072571
2014-12-16 18:35hgbotStatusnew => resolved
2014-12-16 18:35hgbotResolutionopen => fixed
2014-12-16 18:35hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c381dcb2af3bffe8f3403dedc880fba399ddb3bb [^]
2014-12-17 16:46SandrahuguetReview Assigned To => umartirena
2014-12-17 17:30umartirenaNote Added: 0072663
2014-12-18 14:12psanjuanNote Added: 0072698
2014-12-18 14:12psanjuanStatusresolved => new
2014-12-18 18:37hgbotCheckin
2014-12-18 18:37hgbotNote Added: 0072710
2014-12-18 18:38umartirenaStatusnew => scheduled
2014-12-18 18:38umartirenaAssigned Tomalsasua => umartirena
2014-12-18 18:38umartirenafix_in_branch => pi
2014-12-18 18:38umartirenaStatusscheduled => resolved
2014-12-18 18:38umartirenaFixed in Version => pi
2014-12-18 18:38umartirenaFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/c381dcb2af3bffe8f3403dedc880fba399ddb3bb [^] => https://code.openbravo.com/erp/devel/pi/rev/52458c20b3c4 [^]
2014-12-19 10:45malsasuaNote Added: 0072724
2014-12-19 10:49SandrahuguetAssigned Toumartirena => malsasua
2014-12-19 10:49Sandrahuguetfix_in_branchpi =>
2014-12-19 11:30psanjuanNote Added: 0072727
2014-12-19 11:31psanjuanStatusresolved => closed
2014-12-19 11:58umartirenaStatusclosed => new
2014-12-19 11:58umartirenaResolutionfixed => open
2014-12-19 11:58umartirenaFixed in Versionpi =>
2014-12-19 12:02hgbotCheckin
2014-12-19 12:02hgbotNote Added: 0072731
2014-12-19 13:08aferrazNote Added: 0072736
2014-12-19 13:09aferrazStatusnew => scheduled
2014-12-19 13:09aferrazAssigned Tomalsasua => umartirena
2014-12-19 13:09aferrazfix_in_branch => pi
2014-12-19 13:09aferrazStatusscheduled => resolved
2014-12-19 13:09aferrazResolutionopen => fixed
2014-12-19 13:09aferrazReview Assigned Toumartirena => aferraz
2014-12-19 13:09aferrazStatusresolved => closed
2014-12-30 23:27hudsonbotCheckin
2014-12-30 23:27hudsonbotNote Added: 0073225
2014-12-30 23:28hudsonbotCheckin
2014-12-30 23:28hudsonbotNote Added: 0073247
2014-12-30 23:28hudsonbotCheckin
2014-12-30 23:28hudsonbotNote Added: 0073249

Notes
(0072571)
hgbot   
2014-12-16 18:35   
Repository: erp/devel/pi
Changeset: c381dcb2af3bffe8f3403dedc880fba399ddb3bb
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Tue Dec 16 18:34:37 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c381dcb2af3bffe8f3403dedc880fba399ddb3bb [^]

fixed issue 28389: the difference amount is calculated adding the amount of all lines

the difference amount between the cost amount and matched amount was wrong calculated when there was more than one line in landed cost cost tab

---
M src/org/openbravo/erpCommon/ad_forms/DocLCCost.java
---
(0072663)
umartirena   
2014-12-17 17:30   
Code Review Done.
(0072698)
psanjuan   
2014-12-18 14:12   
This one is not properly working in case an invoice including an exchange rate is selected in the landed cost window, cost tab.
Once the landed cost document is processed and post, that posting should take into account the exchange rate included in the invoice and not the one set at system level.
(0072710)
hgbot   
2014-12-18 18:37   
Repository: erp/devel/pi
Changeset: 52458c20b3c40e071c3958725d20849dcc9a98eb
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Thu Dec 18 18:36:08 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/52458c20b3c40e071c3958725d20849dcc9a98eb [^]

Related to Issue 28389: Fixed Posting of LC Cost with Invoice Line

While processing a Landed Cost with an Invoice in a Landed Cost Cost it, if the invoice has an exchange rate different from the system, a new Cost Adjustment is created with that difference between the rates. But this difference it was not taking into account while setting the matched amount in Landed Cost Cost, so the Post process it was not working well.

---
M src/org/openbravo/costing/LandedCostProcess.java
---
(0072724)
malsasua   
2014-12-19 10:45   
code review done
(0072727)
psanjuan   
2014-12-19 11:30   
Verified.
(0072731)
hgbot   
2014-12-19 12:02   
Repository: erp/devel/pi
Changeset: f7a3c44536b8c3c17ac0f41f94453c5097d86470
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Fri Dec 19 12:01:16 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/f7a3c44536b8c3c17ac0f41f94453c5097d86470 [^]

Related to bug 28389: If is no diff in match LCC leave LCC amount as matchedAmt

---
M src/org/openbravo/costing/LandedCostProcess.java
---
(0072736)
aferraz   
2014-12-19 13:08   
Code review done and verified.
(0073225)
hudsonbot   
2014-12-30 23:27   
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/6525fe229e06 [^]
Maturity status: Test
(0073247)
hudsonbot   
2014-12-30 23:28   
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/6525fe229e06 [^]
Maturity status: Test
(0073249)
hudsonbot   
2014-12-30 23:28   
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/6525fe229e06 [^]
Maturity status: Test