Skip to content

SEPA Payment Order does not reliably use Outstanding Amount #353

Description

@PatrickDEissler

Describe the bug

The outstanding amount is not reliably used as default when creating SEPA Payment Orders from Purchase Invoices.

To Reproduce

Steps to reproduce the behavior:

  1. Create a Purchase Invoice (with discounts in the Payment Schedule)
  2. Create a dummy Bank Transaction (that matches the discount amount -> In my case I even had an edge case, where the paid amount was below the discount amoung)
  3. Use Bank Reconciliation Beta to reconcile
  4. Create a SEPA Payment Order from the Purchase Invoice

Result: The grand total was fetched as default payment amount.
Prerequsite is probably: allocate_payment_based_on_payment_terms == 0 in Payment Term Template.
Having that checkbox activated might be the solution for reconciling the Bank Transaction to the Payment Schedule and therefore avoiding the problem in the first. Still, it is a really intransparent process from user's perspective.

Expected Behaviour

The SEPA Payment Order should fetch the real outstanding amount of the Purchase Invoice.

Solution Ideas

A: Quick Fix: Show a message print showing the real residual amounts.
B: Fetch the minimum from: 1) Purchase Invoice: Outstanding Amount , 2) Payment Schedule: Outstanding Amount)
C: Add a property setter allocate_payment_based_on_payment_terms -> Default = 1

I suggest solution B.

Installed Apps (Snippet)

Frappe Framework: v15.101.5 (HEAD)
ERPNext: v15.100.2 (HEAD)
ERPNext Germany: v15.23.0 (HEAD)
PDF on Submit: v15.4.0 (HEAD)
ALYF Banking: v15.32.0 (HEAD)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions