No announcement yet.

PDF/HTML helper ifMultipleOf does not work

  • Filter
  • Time
  • Show
Clear All
new posts

  • PDF/HTML helper ifMultipleOf does not work

    I try to implement the helper mentioned in the title to have a table printed, which breaks the row after three records. It does not work in any possible configuration.
    Here is the thread, where I tried to solve the problem:
    There is also the code I tried. I tried table tags as well as normal HTML table.

    I use the most recent version of espoCRM, PDF engine is TCPDF.
    Nothing in Log-File or console.
    Browsers tried: Chrome, Edge, Firefox on Windows

    In most configuration cases it displays all records in vertical or horizontal without breaking at all. In one configuration it breaks the row but stacks the second row on top of the first.

  • #2
    I move the topic out of Bug Reports category as it does not conform 'How to report a bug' rules.


    • yuri
      yuri commented
      Editing a comment
      ifMultipleOf helper does what it supposed to do. Checks if a % b == 0.

      I think it's not easy to utilize ifMultipleOf with table HTML as they are not that compatible. You would need math operation helper to be able to determine when to close </tr>. We don't have such helper.

      Please do not create bug reports for such issues.
      Last edited by yuri; 07-04-2023, 07:53 AM.

  • #3
    yuri, I think I understand, this calculates a remainder. But for what could this be used in Print to PDF?


    • #4
      The example from the docs is working. Loop over the list with adding new line each {N} iteration.


      • #5
        yuri, yes now I get it. It was my hope to be able to format in any way, but that is not possible. It chains only the pure field content as expected.