Cost calculating at negative balance

Hi All,

Our company allows negative balance for items. Because there’re retail sales too in our company so it’s nature we need negative balance.

I just want to know;

-Which method of which class AX calculates cost of InventTrans.CostAmountPosted field?

-I suppose AX calculates costs of sales from purchases until negative balance. I want to just know how calculates after negative balance? Because we see unmeanable values after negative balance. It just fix after post purchase orders and re-run recalculate of costs. It writes fixes to InventTrans.CostAmountAdjustment field and so costs are seem correct than.

Thank you all,

I cannot tell you the code because I am not a developer, but I can tell you the costing routines skip any item where the inventory balance is negative, it simply adjusts no costs until the inventory is 0 or negative.

I’m not sure that’s true. Because I found this line at UpdateLedgerFinancial method of InventMovement class. That method calculates cost:

if (updateNow.parmFinancial() > 0 || _allowNegative)
{

seem if allowed negative cost is calculating. There are more deeper methods. I have to to some more digging… :slight_smile:

You can look at the cross references of the field and see where the some value is written into that field.

Examples: \Classes\InventUpd_Financial\updateFinancialIssue

\Classes\InventUpd_Financial\updateFinancialReceipt