Merge pull request #6921 from beganovich/desings-table-structure

Desings table structure
This commit is contained in:
David Bomba 2021-10-30 07:42:53 +11:00 committed by GitHub
commit 83d3210bda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 726 additions and 515 deletions

View File

@ -249,6 +249,21 @@
white-space: nowrap; white-space: nowrap;
} }
/** .repeating-header,
.repeating-header-space, **/
.repeating-footer,
.repeating-footer-space {
height: 160px;
}
.repeating-header {
position: fixed;
top: 0;
}
.repeating-footer {
position: fixed;
bottom: 0;
}
/** Useful snippets, uncomment to enable. **/ /** Useful snippets, uncomment to enable. **/
/** Hide company logo **/ /** Hide company logo **/
@ -279,63 +294,75 @@
/** To find out selectors on your own: https://invoiceninja.github.io/docs/custom-fields/#snippets **/ /** To find out selectors on your own: https://invoiceninja.github.io/docs/custom-fields/#snippets **/
</style> </style>
<div id="header"></div> <table>
<thead>
<tr>
<td>
<div class="repeating-header-space">&nbsp;</div>
</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<div id="body">
<div class="header-container">
<img
src="$company.logo"
class="company-logo"
alt="$company.name logo"
/>
<div id="company-details"></div>
<div id="company-address"></div>
</div>
<p class="entity-issued-to">$entity_issued_to_label:</p>
<div class="client-and-entity-wrapper">
<div id="client-details"></div>
<div class="entity-details-wrapper">
<table id="entity-details" cellspacing="0" dir="$dir"></table>
</div>
</div>
<table id="product-table" cellspacing="0" data-ref="table"></table>
<table id="task-table" cellspacing="0" data-ref="table"></table>
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
<div id="table-totals" cellspacing="0"></div>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>
<div class="repeating-footer-space">&nbsp;</div>
</td>
</tr>
</tfoot>
</table>
<div id="body"> <div class="repeating-header" id="header"></div>
<div class="header-container">
<img
src="$company.logo"
class="company-logo"
alt="$company.name logo"
/>
<div id="company-details"></div> <div class="repeating-footer" id="footer">
<div id="company-address"></div>
</div>
<p class="entity-issued-to">$entity_issued_to_label:</p>
<div class="client-and-entity-wrapper">
<div id="client-details"></div>
<div class="entity-details-wrapper">
<table id="entity-details" cellspacing="0" dir="$dir"></table>
</div>
</div>
<table id="product-table" cellspacing="0" data-ref="table"></table>
<table id="task-table" cellspacing="0" data-ref="table"></table>
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
<div id="table-totals" cellspacing="0"></div>
</div>
<div id="footer">
<p data-ref="total_table-footer">$entity_footer</p> <p data-ref="total_table-footer">$entity_footer</p>
<script>
// Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present.
document.addEventListener('DOMContentLoaded', () => {
let tables = [
'product-table', 'task-table', 'delivery-note-table',
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
];
tables.forEach((tableIdentifier) => {
document.getElementById(tableIdentifier).childElementCount === 0
? document.getElementById(tableIdentifier).style.display = 'none'
: '';
});
});
</script>
</div> </div>
<script>
// Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present.
document.addEventListener('DOMContentLoaded', () => {
let tables = [
'product-table', 'task-table', 'delivery-note-table',
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
];
tables.forEach((tableIdentifier) => {
document.getElementById(tableIdentifier).childElementCount === 0
? document.getElementById(tableIdentifier).style.display = 'none'
: '';
});
});
</script>

View File

@ -213,6 +213,21 @@
white-space: nowrap; white-space: nowrap;
} }
/** .repeating-header,
.repeating-header-space, **/
.repeating-footer,
.repeating-footer-space {
height: 160px;
}
.repeating-header {
position: fixed;
top: 0;
}
.repeating-footer {
position: fixed;
bottom: 0;
}
/** Useful snippets, uncomment to enable. **/ /** Useful snippets, uncomment to enable. **/
/** Hide company logo **/ /** Hide company logo **/
@ -243,61 +258,73 @@
/** To find out selectors on your own: https://invoiceninja.github.io/docs/custom-fields/#snippets **/ /** To find out selectors on your own: https://invoiceninja.github.io/docs/custom-fields/#snippets **/
</style> </style>
<div id="header"></div> <table>
<thead>
<tr>
<td>
<div class="repeating-header-space">&nbsp;</div>
</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<div id="body">
<div class="header-container">
<div class="company-logo-container">
<img class="company-logo" src="$company.logo" alt="$company.name logo">
</div>
<div id="company-details"></div>
<div id="company-address"></div>
</div>
<p class="entity-label">$entity_label</p>
<div class="client-and-entity-wrapper">
<div>
<table id="entity-details" cellspacing="0" dir="$dir"></table>
</div>
<div id="client-details"></div>
</div>
<table id="product-table" cellspacing="0" data-ref="table"></table>
<table id="task-table" cellspacing="0" data-ref="table"></table>
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
<div id="table-totals" cellspacing="0"></div>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>
<div class="repeating-footer-space">&nbsp;</div>
</td>
</tr>
</tfoot>
</table>
<div id="body"> <div class="repeating-header" id="header"></div>
<div class="header-container">
<div class="company-logo-container">
<img class="company-logo" src="$company.logo" alt="$company.name logo">
</div>
<div id="company-details"></div> <div class="repeating-footer" id="footer">
<div id="company-address"></div> <p data-ref="total_table-footer">$entity_footer</p>
</div>
<p class="entity-label">$entity_label</p>
<div class="client-and-entity-wrapper">
<div>
<table id="entity-details" cellspacing="0" dir="$dir"></table>
</div>
<div id="client-details"></div>
</div>
<table id="product-table" cellspacing="0" data-ref="table"></table>
<table id="task-table" cellspacing="0" data-ref="table"></table>
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
<div id="table-totals" cellspacing="0"></div>
</div> </div>
<div id="footer"> <script>
<p data-ref="total_table-footer">$entity_footer</p> // Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present.
document.addEventListener('DOMContentLoaded', () => {
let tables = [
'product-table', 'task-table', 'delivery-note-table',
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
];
<script> tables.forEach((tableIdentifier) => {
// Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present. document.getElementById(tableIdentifier).childElementCount === 0
document.addEventListener('DOMContentLoaded', () => { ? document.getElementById(tableIdentifier).style.display = 'none'
let tables = [ : '';
'product-table', 'task-table', 'delivery-note-table',
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
];
tables.forEach((tableIdentifier) => {
document.getElementById(tableIdentifier).childElementCount === 0
? document.getElementById(tableIdentifier).style.display = 'none'
: '';
});
}); });
</script> });
</div> </script>

View File

@ -202,6 +202,21 @@
white-space: nowrap; white-space: nowrap;
} }
/** .repeating-header,
.repeating-header-space, **/
.repeating-footer,
.repeating-footer-space {
height: 160px;
}
.repeating-header {
position: fixed;
top: 0;
}
.repeating-footer {
position: fixed;
bottom: 0;
}
/** Useful snippets, uncomment to enable. **/ /** Useful snippets, uncomment to enable. **/
/** Hide company logo **/ /** Hide company logo **/
@ -232,68 +247,78 @@
/** To find out selectors on your own: https://invoiceninja.github.io/docs/custom-fields/#snippets **/ /** To find out selectors on your own: https://invoiceninja.github.io/docs/custom-fields/#snippets **/
</style> </style>
<table>
<thead>
<tr>
<td>
<div class="repeating-header-space">&nbsp;</div>
</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<div id="body">
<div class="header-wrapper">
<div id="client-details"></div>
<div class="company-info-wrapper">
<div id="company-details"></div>
<div id="company-address"></div>
</div>
<img
class="company-logo"
src="$company.logo"
alt="$company.name logo"
/>
</div>
<div class="entity-label-wrapper">
<h1 class="entity-label">
<span>$entity_label</span>&nbsp;
<span>#$entity_number</span>
</h1>
<table id="entity-details" cellspacing="0" dir="$dir"></table>
</div>
<table id="product-table" cellspacing="0" data-ref="table"></table>
<table id="task-table" cellspacing="0" data-ref="table"></table>
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
<div id="table-totals" cellspacing="0"></div>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>
<div class="repeating-footer-space">&nbsp;</div>
</td>
</tr>
</tfoot>
</table>
<div id="header"></div> <div class="repeating-header" id="header"></div>
<div id="body"> <div class="repeating-footer" id="footer">
<div class="header-wrapper"> <p data-ref="total_table-footer">$entity_footer</p>
<div id="client-details"></div>
<div class="company-info-wrapper">
<div id="company-details"></div>
<div id="company-address"></div>
</div>
<img
class="company-logo"
src="$company.logo"
alt="$company.name logo"
/>
</div>
<div class="entity-label-wrapper">
<h1 class="entity-label">
<span>$entity_label</span>&nbsp;
<span>#$entity_number</span>
</h1>
<table id="entity-details" cellspacing="0" dir="$dir"></table>
</div>
<table id="product-table" cellspacing="0" data-ref="table"></table>
<table id="task-table" cellspacing="0" data-ref="table"></table>
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
<div id="table-totals" cellspacing="0"></div>
</div> </div>
<div id="footer"> <script>
<p data-ref="total_table-footer">$entity_footer</p> // Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present.
document.addEventListener('DOMContentLoaded', () => {
let tables = [
'product-table', 'task-table', 'delivery-note-table',
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
];
<script> tables.forEach((tableIdentifier) => {
// Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present. document.getElementById(tableIdentifier).childElementCount === 0
document.addEventListener('DOMContentLoaded', () => { ? document.getElementById(tableIdentifier).style.display = 'none'
let tables = [ : '';
'product-table', 'task-table', 'delivery-note-table',
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
];
tables.forEach((tableIdentifier) => {
document.getElementById(tableIdentifier).childElementCount === 0
? document.getElementById(tableIdentifier).style.display = 'none'
: '';
});
}); });
</script> });
</div> </script>

View File

@ -210,6 +210,21 @@
white-space: nowrap; white-space: nowrap;
} }
/** .repeating-header,
.repeating-header-space, **/
.repeating-footer,
.repeating-footer-space {
height: 160px;
}
.repeating-header {
position: fixed;
top: 0;
}
.repeating-footer {
position: fixed;
bottom: 0;
}
/** Useful snippets, uncomment to enable. **/ /** Useful snippets, uncomment to enable. **/
/** Hide company logo **/ /** Hide company logo **/
@ -240,71 +255,80 @@
/** To find out selectors on your own: https://invoiceninja.github.io/docs/custom-fields/#snippets **/ /** To find out selectors on your own: https://invoiceninja.github.io/docs/custom-fields/#snippets **/
</style> </style>
<div id="header"></div> <table style="min-width: 100%">
<thead>
<div id="body"> <tr>
<div class="company-logo-wrapper"> <td>
<img class="company-logo" src="$company.logo" alt="$company.name logo"> <div class="repeating-header-space">&nbsp;</div>
</div> </td>
</tr>
<hr class="double-border"> </thead>
<tbody>
<div class="client-entity-wrapper"> <tr>
<div class="wrapper-left-side"> <td>
<div class="text-with-client"> <div id="body">
<h2 class="wrapper-info-text">$to_label</h2> <div class="company-logo-wrapper">
<img class="company-logo" src="$company.logo" alt="$company.name logo">
<div id="client-details"></div> </div>
<hr class="double-border">
<div class="client-entity-wrapper">
<div class="wrapper-left-side">
<div class="text-with-client">
<h2 class="wrapper-info-text">$to_label</h2>
<div id="client-details"></div>
</div>
<div class="company-info">
<h2 class="wrapper-info-text">$from_label</h2>
<div id="company-details"></div>
<div id="company-address"></div>
</div>
</div>
<div class="wrapper-right-side">
<h2 class="wrapper-info-text">$details_label</h2>
<table id="entity-details" cellspacing="0" dir="$dir"></table>
</div>
</div>
<table id="product-table" cellspacing="0" data-ref="table"></table>
<table id="task-table" cellspacing="0" data-ref="table"></table>
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
<div id="table-totals" cellspacing="0"></div>
</div> </div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>
<div class="repeating-footer-space">&nbsp;</div>
</td>
</tr>
</tfoot>
</table>
<div class="company-info"> <div class="repeating-header" id="header"></div>
<h2 class="wrapper-info-text">$from_label</h2>
<div id="company-details"></div>
<div id="company-address"></div>
</div>
</div>
<div class="wrapper-right-side"> <div class="repeating-footer" id="footer">
<h2 class="wrapper-info-text">$details_label</h2> <p data-ref="total_table-footer">$entity_footer</p>
<table id="entity-details" cellspacing="0" dir="$dir"></table>
</div>
</div>
<table id="product-table" cellspacing="0" data-ref="table"></table>
<table id="task-table" cellspacing="0" data-ref="table"></table>
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
<div id="table-totals" cellspacing="0"></div>
</div> </div>
<div id="footer"> <script>
<p data-ref="total_table-footer">$entity_footer</p> // Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present.
document.addEventListener('DOMContentLoaded', () => {
let tables = [
'product-table', 'task-table', 'delivery-note-table',
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
];
<script> tables.forEach((tableIdentifier) => {
// Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present. document.getElementById(tableIdentifier).childElementCount === 0
document.addEventListener('DOMContentLoaded', () => { ? document.getElementById(tableIdentifier).style.display = 'none'
let tables = [ : '';
'product-table', 'task-table', 'delivery-note-table',
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
];
tables.forEach((tableIdentifier) => {
document.getElementById(tableIdentifier).childElementCount === 0
? document.getElementById(tableIdentifier).style.display = 'none'
: '';
});
}); });
</script> });
</div> </script>

View File

@ -227,6 +227,21 @@
white-space: nowrap; white-space: nowrap;
} }
/** .repeating-header,
.repeating-header-space, **/
.repeating-footer,
.repeating-footer-space {
height: 160px;
}
.repeating-header {
position: fixed;
top: 0;
}
.repeating-footer {
position: fixed;
bottom: 0;
}
/** Useful snippets, uncomment to enable. **/ /** Useful snippets, uncomment to enable. **/
/** Hide company logo **/ /** Hide company logo **/
@ -257,102 +272,110 @@
/** To find out selectors on your own: https://invoiceninja.github.io/docs/custom-fields/#snippets **/ /** To find out selectors on your own: https://invoiceninja.github.io/docs/custom-fields/#snippets **/
</style> </style>
<div id="header"></div> <table>
<thead>
<div id="body"> <tr>
<div class="header-wrapper"> <td>
<div class="header-left-side-wrapper"> <div class="repeating-header-space">&nbsp;</div>
<p class="header-text-label">$from_label:</p> </td>
</tr>
<div id="company-details"></div> </thead>
<div id="company-address"></div> <tbody>
</div> <tr>
<td>
<div class="header-right-side-wrapper"> <div id="body">
<div class="header-right-side-wrapper-left"> <div class="header-wrapper">
<p class="header-text-label">$to_label:</p> <div class="header-left-side-wrapper">
<div id="client-details"></div> <p class="header-text-label">$from_label:</p>
<div id="company-details"></div>
<div id="company-address"></div>
</div>
<div class="header-right-side-wrapper">
<div class="header-right-side-wrapper-left">
<p class="header-text-label">$to_label:</p>
<div id="client-details"></div>
</div>
<div class="header-right-side-wrapper-right">
<img
class="company-logo"
src="$company.logo"
alt="$company.name logo"
/>
</div>
</div>
</div>
<h1 class="entity-label">$entity_label</h1>
<div class="entity-details-wrapper">
<div>
<span class="entity-property-label" data-element="entity-details-wrapper-invoice-number-label">
$entity_number_label:
</span>
<span class="entity-property-value">$entity_number</span>
</div>
<div>
<span class="entity-property-label">$date_label:</span>
<span class="entity-property-value">$date</span>
</div>
<div>
<span class="entity-property-label">$payment_due_label:</span>
<span class="entity-property-value">$payment_due</span>
</div>
<div>
<span class="entity-property-label">$amount_due_label:</span>
<span
class="entity-property-value"
data-element="entity-details-wrapper-amount-due"
>$amount_due</span
>
</div>
</div>
<table id="product-table" cellspacing="0" data-ref="table"></table>
<table id="task-table" cellspacing="0" data-ref="table"></table>
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
<div id="table-totals" cellspacing="0"></div>
</div> </div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>
<div class="repeating-footer-space">&nbsp;</div>
</td>
</tr>
</tfoot>
</table>
<div class="header-right-side-wrapper-right"> <div class="repeating-header" id="header"></div>
<img
class="company-logo"
src="$company.logo"
alt="$company.name logo"
/>
</div>
</div>
</div>
<h1 class="entity-label">$entity_label</h1> <div class="repeating-footer" id="footer">
<div class="entity-details-wrapper"> <p data-ref="total_table-footer">$entity_footer</p>
<div>
<span class="entity-property-label" data-element="entity-details-wrapper-invoice-number-label">
$entity_number_label:
</span>
<span class="entity-property-value">$entity_number</span>
</div>
<div>
<span class="entity-property-label">$date_label:</span>
<span class="entity-property-value">$date</span>
</div>
<div>
<span class="entity-property-label">$payment_due_label:</span>
<span class="entity-property-value">$payment_due</span>
</div>
<div>
<span class="entity-property-label">$amount_due_label:</span>
<span
class="entity-property-value"
data-element="entity-details-wrapper-amount-due"
>$amount_due</span
>
</div>
</div>
<table id="product-table" cellspacing="0" data-ref="table"></table>
<table id="task-table" cellspacing="0" data-ref="table"></table>
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
<div id="table-totals" cellspacing="0"></div>
</div> </div>
<div id="footer"> <script>
<p data-ref="total_table-footer">$entity_footer</p> // Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present.
document.addEventListener('DOMContentLoaded', () => {
let tables = [
'product-table', 'task-table', 'delivery-note-table',
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
];
<script> tables.forEach((tableIdentifier) => {
// Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present. document.getElementById(tableIdentifier).childElementCount === 0
document.addEventListener('DOMContentLoaded', () => { ? document.getElementById(tableIdentifier).style.display = 'none'
let tables = [ : '';
'product-table', 'task-table', 'delivery-note-table',
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
];
tables.forEach((tableIdentifier) => {
document.getElementById(tableIdentifier).childElementCount === 0
? document.getElementById(tableIdentifier).style.display = 'none'
: '';
});
// If we have elements in these tables, we can change label to "Statement" & hide entity details.
if (document.querySelectorAll('#statement-payment-table > tbody, #statement-payment-table > tbody, #statement-aging-table-totals > tbody').length > 0) {
document.querySelector('.entity-label').innerText = '$statement_label';
document.querySelector('.entity-details-wrapper').style.display = 'none';
}
}); });
</script>
</div> // If we have elements in these tables, we can change label to "Statement" & hide entity details.
if (document.querySelectorAll('#statement-payment-table > tbody, #statement-payment-table > tbody, #statement-aging-table-totals > tbody').length > 0) {
document.querySelector('.entity-label').innerText = '$statement_label';
document.querySelector('.entity-details-wrapper').style.display = 'none';
}
});
</script>

View File

@ -193,6 +193,21 @@
white-space: nowrap; white-space: nowrap;
} }
/** .repeating-header,
.repeating-header-space, **/
.repeating-footer,
.repeating-footer-space {
height: 160px;
}
.repeating-header {
position: fixed;
top: 0;
}
.repeating-footer {
position: fixed;
bottom: 0;
}
/** Useful snippets, uncomment to enable. **/ /** Useful snippets, uncomment to enable. **/
/** Hide company logo **/ /** Hide company logo **/
@ -223,60 +238,72 @@
/** To find out selectors on your own: https://invoiceninja.github.io/docs/custom-fields/#snippets **/ /** To find out selectors on your own: https://invoiceninja.github.io/docs/custom-fields/#snippets **/
</style> </style>
<div id="header"></div> <table>
<thead>
<tr>
<td>
<div class="repeating-header-space">&nbsp;</div>
</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<div id="body">
<div class="header-wrapper">
<div id="company-details"></div>
<div id="company-address"></div>
<div>
<img
class="company-logo"
src="$company.logo"
alt="$company.name logo"
/>
<table id="entity-details" cellspacing="0" dir="$dir"></table>
</div>
</div>
<div id="client-details"></div>
<table id="product-table" cellspacing="0" data-ref="table"></table>
<table id="task-table" cellspacing="0" data-ref="table"></table>
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
<div id="table-totals" cellspacing="0"></div>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>
<div class="repeating-footer-space">&nbsp;</div>
</td>
</tr>
</tfoot>
</table>
<div id="body"> <div class="repeating-header" id="header"></div>
<div class="header-wrapper">
<div id="company-details"></div>
<div id="company-address"></div>
<div> <div class="repeating-footer" id="footer">
<img <p data-ref="total_table-footer">$entity_footer</p>
class="company-logo"
src="$company.logo"
alt="$company.name logo"
/>
<table id="entity-details" cellspacing="0" dir="$dir"></table>
</div>
</div>
<div id="client-details"></div>
<table id="product-table" cellspacing="0" data-ref="table"></table>
<table id="task-table" cellspacing="0" data-ref="table"></table>
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
<div id="table-totals" cellspacing="0"></div>
</div> </div>
<div id="footer"> <script>
<p data-ref="total_table-footer">$entity_footer</p> // Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present.
document.addEventListener('DOMContentLoaded', () => {
let tables = [
'product-table', 'task-table', 'delivery-note-table',
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
];
<script> tables.forEach((tableIdentifier) => {
// Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present. document.getElementById(tableIdentifier).childElementCount === 0
document.addEventListener('DOMContentLoaded', () => { ? document.getElementById(tableIdentifier).style.display = 'none'
let tables = [ : '';
'product-table', 'task-table', 'delivery-note-table',
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
];
tables.forEach((tableIdentifier) => {
document.getElementById(tableIdentifier).childElementCount === 0
? document.getElementById(tableIdentifier).style.display = 'none'
: '';
});
}); });
</script> });
</div> </script>

View File

@ -26,7 +26,6 @@
} }
.header-wrapper { .header-wrapper {
margin-top: 2rem;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
gap: 20px; gap: 20px;
@ -259,6 +258,24 @@
white-space: nowrap; white-space: nowrap;
} }
.repeating-header,
.repeating-header-space {
height: 50px;
}
.repeating-footer,
.repeating-footer-space {
height: 160px;
}
.repeating-header {
position: fixed;
top: 0;
}
.repeating-footer {
position: fixed;
bottom: 0;
}
/** Useful snippets, uncomment to enable. **/ /** Useful snippets, uncomment to enable. **/
/** Hide company logo **/ /** Hide company logo **/
@ -289,62 +306,76 @@
/** To find out selectors on your own: https://invoiceninja.github.io/docs/custom-fields/#snippets **/ /** To find out selectors on your own: https://invoiceninja.github.io/docs/custom-fields/#snippets **/
</style> </style>
<div id="header"> <table style="min-width: 100%">
<div style="background-color: #00968B"><!-- 1 --></div> <thead>
<div style="background-color: #1D756E"><!-- 2 --></div> <tr>
<div style="background-color: #FCB600"><!-- 3 --></div> <td>
<div style="background-color: #BA932F"><!-- 4 --></div> <div class="repeating-header-space">&nbsp;</div>
<div style="background-color: #A72A4E"><!-- 5 --></div> </td>
<div style="background-color: #E20041"><!-- 6 --></div> </tr>
<div style="background-color: #F8B300"><!-- 7 --></div> </thead>
<div style="background-color: #009B8F"><!-- 8 --></div> <tbody>
</div> <tr>
<td>
<div id="body"> <div id="body">
<div class="header-wrapper"> <div class="header-wrapper">
<div> <div>
<img class="company-logo" src="$company.logo" alt="$company.name logo"> <img class="company-logo" src="$company.logo" alt="$company.name logo">
</div> </div>
<div class="entity-details-wrapper">
<div class="entity-details-wrapper"> <table id="entity-details" cellspacing="0" dir="$dir"></table>
<table id="entity-details" cellspacing="0" dir="$dir"></table> </div>
</div> </div>
</div> <div class="contacts-wrapper">
<div class="contact-wrapper-left-side">
<div class="contacts-wrapper"> <p class="contact-label">$from_label:</p>
<div class="contact-wrapper-left-side"> <div class="company-info">
<p class="contact-label">$from_label:</p> <div id="company-details"></div>
<div class="company-info"> <div id="company-address"></div>
<div id="company-details"></div> </div>
<div id="company-address"></div> </div>
<div class="contact-wrapper-right-side">
<p class="contact-label">$to_label:</p>
<div id="client-details"></div>
</div>
</div>
<table id="product-table" cellspacing="0" data-ref="table"></table>
<table id="task-table" cellspacing="0" data-ref="table"></table>
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
<div id="table-totals" cellspacing="0"></div>
</div> </div>
</div> </td>
</tr>
</tbody>
<tfoot>
<tr>
<td>
<div class="repeating-footer-space">&nbsp;</div>
</td>
</tr>
</tfoot>
</table>
<div class="contact-wrapper-right-side"> <div class="repeating-header">
<p class="contact-label">$to_label:</p> <div id="header">
<div id="client-details"></div> <div style="background-color: #00968B"><!-- 1 --></div>
</div> <div style="background-color: #1D756E"><!-- 2 --></div>
<div style="background-color: #FCB600"><!-- 3 --></div>
<div style="background-color: #BA932F"><!-- 4 --></div>
<div style="background-color: #A72A4E"><!-- 5 --></div>
<div style="background-color: #E20041"><!-- 6 --></div>
<div style="background-color: #F8B300"><!-- 7 --></div>
<div style="background-color: #009B8F"><!-- 8 --></div>
</div> </div>
<table id="product-table" cellspacing="0" data-ref="table"></table>
<table id="task-table" cellspacing="0" data-ref="table"></table>
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
<div id="table-totals" cellspacing="0"></div>
</div> </div>
<div id="footer"> <div class="repeating-footer" id="footer">
<p data-ref="total_table-footer">$entity_footer</p> <p data-ref="total_table-footer">$entity_footer</p>
<div id="footer-colors"> <div id="footer-colors">
@ -357,21 +388,21 @@
<div style="background-color: #F8B300"><!-- 7 --></div> <div style="background-color: #F8B300"><!-- 7 --></div>
<div style="background-color: #009B8F"><!-- 8 --></div> <div style="background-color: #009B8F"><!-- 8 --></div>
</div> </div>
<script>
// Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present.
document.addEventListener('DOMContentLoaded', () => {
let tables = [
'product-table', 'task-table', 'delivery-note-table',
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
];
tables.forEach((tableIdentifier) => {
document.getElementById(tableIdentifier).childElementCount === 0
? document.getElementById(tableIdentifier).style.display = 'none'
: '';
});
});
</script>
</div> </div>
<script>
// Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present.
document.addEventListener('DOMContentLoaded', () => {
let tables = [
'product-table', 'task-table', 'delivery-note-table',
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
];
tables.forEach((tableIdentifier) => {
document.getElementById(tableIdentifier).childElementCount === 0
? document.getElementById(tableIdentifier).style.display = 'none'
: '';
});
});
</script>

