diff --git a/app/Helpers/Invoice/InvoiceSum.php b/app/Helpers/Invoice/InvoiceSum.php index a3c496dcde87..4ef116934266 100644 --- a/app/Helpers/Invoice/InvoiceSum.php +++ b/app/Helpers/Invoice/InvoiceSum.php @@ -160,19 +160,19 @@ class InvoiceSum { $this->total += $this->total_taxes; - if (is_numeric($this->invoice->custom_value1) && $this->invoice->custom_value1 > 0) { + if (is_numeric($this->invoice->custom_value1)) { $this->total += $this->invoice->custom_value1; } - if (is_numeric($this->invoice->custom_value2) && $this->invoice->custom_value2 > 0) { + if (is_numeric($this->invoice->custom_value2)) { $this->total += $this->invoice->custom_value2; } - if (is_numeric($this->invoice->custom_value3) && $this->invoice->custom_value3 > 0) { + if (is_numeric($this->invoice->custom_value3)) { $this->total += $this->invoice->custom_value3; } - if (is_numeric($this->invoice->custom_value4) && $this->invoice->custom_value4 > 0) { + if (is_numeric($this->invoice->custom_value4)) { $this->total += $this->invoice->custom_value4; } diff --git a/app/Helpers/Invoice/InvoiceSumInclusive.php b/app/Helpers/Invoice/InvoiceSumInclusive.php index f04818f62f52..3cba2e4a2944 100644 --- a/app/Helpers/Invoice/InvoiceSumInclusive.php +++ b/app/Helpers/Invoice/InvoiceSumInclusive.php @@ -172,19 +172,19 @@ class InvoiceSumInclusive { //$this->total += $this->total_taxes; - if (is_numeric($this->invoice->custom_value1) && $this->invoice->custom_value1 > 0) { + if (is_numeric($this->invoice->custom_value1)) { $this->total += $this->invoice->custom_value1; } - if (is_numeric($this->invoice->custom_value2) && $this->invoice->custom_value2 > 0) { + if (is_numeric($this->invoice->custom_value2)) { $this->total += $this->invoice->custom_value2; } - if (is_numeric($this->invoice->custom_value3) && $this->invoice->custom_value3 > 0) { + if (is_numeric($this->invoice->custom_value3)) { $this->total += $this->invoice->custom_value3; } - if (is_numeric($this->invoice->custom_value4) && $this->invoice->custom_value4 > 0) { + if (is_numeric($this->invoice->custom_value4)) { $this->total += $this->invoice->custom_value4; } diff --git a/app/Utils/PhantomJS/Phantom.php b/app/Utils/PhantomJS/Phantom.php index feb36b3d9209..5c160624adef 100644 --- a/app/Utils/PhantomJS/Phantom.php +++ b/app/Utils/PhantomJS/Phantom.php @@ -76,6 +76,8 @@ class Phantom $phantom_url = "https://phantomjscloud.com/api/browser/v2/{$key}/?request=%7Burl:%22{$url}%22,renderType:%22pdf%22%7D"; $pdf = CurlUtils::get($phantom_url); + //info($pdf); + Storage::makeDirectory($path, 0775); $instance = Storage::disk(config('filesystems.default'))->put($file_path, $pdf); diff --git a/config/filesystems.php b/config/filesystems.php index 816d65b2b38c..76d21e4bac5d 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -60,7 +60,8 @@ return [ 'public' => [ 'driver' => 'local', - 'root' => storage_path('app/public'), + 'root' => 'storage/', + // 'root' => storage_path('app/public'), 'url' => env('APP_URL').'/storage', 'visibility' => 'public', 'permissions' => [