diff --git a/app/Utils/HtmlEngine.php b/app/Utils/HtmlEngine.php index 4b562decc19f..c3f0f81c6d25 100644 --- a/app/Utils/HtmlEngine.php +++ b/app/Utils/HtmlEngine.php @@ -126,6 +126,7 @@ class HtmlEngine if ($this->entity_string == 'invoice' || $this->entity_string == 'recurring_invoice') { $data['$entity'] = ['value' => '', 'label' => ctrans('texts.invoice')]; $data['$number'] = ['value' => $this->entity->number ?: ' ', 'label' => ctrans('texts.invoice_number')]; + $data['$number_short'] = ['value' => $this->entity->number ?: ' ', 'label' => ctrans('texts.invoice_number_short')]; $data['$entity.terms'] = ['value' => $this->entity->terms ?: '', 'label' => ctrans('texts.invoice_terms')]; $data['$terms'] = &$data['$entity.terms']; $data['$view_link'] = ['value' => ''.ctrans('texts.view_invoice').'', 'label' => ctrans('texts.view_invoice')]; @@ -142,6 +143,7 @@ class HtmlEngine if ($this->entity_string == 'quote') { $data['$entity'] = ['value' => '', 'label' => ctrans('texts.quote')]; $data['$number'] = ['value' => $this->entity->number ?: '', 'label' => ctrans('texts.quote_number')]; + $data['$number_short'] = ['value' => $this->entity->number ?: '', 'label' => ctrans('texts.quote_number_short')]; $data['$entity.terms'] = ['value' => $this->entity->terms ?: '', 'label' => ctrans('texts.quote_terms')]; $data['$terms'] = &$data['$entity.terms']; $data['$view_link'] = ['value' => ''.ctrans('texts.view_quote').'', 'label' => ctrans('texts.view_quote')]; @@ -153,6 +155,7 @@ class HtmlEngine if ($this->entity_string == 'credit') { $data['$entity'] = ['value' => '', 'label' => ctrans('texts.credit')]; $data['$number'] = ['value' => $this->entity->number ?: '', 'label' => ctrans('texts.credit_number')]; + $data['$number_short'] = ['value' => $this->entity->number ?: '', 'label' => ctrans('texts.credit_number_short')]; $data['$entity.terms'] = ['value' => $this->entity->terms ?: '', 'label' => ctrans('texts.credit_terms')]; $data['$terms'] = &$data['$entity.terms']; $data['$view_link'] = ['value' => ''.ctrans('texts.view_credit').'', 'label' => ctrans('texts.view_credit')]; diff --git a/resources/views/pdf-designs/bold.html b/resources/views/pdf-designs/bold.html index a491a9323046..46a89373ee33 100644 --- a/resources/views/pdf-designs/bold.html +++ b/resources/views/pdf-designs/bold.html @@ -2,6 +2,7 @@ :root { --primary-color: $primary_color; --secondary-color: $secondary_color; + --line-height: 1.6; } body { @@ -31,10 +32,11 @@ padding: 3rem; color: white; min-width: 100%; + line-height: var(--line-height); } .company-logo { - max-width: 65%; + max-width: 55%; } #company-details, @@ -47,6 +49,7 @@ margin: 2rem; display: flex; flex-direction: column; + line-height: var(--line-height); } #client-details > :first-child { @@ -251,6 +254,10 @@ margin-bottom: 0; } + [data-ref="product_table-product.description-th"] { + width: 23%; + } + /** Useful snippets, uncomment to enable. **/ /** Hide company logo **/ diff --git a/resources/views/pdf-designs/business.html b/resources/views/pdf-designs/business.html index fe23173e83f1..98443c197eb3 100644 --- a/resources/views/pdf-designs/business.html +++ b/resources/views/pdf-designs/business.html @@ -2,6 +2,7 @@ :root { --primary-color: $primary_color; --secondary-color: $secondary_color; + --line-height: 1.6; } body { @@ -40,16 +41,14 @@ display: flex; flex-direction: column; color: #AAA9A9; + line-height: var(--line-height); } #company-address { display: flex; flex-direction: column; color: #b1b1b1; - } - - #company-address > * { - margin-bottom: 0.8rem; + line-height: var(--line-height); } .entity-issued-to { @@ -58,8 +57,8 @@ } .client-and-entity-wrapper { - display: grid; - grid-template-columns: 2fr 1.5fr; + display: flex; + justify-content: space-between; gap: 20px; } @@ -67,6 +66,7 @@ display: flex; flex-direction: column; margin-top: 1rem; + line-height: var(--line-height); } #client-details > p:nth-child(1) { @@ -82,6 +82,8 @@ text-align: left; } + #entity-details p { margin-right: 20px; } + #entity-details th { font-weight: normal; padding-bottom: .5rem; @@ -195,6 +197,7 @@ #table-totals>.totals-table-right-side>*> :nth-child(1) { text-align: "$dir_text_align"; margin-top: .75rem; + padding-left: 7px; } #table-totals>.totals-table-right-side> * > :not([hidden]) ~ :not([hidden]) { @@ -205,6 +208,7 @@ #table-totals>.totals-table-right-side>*> :nth-child(2) { text-align: right; + padding-right: 7px; } #table-totals @@ -244,6 +248,15 @@ margin-bottom: 0; } + [data-ref="totals_table-outstanding-label"], + [data-ref="totals_table-outstanding"] { + background-color: var(--secondary-color); + color: white; + padding-top: 7px; + padding-bottom: 7px; + padding-right: 7px; + } + /** Useful snippets, uncomment to enable. **/ /** Hide company logo **/ diff --git a/resources/views/pdf-designs/clean.html b/resources/views/pdf-designs/clean.html index 1859255dad54..1d21d47f24ce 100644 --- a/resources/views/pdf-designs/clean.html +++ b/resources/views/pdf-designs/clean.html @@ -2,6 +2,7 @@ :root { --primary-color: $primary_color; --secondary-color: $secondary_color; + --line-height: 1.6; } body { @@ -35,6 +36,7 @@ #company-details { display: flex; flex-direction: column; + line-height: var(--line-height); } #company-details > p:first-child { @@ -44,10 +46,11 @@ #company-address { display: flex; flex-direction: column; + line-height: var(--line-height); } .entity-label { - margin-top: 1rem; + margin-top: 2.5rem; text-transform: uppercase; padding-left: 1rem; margin-bottom: 1rem; @@ -56,8 +59,7 @@ } .client-and-entity-wrapper { - display: grid; - grid-template-columns: .75fr 1fr; + display: flex; padding: 1rem; border-top: 1px solid #d8d8d8; border-bottom: 1px solid #d8d8d8; @@ -65,16 +67,21 @@ #entity-details { text-align: left; + margin-right: 20px; } #entity-details > tr, #entity-details th { font-weight: normal; + padding-right: 15px; + padding-top: 2.5px; + padding-bottom: 2.5px; } #client-details { display: flex; flex-direction: column; + line-height: var(--line-height); } #client-details > :first-child { @@ -201,6 +208,12 @@ font-size: 1rem; margin-bottom: 0; } + + .company-logo-container { + display: flex; + flex-direction: column; + justify-content: flex-end; + } /** Useful snippets, uncomment to enable. **/ @@ -236,11 +249,9 @@
- +
+ +
@@ -248,7 +259,9 @@

$entity_label

-
+
+
+
diff --git a/resources/views/pdf-designs/creative.html b/resources/views/pdf-designs/creative.html index 9acdf7cc9e14..c4f531f5d87b 100644 --- a/resources/views/pdf-designs/creative.html +++ b/resources/views/pdf-designs/creative.html @@ -2,6 +2,7 @@ :root { --primary-color: $primary_color; --secondary-color: $secondary_color; + --line-height: 1.6; } body { @@ -26,12 +27,15 @@ display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; + line-height: var(--line-height); } .company-logo { max-width: 65%; } + #entity-details p { margin-top: 5px; } + .header-wrapper #client-details, .header-wrapper #company-details, .header-wrapper #company-address { @@ -234,6 +238,7 @@ /** To find out selectors on your own: https://invoiceninja.github.io/docs/custom-fields/#snippets **/ +
diff --git a/resources/views/pdf-designs/elegant.html b/resources/views/pdf-designs/elegant.html index 6b1c0b46337a..39e4a85caa15 100644 --- a/resources/views/pdf-designs/elegant.html +++ b/resources/views/pdf-designs/elegant.html @@ -2,6 +2,7 @@ :root { --primary-color: $primary_color; --secondary-color: $secondary_color; + --line-height: 1.6; } body { @@ -23,14 +24,14 @@ } .company-logo { - max-width: 65%; + max-width: 55%; + margin-left: auto; + margin-right: auto; + display: block; } .company-logo-wrapper { - display: flex; - flex-direction: row; - justify-content: center; - padding-bottom: 2.5rem; + padding-bottom: 60px; border-bottom: 4px solid; } @@ -39,12 +40,15 @@ } .client-entity-wrapper { - display: grid; - grid-template-columns: 1.8fr 1.2fr; + display: flex; margin-top: 3rem; - gap: 10px; + gap: 20px; + margin-left: 10px; + line-height: var(--line-height); } + #entity-details p { margin-right: 20px; margin-top: 5px; } + .client-entity-wrapper .wrapper-info-text { display: block; font-size: 1.5rem; @@ -56,6 +60,8 @@ grid-template-columns: 1fr 1fr; } + .text-with-client { margin-right: 15px; } + .client-entity-wrapper .wrapper-left-side #client-details, .client-entity-wrapper .wrapper-left-side #company-details, .client-entity-wrapper .wrapper-left-side #company-address { @@ -121,11 +127,18 @@ #product-table > tbody > tr > td, #delivery-note-table > tbody > tr > td, #task-table > tbody > tr > td { - border-bottom: 1px solid; - border-top: 1px solid; + border-bottom: 1pt solid; padding: 1rem; } + #product-table > tbody > tr:first-child > td, + #delivery-note-table > tbody > tr:first-child > td, + #task-table > tbody > tr:first-child > td { + border-top: 1pt solid !important; + padding: 1rem; + } + + #product-table > tbody > tr > td:last-child, #delivery-note-table > tbody > tr > td:last-child, #task-table > tbody > tr > td:last-child { @@ -236,24 +249,21 @@
- +
-
+
-

$balance_due_label

+

$to_label

+

$from_label

diff --git a/resources/views/pdf-designs/hipster.html b/resources/views/pdf-designs/hipster.html index 84f6c951ec78..e2049b4f7467 100644 --- a/resources/views/pdf-designs/hipster.html +++ b/resources/views/pdf-designs/hipster.html @@ -2,6 +2,7 @@ :root { --primary-color: $primary_color; --secondary-color: $secondary_color; + --line-height: 1.6; } body { @@ -26,6 +27,7 @@ display: grid; grid-template-columns: 1.2fr 1.8fr; gap: 20px; + line-height: var(--line-height); } .header-wrapper .header-text-label { @@ -223,6 +225,10 @@ direction: $dir; } + [data-ref="product_table-product.unit_cost-td"] { text-align: right; } + + [data-ref="totals_table-outstanding"] { color: var(--primary-color); } + /** Useful snippets, uncomment to enable. **/ /** Hide company logo **/ @@ -252,6 +258,7 @@ /** 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 **/ +
diff --git a/resources/views/pdf-designs/modern.html b/resources/views/pdf-designs/modern.html index c8f00b4f2f07..d8cfa66695a0 100644 --- a/resources/views/pdf-designs/modern.html +++ b/resources/views/pdf-designs/modern.html @@ -1,31 +1,31 @@ @@ -367,8 +379,10 @@ }); -
-
+ diff --git a/resources/views/pdf-designs/plain.html b/resources/views/pdf-designs/plain.html index f6ff091b7d51..aad262998cb4 100644 --- a/resources/views/pdf-designs/plain.html +++ b/resources/views/pdf-designs/plain.html @@ -2,6 +2,7 @@ :root { --primary-color: $primary_color; --secondary-color: $secondary_color; + --line-height: 1.6; } body { @@ -25,6 +26,7 @@ .header-wrapper { display: grid; grid-template-columns: 1fr 1fr 1fr; + line-height: var(--line-height); } .company-logo { @@ -34,6 +36,7 @@ .header-wrapper #company-address { display: flex; flex-direction: column; + line-height: var(--line-height); } .header-wrapper #entity-details { @@ -62,6 +65,7 @@ #client-details { display: flex; flex-direction: column; + line-height: var(--line-height); } #product-table, @@ -134,6 +138,7 @@ #table-totals>.totals-table-right-side>*> :nth-child(1) { text-align: "$dir_text_align"; margin-top: .75rem; + padding-left: 7px; } #table-totals>.totals-table-right-side> * > :not([hidden]) ~ :not([hidden]) { @@ -144,6 +149,7 @@ #table-totals>.totals-table-right-side>*> :nth-child(2) { text-align: right; + padding-right: 7px; } #table-totals @@ -180,6 +186,15 @@ margin-bottom: 0; } + [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; + } + /** Useful snippets, uncomment to enable. **/ /** Hide company logo **/ @@ -209,6 +224,7 @@ /** 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 **/ +
diff --git a/resources/views/pdf-designs/playful.html b/resources/views/pdf-designs/playful.html index 31bbbfe608a9..76ae0da483d5 100644 --- a/resources/views/pdf-designs/playful.html +++ b/resources/views/pdf-designs/playful.html @@ -2,6 +2,7 @@ :root { --primary-color: $primary_color; --secondary-color: $secondary_color; + --line-height: 1.6; } body { @@ -24,8 +25,9 @@ .header-wrapper { margin-top: 2rem; - display: grid; - grid-template-columns: 1fr 0.5fr 2fr; + display: flex; + justify-content: space-between; + gap: 20px; padding: 2rem 3rem; } @@ -35,6 +37,8 @@ border-radius: 10px; } + #entity-details p { margin-right: 20px; } + .header-wrapper #entity-details { width: 100%; color: white; @@ -249,6 +253,19 @@ margin-bottom: 0; } + #footer-colors { + position: fixed; + bottom: 0; + min-width: 100%; + display: grid; + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + margin-left: -10px; + } + + #footer-colors > * { + padding: 10px; + } + /** Useful snippets, uncomment to enable. **/ /** Hide company logo **/ @@ -292,13 +309,9 @@
- - -
+
+ +
@@ -332,6 +345,17 @@