ERPNext Foundation ERPNext Cloud Chat Blog Discuss Frappé* Donate

How to fetch payment terms description in invoice print format?


#1

Hi all,

I am having problems trying to fetch the description in the payment terms to the invoice print format. Since the description is different for every payment term, it is important for us to get these details automatically in the invoice print. Is there any solution for this?


#2

You can customize the Print Format and add fields as you wish


#3

Yeah I know, but there is no ‘Description’ field for the payment terms present in the print format customization or in the invoice customization form itself.


#4

Just to give an example, this is how I want it to appear at the end of the invoice print.


#5

Is this Payment Terms table included in the Print Format ?


#6

No, only the template name is included which won’t help.


#7

No I mean when try to customize the print format, have you checked the Payment Terms table was included in the Print Format or not.

If not then you can include this description field to appear.


#8

Thanks for the reply. It only shows the description in the table form while I want it to be in a paragraph as shown in the screenshot in my previous post.

I tried using {{ doc.description }} in the html but it won’t work as well.


#9

<p>{{ doc.payment_schedule[0].description or '' }} </p>

does this work for you ?


#10

If you want to use payment terms then use the Terms and Condition doctype.

Every transaction document for purchase and sales has terms field(which is linked to terms and conditions doctype) and text editor(It will populate the description of terms and condition into it automatically when you select the terms field).

Now when you select the terms field then I will automatically update the text editor field .
Same text editor field is by default selected in standard print formats.


#11

Thanks a ton!! This works perfectly fine.


#12

Thanks a lot for the alternative, have tried and it is working as well.


#13