etendosoftware / etendo_core

Etendo Classic source code
9 stars 10 forks source link

ETP-108: Work Effort with more then 1 P+ with same products generates wrong cost #431

Open juanfunes1996 opened 2 months ago

juanfunes1996 commented 2 months ago

Error's description

Work Effort with more then 1 P+ with same products generates wrong cost

Steps to reproduce the error

Create new Product as raw material Organization : F&B US Search Key : RW001 Name : Raw Material 001 Uom : Kilogram Production : Y Type : Item Stock : Y Weight : 1 Attribute : Lot Number A image

Create new Product as Finished Goods Organization : F&B US Search Key : FG001 Name : Finished Goods 001 Uom : Kilogram Production : Y Type : Item Stock : Y Weight : 1 Attribute : Lot Number B image

Insert New stock for Raw Material 001 using Physical Inventory Raw Material 001, qty : 1000 kg, Cost 1000 image

Indirect Cost Organization : F&B US Name : Indirect Production Cost Cost Type : Production Value : Starting Date : 01-01-2024 Ending Date : 31-12-9999 Cost Uom : per Kilogram Cost : 1 image

Manufacturing Cost Center Organization : F&B US Search Key : Manufacturing Production Cost Name : Manufacturing Production Cost Version : Valid From : 01-01-2024 Indirect Cost : Indirect Cost : Indirect Production Cost image image

Activity Organization : F&B US Search Key : Activity Production Cost Name : Activity Production Cost Cost Center : Manufacturing Production Cost image

Process Plan Search Key : Process Plan 1 Name : Process Plan 1 Version : Starting Date : 01-01-2024 Ending Date : 31-12-9999 Operation : Search Key : Process Plan 1 Name : Process Plan 1 Multiplier :1 Create Standards : Y I/O Products : Raw Material Line : 10 Product : Raw Material 001 Production Type : P- Qty : 1 Finished Goods Line : 20 Product : Finished Goods 001 Production Type : P+ Qty : 0.33 Line : 30 Product : Finished Goods 001 Production Type : P+ Qty : 0.33 Line : 40 Product : Finished Goods 001 Production Type : P+ Qty : 0.33 image image

Work Requirement Organization : F&B US Process Plan : Process Plan 1 Quantity : 1000 Process Work Requirement image

Work Effort Organization : F&B US Completed Qty : 1000 Create Standard Validate Work Effort image

Run Costing Process Post work Effort Journal created : Inventory Asset 1.002.969,99 Inventory Adjustment 1.000.000,00 Inventory Adjustment 1.002.969,99 Inventory Asset 1.000.000,00 image

Finished goods Cost come from : Raw Material Value + Indirect Cost (1.000.000 + (3*990)) =1.002.969,99 multiply by 3 because 3 lines P+ with same product, if we create 8 lines P+ with same product it will multiply by 8 This is wrong Check the product value (Attachment code : PRD001) Product trx cost : 334.232,33

Calculation should be Raw Material Value + Indirect Cost (1.000.000 + 990) =1.000.990,00 Product trx Cost : 333.663,33

Expected behavior

Work effort with more than 1 P+ with the same products generates a right cost

Affected Version

Etendo core: 24.1.8

Solution Design (optional)

Other test cases

Given: When: Then: