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

Custom POS print format


#1

Hi all

Why custom POS print format doesn’t take int, float,round,slice functions in jinja? is there any other procedure to use it?

I am getting folowing error:
Uncaught TypeError: item.amount.slice is not a function

I need to separate integert and fractionala part of Amount.

Anybody know to resolve this?


#2

The POS print format type is JS, the server side functions will not work.


#3

@nabinhait Thank you so much for the reply!

Since it is of type JS, I tried to seperate the rate and amount fields integer and fractional parts in seperate variable in pos.js file. But when I called in jInja it is not displaying…

Can anybody tell me or give me a hint to show it on print format?
Even {% set some_variable = ‘some data’ %} is not working in POS Print format…

from where do the variable takes values in POS print format?
for example ‘doc.items’ wont work. doc is undefined error . just ‘items’ is enough.!!!

Plz help me somebody…


#4

Hi @Amalendu,

did you ever get around this? I am also struggeling to get a good POS print format, but e.g. would like to print the customer address, … The format works niceliy for backend sales invoices (server side), but not at all as client side (JS)…

Is there a list of available fields? Or any how-to?..


#5

Try this. You can customize it if needed.