ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Custom html print format string to number


#1

Hi,
I’m customizing my sales invoce print format.

For example my Sales Invoice Id is:

I19-00013

I’d like to print into invoice only the number, so in this case:

13

I’ve done a substring doc.name[5:] , result 00013, how can I convert it into an integer to have as result only the number 13?

Thanks
Alessandro


#2

{{ variable | int %}} within a jinja2 custom print format should work


#3

{{ variable | int }} without ‘%’ works Thanks!!!