1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 15:13:29 +01:00
invoiceninja/resources/views/pdf-designs/plain.html

397 lines
11 KiB
HTML
Raw Normal View History

<style id="style">
2021-10-27 14:53:46 +02:00
@import url($font_url);
2021-01-14 15:57:14 +01:00
:root {
--primary-color: $primary_color;
--secondary-color: $secondary_color;
--line-height: 1.6;
}
body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
2021-10-27 14:53:46 +02:00
font-family: $font_name, Helvetica, sans-serif;
2023-02-07 13:54:18 +01:00
font-size: $font_size !important;
2021-02-09 16:47:41 +01:00
zoom: 80%;
2021-01-14 15:57:14 +01:00
}
2023-02-22 06:19:51 +01:00
table tr td,
table tr,
th {
2023-02-07 13:54:18 +01:00
font-size: $font_size !important;
}
2022-03-19 02:54:59 +01:00
html {
width: 210mm;
2023-02-22 06:19:51 +01:00
height: 200mm;
2022-03-19 02:54:59 +01:00
}
2021-01-14 15:57:14 +01:00
@page {
2022-03-18 01:55:07 +01:00
margin-left: $global_margin;
margin-right: $global_margin;
margin-top: 0;
margin-bottom: 0;
2022-03-18 23:10:39 +01:00
size: $page_size $page_layout;
2022-03-18 01:55:07 +01:00
}
2021-01-14 15:57:14 +01:00
p {
margin: 0;
padding: 0;
}
.header-wrapper {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
2021-08-17 18:51:20 +02:00
line-height: var(--line-height);
2023-02-25 10:02:35 +01:00
margin-bottom:10px;
2023-02-22 06:19:51 +01:00
}
.client-wrapper{
display: grid;
gap: 10px;
2023-02-25 10:02:35 +01:00
grid-template-columns: 1fr 1fr 1fr;
grid-template-areas: "a b c ";
2023-02-22 06:19:51 +01:00
grid-auto-columns: minmax(0, 1fr);
grid-auto-flow: column;
justify-content:left;
2023-02-26 07:16:41 +01:00
line-height: var(--line-height);
}
2021-05-18 13:14:09 +02:00
.company-logo {
2023-02-22 06:21:37 +01:00
max-width: $company_logo_size;
}
.header-wrapper #company-address {
display: flex;
flex-direction: column;
2021-08-17 18:51:20 +02:00
line-height: var(--line-height);
}
2023-02-25 10:02:35 +01:00
#entity-details {
text-align: left;
width: 100%;
2023-02-26 07:16:41 +01:00
line-height: var(--line-height) !important;
white-space: nowrap;
}
2023-02-25 10:02:35 +01:00
#entity-details>tr,
#entity-details th {
font-weight: normal;
2023-02-26 07:16:41 +01:00
padding-right: 3rem;
line-height: var(--line-height) !important;
}
2023-02-22 06:19:51 +01:00
.header-wrapper #entity-details [data-element='entity-balance-due-label'],
.header-wrapper #entity-details [data-element='entity-balance-due'] {
background-color: #e6e6e6;
}
#client-details {
display: flex;
flex-direction: column;
2023-01-30 12:14:57 +01:00
line-height: var(--line-height);
2023-02-22 06:19:51 +01:00
white-space: nowrap;
2023-01-30 12:14:57 +01:00
}
#shipping-details {
2023-05-23 12:00:36 +02:00
opacity: $show_shipping_address_visibility;
2023-01-30 12:14:57 +01:00
flex-direction: column;
2021-08-17 18:51:20 +02:00
line-height: var(--line-height);
2023-02-22 06:19:51 +01:00
white-space: nowrap;
}
2021-08-24 16:25:01 +02:00
[data-ref="table"] {
2022-03-18 01:55:07 +01:00
margin-top: 1rem;
min-width: 100%;
table-layout: fixed;
overflow-wrap: break-word;
2023-02-25 10:02:35 +01:00
margin-bottom: 5px;
}
.task-time-details {
display: block;
margin-top: 5px;
color: grey;
}
2023-02-22 06:19:51 +01:00
[data-ref="table"]>thead {
text-align: left;
}
2023-02-22 06:19:51 +01:00
[data-ref="table"]>thead>tr>th {
2021-12-18 10:30:53 +01:00
padding: 0.5rem;
background-color: #e6e6e6;
}
2023-02-22 06:19:51 +01:00
[data-ref="table"]>thead>tr>th:last-child {
text-align: right;
}
2023-02-22 06:19:51 +01:00
[data-ref="table"]>tbody>tr>td {
border-bottom: 1px solid #e6e6e6;
2021-12-18 10:30:53 +01:00
padding: 0.75rem;
}
2023-02-22 06:19:51 +01:00
[data-ref="table"]>tbody>tr>td:last-child {
text-align: right;
}
2021-02-09 16:47:41 +01:00
#table-totals {
2021-12-18 10:30:53 +01:00
margin-top: 0rem;
display: grid;
2021-02-09 16:47:41 +01:00
grid-template-columns: 2fr 1fr;
padding-top: .5rem;
2023-02-25 10:02:35 +01:00
padding-left: .5rem;
2021-07-21 14:45:42 +02:00
margin-right: .75rem;
2021-02-09 16:47:41 +01:00
gap: 80px;
2023-02-22 06:19:51 +01:00
page-break-inside: auto;
2022-03-15 13:28:16 +01:00
overflow: visible !important;
2021-02-09 16:47:41 +01:00
}
#table-totals .totals-table-right-side>* {
display: grid;
grid-template-columns: 1fr 1fr;
}
#table-totals>.totals-table-right-side>*> :nth-child(1) {
2022-03-06 08:06:07 +01:00
text-align: $dir_text_align;
2021-12-18 10:30:53 +01:00
margin-top: .25rem;
2021-08-17 18:58:17 +02:00
padding-left: 7px;
2021-07-21 14:45:42 +02:00
}
2023-02-22 06:19:51 +01:00
#table-totals>.totals-table-right-side>*> :not([hidden])~ :not([hidden]) {
2021-07-21 14:45:42 +02:00
--tw-space-y-reverse: 0;
2021-12-18 10:30:53 +01:00
margin-top: calc(.25rem * calc(1 - var(--tw-space-y-reverse)));
margin-bottom: calc(.25rem * var(--tw-space-y-reverse));
2021-02-09 16:47:41 +01:00
}
#table-totals>.totals-table-right-side>*> :nth-child(2) {
text-align: right;
2023-02-25 10:02:35 +01:00
padding-right: 0px;
}
2023-02-22 06:19:51 +01:00
#table-totals>* [data-element='total-table-balance-due-label'],
#table-totals>* [data-element='total-table-balance-due'] {
font-weight: bold;
}
2023-02-22 06:19:51 +01:00
#table-totals>*> :last-child {
text-align: right;
padding-right: 1rem;
}
2021-04-25 15:22:29 +02:00
[data-ref="total_table-footer"] {
padding-left: 1rem
}
2021-05-20 14:55:32 +02:00
#footer {
margin-top: 30px;
}
[data-ref="totals_table-outstanding"] {
color: var(--primary-color)
}
2021-07-29 11:35:13 +02:00
/** Markdown-specific styles. **/
2021-08-24 16:40:28 +02:00
[data-ref="table"] h3 {
2021-07-29 11:35:13 +02:00
font-size: 1rem;
margin-bottom: 0;
}
2021-08-10 14:25:27 +02:00
2021-08-17 18:58:17 +02:00
[data-ref="totals_table-outstanding-label"],
[data-ref="totals_table-outstanding"] {
background-color: #e6e6e6;
color: black;
padding-top: 7px;
padding-bottom: 7px;
padding-right: 7px;
}
2021-08-24 16:25:01 +02:00
[data-ref="statement-totals"] {
margin-top: 1rem;
text-align: right;
margin-right: .75rem;
}
2021-09-02 12:47:06 +02:00
[data-ref*=".line_total-td"] {
white-space: nowrap;
}
2021-10-29 17:42:53 +02:00
/** .repeating-header,
.repeating-header-space, **/
.repeating-footer,
.repeating-footer-space {
2022-03-18 23:10:39 +01:00
height: 10px;
2021-10-29 17:42:53 +02:00
}
2023-02-22 06:19:51 +01:00
2021-10-29 17:42:53 +02:00
.repeating-header {
position: fixed;
top: 0;
}
2023-02-22 06:19:51 +01:00
2021-10-29 17:42:53 +02:00
.repeating-footer {
position: fixed;
bottom: 0;
}
2023-02-22 06:19:51 +01:00
[data-element='product_table-product.description-td'],
td {
min-width: 100%;
2022-06-21 12:42:43 +02:00
max-width: 300px;
2023-02-22 06:19:51 +01:00
overflow-wrap: break-word;
2022-06-21 12:42:43 +02:00
}
2022-11-17 06:41:23 +01:00
.stamp {
2023-02-22 06:19:51 +01:00
transform: rotate(12deg);
2022-11-17 06:41:23 +01:00
color: #555;
font-size: 3rem;
font-weight: 700;
border: 0.25rem solid #555;
display: inline-block;
padding: 0.25rem 1rem;
text-transform: uppercase;
border-radius: 1rem;
font-family: 'Courier';
mix-blend-mode: multiply;
2023-02-22 06:19:51 +01:00
z-index: 200 !important;
position: fixed;
2022-11-17 06:41:23 +01:00
text-align: center;
}
.is-paid {
2023-02-22 06:19:51 +01:00
color: #D23;
border: 1rem double #D23;
2022-11-17 06:41:23 +01:00
transform: rotate(-5deg);
font-size: 6rem;
font-family: "Open sans", Helvetica, Arial, sans-serif;
border-radius: 0;
padding: 0.5rem;
opacity: 0.2;
2023-02-22 06:19:51 +01:00
z-index: 200 !important;
position: fixed;
2023-02-22 06:21:37 +01:00
display: $show_paid_stamp;
2022-11-23 02:47:15 +01:00
}
.project-header {
2022-11-24 10:33:52 +01:00
font-size: 1.2em;
2022-11-23 02:47:15 +01:00
margin-top: 0.1em;
2022-11-24 10:33:52 +01:00
margin-bottom: 0;
padding-bottom: 0;
2022-11-23 02:47:15 +01:00
margin-left: 0;
margin-right: 0;
font-weight: bold;
color: #505050;
}
2023-01-30 12:14:57 +01:00
2023-02-22 06:19:51 +01:00
.pqrcode {}
2021-08-10 14:25:27 +02:00
/** Useful snippets, uncomment to enable. **/
2021-08-10 14:25:27 +02:00
/** Hide company logo **/
/* .company-logo { display: none } */
/* Hide company details */
/* #company-details > * { display: none } */
/* Hide company address */
/* #company-address > * { display: none } */
/* Hide public notes */
/* [data-ref="total_table-public_notes"] { display: none } */
/* Hide terms label */
/* [data-ref="total_table-terms-label"] { display: none } */
/* Hide totals table */
/* #table-totals { display: none } */
/* Hide totals table left side */
/* #table-totals div:first-child > * { display: none !important } */
/* Hide totals table right side */
/* .totals-table-right-side { display: none } */
/** For more info, please check our docs: https://invoiceninja.github.io **/
/** To find out selectors on your own: https://invoiceninja.github.io/docs/custom-fields/#snippets **/
</style>
2021-08-17 18:51:20 +02:00
2021-11-09 17:44:28 +01:00
<table style="min-width: 100%">
2023-02-22 06:19:51 +01:00
<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" />
2023-02-25 10:02:35 +01:00
2023-02-22 06:19:51 +01:00
</div>
</div>
<div class="client-wrapper">
<div id="client-details"></div>
<div id="vendor-details"></div>
<div id="shipping-details"></div>
2023-02-25 10:02:35 +01:00
<div>
2023-02-26 07:16:41 +01:00
<table id="entity-details" cellspacing="0" cellpadding="0" dir="$dir"></table>
2023-02-25 10:02:35 +01:00
</div>
2023-02-22 06:19:51 +01:00
</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-credit-table" cellspacing="0" data-ref="table"></table>
<div id="statement-credit-table-totals" data-ref="statement-totals"></div>
2023-02-22 06:19:51 +01:00
<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">$status_logo</div>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>
<div class="repeating-footer-space">&nbsp;</div>
</td>
</tr>
</tfoot>
2021-10-29 17:42:53 +02:00
</table>
<div class="repeating-header" id="header"></div>
2021-11-30 11:50:50 +01:00
$entity_images
2022-03-15 13:28:16 +01:00
<div class="repeating-footerx" id="footer">
2023-02-22 06:19:51 +01:00
<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',
'statement-invoice-table-totals', 'statement-payment-table-totals', 'statement-aging-table',
'client-details', 'vendor-details', 'swiss-qr', 'shipping-details', 'statement-credit-table', 'statement-credit-table-totals',
2023-02-22 06:19:51 +01:00
];
tables.forEach((tableIdentifier) => {
2023-05-31 23:54:08 +02:00
document.getElementById(tableIdentifier).childElementCount === 0
? document.getElementById(tableIdentifier).style.display = 'none'
2023-02-22 06:19:51 +01:00
: '';
2021-11-30 11:50:50 +01:00
});
2023-02-22 06:19:51 +01:00
});
</script>
2021-11-30 11:50:50 +01:00
</div>