1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 00:11:35 +02:00

Only show header on the first page of the PDF

This commit is contained in:
Hillel Coren 2016-01-10 16:31:56 +02:00
parent 08fd14a4c1
commit 36859c8262
2 changed files with 14 additions and 4 deletions

View File

@ -30926,8 +30926,13 @@ function GetPdfMake(invoice, javascript, callback) {
}
}
// only show the footer on the last page
if (invoice.is_pro && key === 'footer') {
// only show the header on the first page
// and the footer on the last page
if (key === 'header') {
return function(page, pages) {
return page === 1 ? val : '';
}
} else if (invoice.is_pro && key === 'footer') {
return function(page, pages) {
return page === pages ? val : '';
}

View File

@ -54,8 +54,13 @@ function GetPdfMake(invoice, javascript, callback) {
}
}
// only show the footer on the last page
if (invoice.is_pro && key === 'footer') {
// only show the header on the first page
// and the footer on the last page
if (key === 'header') {
return function(page, pages) {
return page === 1 ? val : '';
}
} else if (invoice.is_pro && key === 'footer') {
return function(page, pages) {
return page === pages ? val : '';
}