From 917cca9972fba4fafa9e72f6da6665b73d63cc42 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 7 Feb 2023 23:54:18 +1100 Subject: [PATCH 1/2] Fixes for designs, enable font-size --- ...2_07_114011_add_additional_product_fields.php | 16 ++++++++++++++++ resources/views/pdf-designs/bold.html | 9 +++++++-- resources/views/pdf-designs/business.html | 8 +++++++- resources/views/pdf-designs/calm.html | 7 ++++++- resources/views/pdf-designs/clean.html | 6 +++++- resources/views/pdf-designs/creative.html | 7 ++++++- resources/views/pdf-designs/elegant.html | 6 +++++- resources/views/pdf-designs/hipster.html | 6 +++++- resources/views/pdf-designs/modern.html | 6 +++++- resources/views/pdf-designs/plain.html | 6 +++++- resources/views/pdf-designs/playful.html | 6 +++++- resources/views/pdf-designs/tech.html | 6 +++++- 12 files changed, 77 insertions(+), 12 deletions(-) diff --git a/database/migrations/2023_02_07_114011_add_additional_product_fields.php b/database/migrations/2023_02_07_114011_add_additional_product_fields.php index 4b0760722b42..cc33a6db01ed 100644 --- a/database/migrations/2023_02_07_114011_add_additional_product_fields.php +++ b/database/migrations/2023_02_07_114011_add_additional_product_fields.php @@ -17,6 +17,22 @@ return new class extends Migration $table->unsignedInteger("max_quantity")->nullable(); $table->string("product_image", 191)->nullable(); }); + + Company::query() + ->chunk(1000, function ($companies) { + + foreach($companies as $c) + { + + $settings = $c->settings; + $settings->font_size = 16; + $c->settings = $settings; + $c->save(); + + } + + }); + } /** diff --git a/resources/views/pdf-designs/bold.html b/resources/views/pdf-designs/bold.html index cde5d824c301..01d435cc1df8 100644 --- a/resources/views/pdf-designs/bold.html +++ b/resources/views/pdf-designs/bold.html @@ -11,10 +11,15 @@ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-family: $font_name, Helvetica, sans-serif; - font-size: "$font_size"; + font-size: $font_size !important; zoom: 80%; } + table tr td, table tr, th { + font-size: $font_size !important; + } + + body, html { margin: 0; padding: 0; @@ -114,7 +119,7 @@ min-width: 100%; table-layout: fixed; overflow-wrap: break-word; - margin-top: 3rem; + margin-top: 0rem; margin-bottom: 0px; } diff --git a/resources/views/pdf-designs/business.html b/resources/views/pdf-designs/business.html index ae7925b0672e..89263c580a47 100644 --- a/resources/views/pdf-designs/business.html +++ b/resources/views/pdf-designs/business.html @@ -16,10 +16,16 @@ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-family: $font_name, Helvetica, sans-serif; - font-size: "$font_size"; + font-size: $font_size !important; zoom: 80%; } + + table tr td, table tr, th { + font-size: $font_size !important; + } + + @page { margin-left: $global_margin; margin-right: $global_margin; diff --git a/resources/views/pdf-designs/calm.html b/resources/views/pdf-designs/calm.html index 5f14d226ef7b..3797915b09cd 100644 --- a/resources/views/pdf-designs/calm.html +++ b/resources/views/pdf-designs/calm.html @@ -11,10 +11,15 @@ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-family: $font_name, Helvetica, sans-serif; - font-size: "$font_size"; + font-size: $font_size !important; zoom: 80%; } + + table tr td, table tr, th { + font-size: $font_size !important; + } + html { margin: 0; padding-top: 1rem; diff --git a/resources/views/pdf-designs/clean.html b/resources/views/pdf-designs/clean.html index 5fb92bd88c44..f20942b0cb69 100644 --- a/resources/views/pdf-designs/clean.html +++ b/resources/views/pdf-designs/clean.html @@ -16,10 +16,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 !important; zoom: 80%; } + table tr td, table tr, th { + font-size: $font_size !important; + } + @page { margin-left: $global_margin; margin-right: $global_margin; diff --git a/resources/views/pdf-designs/creative.html b/resources/views/pdf-designs/creative.html index bdb1ad20a1a7..880c31ed7433 100644 --- a/resources/views/pdf-designs/creative.html +++ b/resources/views/pdf-designs/creative.html @@ -16,10 +16,15 @@ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-family: $font_name, Helvetica, sans-serif; - font-size: "$font_size"; + font-size: $font_size !important; zoom: 80%; } + + table tr td, table tr, th { + font-size: $font_size !important; + } + @page { margin-left: $global_margin; margin-right: $global_margin; diff --git a/resources/views/pdf-designs/elegant.html b/resources/views/pdf-designs/elegant.html index 4fbc6154fe69..3eab4fe810f1 100644 --- a/resources/views/pdf-designs/elegant.html +++ b/resources/views/pdf-designs/elegant.html @@ -16,10 +16,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 !important; zoom: 80%; } + table tr td, table tr, th { + font-size: $font_size !important; + } + @page { margin: $global_margin; size: $page_size $page_layout; diff --git a/resources/views/pdf-designs/hipster.html b/resources/views/pdf-designs/hipster.html index 0ea7231638a6..20579f679dab 100644 --- a/resources/views/pdf-designs/hipster.html +++ b/resources/views/pdf-designs/hipster.html @@ -16,10 +16,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 !important; zoom: 80%; } + table tr td, table tr, th { + font-size: $font_size !important; + } + @page { margin: $global_margin; size: $page_size $page_layout; diff --git a/resources/views/pdf-designs/modern.html b/resources/views/pdf-designs/modern.html index a923209cdba3..a1d5f93f50f8 100644 --- a/resources/views/pdf-designs/modern.html +++ b/resources/views/pdf-designs/modern.html @@ -15,10 +15,14 @@ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-family: $font_name, Helvetica, sans-serif; - font-size: "7px"; + font-size: $font_size !important; zoom: 80%; } + table tr td, table tr, th { + font-size: $font_size !important; + } + body, html { margin: 0; padding: 0; diff --git a/resources/views/pdf-designs/plain.html b/resources/views/pdf-designs/plain.html index 4cedc8f519dd..ad417ca39354 100644 --- a/resources/views/pdf-designs/plain.html +++ b/resources/views/pdf-designs/plain.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 !important; zoom: 80%; } + table tr td, table tr, th { + font-size: $font_size !important; + } + html { width: 210mm; height: 200mm; diff --git a/resources/views/pdf-designs/playful.html b/resources/views/pdf-designs/playful.html index aa4df869e4e0..23347f2fdd92 100644 --- a/resources/views/pdf-designs/playful.html +++ b/resources/views/pdf-designs/playful.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 !important; zoom: 80%; } + table tr td, table tr, th { + font-size: $font_size !important; + } + html { width: 210mm; height: 200mm; diff --git a/resources/views/pdf-designs/tech.html b/resources/views/pdf-designs/tech.html index 1a5babf4f9b7..e9f62a2f7229 100644 --- a/resources/views/pdf-designs/tech.html +++ b/resources/views/pdf-designs/tech.html @@ -15,11 +15,15 @@ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-family: $font_name, Helvetica, sans-serif; - font-size: "$font_size"; + font-size: $font_size !important; zoom: 80%; margin: 0; } + table tr td, table tr, th { + font-size: $font_size !important; + } + @page { margin: 0; size: $page_size $page_layout; From 6a808ff84e96e973ffc6f55f8ec58a97eabb6fd2 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 7 Feb 2023 23:58:52 +1100 Subject: [PATCH 2/2] Add missing include --- .../2023_02_07_114011_add_additional_product_fields.php | 1 + 1 file changed, 1 insertion(+) diff --git a/database/migrations/2023_02_07_114011_add_additional_product_fields.php b/database/migrations/2023_02_07_114011_add_additional_product_fields.php index cc33a6db01ed..55f3e701666d 100644 --- a/database/migrations/2023_02_07_114011_add_additional_product_fields.php +++ b/database/migrations/2023_02_07_114011_add_additional_product_fields.php @@ -1,5 +1,6 @@