Merge pull request #7694 from turbo124/v5-stable

v5.5.3
This commit is contained in:
David Bomba 2022-07-29 12:23:34 +10:00 committed by GitHub
commit 32d8942413
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 85 additions and 29 deletions

View File

@ -1 +1 @@
5.5.2 5.5.3

View File

@ -263,6 +263,17 @@ class BillingPortalPurchase extends Component
} }
} }
if(array_key_exists('currency_id', $this->request_data)) {
$currency = Cache::get('currencies')->filter(function ($item){
return $item->id == $this->request_data['currency_id'];
})->first();
if($currency)
$data['settings']->currency_id = $currency->id;
}
if (array_key_exists('locale', $this->request_data)) { if (array_key_exists('locale', $this->request_data)) {
$request = $this->request_data; $request = $this->request_data;

View File

@ -119,6 +119,7 @@ class Company extends BaseModel
'track_inventory', 'track_inventory',
'inventory_notification_threshold', 'inventory_notification_threshold',
'stock_notification', 'stock_notification',
'enabled_expense_tax_rates',
]; ];
protected $hidden = [ protected $hidden = [
@ -518,7 +519,7 @@ class Company extends BaseModel
public function owner() public function owner()
{ {
return $this->company_users()->withTrashed()->where('is_owner', true)->first()->user; return $this->company_users()->withTrashed()->where('is_owner', true)->first()?->user;
} }
public function resolveRouteBinding($value, $field = null) public function resolveRouteBinding($value, $field = null)

View File

@ -177,6 +177,7 @@ class CompanyTransformer extends EntityTransformer
'inventory_notification_threshold' => (int) $company->inventory_notification_threshold, 'inventory_notification_threshold' => (int) $company->inventory_notification_threshold,
'track_inventory' => (bool) $company->track_inventory, 'track_inventory' => (bool) $company->track_inventory,
'enable_applying_payments' => (bool) $company->enable_applying_payments, 'enable_applying_payments' => (bool) $company->enable_applying_payments,
'enabled_expense_tax_rates' => (bool) $company->enabled_expense_tax_rates,
]; ];
} }

View File

@ -36,7 +36,7 @@
"ext-json": "*", "ext-json": "*",
"ext-libxml": "*", "ext-libxml": "*",
"afosto/yaac": "^1.4", "afosto/yaac": "^1.4",
"asm/php-ansible": "^4", "asm/php-ansible": "^4.0",
"authorizenet/authorizenet": "^2.0", "authorizenet/authorizenet": "^2.0",
"awobaz/compoships": "^2.1", "awobaz/compoships": "^2.1",
"bacon/bacon-qr-code": "^2.0", "bacon/bacon-qr-code": "^2.0",

