Hi Team is there any way to display inventory deta...
# advancedpdf
v
Hi Team is there any way to display inventory details in invoice using advanced pdf
d
have you tried using the
inventorydetail
property/field from the
record.item
sequence?
s
It's a string, so if you want to make it look a bit nicer, as per David's answer, inside your
<#list record.item as item>
, try
${item.inventorydetail?replace(") ",")<br/>"}
to insert a line return after each detail
d
I'm looking at my templates, and
inventorydetail
already is delimited by
<br />
?
s
i thought it was a straight string.. might have to double check. It's been a minute
You're correct. it is <br/> delimited already. I was thinking of another template where I made it a table within the cell and split the inventorydetail into an array by
?split("<br />")
I was also manipulating the "available" quantity in the brackets to convert them into the same unit of measure as the order line (ie. each vs bag/38 etc...) natively it shows the Stock Unit quantity
👍 1
v
Thanks I have done the same it's working
Now quantity I am getting as a string and how can I convert as a number
I have tried with ?number etc..
d
what error are you getting when you try
quantity?number
? may have to wrap it in
<#if quantity?has_content></#if>
v
It's from inventory detail quantity after splitting
d
I've had to do a complicated regex match to split out quantity, but our account also has the Advanced Inventory and Bins features enabled. What does your template look like right now for handling inventory detail printing (and maybe an example of the inventory detail text)?