Invoice terms & invoice footer overlapping for white label

Hello,

If invoice terms contents is too long, it will overlap the invoice footer
This seems to only occur to invoices with white label.

I have the same problem. I get 1 invoice on two pages. The terms appear with the values ​​on the second page. Is there any way to correct this?

@david @ben any ideas?

@tobyspr

can you show a screenshot.

@david Here’s mine.

@david @ben

As a side note: Above screen shots show the “Unit Cost” and “Quantity” columns being left aligned, which doesn’t really make a nice table. Just tried; the same is true for the “Tax” column, if present. Can those be made right aligned while you are at it?

@tobyspr

This looks like an overflow issue, you can reduce the font to try and get everything onto a single page.

@xoo

we’ve played around with this and the header text is in the least offensive position for the majority of people. The alignment can be customized with CSS.

@user777

is this the business template?

Yes @david, its the business template.

Hello david! Thank you for helping. Set the font to 5, the smallest and it doesn’t work. The same remains in two pages when the terms are a lot of text. Look for a previous invoice, before buying the whitelabel printing with Phantom JS, if you leave it at 1 page. In system Health it says that I have 439 jobs pending.

@david

Ok, I have played around with this for a bit. I have derived my invoice design from “Plain”, and not looked at any other designs, so I don’t know how this would fit into other designs. But I’d suggest the following change to the “Plain” design:

*** includes.orig       Tue Feb  8 04:41:33 2022
--- includes.test       Thu Mar  3 14:35:59 2022
***************
*** 85,110 ****
      }
  
-     [data-ref="table"] > thead {
-         text-align: left;
-     }
- 
      [data-ref="table"] > thead > tr > th {
          padding: 1rem;
          background-color: #e6e6e6;
      }
  
!     [data-ref="table"] > thead > tr > th:last-child {
!         text-align: right;
      }
  
      [data-ref="table"] > tbody > tr > td {
          border-bottom: 1px solid #e6e6e6;
          padding: 1rem;
      }
  
!     [data-ref="table"] > tbody > tr > td:last-child {
!         text-align: right;
      }
  
      #table-totals {
          page-break-inside: avoid;
--- 99,131 ----
      }
  
      [data-ref="table"] > thead > tr > th {
          padding: 1rem;
          background-color: #e6e6e6;
+         text-align: right;
      }
  
!     [data-ref="table"] > thead > tr > th:nth-child(1) {
!         text-align: $dir_text_align;
      }
  
+     [data-ref="table"] > thead > tr > th:nth-child(2) {
+         text-align: $dir_text_align;
+     }
+ 
      [data-ref="table"] > tbody > tr > td {
          border-bottom: 1px solid #e6e6e6;
          padding: 1rem;
+         vertical-align: top;
+         text-align: right;
      }
  
!     [data-ref="table"] > tbody > tr > td:nth-child(1) {
!         text-align: $dir_text_align;
      }
  
+     [data-ref="table"] > tbody > tr > td:nth-child(2) {
+         text-align: $dir_text_align;
+     }
+ 
      #table-totals {
          page-break-inside: avoid;
***************
*** 127,131 ****
  
      #table-totals>.totals-table-right-side>*> :nth-child(1) {
!         text-align: "$dir_text_align";
          margin-top: .75rem;
          padding-left: 7px;
--- 148,152 ----
  
      #table-totals>.totals-table-right-side>*> :nth-child(1) {
!         text-align: $dir_text_align;
          margin-top: .75rem;
          padding-left: 7px;

This makes all but the first two table columns right-aligned to make nice number columns, first two columns follow $dir_text_align. Also includes a vertical-align: top; to make table rows top-aligned improving readability for lines with long, multi-line descriptions. (This was also requested by another user a while back.)

While playing with it I also discovered text-align: "$dir_text_align"; doesn’t work, the quotes need to go. So fixed this as well. This needs to be fixed in other designs too.

1 Like

@tobyspr

If you have 439 jobs pending:

  • What result do you get from
    egrep QUEUE_CONNECTION /path/to/invoiceninja/.env
  • How do your cron jobs look like?

Hi Xoo, Thank you!

Sorry, I’m not very knowledgeable about what you’re asking. It would have to tell me step by step what I should do to show the results.

BROADCAST_DRIVER=log
LOG_CHANNEL=stack
CACHE_DRIVER=file
QUEUE_CONNECTION=database
SESSION_DRIVER=file
SESSION_LIFETIME=120

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=log
MAIL_HOST=
MAIL_PORT=
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=
MAIL_FROM_NAME=

POSTMARK_API_TOKEN=
REQUIRE_HTTPS=true

GOOGLE_MAPS_API_KEY=
ERROR_EMAIL=
TRUSTED_PROXIES=

NINJA_ENVIRONMENT=selfhost
PDF_GENERATOR=hosted_ninja
NINJA_HOSTED_PDF=true

PHANTOMJS_PDF_GENERATION=false
PHANTOMJS_KEY=“a-demo-key-with-low-quota-per-ip-address”
PHANTOMJS_SECRET=“secret”

UPDATE_SECRET=secret

@tobyspr

QUEUE_CONNECTION=database means you are trying to use the queue, but the huge number of pending jobs tells me that doesn’t work as it should. Can you tell how your cron job(s) are set? (Or are you seeing a red triangle in the bottom left corner telling you to set up cron?)

It would perhaps be a good idea to seek some Linux help here.

@xoo

thanks for the reference of $dir_text_align, this is fixed in the next release

ninja

I think everything is back to normal.

The invoices continue to appear on two pages when there is enough text in the terms field. In any case, I would have to add them manually with Adobe Acrobat. Thank you very much for all the help!