Reset Accounting can't reset documents without fact acct

Description

We found this issue in a customer:

  • The accounting schema flag "Accrual" was unchecked

  • Then all invoices were "posting" no fact acct records - but marked as posted (this is correct, it is how cash based accounting works)

  • Then after fixed the "Accrual" flag we tried to repost all invoices

  • PROBLEM -> Reset accounting was not able to mark as Non-Posted the invoices that didn't have fact acct

Diagnose:
This is because of the UPDATE on FactAcctReset.delete (line 256 with current code)
It has a condition "AND EXISTS (SELECT ...INNER JOIN Fact_Acct fact" - so if the document doesn't have fact acct records cannot be marked as non-posted.

Solution must be towards to change that condition, instead of checking the existence of fact acct records, it must check:

  • when automatic period: check processed, active and dateacct directly, like:
    AND Processed='Y' AND IsActive='Y'
    AND TRUNC(fact.DateAcct) >= p_DateAcct_From
    AND TRUNC(fact.DateAcct) <= p_DateAcct_To

  • when using period control, then it must check procesed, active and that dateacct lands in an open period of the default calendar (this last part is not present in actual code I think)

Regards,

Carlos Ruiz

Environment

None

Activity

Show:

Carlos Ruiz February 12, 2020 at 8:09 PM

Same scenario would happen if order accounting is disabled, and at some point of time we would like to enable it and reset the orders to be posted.

Workaround would be to identify the documents and post them one by one - but it sounds like a lot of work.

Fixed

Details

Assignee

Reporter

Fix versions

Priority

Created October 14, 2016 at 7:46 AM
Updated May 1, 2022 at 1:50 PM
Resolved March 27, 2022 at 2:02 AM