Merge pull request #9211 from turbo124/v5-develop

v5.8.18
This commit is contained in:
David Bomba 2024-01-29 23:00:33 +11:00 committed by GitHub
commit fbed726ed6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
25 changed files with 245 additions and 288 deletions

View File

@ -1 +1 @@
5.8.17
5.8.18

View File

@ -34,7 +34,7 @@ class ValidCompanyQuantity implements Rule
return auth()->user()->company()->account->companies->count() < 10;
}
return auth()->user()->account->isPaid() && auth()->user()->company()->account->companies->count() < 10 ;
return (auth()->user()->account->isPaid() || auth()->user()->account->isTrial()) && auth()->user()->company()->account->companies->count() < 10 ;
}
/**

View File

@ -1,53 +0,0 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Mail\Admin;
use App\Models\Company;
use App\Models\User;
use App\Utils\Ninja;
use Illuminate\Support\Facades\App;
class AccountCreatedObject
{
public function __construct(public User $user, public Company $company)
{
}
public function build()
{
App::forgetInstance('translator');
/* Init a new copy of the translator*/
$t = app('translator');
/* Set the locale*/
App::setLocale($this->company->getLocale());
/* Set customized translations _NOW_ */
$t->replace(Ninja::transformTranslations($this->company->settings));
$data = [
'title' => ctrans('texts.new_signup'),
'message' => ctrans('texts.new_signup_text', ['user' => $this->user->present()->name(), 'email' => $this->user->email, 'ip' => $this->user->ip]),
'url' => config('ninja.web_url'),
'button' => ctrans('texts.account_login'),
'signature' => $this->company->settings->email_signature,
'settings' => $this->company->settings,
'logo' => $this->company->present()->logo(),
];
$mail_obj = new \stdClass();
$mail_obj->subject = ctrans('texts.new_signup');
$mail_obj->data = $data;
$mail_obj->markdown = 'email.admin.generic';
$mail_obj->tag = $this->company->company_key;
return $mail_obj;
}
}

View File

@ -1,115 +0,0 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Mail\Admin;
use App\Models\Invoice;
use App\Utils\HtmlEngine;
use App\Utils\Ninja;
use App\Utils\Traits\MakesHash;
use Illuminate\Support\Facades\App;
use stdClass;
//@deprecated
class AutoBillingFailureObject
{
use MakesHash;
public $client;
public $error;
public $company;
public $payment_hash;
private $invoices;
/**
* Create a new job instance.
*
* @param $client
* @param $message
* @param $company
* @param $amount
*/
public function __construct($client, $error, $company, $payment_hash)
{
$this->client = $client;
$this->error = $error;
$this->company = $company;
$this->payment_hash = $payment_hash;
$this->company = $company;
}
public function build()
{
App::forgetInstance('translator');
/* Init a new copy of the translator*/
$t = app('translator');
/* Set the locale*/
App::setLocale($this->company->getLocale());
/* Set customized translations _NOW_ */
$t->replace(Ninja::transformTranslations($this->company->settings));
$this->invoices = Invoice::query()->whereIn('id', $this->transformKeys(array_column($this->payment_hash->invoices(), 'invoice_id')))->get();
$mail_obj = new stdClass();
$mail_obj->amount = $this->getAmount();
$mail_obj->subject = $this->getSubject();
$mail_obj->data = $this->getData();
$mail_obj->markdown = 'email.admin.generic';
$mail_obj->tag = $this->company->company_key;
return $mail_obj;
}
private function getAmount()
{
return array_sum(array_column($this->payment_hash->invoices(), 'amount')) + $this->payment_hash->fee_total;
}
private function getSubject()
{
return
ctrans(
'texts.auto_bill_failed',
['invoice_number' => $this->invoices->first()->number]
);
}
private function getData()
{
$signature = $this->client->getSetting('email_signature');
$html_variables = (new HtmlEngine($this->invoices->first()->invitations->first()))->makeValues();
$signature = str_replace(array_keys($html_variables), array_values($html_variables), $signature);
$data = [
'title' => ctrans(
'texts.auto_bill_failed',
['invoice_number' => $this->invoices->first()->number]
),
'message' => $this->error,
'signature' => $signature,
'logo' => $this->company->present()->logo(),
'settings' => $this->client->getMergedSettings(),
'whitelabel' => $this->company->account->isPaid() ? true : false,
'url' => config('ninja.app_url'),
'button' => ctrans('texts.login'),
];
return $data;
}
}

View File

@ -127,11 +127,6 @@ class ClientPaymentFailureObject
'additional_info' => $this->error ?? '',
];
if (strlen($this->error > 1)) {
// $data['content'] .= "\n\n{$this->error}";
$data['text_body'] .= "\n\n".$this->error;
}
return $data;
}
}

View File

@ -73,23 +73,26 @@ class EntityCreatedObject
);
$mail_obj->markdown = 'email.admin.generic';
// $mail_obj->tag = $this->company->company_key;
$mail_obj->data = [
'title' => $mail_obj->subject,
'message' => ctrans(
$content = ctrans(
$this->template_body,
[
'amount' => $mail_obj->amount,
'vendor' => $this->entity->vendor->present()->name(),
'purchase_order' => $this->entity->number,
]
),
);
$mail_obj->data = [
'title' => $mail_obj->subject,
'content' => $content,
'url' => $this->entity->invitations()->first()->getAdminLink($this->use_react_link),
'button' => ctrans("texts.view_{$this->entity_type}"),
'signature' => $this->company->settings->email_signature,
'logo' => $this->company->present()->logo(),
'settings' => $this->company->settings,
'whitelabel' => $this->company->account->isPaid() ? true : false,
'text_body' => $content,
];
} else {
$this->entity->load('client.country', 'client.company');
@ -100,7 +103,7 @@ class EntityCreatedObject
$mail_obj->subject = $this->getSubject();
$mail_obj->data = $this->getData();
$mail_obj->markdown = 'email.admin.generic';
// $mail_obj->tag = $this->entity->company->company_key;
$mail_obj->text_view = 'email.template.text';
}
return $mail_obj;
@ -165,15 +168,18 @@ class EntityCreatedObject
{
$settings = $this->entity->client->getMergedSettings();
$content = $this->getMessage();
return [
'title' => $this->getSubject(),
'message' => $this->getMessage(),
'content' => $content,
'url' => $this->entity->invitations()->first()->getAdminLink($this->use_react_link),
'button' => ctrans("texts.view_{$this->entity_type}"),
'signature' => $settings->email_signature,
'logo' => $this->company->present()->logo(),
'settings' => $settings,
'whitelabel' => $this->company->account->isPaid() ? true : false,
'text_body' => $content,
];
}
}

View File

