1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Merge pull request #7833 from turbo124/v5-develop

Remove google URL references to fonts.
This commit is contained in:
David Bomba 2022-09-30 15:35:09 +10:00 committed by GitHub
commit 2a6cded07d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 196 additions and 67 deletions

View File

@ -30,7 +30,10 @@ class ClientFilters extends QueryFilters
*/
public function name(string $name): Builder
{
return $this->builder->where('name', 'like', '%'.$name.'%');
if(strlen($name) >=1)
return $this->builder->where('name', 'like', '%'.$name.'%');
return $this->builder;
}
/**

View File

@ -105,11 +105,21 @@ class SwissQrGenerator
// Add payment reference
// This is what you will need to identify incoming payments.
if(stripos($this->invoice->number, "Live-") === 0)
{
// we're currently in preview status. Let's give a dummy reference for now
$invoice_number = "123456789";
}
else
{
$invoice_number = $this->invoice->number;
}
if(strlen($this->company->present()->besr_id()) > 1)
{
$referenceNumber = QrBill\Reference\QrPaymentReferenceGenerator::generate(
$this->company->present()->besr_id() ?: '', // You receive this number from your bank (BESR-ID). Unless your bank is PostFinance, in that case use NULL.
$this->invoice->number// A number to match the payment with your internal data, e.g. an invoice number
$invoice_number// A number to match the payment with your internal data, e.g. an invoice number
);
$qrBill->setPaymentReference(

View File

@ -41,7 +41,7 @@ class ActivityController extends BaseController
/**
* @OA\Get(
* path="/api/v1/actvities",
* path="/api/v1/activities",
* operationId="getActivities",
* tags={"actvities"},
* summary="Gets a list of actvities",

View File

@ -69,39 +69,7 @@ class SelfUpdateController extends BaseController
* ),
* )
*/
// public function old_update(\Codedge\Updater\UpdaterManager $updater)
// {
// set_time_limit(0);
// define('STDIN', fopen('php://stdin', 'r'));
// if (Ninja::isHosted()) {
// return response()->json(['message' => ctrans('texts.self_update_not_available')], 403);
// }
// $this->testWritable();
// // Get the new version available
// $versionAvailable = $updater->source()->getVersionAvailable();
// // Create a release
// $release = $updater->source()->fetch($versionAvailable);
// $updater->source()->update($release);
// $cacheCompiled = base_path('bootstrap/cache/compiled.php');
// if (file_exists($cacheCompiled)) { unlink ($cacheCompiled); }
// $cacheServices = base_path('bootstrap/cache/services.php');
// if (file_exists($cacheServices)) { unlink ($cacheServices); }
// Artisan::call('clear-compiled');
// Artisan::call('route:clear');
// Artisan::call('view:clear');
// Artisan::call('optimize');
// return response()->json(['message' => 'Update completed'], 200);
// }
public function update()
{
set_time_limit(0);

View File

@ -264,7 +264,7 @@ class Import implements ShouldQueue
$t->replace(Ninja::transformTranslations($this->company->settings));
Mail::to($this->user->email, $this->user->name())
->send(new MigrationCompleted($this->company, implode("<br>",$check_data)));
->send(new MigrationCompleted($this->company->id, $this->company->db, implode("<br>",$check_data)));
}
catch(\Exception $e) {
nlog($e->getMessage());
@ -715,6 +715,15 @@ class Import implements ShouldQueue
Client::reguard();
Client::with('contacts')->where('company_id', $this->company->id)->cursor()->each(function ($client){
$contact = $client->contacts->sortByDesc('is_primary')->first();
$contact->is_primary = true;
$contact->save();
});
/*Improve memory handling by setting everything to null when we have finished*/
$data = null;
$contact_repository = null;

View File

@ -2,6 +2,7 @@
namespace App\Mail;
use App\Libraries\MultiDB;
use App\Models\Company;
use App\Utils\Ninja;
use Illuminate\Bus\Queueable;
@ -13,19 +14,23 @@ class MigrationCompleted extends Mailable
{
// use Queueable, SerializesModels;
public $company;
public $company_id;
public $db;
public $check_data;
public $company;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct(Company $company, $check_data = '')
public function __construct(int $company_id, string $db, $check_data = '')
{
$this->company = $company;
$this->company_id = $company_id;
$this->check_data = $check_data;
$this->db = $db;
}
/**
@ -35,6 +40,10 @@ class MigrationCompleted extends Mailable
*/
public function build()
{
MultiDB::setDb($this->db);
$this->company = Company::find($this->company_id);
App::forgetInstance('translator');
$t = app('translator');
$t->replace(Ninja::transformTranslations($this->company->settings));

View File

@ -12,6 +12,7 @@
namespace App\PaymentDrivers;
use App\Exceptions\PaymentFailed;
use App\Http\Requests\ClientPortal\Payments\PaymentResponseRequest;
use App\Http\Requests\Gateways\Checkout3ds\Checkout3dsRequest;
use App\Http\Requests\Payments\PaymentWebhookRequest;
@ -254,12 +255,13 @@ class CheckoutComPaymentDriver extends BaseDriver
];
} catch (CheckoutApiException $e) {
// API error
$request_id = $e->request_id;
$http_status_code = $e->http_status_code;
$error_details = $e->error_details;
throw new PaymentFailed($e->getMessage(), $e->getCode());
} catch (CheckoutArgumentException $e) {
// Bad arguments
throw new PaymentFailed($e->getMessage(), $e->getCode());
return [
'transaction_reference' => null,
'transaction_response' => json_encode($e->getMessage()),
@ -270,6 +272,8 @@ class CheckoutComPaymentDriver extends BaseDriver
} catch (CheckoutAuthorizationException $e) {
// Bad Invalid authorization
throw new PaymentFailed($e->getMessage(), $e->getCode());
return [
'transaction_reference' => null,
'transaction_response' => json_encode($e->getMessage()),

View File

@ -74,7 +74,7 @@ class UpdatePaymentMethods
{
$sources = $customer->sources;
if(!property_exists($sources, 'data'))
if(!$customer || !property_exists($sources, 'data'))
return;
foreach ($sources->data as $method) {

View File

@ -7,9 +7,20 @@
<title>@yield('title')</title>
<!-- Fonts -->
<link rel="dns-prefetch" href="//fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet" defer>
{{-- <link rel="dns-prefetch" href="//fonts.gstatic.com"> --}}
{{-- <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet" defer> --}}
<style>
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url( {{asset('css/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2')}}) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
</style>
<!-- Styles -->
<style>
html {

View File

@ -7,9 +7,20 @@
<title>@yield('title')</title>
<!-- Fonts -->
<link rel="dns-prefetch" href="//fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet" type="text/css" defer>
{{-- <link rel="dns-prefetch" href="//fonts.gstatic.com"> --}}
{{-- <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet" type="text/css" defer> --}}
<style>
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url( {{asset('css/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2')}}) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
</style>
<!-- Styles -->
<style>
html, body {

View File

@ -7,8 +7,19 @@
<title>@yield('title')</title>
<!-- Fonts -->
<link rel="dns-prefetch" href="//fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet" defer>
{{-- <link rel="dns-prefetch" href="//fonts.gstatic.com"> --}}
{{-- <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet" defer> --}}
<style>
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url( {{asset('css/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2')}}) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
</style>
<!-- Styles -->
<style>

View File

@ -13,8 +13,19 @@
<script src="{{ asset('js/app.js') }}" defer></script>
<!-- Fonts -->
<link rel="dns-prefetch" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet" type="text/css" defer>
{{-- <link rel="dns-prefetch" href="https://fonts.gstatic.com"> --}}
{{-- <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet" type="text/css" defer> --}}
<style>
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url( {{asset('css/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2')}}) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
</style>
<!-- Styles -->
<link href="{{ asset('css/app.css') }}" rel="stylesheet">

View File

@ -52,8 +52,19 @@
<script src="{{ asset('vendor/alpinejs@2.8.2/alpine.js') }}" defer></script>
<!-- Fonts -->
<link rel="dns-prefetch" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet" type="text/css" defer>
{{-- <link rel="dns-prefetch" href="https://fonts.gstatic.com"> --}}
{{-- <link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet" type="text/css" defer> --}}
<style>
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url( {{asset('css/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2')}}) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
</style>
<!-- Styles -->
<link href="{{ mix('css/app.css') }}" rel="stylesheet" defer>

View File

@ -27,7 +27,11 @@
<label
for="{{ $field['key'] }}"
class="input-label">
@if(in_array($field['key'], ['custom_value1','custom_value2','custom_value3','custom_value4']))
{{ (new App\Utils\Helpers())->makeCustomField($register_company->custom_fields, str_replace("custom_value","client", $field['key']))}}
@else
{{ ctrans("texts.{$field['key']}") }}
@endif
</label>
@if($field['required'])

View File

@ -51,9 +51,19 @@
<script src="{{ asset('vendor/alpinejs@2.8.2/alpine.js') }}" defer></script>
<!-- Fonts -->
<link rel="dns-prefetch" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet" type="text/css" defer>
{{-- <link rel="dns-prefetch" href="https://fonts.gstatic.com"> --}}
{{-- <link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet" type="text/css" defer> --}}
<style>
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url( {{asset('css/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2')}}) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
</style>
<!-- Styles -->
<link href="{{ mix('css/app.css') }}" rel="stylesheet">

View File

@ -51,8 +51,20 @@
<script src="{{ asset('vendor/alpinejs@2.8.2/alpine.js') }}" defer></script>
<!-- Fonts -->
<link rel="dns-prefetch" href="https://fonts.gstatic.com">
{{-- <link rel="dns-prefetch" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet" type="text/css" defer>
--}}
<style>
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url( {{asset('css/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2')}}) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
</style>
<!-- Styles -->
<link href="{{ mix('css/app.css') }}" rel="stylesheet">

View File

@ -55,8 +55,19 @@
<script src="{{ asset('vendor/alpinejs@2.8.2/alpine.js') }}" defer></script>
<!-- Fonts -->
<link rel="dns-prefetch" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet" type="text/css" defer>
{{-- <link rel="dns-prefetch" href="https://fonts.gstatic.com"> --}}
{{-- <link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet" type="text/css" defer> --}}
<style>
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url( {{asset('css/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2')}}) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
</style>
<!-- Styles -->
@if(strpos(Request::url(),'setup') === false)

View File

@ -51,8 +51,19 @@
<script src="{{ asset('vendor/alpinejs@2.8.2/alpine.js') }}" defer></script>
<!-- Fonts -->
<link rel="dns-prefetch" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet" type="text/css" defer>
{{-- <link rel="dns-prefetch" href="https://fonts.gstatic.com"> --}}
{{-- <link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet" type="text/css" defer> --}}
<style>
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url( {{asset('css/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2')}}) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
</style>
<!-- Styles -->
<link href="{{ mix('css/app.css') }}" rel="stylesheet">

View File

@ -51,9 +51,21 @@
<script src="{{ asset('vendor/alpinejs@2.8.2/alpine.js') }}" defer></script>
<!-- Fonts -->
<link rel="dns-prefetch" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet" type="text/css" defer>
{{-- <link rel="dns-prefetch" href="https://fonts.gstatic.com"> --}}
{{-- <link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet" type="text/css" defer> --}}
<style>
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url( {{asset('css/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2')}}) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
</style>
<!-- Styles -->
<link href="{{ mix('css/app.css') }}" rel="stylesheet">
{{-- <link href="{{ mix('favicon.png') }}" rel="shortcut icon" type="image/png"> --}}

View File

@ -4,7 +4,18 @@
<head>
<meta charset="UTF-8">
<title>{{config('l5-swagger.documentations.'.$documentation.'.api.title')}}</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:300,600|Titillium+Web:400,600,700" rel="stylesheet" defer>
{{-- <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:300,600|Titillium+Web:400,600,700" rel="stylesheet" defer> --}}
<style>
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url( {{asset('css/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2')}}) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
</style>
<link rel="stylesheet" type="text/css" href="{{ l5_swagger_asset($documentation, 'swagger-ui.css') }}" defer>
<link rel="icon" type="image/png" href="{{ l5_swagger_asset($documentation, 'favicon-32x32.png') }}" sizes="32x32" defer>
<link rel="icon" type="image/png" href="{{ l5_swagger_asset($documentation, 'favicon-16x16.png') }}" sizes="16x16" defer>