diff --git a/app/DataMapper/CompanySettings.php b/app/DataMapper/CompanySettings.php index 28f7d06ecf81..1de71001cac9 100644 --- a/app/DataMapper/CompanySettings.php +++ b/app/DataMapper/CompanySettings.php @@ -222,6 +222,9 @@ class CompanySettings extends BaseSettings public $font_size = 9; public $primary_font = 'Roboto'; public $secondary_font = 'Roboto'; + public $primary_color = '#4caf50'; + public $secondary_color = '#2196f3'; + public $hide_paid_to_date = false; public $embed_documents = false; public $all_pages_header = false; @@ -241,6 +244,8 @@ class CompanySettings extends BaseSettings public $client_portal_allow_over_payment = false; public static $casts = [ + 'primary_color' => 'string', + 'secondary_color' => 'string', 'client_portal_allow_under_payment' => 'bool', 'client_portal_allow_over_payment' => 'bool', 'auto_bill' => 'string', diff --git a/app/Http/Middleware/QueryLogging.php b/app/Http/Middleware/QueryLogging.php index 4841c12bbc8b..d7edc9eccc19 100644 --- a/app/Http/Middleware/QueryLogging.php +++ b/app/Http/Middleware/QueryLogging.php @@ -53,7 +53,7 @@ class QueryLogging Log::info($request->method().' - '.$request->url().": $count queries - ".$time); // if($count > 100) - // Log::info($queries); + // Log::info($queries); } } diff --git a/app/Mail/DownloadInvoices.php b/app/Mail/DownloadInvoices.php index 67f01b183f03..cb76e3e807bb 100644 --- a/app/Mail/DownloadInvoices.php +++ b/app/Mail/DownloadInvoices.php @@ -40,10 +40,5 @@ class DownloadInvoices extends Mailable ] ); - // return $this->from(config('mail.from.address')) //todo this needs to be fixed to handle the hosted version - // ->subject(ctrans('texts.download_documents',['size'=>''])) - // ->markdown('email.admin.download_files', [ - // 'file_path' => $this->file_path - // ]); } } diff --git a/app/Mail/ExampleMail.php b/app/Mail/ExampleMail.php deleted file mode 100644 index 5a3db457a44f..000000000000 --- a/app/Mail/ExampleMail.php +++ /dev/null @@ -1,33 +0,0 @@ -markdown('email.example'); - } -} diff --git a/app/Utils/HtmlEngine.php b/app/Utils/HtmlEngine.php index 110f0aa714bb..e722de9ba58d 100644 --- a/app/Utils/HtmlEngine.php +++ b/app/Utils/HtmlEngine.php @@ -271,6 +271,11 @@ class HtmlEngine $data['$company3'] = ['value' => $this->settings->custom_value3 ?: ' ', 'label' => $this->makeCustomField('company3')]; $data['$company4'] = ['value' => $this->settings->custom_value4 ?: ' ', 'label' => $this->makeCustomField('company4')]; + $data['$custom_surcharge1'] = ['value' => $this->entity->custom_surcharge1, 'label' => $this->makeCustomField('custom_surcharge1')]; + $data['$custom_surcharge2'] = ['value' => $this->entity->custom_surcharge2, 'label' => $this->makeCustomField('custom_surcharge2')]; + $data['$custom_surcharge3'] = ['value' => $this->entity->custom_surcharge3, 'label' => $this->makeCustomField('custom_surcharge3')]; + $data['$custom_surcharge4'] = ['value' => $this->entity->custom_surcharge4, 'label' => $this->makeCustomField('custom_surcharge4')]; + $data['$product.date'] = ['value' => '', 'label' => ctrans('texts.date')]; $data['$product.discount'] = ['value' => '', 'label' => ctrans('texts.discount')]; $data['$product.product_key'] = ['value' => '', 'label' => ctrans('texts.product_key')]; diff --git a/app/Utils/Traits/MakesInvoiceValues.php b/app/Utils/Traits/MakesInvoiceValues.php index 0cba97f7d120..7da5a1b17ef5 100644 --- a/app/Utils/Traits/MakesInvoiceValues.php +++ b/app/Utils/Traits/MakesInvoiceValues.php @@ -366,6 +366,11 @@ trait MakesInvoiceValues $data['$company3'] = ['value' => $settings->custom_value3 ?: ' ', 'label' => $this->makeCustomField('company3')]; $data['$company4'] = ['value' => $settings->custom_value4 ?: ' ', 'label' => $this->makeCustomField('company4')]; + $data['$custom_surcharge1'] = ['value' => $this->custom_surcharge1, 'label' => $this->makeCustomField('custom_surcharge1')]; + $data['$custom_surcharge2'] = ['value' => $this->custom_surcharge2, 'label' => $this->makeCustomField('custom_surcharge2')]; + $data['$custom_surcharge3'] = ['value' => $this->custom_surcharge3, 'label' => $this->makeCustomField('custom_surcharge3')]; + $data['$custom_surcharge4'] = ['value' => $this->custom_surcharge4, 'label' => $this->makeCustomField('custom_surcharge4')]; + $data['$product.date'] = ['value' => '', 'label' => ctrans('texts.date')]; $data['$product.discount'] = ['value' => '', 'label' => ctrans('texts.discount')]; $data['$product.product_key'] = ['value' => '', 'label' => ctrans('texts.product_key')]; diff --git a/resources/views/email/template/plain.blade.php b/resources/views/email/template/plain.blade.php index 2f6adf20f03b..78db0c803729 100644 --- a/resources/views/email/template/plain.blade.php +++ b/resources/views/email/template/plain.blade.php @@ -7,6 +7,13 @@ {!! $body !!} + + + @if($signature) +
+ {!! $signature !!} +
+ @endif