diff --git a/VERSION.txt b/VERSION.txt index 9a45b61bfd27..472daa1d8bd0 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.1.36 \ No newline at end of file +5.1.37 \ No newline at end of file diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index 8451e1d7a3e5..3379ecf4a763 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -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)); } diff --git a/app/Models/Company.php b/app/Models/Company.php index 73f2d1e8c954..eeff9efe43c4 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -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', diff --git a/app/Services/Credit/GetCreditPdf.php b/app/Services/Credit/GetCreditPdf.php index 96bb0f818e7d..84deac828d5f 100644 --- a/app/Services/Credit/GetCreditPdf.php +++ b/app/Services/Credit/GetCreditPdf.php @@ -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); } } diff --git a/app/Services/PdfMaker/Design.php b/app/Services/PdfMaker/Design.php index 65acf2f4bed7..fcce4dbbb784 100644 --- a/app/Services/PdfMaker/Design.php +++ b/app/Services/PdfMaker/Design.php @@ -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']], diff --git a/app/Services/Quote/GetQuotePdf.php b/app/Services/Quote/GetQuotePdf.php index 582664aaacd1..2d8b62539c66 100644 --- a/app/Services/Quote/GetQuotePdf.php +++ b/app/Services/Quote/GetQuotePdf.php @@ -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); } } diff --git a/config/ninja.php b/config/ninja.php index e3ade7f52457..7a1bc2b71c3a 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -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), diff --git a/public/flutter_service_worker.js b/public/flutter_service_worker.js index b0d6292728a4..6931a8977380 100755 --- a/public/flutter_service_worker.js +++ b/public/flutter_service_worker.js @@ -31,7 +31,7 @@ const RESOURCES = { "assets/assets/images/payment_types/paypal.png": "8e06c094c1871376dfea1da8088c29d1", "assets/assets/images/payment_types/maestro.png": "e533b92bfb50339fdbfa79e3dfe81f08", "assets/FontManifest.json": "cf3c681641169319e61b61bd0277378f", -"main.dart.js": "23e852b45f0ac1c4cf3d45a272ec0c83", +"main.dart.js": "98adea066e120e92f7fd607882cd546d", "version.json": "e021a7a1750aa3e7d1d89b51ac9837e9" }; diff --git a/public/main.dart.js b/public/main.dart.js index 33e2ee199a61..856c1d6bd5bb 100755 --- a/public/main.dart.js +++ b/public/main.dart.js @@ -44833,7 +44833,7 @@ o=p.a[o] p=o.b.f o=o.e.a s=b.d -return new B.BO(null,q,p,b,J.c(o.b,s),new B.b6I(a,b),new B.b6J(b,a))}, +return new B.BO(r,q,p,b,J.c(o.b,s),new B.b6I(a,b),new B.b6J(b,a))}, OC:function OC(a){this.a=a}, bw3:function bw3(){}, bw2:function bw2(){}, diff --git a/public/main.foss.dart.js b/public/main.foss.dart.js index 7686220dfe58..3c45f5a4bd7f 100644 --- a/public/main.foss.dart.js +++ b/public/main.foss.dart.js @@ -44619,7 +44619,7 @@ o=p.a[o] p=o.b.f o=o.e.a s=b.d -return new B.BK(null,q,p,b,J.c(o.b,s),new B.b5P(a,b),new B.b5Q(b,a))}, +return new B.BK(r,q,p,b,J.c(o.b,s),new B.b5P(a,b),new B.b5Q(b,a))}, Ov:function Ov(a){this.a=a}, bua:function bua(){}, bu9:function bu9(){}, diff --git a/public/main.wasm.dart.js b/public/main.wasm.dart.js index 54aa0530fc66..52bc7aa13edf 100644 --- a/public/main.wasm.dart.js +++ b/public/main.wasm.dart.js @@ -43749,7 +43749,7 @@ o=p.a[o] p=o.b.f o=o.e.a s=b.d -return new B.BM(null,q,p,b,J.c(o.b,s),new B.b69(a,b),new B.b6a(b,a))}, +return new B.BM(r,q,p,b,J.c(o.b,s),new B.b69(a,b),new B.b6a(b,a))}, Oz:function Oz(a){this.a=a}, buB:function buB(){}, buA:function buA(){},