1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00

Fixes for demo mode in l8

This commit is contained in:
David Bomba 2020-10-01 21:41:23 +10:00
parent 3fa336946f
commit b94bfacc19
2 changed files with 13 additions and 1 deletions

View File

@ -18,8 +18,10 @@ use App\Factory\InvoiceItemFactory;
use App\Helpers\Invoice\InvoiceSum;
use App\Jobs\Ninja\CompanySizeCheck;
use App\Jobs\Util\VersionCheck;
use App\Models\Account;
use App\Models\Client;
use App\Models\ClientContact;
use App\Models\Company;
use App\Models\CompanyToken;
use App\Models\Country;
use App\Models\Credit;

View File

@ -16,8 +16,18 @@ use App\Models\Client;
class Helpers
{
public static function sharedEmailVariables(Client $client, array $settings = null): array
public static function sharedEmailVariables(?Client $client, array $settings = null): array
{
if(!$client){
$elements['signature'] = '';
$elements['settings'] = new \stdClass;
$elements['whitelabel'] = true;
return $elements;
}
$_settings = is_null($settings) ? $client->getMergedSettings() : $settings;
$elements['signature'] = $_settings->email_signature;