Skip to content

Two payments of the same invoice in one statement import make the whole import fail #9

Closed

Description

@4ktLuffy

Invoice for 100, then one import with two 100 lines quoting its VS. The second reconcile raises "already reconciled" and nothing from the import is saved. Since Fio pulls the same lines again, I think it would keep failing. Tracking what earlier lines in the batch already took fixes it.

Activity

  1. added a commit that references this issue on Oct 24, 2026
    792f382
  2. Rad0van commented on Oct 24, 2026

    @Rad0van
    Member

    Confirmed and fixed in 792f382 (l10n_cssk_payment_symbols_oca).

    As you found: OCA's create() proposes a counterpart for every line of the batch and only then reconciles them, so both lines were given the invoice's full residual. The second reconcile_bank_line() raised already reconciled, and since that happens inside create(), the whole import was rolled back, on every re-pull.

    The VS pass now tracks what earlier lines of the same import will reconcile, and a line proposes only what's left open:

    • 100 + 100 against a 100 invoice: the first pays it, the second is left for a person (it isn't handed to OCA's own matcher either, which would propose the same item again);
    • 60 + 40: both reconcile, the invoice is paid;
    • 60 + 100: the first reconciles, the second is proposed for the remaining 40 and waits for a person.

    Only a line that will actually be reconciled claims anything. An overpayment that is merely proposed takes nothing from an exact payment later in the same file. The import itself never fails on this any more.

    This is the OCA bridge. The Enterprise bridge (l10n_cssk_payment_symbols_ee) reconciles line by line and re-searches open items each time, so it shouldn't have this problem, but I haven't run it.

  3. added a commit that references this issue on Oct 25, 2026
    8bbd3fc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions