Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0026844Openbravo ERP05. Production managementpublic2014-06-11 16:222014-08-19 20:18
ngarcia 
rafaroda 
urgentmajoralways
closedfixed 
5
 
3.0PR14Q4pi 
AtulOpenbravo
Core
No
0026844: Standard cost is not taken into account for not stocked products consumed in a work effort
Standard cost is not taken into account for not stocked products consumed in a work effort
As group admin role:
   Create a product and set it as:
      Production: Y
      Stocked: N
   Assign a cost to it:
      Cost Type: Standard
      Cost
      Starting date: today
      Ending Date: 31-12-9999
      Manual: Y
      Permanent: Y
   Assign a Storage Bin in the Manufacturing tab
   Create a Manufacturing Cost Center
   Create an Activity and assign that Cost Center
   Create a Process Plan, Version and Operation
   Add the previously created product as P- and another product as P+
   Assign the previously created Activity
   Create a Work Requirement for the Process Plan
   Process it and create a Work Effort
   Check the Cost Center Version has been assigned in the Production Run (assign it if not)
   Validate it
   Run the Costing Background process and check the following error is raised:
      "java.lang.IllegalStateException: org.postgresql.util.PSQLException: ERROR: No average cost found for given product and date..."
   If you change the Cost Type to Average in the Product - Costing tab, the cost will be calculated correctly
      
No tags attached.
Issue History
2014-06-11 16:22ngarciaNew Issue
2014-06-11 16:22ngarciaAssigned To => jonalegriaesarte
2014-06-11 16:22ngarciaModules => Core
2014-06-11 16:22ngarciaResolution time => 1405375200
2014-06-11 16:22ngarciaTriggers an Emergency Pack => No
2014-06-11 18:24jonalegriaesarteAssigned Tojonalegriaesarte => pramakrishnan
2014-06-16 12:48jonalegriaesarteTarget VersionPR14Q3 => PR14Q4
2014-07-28 11:22ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6187#r6187
2014-07-28 11:22ngarciaIssue Monitored: networkb
2014-07-28 12:08ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6192#r6192
2014-07-28 12:40rafarodaStatusnew => scheduled
2014-07-28 12:40rafarodaAssigned Topramakrishnan => rafaroda
2014-07-28 12:40rafarodafix_in_branch => pi
2014-08-07 15:24rafarodaNote Added: 0069116
2014-08-15 08:42hgbotCheckin
2014-08-15 08:42hgbotNote Added: 0069384
2014-08-15 08:42hgbotStatusscheduled => resolved
2014-08-15 08:42hgbotResolutionopen => fixed
2014-08-15 08:42hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f042a64ea3c70ce56eb9ec2c69bb5dbd4e2e77c5 [^]
2014-08-18 01:58hudsonbotCheckin
2014-08-18 01:58hudsonbotNote Added: 0069451
2014-08-19 20:18AtulOpenbravoReview Assigned To => AtulOpenbravo
2014-08-19 20:18AtulOpenbravoNote Added: 0069527
2014-08-19 20:18AtulOpenbravoStatusresolved => closed
2014-08-19 20:18AtulOpenbravoFixed in Version => pi

Notes
(0069116)
rafaroda   
2014-08-07 15:24   
Selection of the costing method in MA_PRODUCTION_COST procedure will be the following.

If costing logic is NOT migrated to the newest version:
* Look for Average or Standard Cost: c.COSTTYPE IN ('AV','ST') AND v_iscostmigrated = 'N'

If costing logic is migrated to the newest version:
* If product is item and is stocked, select Average: CASE WHEN (SELECT COUNT(1) FROM M_PRODUCT WHERE M_PRODUCT_ID = ppl.M_PRODUCT_ID AND PRODUCTTYPE = 'I' AND ISSTOCKED = 'Y') > 0 THEN 'AVA'
* Else, select Standard: ELSE 'STA'
(0069384)
hgbot   
2014-08-15 08:42   
Repository: erp/devel/pi
Changeset: f042a64ea3c70ce56eb9ec2c69bb5dbd4e2e77c5
Author: Rafa Roda Palacios <rafa.roda <at> ubiquads.com>
Date: Thu Aug 14 14:22:55 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f042a64ea3c70ce56eb9ec2c69bb5dbd4e2e77c5 [^]

Fixes issue 26844 Modified MA_PRODUCTION_COST to select the correct costing method in production

---
M src-db/database/model/functions/MA_PRODUCTION_COST.xml
---
(0069451)
hudsonbot   
2014-08-18 01:58   
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/ed428d44c18c [^]
Maturity status: Test
(0069527)
AtulOpenbravo   
2014-08-19 20:18   
Verified