You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have created a copy of an already existing PDF template and saved it unter var/export/myexport.pdf.twig. I modified it to my needs and this worked pretty well.
Now I want to add custom rounding to the duration field where some math is implied. Since I was not able to achieve this just with twig filters, I would like to add an extra field like duration_rounded and do the calculation of this value in PHP.
What would be the best / update safe way to implement this?
Is it possible to register to a hook or extend the controller?
The text was updated successfully, but these errors were encountered:
Thank you.
I was able to do the rounding in my template with a few set var = <calculation> steps in between.
I'm still wondering, if I would like to add a custom twig filter, would this be possible to be done update proof like it is possible with Invoice templates placed under /var/export/ so that they don't get overwritten?
I have created a copy of an already existing PDF template and saved it unter
var/export/myexport.pdf.twig
. I modified it to my needs and this worked pretty well.Now I want to add custom rounding to the
duration
field where some math is implied. Since I was not able to achieve this just with twig filters, I would like to add an extra field likeduration_rounded
and do the calculation of this value in PHP.What would be the best / update safe way to implement this?
Is it possible to register to a hook or extend the controller?
The text was updated successfully, but these errors were encountered: