I fully agree that it's non trivial. It's a combinatorial problem in theory, to find the match that gives the highest overall score. But this is academic musing! In practice, we're not faced with complicated types of scenario and the matcher only has to give a "good" solution, not necessarily the best.

But in any case, it should definitely NOT offer to match all OFX to the same account transaction!
That's just a bug.
Also, it should not try to match an OFX transaction to an already cleared, or reconciled transaction.
That's also a bug.

Jean


On 5/7/2020 2:20 AM, Christopher Lam wrote:
It's very non-trivial. Consider simplified examples:

OFX
02/01/20 DESC $25
04/01/20 DESC $25
06/01/20 DESC $25

Account
01/01/20 DESC $25
03/01/20 DESC $25
03/01/20 DESC $25
05/01/20 DESC $29

They all could match each other. There's always a score that exists between any OFX-split and Account-split. eg the first splits will have a high score, and the last lines will have a low score due to the amount discrepancy. The automatcher should prepare a match list that maximises the "good" matches e.g. 02/01/20(OFX) to 01/01/20(account), and does not attempt matches below an arbitrary threshold e.g. 04/01/20(OFX) to 05/01/20(account).

The answer will lie somewhere in https://en.wikipedia.org/wiki/Matching_(graph_theory) <https://en.wikipedia.org/wiki/Matching_%28graph_theory%29>

C

On Thu, 7 May 2020, 12:46 pm jeanl, <rip...@gmail.com <mailto:rip...@gmail.com>> wrote:

    What about this question?

    On a related note, is it expected that an already-cleared transactions
    should appear in the list of matches, if the "Enable update match
    action"
    option isn't on? It seems that it shouldn't but maybe I don't quite
    understand the match logic...

    Jean



    --
    Sent from:
    http://gnucash.1415818.n4.nabble.com/GnuCash-Dev-f1435356.html
    _______________________________________________
    gnucash-devel mailing list
    gnucash-devel@gnucash.org <mailto:gnucash-devel@gnucash.org>
    https://lists.gnucash.org/mailman/listinfo/gnucash-devel


_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to