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 // only show the header on the first page
if (invoice.is_pro && key === 'footer') { // 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 function(page, pages) {
return page === pages ? val : ''; return page === pages ? val : '';
} }

View File

@ -54,8 +54,13 @@ function GetPdfMake(invoice, javascript, callback) {
} }
} }
// only show the footer on the last page // only show the header on the first page
if (invoice.is_pro && key === 'footer') { // 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 function(page, pages) {
return page === pages ? val : ''; return page === pages ? val : '';
} }