diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index 8ee5573f0d2d..f8978b3d55b9 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -843,7 +843,7 @@ class InvoiceController extends BaseController { $file_path = $invoice->service()->getInvoiceDeliveryNote($invoice, $invoice->invitations->first()->contact); - $file = base_path("storage/app/public/{$file_path}"); + $file = public_path("storage/{$file_path}"); return response()->download($file, basename($file)); } diff --git a/app/Http/Middleware/QueryLogging.php b/app/Http/Middleware/QueryLogging.php index 4843070dc947..d3c6e9479a44 100644 --- a/app/Http/Middleware/QueryLogging.php +++ b/app/Http/Middleware/QueryLogging.php @@ -34,9 +34,10 @@ class QueryLogging $timeStart = microtime(true); // Enable query logging for development - if (config('ninja.app_env') != 'production') { - DB::enableQueryLog(); - } + if (config('ninja.app_env') == 'production') + return $next($request); + + DB::enableQueryLog(); $response = $next($request); diff --git a/app/Models/ClientContact.php b/app/Models/ClientContact.php index bfa50b598555..5f1ccb4098ef 100644 --- a/app/Models/ClientContact.php +++ b/app/Models/ClientContact.php @@ -207,6 +207,6 @@ class ClientContact extends Authenticatable implements HasLocalePreference { $domain = isset($this->company->portal_domain) ?: $this->company->domain(); - return $domain . 'client/key_login/' . $this->contact_key; + return $domain . '/client/key_login/' . $this->contact_key; } } diff --git a/app/Utils/Traits/Inviteable.php b/app/Utils/Traits/Inviteable.php index 6765c3f65eb6..12188dc55626 100644 --- a/app/Utils/Traits/Inviteable.php +++ b/app/Utils/Traits/Inviteable.php @@ -50,14 +50,14 @@ trait Inviteable switch ($this->company->portal_mode) { case 'subdomain': - return $domain.'client/'.$entity_type.'/'.$this->key; + return $domain.'/client/'.$entity_type.'/'.$this->key; break; case 'iframe': - return $domain.'client/'.$entity_type.'/'.$this->key; + return $domain.'/client/'.$entity_type.'/'.$this->key; //return $domain . $entity_type .'/'. $this->contact->client->client_hash .'/'. $this->key; break; case 'domain': - return $domain.'client/'.$entity_type.'/'.$this->key; + return $domain.'/client/'.$entity_type.'/'.$this->key; break; default: diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index bca47d23277e..85f4cff62452 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -72,8 +72,8 @@ return [ 'tax_rates' => 'Tax Rates', 'rate' => 'Rate', 'settings' => 'Settings', - 'enable_invoice_tax' => 'Enable specifying an invoice tax', - 'enable_line_item_tax' => 'Enable specifying line item taxes', + 'enable_invoice_tax' => 'Enable specifying an invoice tax', + 'enable_line_item_tax' => 'Enable specifying line item taxes', 'dashboard' => 'Dashboard', 'dashboard_totals_in_all_currencies_help' => 'Note: add a :link named ":name" to show the totals using a single base currency.', 'clients' => 'Clients', @@ -100,9 +100,9 @@ return [ 'powered_by' => 'Powered by', 'no_items' => 'No items', 'recurring_invoices' => 'Recurring Invoices', - 'recurring_help' => '

Automatically send clients the same invoices weekly, bi-monthly, monthly, quarterly or annually.

-

Use :MONTH, :QUARTER or :YEAR for dynamic dates. Basic math works as well, for example :MONTH-1.

-

Examples of dynamic invoice variables:

+ 'recurring_help' => 'Automatically send clients the same invoices weekly, bi-monthly, monthly, quarterly or annually. + Use :MONTH, :QUARTER or :YEAR for dynamic dates. Basic math works as well, for example :MONTH-1. + Examples of dynamic invoice variables: