diff --git a/app/Utils/HtmlEngine.php b/app/Utils/HtmlEngine.php index 9461b87734ff..f3515ee12349 100644 --- a/app/Utils/HtmlEngine.php +++ b/app/Utils/HtmlEngine.php @@ -118,6 +118,7 @@ class HtmlEngine $data['$global_margin'] = ['value' => '6.35mm', 'label' => '']; $data['$company_logo_size'] = ['value' => $this->resolveCompanyLogoSize(), 'label' => '']; + $data['show_shipping_address'] = ['value' => $this->settings?->show_shipping_address ? 'flex' : 'none', 'label' => '']; $data['$tax'] = ['value' => '', 'label' => ctrans('texts.tax')]; $data['$app_url'] = ['value' => $this->generateAppUrl(), 'label' => '']; $data['$from'] = ['value' => '', 'label' => ctrans('texts.from')]; @@ -182,7 +183,7 @@ class HtmlEngine $data['$invoice.project'] = &$data['$project.name']; } - if($this->entity->status_id == 4) { + if($this->entity->status_id == 4 && $this->settings->show_paid_stamp) { $data['$status_logo'] = ['value' => '
' . ctrans('texts.paid') .'
', 'label' => '']; } @@ -568,7 +569,7 @@ class HtmlEngine $data['_rate2'] = ['value' => '', 'label' => ctrans('texts.tax')]; $data['_rate3'] = ['value' => '', 'label' => ctrans('texts.tax')]; - $data['$font_size'] = ['value' => $this->settings->font_size . 'px', 'label' => '']; + $data['$font_size'] = ['value' => $this->settings->font_size . 'px !important;', 'label' => '']; $data['$font_name'] = ['value' => Helpers::resolveFont($this->settings->primary_font)['name'], 'label' => '']; $data['$font_url'] = ['value' => Helpers::resolveFont($this->settings->primary_font)['url'], 'label' => '']; diff --git a/resources/views/pdf-designs/bold.html b/resources/views/pdf-designs/bold.html index cde5d824c301..b22f65f6472d 100644 --- a/resources/views/pdf-designs/bold.html +++ b/resources/views/pdf-designs/bold.html @@ -11,10 +11,14 @@ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-family: $font_name, Helvetica, sans-serif; - font-size: "$font_size"; + font-size: $font_size zoom: 80%; } - +/* + body, table{ + font-size: $font_size + } +*/ body, html { margin: 0; padding: 0; @@ -57,9 +61,9 @@ margin-bottom: 1rem; } .company-logo { - height: 100%; - max-width: 100%; - /* max-width: $company_logo_size;*/ +/* height: 100%;*/ +/* max-width: 100%;*/ + max-width: $company_logo_size; object-fit: contain; object-position: left center; } @@ -77,10 +81,17 @@ } #client-details { - margin: 2rem; + padding-right:1rem; display: flex; flex-direction: column; line-height: var(--line-height); + padding-left: 2rem; + } + + #shipping-details { + display: $show_shipping_address; + flex-direction: column; + line-height: var(--line-height); } #client-details > :first-child { @@ -89,9 +100,13 @@ .client-entity-wrapper { display: grid; - grid-template-columns: 1.5fr 1fr; + grid-template-columns: 2fr 1fr; padding-left: 1rem; } + + .client-wrapper-left-side { + display: flex; + } .entity-details-wrapper { background-color: var(--primary-color); @@ -114,7 +129,7 @@ min-width: 100%; table-layout: fixed; overflow-wrap: break-word; - margin-top: 3rem; + margin-top: 1rem; margin-bottom: 0px; } @@ -388,9 +403,15 @@
-

$entity_label

-
-
+
+

$entity_label

+
+
+
+
+

&

+
+
@@ -414,7 +435,7 @@
-
+
$status_logo
diff --git a/resources/views/pdf-designs/business.html b/resources/views/pdf-designs/business.html index ae7925b0672e..718c3214b07d 100644 --- a/resources/views/pdf-designs/business.html +++ b/resources/views/pdf-designs/business.html @@ -40,8 +40,8 @@ } .company-logo { - max-width: 65%; - /* max-width: $company_logo_size;*/ +/* max-width: 65%;*/ + max-width: $company_logo_size; } .header-container > span { diff --git a/resources/views/pdf-designs/calm.html b/resources/views/pdf-designs/calm.html index 5f14d226ef7b..85dfb947607f 100644 --- a/resources/views/pdf-designs/calm.html +++ b/resources/views/pdf-designs/calm.html @@ -46,8 +46,8 @@ } .company-logo { - max-width: 65%; - /* max-width: $company_logo_size;*/ +/* max-width: 65%;*/ + max-width: $company_logo_size; } .client-and-entity-wrapper { diff --git a/resources/views/pdf-designs/clean.html b/resources/views/pdf-designs/clean.html index 142213b2cc10..fa1e9fe90fb6 100644 --- a/resources/views/pdf-designs/clean.html +++ b/resources/views/pdf-designs/clean.html @@ -113,7 +113,7 @@ } #shipping-details { - display: flex; + display: $show_shipping_address; flex-direction: column; line-height: var(--line-height); } @@ -290,6 +290,8 @@ z-index:200 !important; position: fixed; text-align: center; + float:right; + } .is-paid { @@ -387,7 +389,7 @@
-
+
$status_logo
@@ -416,7 +418,7 @@ $entity_images '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' + 'client-details','vendor-details', 'swiss-qr','shipping-details' ]; tables.forEach((tableIdentifier) => { diff --git a/resources/views/pdf-designs/creative.html b/resources/views/pdf-designs/creative.html index bdb1ad20a1a7..a2f008d4a4d0 100644 --- a/resources/views/pdf-designs/creative.html +++ b/resources/views/pdf-designs/creative.html @@ -41,8 +41,8 @@ } .company-logo { - max-width: 65%; - /* max-width: $company_logo_size;*/ +/* max-width: 65%;*/ + max-width: $company_logo_size; } #entity-details p { margin-top: 5px; } diff --git a/resources/views/pdf-designs/elegant.html b/resources/views/pdf-designs/elegant.html index 4fbc6154fe69..51f2a4710972 100644 --- a/resources/views/pdf-designs/elegant.html +++ b/resources/views/pdf-designs/elegant.html @@ -31,8 +31,8 @@ } .company-logo { - max-width: 55%; - /* max-width: $company_logo_size;*/ +/* max-width: 55%;*/ + max-width: $company_logo_size; margin-left: auto; margin-right: auto; display: block; diff --git a/resources/views/pdf-designs/hipster.html b/resources/views/pdf-designs/hipster.html index 0ea7231638a6..ced26c2ad2ff 100644 --- a/resources/views/pdf-designs/hipster.html +++ b/resources/views/pdf-designs/hipster.html @@ -80,8 +80,8 @@ } .company-logo { - max-width: 65%; - /* max-width: $company_logo_size;*/ +/* max-width: 65%;*/ + max-width: $company_logo_size; } .entity-label { diff --git a/resources/views/pdf-designs/modern.html b/resources/views/pdf-designs/modern.html index a923209cdba3..ac06531fd424 100644 --- a/resources/views/pdf-designs/modern.html +++ b/resources/views/pdf-designs/modern.html @@ -84,8 +84,8 @@ } .company-logo { - max-width: 55%; - /* max-width: $company_logo_size;*/ +/* max-width: 55%;*/ + max-width: $company_logo_size; } #client-details { diff --git a/resources/views/pdf-designs/plain.html b/resources/views/pdf-designs/plain.html index bad77c7657e4..4d51869dceaf 100644 --- a/resources/views/pdf-designs/plain.html +++ b/resources/views/pdf-designs/plain.html @@ -43,7 +43,7 @@ .company-logo { /* max-width: 65%;*/ - max-width: $company_logo_size; + max-width: $company_logo_size; } .header-wrapper #company-address { @@ -93,7 +93,7 @@ } #shipping-details { - display: flex; + display: $show_shipping_address; flex-direction: column; padding-right: 30px; line-height: var(--line-height); diff --git a/resources/views/pdf-designs/playful.html b/resources/views/pdf-designs/playful.html index aa4df869e4e0..4c94473cc2dc 100644 --- a/resources/views/pdf-designs/playful.html +++ b/resources/views/pdf-designs/playful.html @@ -62,8 +62,8 @@ } .company-logo { - max-width: 65%; - /* max-width: $company_logo_size;*/ +/* max-width: 65%;*/ + max-width: $company_logo_size; } .contacts-wrapper { diff --git a/resources/views/pdf-designs/tech.html b/resources/views/pdf-designs/tech.html index 1a5babf4f9b7..2a5f4d5f9052 100644 --- a/resources/views/pdf-designs/tech.html +++ b/resources/views/pdf-designs/tech.html @@ -67,8 +67,8 @@ } .company-logo { - max-width: 65%; -/* max-width: $company_logo_size;*/ +/* max-width: 65%;*/ + max-width: $company_logo_size; } .header-invoice-number {