mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Recurring Headers on PDFs (#3624)
* Working on recurring headers and footers * Fixes for isolating headers and footer repeat
This commit is contained in:
parent
79766d6c1c
commit
e3446e906f
@ -737,36 +737,6 @@ trait MakesInvoiceValues
|
||||
$settings = $this->client->getMergedSettings();
|
||||
|
||||
$header_and_footer = '
|
||||
@media print {
|
||||
thead {display: table-header-group;}
|
||||
tfoot {display: table-footer-group;}
|
||||
button {display: none;}
|
||||
body {margin: 0;}
|
||||
}';
|
||||
|
||||
$header = '
|
||||
@media print {
|
||||
thead {display: table-header-group;}
|
||||
button {display: none;}
|
||||
body {margin: 0;}
|
||||
}';
|
||||
|
||||
$footer = '
|
||||
@media print {
|
||||
tfoot {display: table-footer-group;}
|
||||
button {display: none;}
|
||||
body {margin: 0;}
|
||||
}';
|
||||
$css = '';
|
||||
|
||||
if($settings->all_pages_header && $settings->all_pages_footer)
|
||||
$css .= $header_and_footer;
|
||||
elseif($settings->all_pages_header && !$settings->all_pages_footer)
|
||||
$css .= $header;
|
||||
elseif(!$settings->all_pages_header && $settings->all_pages_footer)
|
||||
$css .= $footer;
|
||||
|
||||
$css .= '
|
||||
.header, .header-space {
|
||||
height: 160px;
|
||||
}
|
||||
@ -787,6 +757,60 @@ trait MakesInvoiceValues
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@media print {
|
||||
thead {display: table-header-group;}
|
||||
tfoot {display: table-footer-group;}
|
||||
button {display: none;}
|
||||
body {margin: 0;}
|
||||
}';
|
||||
|
||||
$header = '
|
||||
.header, .header-space {
|
||||
height: 160px;
|
||||
}
|
||||
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 0mm;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@media print {
|
||||
thead {display: table-header-group;}
|
||||
button {display: none;}
|
||||
body {margin: 0;}
|
||||
}';
|
||||
|
||||
$footer = '
|
||||
|
||||
.footer, .footer-space {
|
||||
height: 160px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@media print {
|
||||
tfoot {display: table-footer-group;}
|
||||
button {display: none;}
|
||||
body {margin: 0;}
|
||||
}';
|
||||
$css = '';
|
||||
|
||||
\Log::error($settings->all_pages_header);
|
||||
\Log::error($settings->all_pages_footer);
|
||||
|
||||
if($settings->all_pages_header && $settings->all_pages_footer)
|
||||
$css .= $header_and_footer;
|
||||
elseif($settings->all_pages_header && !$settings->all_pages_footer)
|
||||
$css .= $header;
|
||||
elseif(!$settings->all_pages_header && $settings->all_pages_footer)
|
||||
$css .= $footer;
|
||||
|
||||
$css .= '
|
||||
.page {
|
||||
page-break-after: always;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user