Topic: Known side effects of 'allow negative inventory'?

I am looking for a good way to sell products prior to purchase these. In practisch this is often the case (maybe not in B2B, but for retailing I'm sure). 

In the release notes of FrontAccounting v2.2.5 I do see:
•put a heavy warning on marking the checkbox 'allow negative inventory'

Could you please explain what side effects I need to think of?
I've installed the 2.2.5 and indeed in setup with "Allow Negative Inventory" there is the red message "Warning: Checking this will result in incorrect values in General Ledger".

Will it screw up the General Ledger?

I would really appreciate if you can explain the effects and let me know if there are any plans to implement corrective actions?

Re: Known side effects of 'allow negative inventory'?

Im interested in answerst to this topic too.
I want to sell goods when stock is null, in some way that the system inform me and then make a order to a supplier, for this we must enable the scary "allow negative inventory" checkbox

Thank you

Re: Known side effects of 'allow negative inventory'?

As far as I know current inventory valuation algorithm does not behave well when inventory became negative. Ask Joe about this, he is the author of the code.

Janusz

Re: Known side effects of 'allow negative inventory'?

In the GL Inventory, it is not possible to have a negative inventory stock value. This is physical impossible. Just like you cannot have a negative cash. Therefore when the stock is going negative the average material cost is going to be set to 0. First when the value is going into a positive value again, the average material cost is growing again.
When you later buy the stock that is missing, the values will not increase the GL stock inventory before the stock item value is over 0.

You must be avare of that. If you operate with this flag set, you should always check the values when the stock is positive again and make adjustments in the GL.

/Joe

Re: Known side effects of 'allow negative inventory'?

I'm not sure if I completely understand. I will try to summarize and hope you can confirm/deny.

So when the GL inventory amount becomes to zero and another sales invoice will try to move the amount from this GL inventory then this will not take place because it will never go lower than 0.

However I don't understand the wording average material costs. It sounds like you take the average price of all products. So if one product is 1001 euro and the other one 1 euro then you will take 5000 euro?  Or are you refering the the average purchase prices for a particular product? Why don't you use the real material costs?

As a workaround: If I transfer 10000 euro to the GL inventory at the begin of the year. And I return this at the end of the year. Then I make sure it will not go below zero. Am I right that during the year I will not see any negative effects? So I don't need to to check the values and make adjustments in the GL?

Thanks for helping me understanding the situation.

Re: Known side effects of 'allow negative inventory'?

The average material cost is a common way of handling the producs. Other methods are LIFO and FIFO, where LIFO is last in first out and FIFO is first in first out.
Both Oracle and quickBooks are using the Average Material Costs. And we have been looking at how they handle the 'Allow Negative Stock'. There is a possibility to continue with the Average Material Costs during the negative period of stock, but this value is not correct. But when the stock again passes positive values, either with PO or Item adjustments, all the deliveries done during this period will have to be adjusted for correct values.

We will fix it in this way, but it will take a while.

/Joe

7 (edited by shopimport 02/10/2010 08:25:25 am)

Re: Known side effects of 'allow negative inventory'?

From your mail I was thinking how FA could correct the values for deliveries done during the period that the stock is negative.

Problem description:
When stock is <=0 then the calculation of the average material price needs to be estimated. Currently it's set to 0 in FA (v2.2.5).

Idea:
Calculate the estimate purchase price based on the selling price minus the default margin. This margin is already set with the company setup (Add Price from Std Cost). Use this temporarily for the amount to book debet on C.O.G.S. and credit on a new account "Inventory Shortage" or maybe even the existing one "5040 Purchase Price Variant" (or maybe the regular stock account "1510 Inventory"). So now the C.O.G.S. has the best estimate. At the moment the PO or item adjustment is done it should be reversed and then the the real values can be booked. I'm not sure how you can identify the bookings to be reversed, that's why I though about a new account but maybe there is another way to identify?

Is this something you can have a light on and I hope it will contribute to a stabil solution.

Re: Known side effects of 'allow negative inventory'?

We have just fixed it and the CVS Main trunk is updated.
We can not use the proposed approach from the Company Setup, because we don't know if it is filled correctly.
What we do, is almost the same way as they do in Oracle and QuickBooks.
If there is an Average Standard Cost before the stock goes below 0, this is used until we get some better values from PO or Item Adjustments. Then the GL Inventory/COGS are updated in the background.
If you have new items and you want a start value for Standard Cost, then you can set in in Item and Inventory tab, Standard Costs.
You can enter an initial Standard Cost even if there are no stocks there yet.
This has the advance for new items that you get a better estimate for COGS and these values will later be corrected when POs or Item Adjustments are done.

/Joe

9 (edited by shopimport 02/10/2010 10:52:21 pm)

Re: Known side effects of 'allow negative inventory'?

Hi Joe, great to hear you found a solution. I was already digging into it and performed a workaround in the funtion update_average_material_cost() (grn_db.inc) to changes this around line 48:

    elseif ($qoh + $qty <= 0)
        $material_cost = 0;

into

    elseif ($qoh + $qty <= 0)
        $material_cost = $price_in_home_currency;

What do you think of this?

How do you control people to correctly fill in each initial Standard Cost? As this was your argument not to use the company setup Add Price from Std Cost. I looks to me you better request one field for the company instead of the cost price for each product?

Is it save for me to use the CVS version in production or do you advise to wait for the next release?

Re: Known side effects of 'allow negative inventory'?

The sentense you changed has been commented out in the code and gone into a later algorithm, where you can see how the average cost is calculated and also the adjustment when it arrives.

Well, it should work now, but you know, maybe it is safe to wait. I have tested it rigorously, but the developer should maybe not be the main tester.

If you do not enter a temporary Standard Cost for your 0 stock new items, you will not get any COGS values in the GL untill you get a PO or Item Adjustment, because there are no Standard Cost values to fetch. It is, however, corrected in the long run.

/Joe

Re: Known side effects of 'allow negative inventory'?

Thanks a lot for your fast response and clear confirmation, especially the fact that it will correct in the long run when stock gets positive again!

I will wait for the next release after the current 2.2.5 which I'm running now. Looking forward to upgrade :-)