Skip to content

Enhancement: Optional multi-installment QR Bill generation for invoices with payment terms #7

@SYSINFRACH

Description

@SYSINFRACH

Hi Christoph 👋

First of all, thank you for the excellent update — the new structured address type S implementation works perfectly with UBS validation.

I’d like to propose a small enhancement that could benefit Swiss ERPNext users who issue invoices with installment-based payment terms (payment_schedule in ERPNext).

Currently, swiss_accounting_software generates one QR Bill per invoice, which is correct for standard invoices.
However, ERPNext allows defining multiple due dates and partial amounts through payment terms.
In these cases, it would make sense to optionally generate multiple QR Bills — one for each installment, since each QR represents a single payment instruction under the SIX/UBS standard.


Expected Behavior

  • If a Sales Invoice contains multiple payment terms (e.g. 3 installments), the app could optionally generate three QR Bills — each with the correct partial amount and due date.
  • If no payment terms are defined, the behavior remains unchanged (one QR Bill).
  • Optionally, the multiple QR PDFs could be combined into one file or attached separately.

Example Use Case

Invoice total: 3’000 CHF
Payment terms:

  • 1’000 CHF due on 01.12.2025
  • 1’000 CHF due on 01.01.2026
  • 1’000 CHF due on 01.02.2026

Expected: Three QR Bills (one per installment) generated automatically from the payment schedule.


Possible Implementation (Conceptually)

  • Add a toggle in Swiss QR Bill Settings:

    “Generate multiple QR Bills if payment terms exist” (default: off)

  • The feature simply loops over the payment_schedule table and creates one QR per entry.

  • This remains fully backward-compatible and does not affect ERPNext core logic.


Benefits

  • 100% compliant with SIX/UBS guidelines (one QR = one payment instruction).
  • Backward-compatible and optional.
  • Supports Swiss businesses offering installment or milestone-based payments.
  • Increases automation and reduces manual splitting of invoices for customers.

Environment

  • ERPNext: 15.
  • Frappe: 15.88.0
  • swiss_accounting_software: 0.0.6 (main, commit aac246f, “new_qr_spec”)
  • Deployment: self-hosted, UBS-validated, Switzerland

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