mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Merge upstream/v5-develop
This commit is contained in:
commit
dade7bad0a
@ -1 +1 @@
|
||||
5.1.24
|
||||
5.1.25
|
@ -136,7 +136,8 @@ class ConnectedAccountController extends BaseController
|
||||
//$ct = CompanyUser::whereUserId(auth()->user()->id);
|
||||
//return $this->listResponse($ct);
|
||||
|
||||
return $this->listResponse(auth()->user());
|
||||
return $this->itemResponse(auth()->user());
|
||||
// return $this->listResponse(auth()->user());
|
||||
}
|
||||
|
||||
return response()
|
||||
|
@ -47,11 +47,13 @@ class TwoFactorController extends BaseController
|
||||
|
||||
public function enableTwoFactor()
|
||||
{
|
||||
$google2fa = new Google2FA();
|
||||
|
||||
$user = auth()->user();
|
||||
$secret = request()->input('secret');
|
||||
$oneTimePassword = request()->input('one_time_password');
|
||||
|
||||
if (! $secret || ! \Google2FA::verifyKey($secret, $oneTimePassword)) {
|
||||
if (! $secret || ! $google2fa->verifyKey($secret, $oneTimePassword)) {
|
||||
return response()->json('message' > ctrans('texts.invalid_one_time_password'));
|
||||
} elseif (! $user->google_2fa_secret && $user->phone && $user->confirmed) {
|
||||
$user->google_2fa_secret = encrypt($secret);
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Services\BillingSubscription\BillingSubscriptionService;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
@ -53,6 +54,11 @@ class BillingSubscription extends BaseModel
|
||||
'deleted_at' => 'timestamp',
|
||||
];
|
||||
|
||||
public function service()
|
||||
{
|
||||
return new BillingSubscriptionService($this);
|
||||
}
|
||||
|
||||
public function company(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Company::class);
|
||||
|
@ -136,7 +136,7 @@ class PayPalExpressPaymentDriver extends BaseDriver
|
||||
$payment = $this->createPayment($data, \App\Models\Payment::STATUS_COMPLETED);
|
||||
|
||||
SystemLogger::dispatch(
|
||||
['response' => $response, 'data' => $data],
|
||||
['response' => (array)$response->getData(), 'data' => $data],
|
||||
SystemLog::CATEGORY_GATEWAY_RESPONSE,
|
||||
SystemLog::EVENT_GATEWAY_SUCCESS,
|
||||
SystemLog::TYPE_PAYPAL,
|
||||
|
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
|
||||
*
|
||||
* @license https://opensource.org/licenses/AAL
|
||||
*/
|
||||
|
||||
namespace App\Services\BillingSubscription;
|
||||
|
||||
class BillingSubscriptionService
|
||||
{
|
||||
|
||||
private $billing_subscription;
|
||||
|
||||
public function __construct(BillingSubscription $billing_subscription)
|
||||
{
|
||||
$this->billing_subscription = $billing_subscription;
|
||||
}
|
||||
|
||||
public function createInvoice($payment_hash)
|
||||
{
|
||||
//create the invoice if necessary ie. only is a payment was actually processed
|
||||
}
|
||||
|
||||
public function createClientSubscription($payment_hash)
|
||||
{
|
||||
//create the client sub record
|
||||
}
|
||||
|
||||
public function triggerWebhook($payment_hash)
|
||||
{
|
||||
//hit the webhook to after a successful onboarding
|
||||
}
|
||||
|
||||
public function fireNotifications()
|
||||
{
|
||||
//scan for any notification we are required to send
|
||||
}
|
||||
}
|
@ -285,6 +285,8 @@ class HtmlEngine
|
||||
$data['$company.website'] = ['value' => $this->settings->website ?: ' ', 'label' => ctrans('texts.website')];
|
||||
$data['$company.address'] = ['value' => $this->company->present()->address($this->settings) ?: ' ', 'label' => ctrans('texts.address')];
|
||||
|
||||
$data['$signature'] = ['value' => $this->settings->email_signature ?: ' ', 'label' => ''];
|
||||
|
||||
$data['$spc_qr_code'] = ['value' => $this->company->present()->getSpcQrCode($this->client->currency()->code, $this->entity->number, $this->entity->balance), 'label' => ''];
|
||||
|
||||
$logo = $this->company->present()->logo($this->settings);
|
||||
|
@ -38,7 +38,7 @@
|
||||
"coconutcraig/laravel-postmark": "^2.10",
|
||||
"composer/composer": "^2",
|
||||
"czproject/git-php": "^3.17",
|
||||
"dacastro4/laravel-gmail": "dev-master",
|
||||
"dacastro4/laravel-gmail": "^5.1",
|
||||
"doctrine/dbal": "^2.10",
|
||||
"fideloper/proxy": "^4.2",
|
||||
"fzaninotto/faker": "^1.4",
|
||||
|
739
composer.lock
generated
739
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -13,7 +13,7 @@ return [
|
||||
'require_https' => env('REQUIRE_HTTPS', true),
|
||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||
'app_domain' => env('APP_DOMAIN', ''),
|
||||
'app_version' => '5.1.24',
|
||||
'app_version' => '5.1.25',
|
||||
'minimum_client_version' => '5.0.16',
|
||||
'terms_version' => '1.0.1',
|
||||
'api_secret' => env('API_SECRET', false),
|
||||
|
2
public/flutter_service_worker.js
vendored
2
public/flutter_service_worker.js
vendored
@ -30,7 +30,7 @@ const RESOURCES = {
|
||||
"assets/packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf": "3e722fd57a6db80ee119f0e2c230ccff",
|
||||
"assets/FontManifest.json": "cf3c681641169319e61b61bd0277378f",
|
||||
"/": "23224b5e03519aaa87594403d54412cf",
|
||||
"main.dart.js": "c11c4d2efa9e671a88eb792d18c2296e",
|
||||
"main.dart.js": "0c23e414413fb1fc8aa4a898cd035a38",
|
||||
"version.json": "b7c8971e1ab5b627fd2a4317c52b843e",
|
||||
"favicon.png": "dca91c54388f52eded692718d5a98b8b"
|
||||
};
|
||||
|
70170
public/main.dart.js
vendored
70170
public/main.dart.js
vendored
File diff suppressed because one or more lines are too long
@ -22,10 +22,6 @@
|
||||
@lang($button)
|
||||
@endcomponent
|
||||
|
||||
@slot('signature')
|
||||
{{ $signature }}
|
||||
@endslot
|
||||
|
||||
@if(isset($whitelabel) && !$whitelabel)
|
||||
@slot('footer')
|
||||
@component('email.components.footer', ['url' => 'https://invoiceninja.com', 'url_text' => '© InvoiceNinja'])
|
||||
|
@ -6,10 +6,12 @@
|
||||
|
||||
{!! $body !!}
|
||||
|
||||
@slot('below_card')
|
||||
@if($signature)
|
||||
{{ $signature }}
|
||||
@endif
|
||||
@endslot
|
||||
@if($signature)
|
||||
<br>
|
||||
<br>
|
||||
<p>
|
||||
{{ $signature }}
|
||||
</p>
|
||||
@endif
|
||||
|
||||
@endcomponent
|
||||
|
@ -6,10 +6,12 @@
|
||||
|
||||
{!! $body !!}
|
||||
|
||||
@slot('below_card')
|
||||
@if($signature)
|
||||
{{ $signature }}
|
||||
@endif
|
||||
@endslot
|
||||
@if($signature)
|
||||
<br>
|
||||
<br>
|
||||
<p>
|
||||
{{ $signature }}
|
||||
</p>
|
||||
@endif
|
||||
|
||||
@endcomponent
|
||||
|
@ -24,6 +24,13 @@
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
@if($signature)
|
||||
<tr>
|
||||
<td>
|
||||
<p>{{ $signature }}</p>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
@isset($whitelabel)
|
||||
@if(!$whitelabel)
|
||||
|
@ -20,7 +20,7 @@
|
||||
-- Commands to create a MySQL database and user
|
||||
CREATE SCHEMA `db-ninja-01` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||
CREATE USER 'ninja'@'localhost' IDENTIFIED BY 'ninja';
|
||||
GRANT ALL PRIVILEGES ON `ninja`.* TO 'ninja'@'localhost';
|
||||
GRANT ALL PRIVILEGES ON `db-ninja-01`.* TO 'ninja'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
</pre>
|
||||
</details>
|
||||
|
Loading…
x
Reference in New Issue
Block a user