1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 08:51:34 +02:00

Merge pull request #5351 from turbo124/v5-develop

v5.1.37
This commit is contained in:
David Bomba 2021-04-06 22:41:00 +10:00 committed by GitHub
commit aac6831d15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 6 deletions

View File

@ -1 +1 @@
5.1.36
5.1.37

View File

@ -795,8 +795,6 @@ class InvoiceController extends BaseController
$file_path = $invoice->service()->getInvoicePdf($contact);
nlog($file_path);
return response()->download($file_path, basename($file_path));
}

View File

@ -100,7 +100,6 @@ class Company extends BaseModel
'country_id' => 'string',
'custom_fields' => 'object',
'settings' => 'object',
'custom_fields' => 'object',
'updated_at' => 'timestamp',
'created_at' => 'timestamp',
'deleted_at' => 'timestamp',

View File

@ -13,6 +13,7 @@ namespace App\Services\Credit;
use App\Jobs\Entity\CreateEntityPdf;
use App\Services\AbstractService;
use App\Utils\TempFile;
use Illuminate\Support\Facades\Storage;
class GetCreditPdf extends AbstractService
@ -48,6 +49,9 @@ class GetCreditPdf extends AbstractService
$file_path = CreateEntityPdf::dispatchNow($this->invitation);
}
if(config('filesystems.default') == 's3')
return TempFile::path(Storage::disk($disk)->url($file_path));
return Storage::disk($disk)->path($file_path);
}
}

View File

@ -499,7 +499,7 @@ class Design extends BaseDesign
}
} elseif (Str::startsWith($variable, '$custom')) {
$field = explode('_', $variable);
$visible = property_exists($this->client->company->custom_fields, $field[1]) && !empty($this->client->company->custom_fields->{$field[1]});
$visible = is_object($this->client->company->custom_fields) && property_exists($this->client->company->custom_fields, $field[1]) && !empty($this->client->company->custom_fields->{$field[1]});
$elements[1]['elements'][] = ['element' => 'div', 'elements' => [
['element' => 'span', 'content' => $variable . '_label', 'properties' => ['hidden' => !$visible, 'data-ref' => 'totals_table-' . substr($variable, 1) . '-label']],

View File

@ -15,6 +15,7 @@ use App\Jobs\Entity\CreateEntityPdf;
use App\Models\ClientContact;
use App\Models\Quote;
use App\Services\AbstractService;
use App\Utils\TempFile;
use Illuminate\Support\Facades\Storage;
class GetQuotePdf extends AbstractService
@ -46,6 +47,9 @@ class GetQuotePdf extends AbstractService
$file_path = CreateEntityPdf::dispatchNow($invitation);
}
if(config('filesystems.default') == 's3')
return TempFile::path(Storage::disk($disk)->url($file_path));
return Storage::disk($disk)->path($file_path);
}
}

View File

@ -14,7 +14,7 @@ return [
'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', ''),
'app_version' => '5.1.36',
'app_version' => '5.1.37',
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', false),