Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0037317
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajoralways2017-11-17 09:532018-01-03 12:39
ReporterngarciaView Statuspublic 
Assigned Tononofrancisco 
PriorityurgentResolutionfixedFixed in Version3.0PR18Q1
StatusclosedFix in branchFixed in SCM revision4206e68ea96b
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0037317: Costing Background Process stopped if the same product is produced and consumed in different production run of same work effort

DescriptionCosting Background Process stopped if the same product is produced and consumed in different production run of same work effort
Steps To ReproduceAs group admin role:
   Create three products and set them as Production:
      RawMaterial
      WIP
      Final
   Set a Storage Bin for WIP and Final
   Add a purchase price list to RawMaterial and increase its stock
   Create a Manufacturing Cost Center and version
   Create an Activity and assign the previous Cost Center
   Create a Process Plan and Version
   Add two Operations to it
      Set RawMaterial as P- and WIP as P+ in first operation
      Set WIP as P- and Final as P+ in second operation
   Create a Work Requirement and process it
   Create a Work Effort
   Add two Production Run to it, one for each operation and set Completed Quantity
   Create Standards for both of them
   Validate it
   Launch the Costing Background Process and check the following error message is shown:
      java.lang.IllegalStateException: org.postgresql.util.PSQLException: ERROR: No average cost found for given product and date. Product: WIP, Date:...
TagsNo tags attached.
Attached Files? file icon work-effort.fix [^] (5,877 bytes) 2017-11-21 18:40

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0100706)
nonofrancisco (developer)
2017-11-24 14:59

As group admin role:
* Create three products and set them as Production:
    RawMaterial
    WIP
    Final
  Set a Storage Bin for WIP and Final

* Add a purchase price list to RawMaterial with price 3.00

* Create and complete a Goods Receipt for 5 units of product Raw Material

* Create a Manufacturing Cost Center and version

* Create an Activity and assign the previous Cost Center

* Create a Process Plan and Version
  Add two Operations to it
    Set RawMaterial as P- and WIP as P+ in first operation
    Set WIP as P- and Final as P+ in second operation

* Create a Work Requirement and process it

* Create a Work Effort
  Add two Production Run to it, one for each operation
  Set Completed Quantity
  Create Standards for both of them

* Validate the Work Effort

* Launch the Costing Background Process

* Verify the process completes successfully

* Select Costing tab of product RawMaterial and verify:
  Cost: 3.24
  Quantity: 5
  Total Stock Valuation: 16.2

* Select Costing tab of product WIP and verify there is a line with:
  Cost: 3.24
  Quantity: 1
  Total Stock Valuation: 3.24

* Select Costing tab of product Final and verify:
  Cost: 3.24
  Quantity: 1
  Total Stock Valuation: 3.24
(0100830)
dmiguelez (developer)
2017-11-30 12:34
edited on: 2017-11-30 12:36

As group admin role:
* Create three products and set them as Production:
    RawMaterial
    WIP
    Final
  Set a Storage Bin for WIP and Final

* Add a purchase price list to RawMaterial with price 10.00

* Create and complete a Goods Receipt for 10 units of product Raw Material

* Create a Manufacturing Cost Center and version

* Create an Activity and assign the previous Cost Center

* Create a Process Plan and Version
  Add two Operations to it
    Set RawMaterial as P- (2 units) and WIP as P+ (1 unit) in first operation
    Set WIP as P- (2 units) and Final as P+ (1 unit) in second operation

* Create a Work Requirement and process it

* Create a Work Effort
  Add two Production Run to it, one for each operation
  Set Completed Quantity (2 in the first case, 1 in the second)
  Create Standards for both of them

* Validate the Work Effort

* Launch the Costing Background Process

* Verify the process completes successfully

* Select Costing tab of product RawMaterial and verify:
  Cost: 10
  Quantity: 10
  Total Stock Valuation: 100

* Select Costing tab of product WIP and verify there is a line with:
  Cost: 20
  Quantity: 2
  Total Stock Valuation: 40
* Also, there should be another line, with same starting date and ending date, with no Production related to it and with Organization different from *. This is because this cost has been calculated with the old costing engine code.

* Select Costing tab of product Final and verify:
  Cost: 40
  Quantity: 1
  Total Stock Valuation: 40

(0100831)
dmiguelez (developer)
2017-11-30 12:38

As group admin role:
* Create four products and set them as Production:
    RawMaterial
    WIP1
    WIP2
    Final
  Set a Storage Bin for WIP and Final

* Add a purchase price list to RawMaterial with price 10.00

* Create and complete a Goods Receipt for 10 units of product Raw Material

* Create a Manufacturing Cost Center and version

* Create an Activity and assign the previous Cost Center

* Create a Process Plan and Version
  Add two Operations to it
    Set RawMaterial as P- (1 unit) and WIP1 as P+ (1 unit) in first operation
    Set WIP1 as P- (1 unit) and WIP2 as P+ (1 unit) in second operation
    Set WIP2 as P- (1 unit) and Final as P+ (1 unit) in second operation

* Create a Work Requirement and process it

* Create a Work Effort
  Add three Production Run to it, one for each operation
  Set Completed Quantity
  Create Standards for both of them

* Validate the Work Effort

* Launch the Costing Background Process

* Verify the process completes successfully

* Select Costing tab of product RawMaterial and verify:
  Cost: 10
  Quantity: 10
  Total Stock Valuation: 100

* Select Costing tab of product WIP1 and verify there is a line with:
  Cost: 10
  Quantity: 1
  Total Stock Valuation: 10
* Also, there should be another line, with same starting date and ending date, with no Production related to it and with Organization different from *. This is because this cost has been calculated with the old costing engine code.

* Select Costing tab of product WIP2 and verify there is a line with:
  Cost: 10
  Quantity: 1
  Total Stock Valuation: 10
* Also, there should be another line, with same starting date and ending date, with no Production related to it and with Organization different from *. This is because this cost has been calculated with the old costing engine code.

* Select Costing tab of product Final and verify:
  Cost: 10
  Quantity: 1
  Total Stock Valuation: 10
(0100832)
hgbot (developer)
2017-11-30 12:44

Repository: erp/devel/pi
Changeset: 4206e68ea96bcf6136b62a052c87895fcbd5905f
Author: Nono Carballo <nonofce <at> gmail.com>
Date: Thu Nov 30 10:44:40 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/4206e68ea96bcf6136b62a052c87895fcbd5905f [^]

Fixes issue 37317: Costing Background Process stopped if the same product is
produced and consumed in different production run of same work effort

If the product is not consumed by the same work effort, the costing server will
create/update the cost, otherwise, the cost is updated, to be taken into account
for the production run that consumes it.

This fix is a contribution of Support Team.

---
M src-db/database/model/functions/MA_PRODUCTION_COST.xml
---
(0100833)
dmiguelez (developer)
2017-11-30 12:46

Code Review + Testing Ok
(0101503)
hudsonbot (developer)
2018-01-03 12:39

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/c81e0d3cbab5 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-11-17 09:53 ngarcia New Issue
2017-11-17 09:53 ngarcia Assigned To => Triage Finance
2017-11-17 09:53 ngarcia Modules => Core
2017-11-17 09:53 ngarcia Triggers an Emergency Pack => No
2017-11-17 09:54 ngarcia Issue Monitored: networkb
2017-11-17 14:48 nonofrancisco Assigned To Triage Finance => nonofrancisco
2017-11-17 14:48 nonofrancisco Status new => scheduled
2017-11-21 18:40 ngarcia File Added: work-effort.fix
2017-11-22 10:43 ngarcia Steps to Reproduce Updated View Revisions
2017-11-23 09:53 ngarcia Steps to Reproduce Updated View Revisions
2017-11-24 14:59 nonofrancisco Note Added: 0100706
2017-11-30 12:34 dmiguelez Note Added: 0100830
2017-11-30 12:36 dmiguelez Note Edited: 0100830 View Revisions
2017-11-30 12:38 dmiguelez Note Added: 0100831
2017-11-30 12:44 hgbot Checkin
2017-11-30 12:44 hgbot Note Added: 0100832
2017-11-30 12:44 hgbot Status scheduled => resolved
2017-11-30 12:44 hgbot Resolution open => fixed
2017-11-30 12:44 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4206e68ea96bcf6136b62a052c87895fcbd5905f [^]
2017-11-30 12:46 dmiguelez Review Assigned To => dmiguelez
2017-11-30 12:46 dmiguelez Note Added: 0100833
2017-11-30 12:46 dmiguelez Status resolved => closed
2017-11-30 12:46 dmiguelez Fixed in Version => 3.0PR18Q1
2018-01-03 12:39 hudsonbot Checkin
2018-01-03 12:39 hudsonbot Note Added: 0101503


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker