Skip to content

Render Payment Term Description on Sales Invoice for Rebate/Skonto Clarity #37

@Nudelsalad

Description

@Nudelsalad

Hey @barredterra,

First off, thank you for this awesome and incredibly helpful project! It's been a real lifesaver and has solved many headaches.

I've noticed that the sales invoice template doesn't seem to display the payment terms, which can be important for communicating details like early payment discounts (Skonto) to the customer.

The Use Case:

In Germany, it's common to offer a discount if a customer pays an invoice within a specific timeframe (e.g., 2% discount for payment within 10 days). In ERPNext, this is managed via the "Payment Terms" functionality, which generates a payment schedule with a description.

Here is an example of a Payment Term setup in ERPNext:
Image

It would be very beneficial for this payment term description to be visible on the final invoice PDF.

Proposed Solution:

I was able to achieve the desired result by adding a small snippet to the invoice template. I'm not sure if this aligns with your intended implementation, but it works well. The idea is to check for a payment schedule and then print the description of the first entry.

Here is the code I added:

{% if doc.payment_schedule and doc.payment_schedule|length %}
  <p>{{ doc.payment_schedule[0].description }}</p>
{% endif %}

It would be great if this or a similar feature could be integrated into the default template.

Thanks again for your great work!

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