1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #5227 from turbo124/v5-develop

v5.1.31
This commit is contained in:
David Bomba 2021-03-23 08:55:03 +11:00 committed by GitHub
commit 1379b8532d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 48 additions and 3 deletions

View File

@ -1 +1 @@
5.1.30
5.1.31

View File

@ -0,0 +1,39 @@
<?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\Http\Controllers;
use App\Libraries\MultiDB;
class SubdomainController extends BaseController
{
public function __construct()
{
}
/**
* Display a listing of the resource.
*
* @return void
*/
public function index()
{
$subdomain_exists = MultiDB::findAndSetDbByDomain(request()->input('subdomain'));
if($subdomain_exists)
return response()->json(['message' => 'Domain not available'] , 401);
return response()->json(['message' => 'Domain available'], 200);
}
}

View File

@ -271,6 +271,7 @@ class BillingPortalPurchase extends Component
->createInvoice($data)
->service()
->markSent()
->fillDefaults()
->save();
Cache::put($this->hash, [

View File

@ -63,6 +63,7 @@ class SendRecurring implements ShouldQueue
->markSent()
->applyNumber()
->createInvitations()
->fillDefaults()
->save();
nlog("Invoice {$invoice->number} created");

View File

@ -11,6 +11,7 @@
namespace App\Mail\Engine;
use App\Models\Account;
use App\Utils\HtmlEngine;
use App\Utils\Number;

View File

@ -20,12 +20,14 @@ use App\Models\PaymentHash;
use App\Models\Product;
use App\Models\SystemLog;
use App\Repositories\InvoiceRepository;
use App\Utils\Traits\CleanLineItems;
use App\Utils\Traits\MakesHash;
use GuzzleHttp\RequestOptions;
class BillingSubscriptionService
{
use MakesHash;
use CleanLineItems;
/** @var BillingSubscription */
private $billing_subscription;
@ -68,7 +70,7 @@ class BillingSubscriptionService
{
$invoice_repo = new InvoiceRepository();
$data['line_items'] = $this->createLineItems($data);
$data['line_items'] = $this->cleanItems($this->createLineItems($data));
/*
If trial_enabled -> return early

View File

@ -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.30',
'app_version' => '5.1.31',
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', false),

View File

@ -24,6 +24,7 @@ Route::group(['middleware' => ['api_secret_check', 'email_db']], function () {
});
Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'api/v1', 'as' => 'api.'], function () {
Route::post('check_subdomain', 'SubdomainController@index')->name('check_subdomain');
Route::get('ping', 'PingController@index')->name('ping');
Route::get('health_check', 'PingController@health')->name('health_check');