PDF/HTML helper ifMultipleOf does not work

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1640

    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: https://forum.espocrm.com/forum/gene...row-with-break
    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.

  • yuri
    Member
    • Mar 2014
    • 8716

    #2
    I move the topic out of Bug Reports category as it does not conform 'How to report a bug' rules.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment


    • 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.
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1640

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

    Comment

    • yuri
      Member
      • Mar 2014
      • 8716

      #4
      The example from the docs is working. Loop over the list with adding new line each {N} iteration.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • shalmaxb
        Senior Member
        • Mar 2015
        • 1640

        #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.

        Comment

        Working...