Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027856Openbravo ERP04. Warehouse managementpublic2014-10-14 10:112014-12-30 23:22
aferraz 
umartirena 
normalminoralways
closedfixed 
30Professional Appliance
pi 
 
Core
No
0027856: Cost Adjustment Lines line numbers are sometimes not properly created
Cost Adjustment Lines line numbers are sometimes not properly created
In "QA Testing" client:

Create a new Product named "Costing DDD" for Spain organization.
Go to Price tab and select "Purchase" price list. Then, enter a unit/list price of 25 €

Go to Purchase Order window and create a new order for Spain organization and product "Costing DDD", order date 14-10-2014.
Enter 580 units. Book the order. Let's say this is order 800064.

Go to Purchase Invoice window and create a new invoice for Spain organization and invoice date 19-10-2014. Click Create Lines From and select order 800064. Complete the invoice and post it. Let's say this is invoice 10000082.
Realize that the value posted to the ledger is 14,500.00 (580 units * 25 €/unit)

Go to Goods Receipt window and create a new receipt dated on 24-10-2014. Select invoice 10000082 and enter 80 units. Complete. Let's say this is receipt 10000104.

Navigate to Process Request window and run "Costing Background process". This will allow you to post the receipts.

Go to receipt window and post the receipt 10000104.
Realize that the value posted to the ledger is 2,000.00 (80 units * 25 €/unit)

Go to Purchase Invoice window and select the invoice 10000082. Click Unpost, check Delete accounting entry and click OK. Click Reactivate and OK. Update Invoice Line net unit price from 25€ to 20€. Complete the invoice and post it.
Realize that the value posted to the ledger is 11,600.00 (580 units * 20 €/unit)

Go to Goods Receipt window and create a new receipt dated on 29-10-2014. Select invoice 10000082 and enter 500 units. Complete. Let's say this is receipt 10000105.

Navigate to Process Request window and run "Costing Background process". This will allow you to post the receipts.

Go to receipt window and post the receipt 10000105.
Realize that the value posted to the ledger is 12,500.00 (500 units * 25 €/unit)

Navigate to Process Request window and run "Price Correction Background".

Navigate to Cost Adjustment window, search the last created record and realize it has two lines (sort them by Inventory Transaction ascending):

- line 1 points to receipt 10000104

- line 2 points to receipt 10000105

Realize that both lines have Line No. "10".
No tags attached.
png CostingDDD.png (202,591) 2014-10-14 10:11
https://issues.openbravo.com/file_download.php?file_id=7356&type=bug
png
Issue History
2014-10-14 10:11aferrazNew Issue
2014-10-14 10:11aferrazAssigned To => eduardo_Argal
2014-10-14 10:11aferrazFile Added: CostingDDD.png
2014-10-14 10:11aferrazModules => Core
2014-10-14 10:11aferrazTriggers an Emergency Pack => No
2014-10-15 14:16hgbotCheckin
2014-10-15 14:16hgbotNote Added: 0070965
2014-10-15 14:16hgbotStatusnew => resolved
2014-10-15 14:16hgbotResolutionopen => fixed
2014-10-15 14:16hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/81d5a6670d7fea6e79258072b319cca210dee384 [^]
2014-10-15 14:19umartirenaNote Added: 0070966
2014-10-16 14:08psanjuanAssigned Toeduardo_Argal => umartirena
2014-10-16 14:30psanjuanNote Added: 0070993
2014-10-16 14:30psanjuanStatusresolved => closed
2014-10-16 14:30psanjuanNote Edited: 0070993bug_revision_view_page.php?bugnote_id=0070993#r6819
2014-12-30 23:22hudsonbotCheckin
2014-12-30 23:22hudsonbotNote Added: 0072937

Notes
(0070965)
hgbot   
2014-10-15 14:16   
Repository: erp/devel/pi
Changeset: 81d5a6670d7fea6e79258072b319cca210dee384
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Wed Oct 15 14:15:47 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/81d5a6670d7fea6e79258072b319cca210dee384 [^]

Fixes bug 27856: Cost Adjustment Lines line numbers are not properly created

---
M src/org/openbravo/costing/PriceDifferenceProcess.java
---
(0070966)
umartirena   
2014-10-15 14:19   
In order to test this fix with the described steps above the preference "Enable automatic Price Difference Corrections" has to be disabled.
(0070993)
psanjuan   
2014-10-16 14:30   
Verified with preference disabled.
Only one cost adjustment is created with two lines. Line Nº is ok (10-20)

Verified with preference enabled.
Two cost adjustments are created each one having one line.

(0072937)
hudsonbot   
2014-12-30 23:22   
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