Home Forums Support variable pageNumber and pageCount

This topic contains 17 replies, has 4 voices, and was last updated by  Hillel Coren 4 months, 3 weeks ago.

Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #16387

    johann8
    Participant

    I read that Invoice Ninja supports the variable pageNumber and pageCount. I put both variables in the code. Both variable are not supported. What am I doing wrong?
    variable pageNumber and pageCount
    I use the last version of Invoice Ninja.
    Many Thanks
    greetings

    • This topic was modified 9 months, 3 weeks ago by  johann8.
    #16393

    Hillel Coren
    Keymaster

    The variables are designed to be used in the footer text rather than in a custom design,

    #16400

    johann8
    Participant

    Thank you.
    Will they be supported in the future?

    #16401

    Hillel Coren
    Keymaster

    I’m not sure I follow, why not use the variables in the footer?

    #16402

    johann8
    Participant

    They did not work in the footer too.
    Look at the picture below right (opening post)

    #16403

    Hillel Coren
    Keymaster

    Have you tried adding the variables in the default footer at the bottom of Settings > Invoice Settings

    #18611

    fbachofner
    Participant

    Hi Hillel:

    Do the variables need to be escaped somehow? Putting

    $pageNumber of $pageCount

    into the footer (at Settings/Invoice_Settings/Defaults/Invoice_Footer) displays that literal text on the invoice

    Adding $pageNumber and/or $pageCount to the footer code (in custom design mode) doesn’t work either — but that makes sense as PDFMake is a JS program and $pageNumber and $pageCount are, presumably, PHP variables.

    Thanks for any insight.

    This is on 4.5.9, self hosted.

    • This reply was modified 5 months, 3 weeks ago by  fbachofner. Reason: added some clarification about where variables were added
    • This reply was modified 5 months, 3 weeks ago by  fbachofner. Reason: clarify version #
    #18624

    Hillel Coren
    Keymaster

    I’m not sure, it seems to work in my test.

    I just copied the help text on Settings/Invoice_Settings/Defaults/Invoice_Footer into the footer field, clicked save and then saw ‘1 and 1’ on a test invoice.

    #18630

    fbachofner
    Participant

    Hi Hillel:

    You mention: “I just copied the help text on Settings/Invoice_Settings/Defaults/Invoice_Footer”

    Where at Settings/Invoice_Settings/Defaults/Invoice_Footer do you see help text?

    Further up the page (i.e. Settings/Invoice_Settings/Generated_Numbers/Invoice_Number) I see some help text for the “pattern,” but nowhere else do I see relevant help text.

    Pattern requires squiggly brackets (i.e. { and } ) for variables. They work in “pattern” but not in the footer (I had tried that too).

    Thanks in advance for any further insights.

    • This reply was modified 5 months, 3 weeks ago by  fbachofner.
    • This reply was modified 5 months, 3 weeks ago by  fbachofner. Reason: spelling!
    #18633

    Hillel Coren
    Keymaster

    At the bottom of the page on the “Invoice Footer” tab it says:

    Use $pageNumber and $pageCount to display the page information.

    #18707

    fbachofner
    Participant

    Hi Hillel:

    At the bottom of the page on the “Invoice Footer” tab it says:

    Use $pageNumber and $pageCount to display the page information.

    I do not see that at the bottom of my page. I am on 4.5.9 self hosted.

    I have also tried various other permutations including:
    adding squiggly brackets, for example {$pageNumber} of {$pageCount}
    adding periods (some other variables have them), for example $page.Number of $page.Count

    The first shows the literal string, the second displays only the “of” as the variables do not exist with the period . . .

    Thanks in advance for any further insight(s).

    • This reply was modified 5 months, 3 weeks ago by  fbachofner.
    #18711

    Hillel Coren
    Keymaster

    That’s odd, can you post a screenshot?

    #18714

    fbachofner
    Participant

    post a screenshot?

    OK, here you go.

    The linked image shows no help text you describe (under the “Invoice Footer” tab).

    You will also note I have the simplest possible variable entered to test: “$pageNumber” — with no additional text or variables. Even a single variable like this will show the literal text “$pageNumber” (without the quotes) on a generated invoice.

    Thanks in advance for any further help or ideas.

    • This reply was modified 5 months, 3 weeks ago by  fbachofner.
    #18716

    Hillel Coren
    Keymaster

    I’ve checked the code, it looks like this feature requires a white label license.

    Sorry for the trouble!

    #18717

    fbachofner
    Participant

    it looks like this feature requires a white label license

    Aha!!

    Here I thought you and I were speaking different languages. 😉

    Would you consider removing this from the White Label restrictions? For the moment, at least, I don’t mind plugging Invoice Ninja, but my invoices need pagination!

    Also, is there a description somewhere which demonstrates all features affected by White Labeling?

    One more White Label question: when purchased, the Invoice Ninja logo is also removed from I-N generated web pages for clients. Can that logo then be replaced with a different logo?

    • This reply was modified 5 months, 3 weeks ago by  fbachofner.
    #18723

    Hillel Coren
    Keymaster

    I think the problem is this feature conflicts with the branding added to some of the designs. If possible we’ll try to correct it in v2.

    This is the only affected feature that I’m aware of.

    You’d need to modify the code to do it but it’s ok by the license to add your logo in the client portal, we plan to support it natively with v2.

    #19750

    Mikhoul
    Participant

    I was also looking for how to add the pagination of the footers because the variables did not work.

    Until this is repaired is there a PHP or JS file that I could modify manually so that the footer interprets the pagination variables correctly ?

    Regards ☺️

    • This reply was modified 4 months, 3 weeks ago by  Mikhoul.
    #19753

    Hillel Coren
    Keymaster

    Sorry, this won’t be fixed. The feature requires a white label license.

Viewing 18 posts - 1 through 18 (of 18 total)

You must be logged in to reply to this topic.

Posted in: