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:
- Create a Purchase Invoice (with discounts in the Payment Schedule)
- 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)
- Use Bank Reconciliation Beta to reconcile
- 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)
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:
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 = 1I 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)