when CLIENT_ACCOUNTING = Q (Queue), Posting are done later. In this case if Match invoice is reversed before accounting engine executes, it do not able to post original or reversed matched invoice. This accumulate non posted document in queue
PO -> Complete
MR -> Complete
VI -> Complete
MR or Invoice -> Voided (note: original MR or INV is voided before accounting engine execution)
Client Accounting Processor ===> note: pair of matched invoice will not post (manually or via accounting processor) as both has reverse ID reference of each other and no posting founds for referenced document.
In current implementation, there is no way to differentiate between the original document and what is the reversal document and so both document are not getting posted.
To resolve this we can add field IsReversal on document table as discussed in FR-339, so we can change posting logic to post original document as per doc line and not try to retrieve Fact lines from reversed one.
Reference SF Ticket created in Adempiere but looks not implemented yet.
> In current implementation, there is no way to differentiate between the original document and what
> is the reversal document and so both document are not getting posted.
The reversal document has always a Created date greater than the original document - also the _ID is greater, but I think would be safer to check the Created.
Yes we have considered to compare _ID column to decide but looks isReversal flag approach is cleaner and better. We are creating migration script SQL which will set this flag for existing document.
Currently considering to add this for Match PO and Match Invoice as those two do not have document status field and getting stuck during re posting process.
There is no “Void“ on the invoice or material receipt.
When reversing, “Match invoice” is also reversed.
The postings are all working fine.