>>Hi,
>>weighted average
>
>One method would be first to have a count and cost for all items current. Then, as items are added to inventory:
>add 1 to item count
>add item's cost to total cost
>average cost = total cost/ number of items
>
>When items are pulled from inventory:
>Total Cost=Total Cost - Average Cost
>Item Count = Item COunt - Number of items
One thing I've learned about this (my company back home had one of these, both for sale and internal use) is that you never use average cost for anything but display. You always have the amount and total cost. If for any reason a partial amount goes anywhere, it takes with it its share of the total cost. If anything is added, it adds to amount and to total cost. The average is not stored anywhere - and it's not even used in calculations, unless there's an amount of 1, where it equals the cost.
>Each time an item is added top (or pulled from) inventory, the item cost will need to be recomputed.
Not when it is pulled - the so-called average should remain the same. There may be a roundoff error, though, and the value of the pulled vs the value of remaining may differ for a fraction of a cent. Which is the main reason we had TotalCost/Amount in frxes only.