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

Show:
Carlos Ruiz
August 22, 2020, 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.

Assignee

Daniel Tamm

Reporter

Daniel Tamm

Tested By

None

Time tracking

1h

Components

Affects versions

Priority

Minor
Configure