Adding a custom field to PDF Template

Hey,

I want to add a field created by me in the pdf template, this field it’s service quantity in the line items, it works perfect, in the total, subtotal, etc… But when i’m about to create a pdf template, this field was not there, by coding i can finally see the field quantity service in the pdf template, but it’s not working, i mean i select that field, save the pdf template, and when i open it again, this field it’s not there anymore, it’s been replace by quantity PRODUCT.
Anyone knows what is going on here?

Thanks!

Sorry I forgot to add the file t.t

I fixed that! Now it works.