View File

@ -232,6 +232,21 @@
white-space: nowrap; white-space: nowrap;
} }
/** .repeating-header,
.repeating-header-space, **/
.repeating-footer,
.repeating-footer-space {
height: 160px;
}
.repeating-header {
position: fixed;
top: 0;
}
.repeating-footer {
position: fixed;
bottom: 0;
}
/** Useful snippets, uncomment to enable. **/ /** Useful snippets, uncomment to enable. **/
/** Hide company logo **/ /** Hide company logo **/
@ -262,86 +277,98 @@
/** To find out selectors on your own: https://invoiceninja.github.io/docs/custom-fields/#snippets **/ /** To find out selectors on your own: https://invoiceninja.github.io/docs/custom-fields/#snippets **/
</style> </style>
<div id="header"></div> <table style="min-width: 100%">
<thead>
<div id="body"> <tr>
<div class="header-wrapper"> <td>
<div class="top-right-side-section"> <div class="repeating-header-space">&nbsp;</div>
<span class="header-invoice-number">$entity_number_label: $entity_number</span> </td>
<span>$date_label: $date</span> </tr>
</div> </thead>
<tbody>
<div class="logo-and-partial-entity-info"> <tr>
<div class="company-logo-wrapper"> <td>
<img class="company-logo" src="$company.logo" <div id="body">
alt="$company.name logo"> <div class="header-wrapper">
<div class="top-right-side-section">
<span class="header-invoice-number">$entity_number_label: $entity_number</span>
<span>$date_label: $date</span>
</div>
<div class="logo-and-partial-entity-info">
<div class="company-logo-wrapper">
<img class="company-logo" src="$company.logo"
alt="$company.name logo">
</div>
<div class="top-right-side-section">
<div dir="$dir">
<span class="header-payment-due-label">$payment_due_label:</span>
<span>$payment_due</span>
</div>
<div dir="$dir">
<span class="header-amount-due-label">$amount_due_label:</span>
<span class="header-amount-due-value">$amount_due</span>
</div>
</div>
</div>
</div>
<div class="hero-section">
<div class="hero-contact-section">
<div class="client-details">
<span class="client-details-to-label">$from_label:</span>
<div id="client-details"></div>
</div>
<div class="company-details">
<span class="client-details-to-label">$to_label:</span>
<div class="company-details-wrapper">
<div id="company-details"></div>
<div id="company-address"></div>
</div>
</div>
</div>
</div>
<div class="body-wrapper">
<table id="product-table" cellspacing="0" data-ref="table"></table>
<table id="task-table" cellspacing="0" data-ref="table"></table>
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
<div id="table-totals" cellspacing="0"></div>
</div>
</div> </div>
<div class="top-right-side-section"> </td>
<div dir="$dir"> </tr>
<span class="header-payment-due-label">$payment_due_label:</span> </tbody>
<span>$payment_due</span> <tfoot>
</div> <tr>
<td>
<div class="repeating-footer-space">&nbsp;</div>
</td>
</tr>
</tfoot>
</table>
<div dir="$dir"> <div class="repeating-header" id="header"></div>
<span class="header-amount-due-label">$amount_due_label:</span>
<span class="header-amount-due-value">$amount_due</span>
</div>
</div>
</div>
</div>
<div class="hero-section"> <div class="repeating-footer" id="footer">
<div class="hero-contact-section"> <p data-ref="total_table-footer">$entity_footer</p>
<div class="client-details">
<span class="client-details-to-label">$from_label:</span>
<div id="client-details"></div>
</div>
<div class="company-details">
<span class="client-details-to-label">$to_label:</span>
<div class="company-details-wrapper">
<div id="company-details"></div>
<div id="company-address"></div>
</div>
</div>
</div>
</div>
<div class="body-wrapper">
<table id="product-table" cellspacing="0" data-ref="table"></table>
<table id="task-table" cellspacing="0" data-ref="table"></table>
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
<div id="table-totals" cellspacing="0"></div>
</div>
</div> </div>
<div id="footer"> <script>
<p data-ref="total_table-footer">$entity_footer</p> // Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present.
document.addEventListener('DOMContentLoaded', () => {
let tables = [
'product-table', 'task-table', 'delivery-note-table',
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
];
<script> tables.forEach((tableIdentifier) => {
// Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present. document.getElementById(tableIdentifier).childElementCount === 0
document.addEventListener('DOMContentLoaded', () => { ? document.getElementById(tableIdentifier).style.display = 'none'
let tables = [ : '';
'product-table', 'task-table', 'delivery-note-table',
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
];
tables.forEach((tableIdentifier) => {
document.getElementById(tableIdentifier).childElementCount === 0
? document.getElementById(tableIdentifier).style.display = 'none'
: '';
});
}); });
</script> });
</div> </script>