Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028029Openbravo ERP04. Warehouse managementpublic2014-10-30 13:152014-12-30 23:24
psanjuan 
umartirena 
normalmajoralways
closedfixed 
5
 
 
Core
No
0028029: [Costing] Negative Stock Correction adjustments should NOT be marked as "Unit Cost".
[Costing] Negative Stock Correction adjustments should NOT be marked as "Unit Cost".
In QA Testing creates a product named "Costing V221". In Price tab enter a unit/list price of 15 €

Creates a purchase order dated on 11/10/2014 for 500 units. Check that the price shown is 15 €/unit. Book the order

Creates a purchase order dated on 15/10/2014 for 700 units. Change the price to 12 €/unit. Book the order

Creates a goods receipt dated on 16/10/2014 from the first order of 150 units. Enter a storage bin and complete the receipt.

Run costing background process so cost are calculated therefore receipt can be posted. Value posted is 2250 (150 units *15 €/unit)

Creates a goods shipment dated on 20/10/2014 for 600 units. Complete the shipment.

Run costing background process so cost are calculated therefore shipment can be posted. Value posted is 9000 (600 units *15 €/unit)

Creates a goods receipt dated on 22/10/2014 from the second order. Receipt 500 units.

Run costing background process so cost are calculated therefore receipt can be posted. Value posted is 6000 (500 units * 12 €/unit)

Realize that a negative stock correction cost adjustment has been created for an amount of 1350 (2250-9000+6000+X)/50 = 12

This negative stock correction should not be marked as "Unit Cost" but it is. See image attached.
This negative stock correction should not be marked as "Unit Cost" but it is. See image attached.
No tags attached.
related to defect 0028113 closed umartirena [Costing] wrong negative stock correction adjustment 
png issue_28029.png (97,687) 2014-10-30 13:38
https://issues.openbravo.com/file_download.php?file_id=7450&type=bug
png
Issue History
2014-10-30 13:15psanjuanNew Issue
2014-10-30 13:15psanjuanAssigned To => dmiguelez
2014-10-30 13:15psanjuanModules => Core
2014-10-30 13:15psanjuanTriggers an Emergency Pack => No
2014-10-30 13:37psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6922#r6922
2014-10-30 13:37psanjuanProposed Solution updated
2014-10-30 13:38psanjuanFile Added: issue_28029.png
2014-10-30 13:39psanjuanAssigned Todmiguelez => umartirena
2014-10-30 18:58hgbotCheckin
2014-10-30 18:58hgbotNote Added: 0071283
2014-10-30 18:58hgbotStatusnew => resolved
2014-10-30 18:58hgbotResolutionopen => fixed
2014-10-30 18:58hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5c9fcf65a9af22480c0823b1b9cf25874472e8c6 [^]
2014-11-04 17:56hgbotCheckin
2014-11-04 17:56hgbotNote Added: 0071409
2014-11-06 18:02psanjuanNote Added: 0071469
2014-11-06 18:02psanjuanStatusresolved => closed
2014-11-06 18:06psanjuanRelationship addedrelated to 0028113
2014-12-30 23:23hudsonbotCheckin
2014-12-30 23:23hudsonbotNote Added: 0073005
2014-12-30 23:24hudsonbotCheckin
2014-12-30 23:24hudsonbotNote Added: 0073016

Notes
(0071283)
hgbot   
2014-10-30 18:58   
Repository: erp/devel/pi
Changeset: 5c9fcf65a9af22480c0823b1b9cf25874472e8c6
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Thu Oct 30 18:57:32 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/5c9fcf65a9af22480c0823b1b9cf25874472e8c6 [^]

Fixes issue 28029: Negative Stock Correction adjustments not marked as Unit Cost

---
M src/org/openbravo/costing/CostingServer.java
---
(0071409)
hgbot   
2014-11-04 17:56   
Repository: erp/devel/pi
Changeset: c6389ceb2f1177f9c1a927b9d2a646c8b63ca2ec
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Tue Nov 04 17:55:30 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c6389ceb2f1177f9c1a927b9d2a646c8b63ca2ec [^]

Related to issue 28029: Prevent extra negative stock adjustment line

AverageCostAdjustment it was creating an extra negative stock adjustment line when there was already an adjustment line of negative stock. This was happening on a receipt with previuos stock in negative, that leaves the stock still in negative after the completion of the receipt.
To prevent this and extra check has been added in AverageCostAdjustment: If baseCAL is of type negative stock, then dont add a new negative stock line.

---
M src/org/openbravo/costing/AverageCostAdjustment.java
---
(0071469)
psanjuan   
2014-11-06 18:02   
Verified that negative stock correction are now do not created as Unit Cost.
(0073005)
hudsonbot   
2014-12-30 23:23   
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
(0073016)
hudsonbot   
2014-12-30 23:24   
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