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
The variables are designed to be used in the footer text rather than in a custom design,
Thank you.
Will they be supported in the future?
Iâm not sure I follow, why not use the variables in the footer?
They did not work in the footer too.
Look at the picture below right (opening post)
Have you tried adding the variables in the default footer at the bottom of Settings > Invoice Settings
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.
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.
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.
At the bottom of the page on the âInvoice Footerâ tab it says:
Use $pageNumber and $pageCount to display the page information.
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).
Thatâs odd, can you post a screenshot?
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.
Iâve checked the code, it looks like this feature requires a white label license.
Sorry for the trouble!
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?
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.
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
Sorry, this wonât be fixed. The feature requires a white label license.
Hello there.
I have the latest version of dockerized IN - v5.1.19-C44 with white license.
both variables $pageNumber and $pageCount are not rendered in invoice.
is that know behavior? are there any tricks?