Error message missing - reposting cant be done because fact reconcilation exists

Description

documents (e.g. invoice, payments..etc.) with reconciled accounting facts can’t be - Re-Post (force is same) - When user try to re-post nothing happened - no error message appear. other hand server log include the follow log:

Update or delete on table "fact_acct" violates foreign key constraint "factacct_factreconciliation" / Detail: Key (fact_acct_id)=(1069433) is still referenced from table "fact_reconciliation". [871]

WISH: we need exact error message inform users in GUI (red popup) - the transaction is locked by fact reconcilation

Environment

private demo tested 2.0

Activity

Show:
Nicolas Micoud
July 12, 2018, 2:23 PM

IMHO, the fact reconciliation must be deleted before the posting is deleted.

So when a user wants to repost a document, he should see a message "Impossible to repost ; posting is reconcilied".
Thus he has to delete reconciliation to be able to repost the document.

Carlos Ruiz
July 16, 2018, 1:57 PM

Hi , I haven't tested fact reconciliation, I agree with your advice if the fact reconciliation record can be deleted.

Norbert Bede
August 22, 2020, 7:19 PM

Reproducible in 7.1z.

steps to reproduce/test case

  1. Login to Gardenworld demo

  2. open form Accounting Reconciliation form

  3. select account 12110 - Accounts Receivable, refresh

  4. mark related invoice lines (amt 50.35USD) - process it

  5. open the invoice (customer) DocumentNo: 200000 - open posting form, repost it=> BUG see attached screen

Norbert Bede
August 22, 2020, 7:24 PM

I remember you are working with reconcilation. The question is what is the best solution
A. when period is open then repost and delete reconcilation records automatically - we have done this
B. when period is open disallow to repost - instead show serious translated message - but not sure how we can - “uncreconcile“ accounting fact records in form (do you know feature for this ?)

if B exists, then I suggest make allow configurable by Sysconfig eg. AutomaticReconcilationDelete Y/N.

Wdyt ?

Nicolas Micoud
August 24, 2020, 8:04 AM

Hi,

I would vote for B.

The SysConfig can be added but the workaround is quite easy.
nb: you can delete the reconciliation easily in the "Accounting Fact Reconcilation (manual)", using the "Reset" button. That will delete records in the FactReconciliation table (since https://idempiere.atlassian.net/browse/IDEMPIERE-4133).

I have a usecase similar : In France, we need to execute a process that set a unique number on every FactAcct record (by period).
Once the number is set, the period should NEVER be modified.
To avoid mistake, I made 3 changes (in core) - I can provide patch/PR if you want

Add a boolean method in FactAcct to check if a record from the table has been validated.
=> Could be easily ported to check if the record is present in FactReconciliation table.

This method is called from org.tgi.webui.acct.WAcctViewer.actionRePost()

=> So user can't repost it and he knows why

Another call (I think is not really necessary, is more like a 'just in case...') is done in Doc.post :

Is also done in MFactAcct.deleteEx

=> Is to avoid to delete a record programmatically

Does this help ?

Nicolas

Assignee

Unassigned

Reporter

Norbert Bede

Tested By

None

Components

Priority

Major
Configure