[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible bug in IS.pm



Chris Travers wrote:
On 10/10/07, Charley Tiggs <..hidden..> wrote:
1) Create an invoice that's several days old against inventory so that
inventory is used up

2) Create a new invoice against same inventory but don't pay for it yet

3) Attempt to credit (reverse) inventory against the first invoice


I will attempt to replicate this immediately.  The way the current reversing
logic works is that we first try to reverse outstanding short invoices
(which prevents COGS from being calculated when products are ordered), then
we try to reverse purchased goods which have COGS associated.

This means that you must have either:
1)  Unallocated line items for sales invoices
OR
2)  Allocated line items for vendor invoices.

If you have enough reversals that we cannot pull enough records from either
of these sources, you will get that error.  We throw this error because
reversing even more inventory items would create orphaned records which
would probably never get allocated.  If we know when it is required that we
allow such reversals, then we can properly handle them :-).

I don't know how to advise you from a general practice standpoint. All I know is that suddenly, random orders cannot be reversed. All should be allocated so all should be reversible. How can I go about finding records that meet one of the two criteria you mentioned above? I know that vendor invoices are created in only two scenarios:

1) when product is received or sent back to vendor

2) when qty is adjusted either up or down due to a mistake of some kind.

Qty can be positive or negative in either of these situations.

Charley