Add primary/secondary_color to companysettings

This commit is contained in:
David Bomba 2020-09-08 14:02:00 +10:00
parent a384db6ee8
commit 77119e69fe
7 changed files with 23 additions and 39 deletions

View File

@ -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',

View File

@ -53,7 +53,7 @@ class QueryLogging
Log::info($request->method().' - '.$request->url().": $count queries - ".$time);
// if($count > 100)
// Log::info($queries);
// Log::info($queries);
}
}

View File

@ -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
// ]);
}
}

View File

@ -1,33 +0,0 @@
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class ExampleMail extends Mailable
{
use Queueable, SerializesModels;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->markdown('email.example');
}
}

View File

@ -271,6 +271,11 @@ class HtmlEngine
$data['$company3'] = ['value' => $this->settings->custom_value3 ?: '&nbsp;', 'label' => $this->makeCustomField('company3')];
$data['$company4'] = ['value' => $this->settings->custom_value4 ?: '&nbsp;', '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')];

View File

@ -366,6 +366,11 @@ trait MakesInvoiceValues
$data['$company3'] = ['value' => $settings->custom_value3 ?: '&nbsp;', 'label' => $this->makeCustomField('company3')];
$data['$company4'] = ['value' => $settings->custom_value4 ?: '&nbsp;', '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')];

View File

@ -7,6 +7,13 @@
<body class="bg-white p-4">
{!! $body !!}
@if($signature)
<div style="margin-top: 20px">
{!! $signature !!}
</div>
@endif
</body>
<footer class="p-4">