xTuple.com xTupleU Blog & News Customer Support

Synchronize Standard Cost with Actual Cost when using Average Costing Model

Hi Everyone

We use average costing for virtually all of our item sites. “Standard Cost” is almost meaningless to us in our implementation, but it’s used everywhere in xTuple.

I would like to synchronize the standard costs with the actual costs using trigger functions on the itemcost table. When the actual cost updates, so does standard cost, and all of the locations where standard costs are show, they will match the actual. Is this a bad idea?

Similarly, I’d like to automatically roll up actual cost on affected items whenever a costing element changes, but I haven’t thought that one through yet.

Last comment: it should be possible to turn off the “Standard Cost” paradigm in the system so that wherever “Standard” exists, we can see “Actual”, if that makes sense.


My immediate thought is, why not use average costing? My biggest concern with a trigger is that your costs will always be reflective of the LAST cost, not necessarily a true average cost.

Maybe you need something in place to more appropriately determine the average cost? The average costs could then be updated. https://xtupleuniversity.xtuple.com/sites/default/files/refguide/current/adjustInvValue.html

That’s the manual adjustment, but perhaps you could use that model to automate the adjustment. There are plenty of folks in this community that know the costing portion of xTuple better than myself. I’ll be watching the feedback.

If you are using DIST or ENT edition, then there is a trigger on the recv table that updates the actcost when you receive an item, and if you schedule that roll up, it should update the std cost, which I think is used if the avg cost is zero( no qty on hand).

here is the criteria, there is a metric set from Inventory/setup to enable:
IF (fetchMetricBool(‘xwdUpdateActCost’)) THEN
IF (NEW.recv_order_type=‘PO’) THEN
– update actual cost at time of receipt
SELECT costelem_id INTO _costelemid
FROM costelem WHERE costelem_type=‘Material’;
RAISE EXCEPTION ‘xwd._recvTrigger, Material cost element not found’;

Thanks szuke.

We do use average costing, and that’s the problem: the standard cost is what appears on a lot of screens and reports. The actual cost gets updated as the average cost changes, I just want the standard cost to be synchronized with the actual cost. Since there are no transactions done at standard, it is solely an informational field to us.