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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0045164
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 05. Production managementmajoralways2020-09-30 16:362020-10-26 16:11
ReporterLeyreView Statuspublic 
Assigned Toinigo_lerga 
PrioritynormalResolutionfixedFixed in VersionPR21Q1
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0045164: The cost of a salary category and machine defined for the future is taken into account in a work effort

DescriptionWhen a salary category or machine has an assigned cost with a date higher than the current one, the database function = "MA_PRODUCTION_COST" returns the assigned cost wrong, because it should be the one with a higher date but always below of the current date.

However, the function returns the one with a higher date.
Steps To ReproduceCreate two products: "consumed" and "produced"
Set them as production
Set a storage bin for "produced" product in Product - Manufacturing tab
Set a cost of 1 for "consumed" product in Product - Costing tab
Increase the stock of the "consumed" one (you can use a physical inventory)

Create a Salary Category
Set a Cost to it:
   Cost: 1000
   Cost UOM: per Produced Units
   Starting date: today
Create a Machine:
Set a Cost to it:
   Cost: 1000
   Cost UOM: per Produced Units
   Starting date: a date in the future (06-10-2021)
Create a Manufacting Cost Center and version (valid from today)
Add the Machine to it
Add the Salary Category to it
Go to Salary category and change its Cost starting date to a date in the future (06-10-2021)
Create an Activity and assign the previously created cost center
Create a Process Plan, Version and Operation
Assign the previously created Activity to the Operation
Set a Cost Center Use time
Select Create Standards
Add in I/O products tab the "consumed" product as Product use (P-) and the "produced" product as Product Production (P+)
Create a Work Requirement
Assign the previously created Process Plan
Process it

Create Work Effort
Go to Work Effort and assign the Cost Center Version, Salary Category and Machine
Validate it

Launch the costing background process and check the cost of the salary category and machine has been taken into account for cost calculation and they shouldn't as they are not valid in the current date
Proposed SolutionPlease, see attached file MA_PRODUCTION_COST.diff
TagsNo tags attached.
Attached Filesdiff file icon MA_PRODUCTION_COST.diff [^] (3,422 bytes) 2020-09-30 16:36 [Show Content]
png file icon Before-Fix.png [^] (94,335 bytes) 2020-10-20 10:25


png file icon After-Fix.png [^] (91,866 bytes) 2020-10-20 10:25

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0123480)
hgbot (developer)
2020-10-01 14:02

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/186 [^]
(0123530)
inigo_lerga (reporter)
2020-10-05 12:20

Please attach new proper detailed steps to reproduce this Issue.
(0123795)
inigo_lerga (reporter)
2020-10-20 10:25
edited on: 2020-10-20 10:26

--Test Plan Mantis--
Beforehand, in Preference window, 'Show MRP and Production Fileds' property
must be set to 'Y'.
Openbravo Instance must be activated.
Also, use 'F&B España, S.A' as Organization for all records created.

As the F&B International Group Admin role in Backend:
1º- Go to Process Request window and Unschedule the Costing Background Process.
    Open the record and set the Timing field to 'Run Immediately'

2º- Go to Product window and create a new record with 'CONSUMED' as
    Search Key and Name.
    Check the Production checkbox.
3º- Go to Costing tab and create a new record with Cost Type 'Standard'
    and 1 as Cost.
    Set '01-01-2020' as Starting Date and '06-10-2023' as Ending Date.

4º- Go to Product window and create a new record with 'PRODUCED' as
    Search Key and Name.
    Check the Production checkbox.
5º- Go to Manufacturing tab and create a new record with 'RN-2-0-0' as
    Storage Bin.

6º- Go to Physical Inventory window and create a new record.
7º- Go to Lines tab and create a new Line with 'CONSUMED' as Product,
    'RN-2-0-0' as Storage Bin and 50000 as Quantity Count.
8º- Process the Physical Inventory.

9º- Go to Salary Category window and create a new record with
    'SALARY CATEGORY TEST' as Name.
10º- Go to Cost tab and create a new record with 1000 as Cost, 'per Produced Units'
    as Cost UOM and Today as Starting Date.

11º- Go to Machine window and create a new record with 'MACHINE TEST' as
    Search Key and Name.
12º- Go to Cost tab and create a new record with 1000 as Cost, 'per Produced Units'
    as Cost UOM and '06-10-2021' as Valid From Date.

13º- Go to Manufacturing Cost Center window and create a new record with
    'MANUFACTURING COST CENTER TEST' as Search Key and Name.
14º- Go to Version tab and create a new line with Today as Valid From Date field.
15º- Go to Machine subtab and create a new record with 'MACHINE TEST' in Machine field.
16º- Go to Employee subtab and create a new record with 'SALARY CATEGORY TEST'
    as Salary Category and 1 as Quantity.

17º- Go back to Salary Category window and edit the Starting Date in Cost tab of
    previously created Salary Category.
    Set the Starting Date to '06-10-2021'.

18º- Go to Activity window and create a new record with 'ACTIVITY TEST' as
    Search Key and Name.
    Set 'MANUFACTURING COST CENTER TEST' as Cost Center.

19º- Go to Process Plan window and create a new record with 'PROCESS PLAN TEST' as
    Search Key and Name.
20º- Go to Version tab and create a new line with '01-01-2020' as Starting Date
    and '06-10-2023' as Ending Date.
21º- Go to Operation subtab and create a new record with 'OPERATION TEST' as
    Search Key and Name.
    Set previously created 'ACTIVITY TEST' as Activity.
    Set 5 as Cost Center Use Time.
    Check Create Standards checkbox.
22º- Go to I/O Products subtab and create a new record with 'CONSUMED' as Product
    with 'Product use (P-)' as Production Type and 1 as Quantity.
23º- Create another I/O Products record for 'PRODUCED' product and 'Product Production (P+)'
    as Production Type, with 1 as Quantity.

24º- Go to Work Requirement window and create a new record with 'PROCESS PLAN TEST' as
    Process Plan, '01-01-2020' as Starting Date, '06-10-2023' as Ending Date and 1 as
    Quantity.
    Process Work Requirement.

25º- Go to Work Effort window and create a new record with '8:00:00' as Starting Time
    and '21:00:00' as Ending Time.
26º- Go to Production Run tab and create a new line with previous created Work Requirement
    as WR Phase and 10 as Completed Quantity.
    Set previously created 'MANUFACTURING COST CENTER TEST' as Cost Center Version.
27º- Go to Salary Category subtab and create a new line with 'SALARY CATEGORY TEST' as Salary Category,
    with 1 as Quantity and 1 as Run Time.
28º- Go to Machine subtab and create a new line with 'MACHINE TEST' as Machine.
29º- Go back to Production Run tab and press the Create Standards button.
30º- Validate the Work Effort

31º- Go back to Process Request window and Reschedule the Costing Background Process.

#If you go now to Production Cost Report window and use dates such as 1 month before now
as From Date and 1 month after today as To Date, you can see that now MACHINE TEST's and
SALARY CATEGORY TEST's Real Cost is not taken into account.
Images attached of result before and after the fix for this Issue#

(0123944)
hgbot (developer)
2020-10-26 16:11

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/186 [^]
(0123945)
hgbot (developer)
2020-10-26 16:11

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: fcf5117f6f85c4b52a92476b5840d8d605093bbd
Author: inigo_lerga <inigo.lerga@openbravo.com>
Date: 2020-10-26T10:24:57+01:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/fcf5117f6f85c4b52a92476b5840d8d605093bbd [^]

fixes BUG-45164:Proper date considered in query

Now the function returns the proper assigned cost with
highest date but bellow the current date. Before, the
highest date would be picked with no consideration
for current date.

---
M src-db/database/model/functions/MA_PRODUCTION_COST.xml
---
(0123946)
hgbot (developer)
2020-10-26 16:11

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 157305ea94b5703e76ae62dca8fa618323d861fb
Author: inigo_lerga <inigo.lerga@openbravo.com>
Date: 2020-10-26T12:49:03+01:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/157305ea94b5703e76ae62dca8fa618323d861fb [^]

related to ISSUE-45164: Correction in query proper date

---
M src-db/database/model/functions/MA_PRODUCTION_COST.xml
---

- Issue History
Date Modified Username Field Change
2020-09-30 16:36 Leyre New Issue
2020-09-30 16:36 Leyre Assigned To => Triage Finance
2020-09-30 16:36 Leyre File Added: MA_PRODUCTION_COST.diff
2020-09-30 16:36 Leyre Modules => Core
2020-09-30 16:36 Leyre Resolution time => 1603231200
2020-09-30 16:36 Leyre Triggers an Emergency Pack => No
2020-09-30 16:59 Leyre Steps to Reproduce Updated View Revisions
2020-10-01 11:04 inigo_lerga Assigned To Triage Finance => inigo_lerga
2020-10-01 11:04 inigo_lerga Status new => scheduled
2020-10-01 14:02 hgbot Note Added: 0123480
2020-10-05 12:20 inigo_lerga Note Added: 0123530
2020-10-05 12:20 inigo_lerga Status scheduled => feedback
2020-10-06 17:57 ngarcia Status feedback => scheduled
2020-10-06 17:57 ngarcia Summary Cost calculation => The cost of a salary category and machine defined for the future is taken into account in a work effort
2020-10-06 17:57 ngarcia Description Updated View Revisions
2020-10-06 17:57 ngarcia Steps to Reproduce Updated View Revisions
2020-10-09 10:59 ngarcia Steps to Reproduce Updated View Revisions
2020-10-12 12:52 Practics Issue Monitored: Practics
2020-10-20 10:25 inigo_lerga Note Added: 0123795
2020-10-20 10:25 inigo_lerga File Added: Before-Fix.png
2020-10-20 10:25 inigo_lerga File Added: After-Fix.png
2020-10-20 10:26 inigo_lerga Note Edited: 0123795 View Revisions
2020-10-26 16:11 hgbot Resolution open => fixed
2020-10-26 16:11 hgbot Status scheduled => closed
2020-10-26 16:11 hgbot Note Added: 0123944
2020-10-26 16:11 hgbot Fixed in Version => PR21Q1
2020-10-26 16:11 hgbot Note Added: 0123945
2020-10-26 16:11 hgbot Note Added: 0123946


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker