Wrong Product Cost if current qty < 1 and when posting Invoice Price Variances (IPV) or landed costs

Description

Costing method=Average PO

The system updates Product=>Costs=>Current Cost Price INCORRECTLY when posting landed costs and/or invoice price variances (IPV) to inventory if the stock quantity < 1 (e.g. 0.01, 0.01 for products with UOM kilograms) using the following formulae:
o New Current Cost Price = Old Current Cost Price + Landed costs / Current Quantity =>incorrect
o New Current Cost Price = Old Current Cost Price + Invoice Price Variance (IPV) / Current Quantity=>incorrect

For example: if the invoice price variance is USD 500 and the current quantity = 0.01 and the current cost price is USD 10, the system updates the current cost price as follows:

Current Cost Price = USD 10 + USD 500 / 0.01 = 50,010,-- =>incorrect

since customer shipment, customer return etc. transactions seem to always assume a base cost quantity of 1, the formulae to update the current cost price if stock quantity < 1 should be:
o New Current Cost Price = Old Current Cost Price + Landed costs x Current Quantity =>correct
o New Current Cost Price = Old Current Cost Price + Invoice Price Variance (IPV) x Current Quantity=>correct

In the example above, the current cost price should be calculated as follows:
New Current Cost Price = USD 10 + USD 500 x 0.01 = USD 10=>correct

Environment

None

Attachments

2

Activity

Show:

Đậu Xuân Kiên February 5, 2021 at 3:51 AM

I use cost element Avarage PO. This situation I have encountered.

the solution I give:

I change method :

public void setWeightedAverage (BigDecimal amt, BigDecimal qty, boolean IsInternal, String MovementType) in class MCost

Not calculate again with MovementType ='V-' and MovementType = 'C+'.

So I keep the po cost price + landed cost. With case Return to Vendor, will be redundant Landed Cost, use GL Jounal

Michael Powacht August 23, 2020 at 2:13 AM

Thanks Anna.

Anna Fadeeva August 22, 2020 at 7:17 PM

Anna Fadeeva August 22, 2020 at 7:15 PM

In Storage < 1
Purchase Order 0.2 USD10
Invoise 0.2 USD500 , charge USD10

Anna Fadeeva August 22, 2020 at 7:13 PM

Reprodused

Details

Assignee

Reporter

Labels

Tested By

Anna Fadeeva

Components

Affects versions

Priority

Created January 9, 2018 at 4:22 AM
Updated February 5, 2021 at 3:51 AM