# Repack Valuation Error

When I try to repack items using multiple inputs and multiple outputs, the system calculates the outgoing values based on the purchasing historty and the set valuation method.

However, when we repack, the outgoing value is for items never purchased, and doesnt have valuation, or historial pricing, thus we allow zero valuation in the repack, and expect the system shall update the incoming value based on the weighted average of the outgoing items values distributed between the incoming items values.

What happens is that instead of the above, the system wrongly updates the valation rate per incoming line items to match the total outgoing value which means you will have a redundant incoming value above the outgoing with an amount equal to the outgoing X the number of line items incoming.

Example, I bought 2 dates fruits harvest from 2 farms 1000 KG @ USD 2.5 and 1000 KG @ 3 USD and Carton 5KG Boxes at 0.50 USD and used these to sort my dates fruits and repackage 3 new items Dates Quality 1 - 5KG Boxes (1200KG), Dates Quality 2 - 5 KG Boxes (500 KG), Dates Quality 3 - 5 KG Boxes (300KG).

Ideally the system shall have an out going value = (1000 X 2.5) + (1000X3) + (400X0.50)= USD 5700 which is done correctly in the system.

The incoming value must be 5700USD/2000KG=USD2.85/KG and thus I will have three incoming items as follows:

Quality 1 = 1200 X 2.85 = 3420

Quality 2 = 500 X 2.85 = 1425

Quality 3 = 300 X 2.85 = 855

Total = 5700 with no stock value differece.

But the system insead works out each line item to equal the total of 5700

Quality 1 = 1200 X 4.75 = 5700

Quality 2 = 500 X 11.4 = 5700

Quality 3 = 300 X 19 = 5700

Total incoming = 17100 with stock difference =11400