Don't halt accounting with AverageCostingNegativeQtyException

Description

For some reason the average costing qty doesn't always end up correctly. To prevent the average costing to run wild in cases when the qty goes below zero an exception called AverageCostingNegativeQtyException has been created.

This exception is helpful when finding errors, but it's not at all helpful to the user who just wants the accounting to be done.

A suggestion is to remove these exceptions and just silently (or logging) adjust qty to zero when the qty would go below zero (which we know is wrong).

Suggested solution:

https://bitbucket.org/dantam/idempiere-gaap/commits/c5801ea9e55726ccaf2d7b7e0cf06fb00d5d0bb2

Environment

None

Activity

Carlos Ruiz 
August 22, 2020 at 8:18 PM

Closing as potential idea, however this requires discussion as probably it can affect negatively the costing - the exception was added because when arriving to negative inventories in average costing methods can create big issues that are really hard to solve later.

Patch is broken as bitbucket closed mercurial repositories.

Incomplete

Details

Assignee

Reporter

Original estimate

Time tracking

No time logged1h remaining

Components

Affects versions

Priority

Created December 6, 2015 at 5:45 PM
Updated October 2, 2020 at 4:14 PM
Resolved August 22, 2020 at 8:18 PM