40
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "bbd6f8107bd70628ea7527c968ca3c8d", "content-hash": "dd251d0b8181fc819aded8d8d5c6bb07",
"packages": [ "packages": [
{ {
"name": "afosto/yaac", "name": "afosto/yaac",
@ -378,16 +378,16 @@
}, },
{ {
"name": "aws/aws-sdk-php", "name": "aws/aws-sdk-php",
"version": "3.231.15", "version": "3.231.16",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/aws/aws-sdk-php.git", "url": "https://github.com/aws/aws-sdk-php.git",
"reference": "ba379285d24b609a997bd8b40933d3e0a3826dfb" "reference": "c50adea1de4ad3d6dda41310a8af5ce13ee876d5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/ba379285d24b609a997bd8b40933d3e0a3826dfb", "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c50adea1de4ad3d6dda41310a8af5ce13ee876d5",
"reference": "ba379285d24b609a997bd8b40933d3e0a3826dfb", "reference": "c50adea1de4ad3d6dda41310a8af5ce13ee876d5",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -464,9 +464,9 @@
"support": { "support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues", "issues": "https://github.com/aws/aws-sdk-php/issues",
"source": "https://github.com/aws/aws-sdk-php/tree/3.231.15" "source": "https://github.com/aws/aws-sdk-php/tree/3.231.16"
}, },
"time": "2022-07-27T18:59:36+00:00" "time": "2022-07-28T18:17:24+00:00"
}, },
{ {
"name": "bacon/bacon-qr-code", "name": "bacon/bacon-qr-code",
@ -7438,16 +7438,16 @@
}, },
{ {
"name": "psy/psysh", "name": "psy/psysh",
"version": "v0.11.7", "version": "v0.11.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/bobthecow/psysh.git", "url": "https://github.com/bobthecow/psysh.git",
"reference": "77fc7270031fbc28f9a7bea31385da5c4855cb7a" "reference": "f455acf3645262ae389b10e9beba0c358aa6994e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/77fc7270031fbc28f9a7bea31385da5c4855cb7a", "url": "https://api.github.com/repos/bobthecow/psysh/zipball/f455acf3645262ae389b10e9beba0c358aa6994e",
"reference": "77fc7270031fbc28f9a7bea31385da5c4855cb7a", "reference": "f455acf3645262ae389b10e9beba0c358aa6994e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -7508,9 +7508,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/bobthecow/psysh/issues", "issues": "https://github.com/bobthecow/psysh/issues",
"source": "https://github.com/bobthecow/psysh/tree/v0.11.7" "source": "https://github.com/bobthecow/psysh/tree/v0.11.8"
}, },
"time": "2022-07-07T13:49:11+00:00" "time": "2022-07-28T14:25:11+00:00"
}, },
{ {
"name": "ralouphie/getallheaders", "name": "ralouphie/getallheaders",
@ -16461,16 +16461,16 @@
}, },
{ {
"name": "vimeo/psalm", "name": "vimeo/psalm",
"version": "4.24.0", "version": "v4.25.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/vimeo/psalm.git", "url": "https://github.com/vimeo/psalm.git",
"reference": "06dd975cb55d36af80f242561738f16c5f58264f" "reference": "d7cd84c4ebca74ba3419b9601f81d177bcbe2aac"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/06dd975cb55d36af80f242561738f16c5f58264f", "url": "https://api.github.com/repos/vimeo/psalm/zipball/d7cd84c4ebca74ba3419b9601f81d177bcbe2aac",
"reference": "06dd975cb55d36af80f242561738f16c5f58264f", "reference": "d7cd84c4ebca74ba3419b9601f81d177bcbe2aac",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -16562,9 +16562,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/vimeo/psalm/issues", "issues": "https://github.com/vimeo/psalm/issues",
"source": "https://github.com/vimeo/psalm/tree/4.24.0" "source": "https://github.com/vimeo/psalm/tree/v4.25.0"
}, },
"time": "2022-06-26T11:47:54+00:00" "time": "2022-07-25T17:04:37+00:00"
}, },
{ {
"name": "webmozart/path-util", "name": "webmozart/path-util",
@ -16707,5 +16707,5 @@
"platform-dev": { "platform-dev": {
"php": "^7.4|^8.0" "php": "^7.4|^8.0"
}, },
"plugin-api-version": "2.1.0" "plugin-api-version": "2.3.0"
} }

View File

@ -14,8 +14,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true), 'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', 'invoicing.co'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => '5.5.2', 'app_version' => '5.5.3',
'app_tag' => '5.5.2', 'app_tag' => '5.5.3',
'minimum_client_version' => '5.0.16', 'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1', 'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''), 'api_secret' => env('API_SECRET', ''),

View File

@ -19,7 +19,12 @@ class AddSmsVerificationToHostedAccount extends Migration
$table->boolean('account_sms_verified')->default(0); $table->boolean('account_sms_verified')->default(0);
}); });
App\Models\Account::query()->update(['account_sms_verified' => true]); App\Models\Account::query()->cursor()->each(function ($account){
$account->account_sms_verified = true;
$account->save();
});
} }
/** /**

View File

@ -0,0 +1,38 @@
<?php
use App\Models\Company;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('companies', function (Blueprint $table) {
$table->boolean('enabled_expense_tax_rates')->default(0);
});
Company::query()->where('enabled_item_tax_rates', true)->cursor()->each(function ($company){
$company->enabled_expense_tax_rates = true;
$company->save();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
}
};

View File

@ -20,7 +20,7 @@
@foreach($subscription->service()->products() as $product) @foreach($subscription->service()->products() as $product)
<div class="flex items-center justify-between mb-4 bg-white rounded px-6 py-4 shadow-sm border"> <div class="flex items-center justify-between mb-4 bg-white rounded px-6 py-4 shadow-sm border">
<div> <div>
<p class="text-sm text-gray-800">{{ $product->notes }}</p> <p class="text-sm text-gray-800">{!! nl2br($product->notes) !!}</p>
</div> </div>
<div data-ref="price-and-quantity-container"> <div data-ref="price-and-quantity-container">
<span <span
@ -40,7 +40,7 @@
@foreach($subscription->service()->recurring_products() as $product) @foreach($subscription->service()->recurring_products() as $product)
<div class="flex items-center justify-between mb-4 bg-white rounded px-6 py-4 shadow-sm border"> <div class="flex items-center justify-between mb-4 bg-white rounded px-6 py-4 shadow-sm border">
<div class="text-sm">{!! $product->notes !!}</div> <div class="text-sm">{!! nl2br($product->notes) !!}</div>
<div data-ref="price-and-quantity-container"> <div data-ref="price-and-quantity-container">
<span <span
data-ref="price">{{ \App\Utils\Number::formatMoney($product->price, $subscription->company) }}</span> data-ref="price">{{ \App\Utils\Number::formatMoney($product->price, $subscription->company) }}</span>