@ -37,11 +37,11 @@ class EntityFailedSendObject
private $template_body;
private $message;
private $message_content;
protected $use_react_url;
public function __construct($invitation, $entity_type, $template, $message, $use_react_url)
public function __construct($invitation, $entity_type, $template, $message_content, $use_react_url)
{
$this->invitation = $invitation;
$this->entity_type = $entity_type;
@ -49,7 +49,7 @@ class EntityFailedSendObject
$this->contact = $invitation->contact;
$this->company = $invitation->company;
$this->template = $template;
$this->message = $message;
$this->message_content = $message_content;
$this->use_react_url = $use_react_url;
}
@ -71,6 +71,7 @@ class EntityFailedSendObject
$mail_obj->data = $this->getData();
$mail_obj->markdown = 'email.admin.generic';
$mail_obj->tag = $this->company->company_key;
$mail_obj->text_view = 'email.template.text';
return $mail_obj;
}
@ -80,36 +81,28 @@ class EntityFailedSendObject
switch ($this->template) {
case 'invoice':
case 'reminder1':
case 'reminder2':
case 'reminder3':
case 'reminder_endless':
$this->template_subject = 'texts.notification_invoice_bounced_subject';
$this->template_body = 'texts.notification_invoice_bounced';
break;
case 'reminder1':
$this->template_subject = 'texts.notification_invoice_reminder1_sent_subject';
$this->template_body = 'texts.notification_invoice_sent';
break;
case 'reminder2':
$this->template_subject = 'texts.notification_invoice_reminder2_sent_subject';
$this->template_body = 'texts.notification_invoice_sent';
break;
case 'reminder3':
$this->template_subject = 'texts.notification_invoice_reminder3_sent_subject';
$this->template_body = 'texts.notification_invoice_sent';
break;
case 'reminder_endless':
$this->template_subject = 'texts.notification_invoice_reminder_endless_sent_subject';
$this->template_body = 'texts.notification_invoice_sent';
break;
case 'quote':
$this->template_subject = 'texts.notification_quote_bounced_subject';
$this->template_body = 'texts.notification_quote_sent';
$this->template_body = 'texts.notification_quote_bounced';
break;
case 'credit':
$this->template_subject = 'texts.notification_credit_bounced_subject';
$this->template_body = 'texts.notification_credit_bounced';
break;
case 'purchase_order':
$this->template_subject = 'texts.notification_purchase_order_bounced_subject';
$this->template_body = 'texts.notification_purchase_order_bounced';
break;
default:
$this->template_subject = 'texts.notification_invoice_sent_subject';
$this->template_body = 'texts.notification_invoice_sent';
$this->template_subject = 'texts.notification_invoice_bounced_subject';
$this->template_body = 'texts.notification_invoice_bounced';
break;
}
}
@ -138,25 +131,30 @@ class EntityFailedSendObject
$html_variables = (new HtmlEngine($this->invitation))->makeValues();
$signature = str_replace(array_keys($html_variables), array_values($html_variables), $signature);
return [
'title' => $this->getSubject(),
'message' => ctrans(
$content = ctrans(
$this->template_body,
[
'amount' => $this->getAmount(),
'client' => $this->contact->present()->name(),
'invoice' => $this->entity->number,
'error' => $this->message,
'error' => $this->message_content ?? '',
'contact' => $this->contact->present()->name(),
]
),
'url' => $this->invitation->getAdminLink($this->use_react_url),
'button' => ctrans("texts.view_{$this->entity_type}"),
'signature' => $signature,
'logo' => $this->company->present()->logo(),
'settings' => $settings,
'whitelabel' => $this->company->account->isPaid() ? true : false,
);
$data = [
"title" => $this->getSubject(),
"content" => $content,
"url" => $this->invitation->getAdminLink($this->use_react_url),
"button" => ctrans("texts.view_{$this->entity_type}"),
"signature" => $signature,
"logo" => $this->company->present()->logo(),
"settings" => $settings,
"whitelabel" => $this->company->account->isPaid() ? true : false,
"text_body" => str_replace("<br>", "\n", $content),
];
return $data;
}
}

View File

@ -12,7 +12,7 @@
namespace App\Mail\Admin;
use Illuminate\Mail\Mailable;
//@deprecated?
class EntityNotificationMailer extends Mailable
{
public $mail_obj;

View File

@ -52,6 +52,7 @@ class EntityPaidObject
$mail_obj->data = $this->getData();
$mail_obj->markdown = 'email.admin.generic';
$mail_obj->tag = $this->company->company_key;
$mail_obj->text_view = 'email.template.text';
return $mail_obj;
}
@ -74,8 +75,6 @@ class EntityPaidObject
{
$settings = $this->payment->client->getMergedSettings();
$signature = $this->generateSignature($settings);
$amount = Number::formatMoney($this->payment->amount, $this->payment->client);
$invoice_texts = ctrans('texts.invoice_number_short');
@ -85,37 +84,30 @@ class EntityPaidObject
}
$invoice_texts = substr($invoice_texts, 0, -1);
$content = ctrans(
'texts.notification_payment_paid',
['amount' => $amount,
'client' => $this->payment->client->present()->name(),
'invoice' => $invoice_texts,
]
);
$data = [
'title' => ctrans(
'texts.notification_payment_paid_subject',
['client' => $this->payment->client->present()->name()]
),
'content' => ctrans(
'texts.notification_payment_paid',
['amount' => $amount,
'client' => $this->payment->client->present()->name(),
'invoice' => $invoice_texts,
]
),
'content' => $content,
'url' => $this->payment->portalUrl($this->use_react_url),
'button' => ctrans('texts.view_payment'),
'signature' => $settings->email_signature,
'logo' => $this->company->present()->logo(),
'settings' => $settings,
'whitelabel' => $this->company->account->isPaid() ? true : false,
'text_body' => $content,
];
return $data;
}
private function generateSignature($settings)
{
$html_variables = (new PaymentEmailEngine($this->payment, $this->payment->client->primary_contact()->first()))->makeValues();
$signature = str_replace(array_keys($html_variables), array_values($html_variables), $settings->email_signature);
return $signature;
}
}

View File

@ -98,7 +98,9 @@ class EntitySentObject
$mail_obj->markdown = 'email.admin.generic';
$mail_obj->tag = $this->company->company_key;
}
// nlog($mail_obj);
$mail_obj->text_view = 'email.template.text';
return $mail_obj;
}
@ -183,16 +185,18 @@ class EntitySentObject
private function getData()
{
$settings = $this->entity->client->getMergedSettings();
$content = $this->getMessage();
return [
'title' => $this->getSubject(),
'content' => $this->getMessage(),
'content' => $content,
'url' => $this->invitation->getAdminLink($this->use_react_url),
'button' => ctrans("texts.view_{$this->entity_type}"),
'signature' => $settings->email_signature,
'logo' => $this->company->present()->logo(),
'settings' => $settings,
'whitelabel' => $this->company->account->isPaid() ? true : false,
'text_body' => $content,
];
}
}

View File

@ -62,7 +62,7 @@ class EntityViewedObject
$mail_obj->data = $this->getData();
$mail_obj->markdown = 'email.admin.generic';
$mail_obj->tag = $this->company->company_key;
$mail_obj->text_view = 'email.template.text';
return $mail_obj;
}
@ -97,22 +97,25 @@ class EntityViewedObject
$settings = $this->company->settings;
}
$data = [
'title' => $this->getSubject(),
'message' => ctrans(
$content = ctrans(
"texts.notification_{$this->entity_type}_viewed",
[
'amount' => $this->getAmount(),
'client' => $this->contact->present()->name(),
'invoice' => $this->entity->number,
]
),
);
$data = [
'title' => $this->getSubject(),
'content' => $content,
'url' => $this->invitation->getAdminLink($this->use_react_url),
'button' => ctrans("texts.view_{$this->entity_type}"),
'signature' => $settings->email_signature,
'logo' => $this->company->present()->logo(),
'settings' => $settings,
'whitelabel' => $this->company->account->isPaid() ? true : false,
'text_body' => $content,
];
return $data;

View File

@ -39,7 +39,7 @@ class InventoryNotificationObject
$mail_obj->data = $this->getData();
$mail_obj->markdown = 'email.admin.generic';
$mail_obj->tag = $this->product->company->company_key;
$mail_obj->text_view = 'email.template.text';
return $mail_obj;
}
@ -59,20 +59,23 @@ class InventoryNotificationObject
private function getData()
{
$data = [
'title' => $this->getSubject(),
'content' => ctrans(
$content = ctrans(
'texts.inventory_notification_body',
['amount' => $this->getAmount(),
'product' => $this->product->product_key.': '.$this->product->notes,
]
),
);
$data = [
'title' => $this->getSubject(),
'content' => $content,
'url' => $this->product->portalUrl($this->use_react_url),
'button' => ctrans('texts.view'),
'signature' => $this->product->company->settings->email_signature,
'logo' => $this->product->company->present()->logo(),
'settings' => $this->product->company->settings,
'whitelabel' => $this->product->company->account->isPaid() ? true : false,
'text_body' => $content,
];
return $data;

View File

@ -52,6 +52,7 @@ class PaymentFailureObject
$mail_obj->data = $this->getData();
$mail_obj->markdown = 'email.admin.generic';
$mail_obj->tag = $this->company->company_key;
$mail_obj->text_view = 'email.template.text';
return $mail_obj;
}
@ -73,7 +74,15 @@ class PaymentFailureObject
private function getData()
{
$signature = $this->client->getSetting('email_signature');
$content = ctrans(
'texts.notification_invoice_payment_failed',
[
'client' => $this->client->present()->name(),
'invoice' => $this->getDescription(),
'amount' => Number::formatMoney($this->amount, $this->client),
]
);
$data = [
'title' => ctrans(
'texts.payment_failed_subject',
@ -81,14 +90,7 @@ class PaymentFailureObject
'client' => $this->client->present()->name(),
]
),
'content' => ctrans(
'texts.notification_invoice_payment_failed',
[
'client' => $this->client->present()->name(),
'invoice' => $this->getDescription(),
'amount' => Number::formatMoney($this->amount, $this->client),
]
),
'content' => $content,
'signature' => $signature,
'logo' => $this->company->present()->logo(),
'settings' => $this->client->getMergedSettings(),
@ -96,12 +98,9 @@ class PaymentFailureObject
'url' => $this->client->portalUrl($this->use_react_url),
'button' => $this->use_react_url ? ctrans('texts.view_client') : ctrans('texts.login'),
'additional_info' => $this->error,
'text_body' => $content,
];
if (strlen($this->error > 1)) {
$data['content'] .= "\n\n".$this->error;
}
return $data;
}

View File

@ -47,6 +47,7 @@ class PurchaseOrderAcceptedObject
$mail_obj->data = $this->getData();
$mail_obj->markdown = 'email.admin.generic';
$mail_obj->tag = $this->company->company_key;
$mail_obj->text_view = 'email.template.text';
return $mail_obj;
}
@ -72,22 +73,25 @@ class PurchaseOrderAcceptedObject
{
$settings = $this->company->settings;
$data = [
'title' => $this->getSubject(),
'message' => ctrans(
$content = ctrans(
'texts.notification_purchase_order_accepted',
[
'amount' => $this->getAmount(),
'vendor' => $this->purchase_order->vendor->present()->name(),
'purchase_order' => $this->purchase_order->number,
]
),
);
$data = [
'title' => $this->getSubject(),
'content' => $content,
'url' => $this->purchase_order->invitations->first()->getAdminLink($this->use_react_url),
'button' => ctrans('texts.view_purchase_order'),
'signature' => $settings->email_signature,
'logo' => $this->company->present()->logo(),
'settings' => $settings,
'whitelabel' => $this->company->account->isPaid() ? true : false,
'text_body' => $content,
];
return $data;

View File

@ -47,6 +47,7 @@ class QuoteApprovedObject
$mail_obj->data = $this->getData();
$mail_obj->markdown = 'email.admin.generic';
$mail_obj->tag = $this->company->company_key;
$mail_obj->text_view = 'email.template.text';
return $mail_obj;
}
@ -71,23 +72,25 @@ class QuoteApprovedObject
private function getData()
{
$settings = $this->quote->client->getMergedSettings();
$data = [
'title' => $this->getSubject(),
'message' => ctrans(
$content = ctrans(
'texts.notification_quote_approved',
[
'amount' => $this->getAmount(),
'client' => $this->quote->client->present()->name(),
'invoice' => $this->quote->number,
]
),
);
$data = [
'title' => $this->getSubject(),
'content' => $content,
'url' => $this->quote->invitations->first()->getAdminLink($this->use_react_url),
'button' => ctrans('texts.view_quote'),
'signature' => $settings->email_signature,
'logo' => $this->company->present()->logo(),
'settings' => $settings,
'whitelabel' => $this->company->account->isPaid() ? true : false,
'text_body' => $content,
];
return $data;

View File

@ -47,6 +47,7 @@ class QuoteExpiredObject
$mail_obj->data = $this->getData();
$mail_obj->markdown = 'email.admin.generic';
$mail_obj->tag = $this->company->company_key;
$mail_obj->text_view = 'email.template.text';
return $mail_obj;
}
@ -71,23 +72,25 @@ class QuoteExpiredObject
private function getData()
{
$settings = $this->quote->client->getMergedSettings();
$data = [
'title' => $this->getSubject(),
'message' => ctrans(
$content = ctrans(
'texts.notification_quote_expired',
[
'amount' => $this->getAmount(),
'client' => $this->quote->client->present()->name(),
'invoice' => $this->quote->number,
]
),
);
$data = [
'title' => $this->getSubject(),
'content' => $content,
'url' => $this->quote->invitations->first()->getAdminLink($this->use_react_url),
'button' => $this->use_react_url ? ctrans('texts.view_quote') : ctrans('texts.login'),
'signature' => $settings->email_signature,
'logo' => $this->company->present()->logo(),
'settings' => $settings,
'whitelabel' => $this->company->account->isPaid() ? true : false,
'text_body' => $content,
];
return $data;

View File

@ -34,12 +34,13 @@ class ResetPasswordObject
$data = [
'title' => ctrans('texts.your_password_reset_link'),
'message' => ctrans('texts.reset_password'),
'content' => ctrans('texts.reset_password'),
'url' => route('password.reset', ['token' => $this->token, 'email' => $this->user->email, 'react' => $this->is_react ? 'true' : 'false']),
'button' => ctrans('texts.reset'),
'signature' => $this->company->settings->email_signature,
'settings' => $this->company->settings,
'logo' => $this->company->present()->logo(),
'text_body' => ctrans('texts.reset_password'),
];
$mail_obj = new \stdClass();
@ -47,6 +48,7 @@ class ResetPasswordObject
$mail_obj->data = $data;
$mail_obj->markdown = 'email.admin.generic';
$mail_obj->tag = $this->company->company_key;
$mail_obj->text_view = 'email.template.text';
return $mail_obj;
}

View File

@ -46,12 +46,13 @@ class VerifyUserObject
$data = [
'title' => ctrans('texts.confirmation_subject'),
'message' => ctrans('texts.confirmation_message'),
'content' => ctrans('texts.confirmation_message'),
'url' => url("/user/confirm/{$this->user->confirmation_code}".$react_redirect),
'button' => ctrans('texts.button_confirmation_message'),
'settings' => $this->company->settings,
'logo' => $this->company->present()->logo(),
'signature' => $this->company->settings->email_signature,
'text_body' => ctrans('texts.confirmation_message'),
];
$mail_obj = new \stdClass();

View File

@ -28,7 +28,7 @@ class MaxCompanies extends Mailable
public $title;
public $message;
// public $message;
public $whitelabel;
@ -54,7 +54,7 @@ class MaxCompanies extends Mailable
$this->settings = $this->company->settings;
$this->logo = $this->company->present()->logo();
$this->title = ctrans('texts.max_companies');
$this->message = ctrans('texts.max_companies_desc');
// $this->message = ctrans('texts.max_companies_desc');
$this->whitelabel = $this->company->account->isPaid();
return $this->from(config('mail.from.address'), config('mail.from.name'))

View File

@ -100,7 +100,7 @@ class Helpers
break;
case 'switch':
return trim($value) == 'yes' ? ctrans('texts.yes') : ctrans('texts.no');
return trim($value ?? '') == 'yes' ? ctrans('texts.yes') : ctrans('texts.no');
break;
default:

View File

@ -5,7 +5,7 @@ return [
'web_url' => 'https://www.invoiceninja.com',
'admin_token' => env('NINJA_ADMIN_TOKEN', ''),
'license_url' => 'https://app.invoiceninja.com',
'react_url' => env('REACT_URL', 'https://app.invoicing.co'),
'react_url' => env('REACT_URL', env('APP_URL', '')),
'production' => env('NINJA_PROD', false),
'license' => env('NINJA_LICENSE', ''),
'version_url' => 'https://pdf.invoicing.co/api/version',
@ -17,8 +17,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => env('APP_VERSION', '5.8.17'),
'app_tag' => env('APP_TAG', '5.8.17'),
'app_version' => env('APP_VERSION', '5.8.18'),
'app_tag' => env('APP_TAG', '5.8.18'),
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', false),

View File

@ -0,0 +1,109 @@
<?php
use App\Models\Timezone;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
if($t = Timezone::find(2)){
$t->name = 'Pacific/Apia';
$t->save();
}
if($t = Timezone::find(3)) {
$t->name = 'Pacific/Honolulu';
$t->save();
}
if($t = Timezone::find(4)) {
$t->name = 'America/Anchorage';
$t->save();
}
if($t = Timezone::find(5)) {
$t->name = 'America/Los_Angeles';
$t->save();
}
if($t = Timezone::find(7)) {
$t->name = 'America/Phoenix';
$t->save();
}
if($t = Timezone::find(8)) {
$t->name = 'America/Denver';
$t->save();
}
if($t = Timezone::find(13)) {
$t->name = 'America/Regina';
$t->save();
}
if($t = Timezone::find(14)) {
$t->name = 'America/Chicago';
$t->save();
}
if($t = Timezone::find(15)) {
$t->name = 'America/New_York';
$t->save();
}
if($t = Timezone::find(16)) {
$t->name = 'America/Indiana/Indianapolis';
$t->save();
}
if($t = Timezone::find(20)) {
$t->name = 'America/Halifax';
$t->save();
}
if($t = Timezone::find(23)) {
$t->name = 'America/St_Johns';
$t->save();
}
if($t = Timezone::find(24)) {
$t->name = 'America/Argentina/Buenos_Aires';
$t->save();
}
if($t = Timezone::find(25)) {
$t->name = 'America/Nuuk';
$t->save();
}
if($t = Timezone::find(59)) {
$t->name = 'Europe/Kyiv';
$t->save();
}
if($t = Timezone::find(90)) {
$t->name = 'Asia/Shanghai';
$t->save();
}
if($t = Timezone::find(105)) {
$t->name = 'Australia/Sydney';
$t->save();
}
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};

View File

@ -693,9 +693,9 @@ $lang = array(
'disable' => 'Disable',
'invoice_quote_number' => 'Invoice and Quote Numbers',
'invoice_charges' => 'Invoice Surcharges',
'notification_invoice_bounced' => 'We were unable to deliver Invoice :invoice to :contact.',
'notification_invoice_bounced' => 'We were unable to deliver Invoice :invoice to :contact. <br><br> :error',
'notification_invoice_bounced_subject' => 'Unable to deliver Invoice :invoice',
'notification_quote_bounced' => 'We were unable to deliver Quote :invoice to :contact.',
'notification_quote_bounced' => 'We were unable to deliver Quote :invoice to :contact. <br><br> :error',
'notification_quote_bounced_subject' => 'Unable to deliver Quote :invoice',
'custom_invoice_link' => 'Custom Invoice Link',
'total_invoiced' => 'Total Invoiced',
@ -3010,7 +3010,7 @@ $lang = array(
'hosted_login' => 'Hosted Login',
'selfhost_login' => 'Selfhost Login',
'google_login' => 'Google Login',
'thanks_for_patience' => 'Thank for your patience while we work to implement these features.\n\nWe hope to have them completed in the next few months.\n\nUntil then we\'ll continue to support the',
'thanks_for_patience' => 'Thank for your patience while we work to implement these features.<br><br>We hope to have them completed in the next few months.<br><br>Until then we\'ll continue to support the',
'legacy_mobile_app' => 'legacy mobile app',
'today' => 'Today',
'current' => 'Current',
@ -5219,6 +5219,9 @@ $lang = array(
'subscribe' => 'Subscribe',
'subscribe_help' => 'You are currently subscribed and will continue to receive email communications.',
'unsubscribe_help' => 'You are currently not subscribed, and therefore, will not receive emails at this time.',
'notification_purchase_order_bounced' => 'We were unable to deliver Purchase Order :invoice to :contact. <br><br> :error',
'notification_purchase_order_bounced_subject' => 'Unable to deliver Purchase Order :invoice',
);
return $lang;

View File

@ -14,7 +14,7 @@
<div style="margin-top: 10px; margin-bottom: 30px;">
@isset($content)
{{ $content }}
{!! nl2br($content, true) !!}
@endisset
@isset($slot)

View File

@ -13,7 +13,7 @@
@endisset
<div style="margin-top: 10px; margin-bottom: 30px;">
{{ $content }}
{!! nl2br(e($content)) !!}
</div>
@isset($additional_info)