diff --git a/VERSION.txt b/VERSION.txt index 9ee40d9560..d7896a867f 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.1.30 \ No newline at end of file +5.1.31 \ No newline at end of file diff --git a/app/Http/Controllers/SubdomainController.php b/app/Http/Controllers/SubdomainController.php new file mode 100644 index 0000000000..73733e382c --- /dev/null +++ b/app/Http/Controllers/SubdomainController.php @@ -0,0 +1,39 @@ +input('subdomain')); + + if($subdomain_exists) + return response()->json(['message' => 'Domain not available'] , 401); + + return response()->json(['message' => 'Domain available'], 200); + } + +} diff --git a/app/Http/Livewire/BillingPortalPurchase.php b/app/Http/Livewire/BillingPortalPurchase.php index b3a5148c7f..bfb35d4697 100644 --- a/app/Http/Livewire/BillingPortalPurchase.php +++ b/app/Http/Livewire/BillingPortalPurchase.php @@ -271,6 +271,7 @@ class BillingPortalPurchase extends Component ->createInvoice($data) ->service() ->markSent() + ->fillDefaults() ->save(); Cache::put($this->hash, [ diff --git a/app/Jobs/RecurringInvoice/SendRecurring.php b/app/Jobs/RecurringInvoice/SendRecurring.php index 843c722d1d..8dac7d6cfc 100644 --- a/app/Jobs/RecurringInvoice/SendRecurring.php +++ b/app/Jobs/RecurringInvoice/SendRecurring.php @@ -63,6 +63,7 @@ class SendRecurring implements ShouldQueue ->markSent() ->applyNumber() ->createInvitations() + ->fillDefaults() ->save(); nlog("Invoice {$invoice->number} created"); diff --git a/app/Mail/Engine/QuoteEmailEngine.php b/app/Mail/Engine/QuoteEmailEngine.php index 9d85d8b68d..548728bb12 100644 --- a/app/Mail/Engine/QuoteEmailEngine.php +++ b/app/Mail/Engine/QuoteEmailEngine.php @@ -11,6 +11,7 @@ namespace App\Mail\Engine; +use App\Models\Account; use App\Utils\HtmlEngine; use App\Utils\Number; diff --git a/app/Services/BillingSubscription/BillingSubscriptionService.php b/app/Services/BillingSubscription/BillingSubscriptionService.php index c030678d38..b68a9e7fc1 100644 --- a/app/Services/BillingSubscription/BillingSubscriptionService.php +++ b/app/Services/BillingSubscription/BillingSubscriptionService.php @@ -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 diff --git a/config/ninja.php b/config/ninja.php index bb8873be61..6119b502a1 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -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), diff --git a/public/assets/packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf b/public/assets/packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf old mode 100755 new mode 100644 index 55456295b3..761dfaf8a6 Binary files a/public/assets/packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf and b/public/assets/packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf differ diff --git a/routes/api.php b/routes/api.php index 26136e5009..7038fa7856 100644 --- a/routes/api.php +++ b/routes/api.php @@ -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');