diff --git a/VERSION.txt b/VERSION.txt index b01dcc14f8..35986ea716 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.4.11 \ No newline at end of file +5.4.12 \ No newline at end of file diff --git a/app/Factory/CompanyFactory.php b/app/Factory/CompanyFactory.php index d78508f9ff..e1a21a92ad 100644 --- a/app/Factory/CompanyFactory.php +++ b/app/Factory/CompanyFactory.php @@ -46,6 +46,7 @@ class CompanyFactory $company->enabled_modules = config('ninja.enabled_modules'); //32767;//8191; //4095 $company->default_password_timeout = 1800000; $company->markdown_email_enabled = false; + $company->markdown_enabled = false; return $company; } diff --git a/app/Http/Requests/Vendor/UpdateVendorRequest.php b/app/Http/Requests/Vendor/UpdateVendorRequest.php index 0a8404c298..0f964d3d25 100644 --- a/app/Http/Requests/Vendor/UpdateVendorRequest.php +++ b/app/Http/Requests/Vendor/UpdateVendorRequest.php @@ -66,6 +66,8 @@ class UpdateVendorRequest extends Request $input['assigned_user_id'] = $this->decodePrimaryKey($input['assigned_user_id']); } + $input = $this->decodePrimaryKeys($input); + $this->replace($input); } } diff --git a/app/Jobs/Mail/NinjaMailerJob.php b/app/Jobs/Mail/NinjaMailerJob.php index 2f69ef6488..b706646079 100644 --- a/app/Jobs/Mail/NinjaMailerJob.php +++ b/app/Jobs/Mail/NinjaMailerJob.php @@ -329,6 +329,10 @@ class NinjaMailerJob implements ShouldQueue if(Ninja::isHosted() && $this->company->account && $this->company->account->is_flagged) return true; + /* If the account is verified, we allow emails to flow */ + if(Ninja::isHosted() && $this->company->account && $this->company->account->is_verified_account) + return false; + /* Ensure the user has a valid email address */ if(!str_contains($this->nmo->to_user->email, "@")) return true; diff --git a/app/Models/Account.php b/app/Models/Account.php index 2ea57856c5..3e08838b44 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -227,6 +227,9 @@ class Account extends BaseModel return false; } + if($this->plan_expires && Carbon::parse($this->plan_expires)->lt(now())) + return false; + return $this->plan == 'pro' || $this->plan == 'enterprise'; } @@ -236,7 +239,10 @@ class Account extends BaseModel return false; } - return $this->plan == 'free' || is_null($this->plan); + if($this->plan_expires && Carbon::parse($this->plan_expires)->lt(now())) + return true; + + return $this->plan == 'free' || is_null($this->plan) || empty($this->plan); } public function isEnterpriseClient() diff --git a/app/Repositories/VendorContactRepository.php b/app/Repositories/VendorContactRepository.php index 1df37b6846..0e3c6b3b5a 100644 --- a/app/Repositories/VendorContactRepository.php +++ b/app/Repositories/VendorContactRepository.php @@ -32,7 +32,7 @@ class VendorContactRepository extends BaseRepository } /* Get array of IDs which have been removed from the contacts array and soft delete each contact */ - $vendor->contacts->pluck('hashed_id')->diff($contacts->pluck('id'))->each(function ($contact) { + $vendor->contacts->pluck('id')->diff($contacts->pluck('id'))->each(function ($contact) { VendorContact::destroy($contact); }); @@ -50,7 +50,7 @@ class VendorContactRepository extends BaseRepository $update_contact = null; if (isset($contact['id'])) { - $update_contact = VendorContact::find($this->decodePrimaryKey($contact['id'])); + $update_contact = VendorContact::find($contact['id']); } if (! $update_contact) { diff --git a/composer.lock b/composer.lock index 2b961def92..d28c6a4ced 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "afosto/yaac", - "version": "v1.4.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/afosto/yaac.git", - "reference": "ef131cfe9e6dc627968f2847a5a726e961a21cd3" + "reference": "c11e5d254ca42bbc6435488df5978a9f4b2a3bfd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/afosto/yaac/zipball/ef131cfe9e6dc627968f2847a5a726e961a21cd3", - "reference": "ef131cfe9e6dc627968f2847a5a726e961a21cd3", + "url": "https://api.github.com/repos/afosto/yaac/zipball/c11e5d254ca42bbc6435488df5978a9f4b2a3bfd", + "reference": "c11e5d254ca42bbc6435488df5978a9f4b2a3bfd", "shasum": "" }, "require": { @@ -54,9 +54,9 @@ ], "support": { "issues": "https://github.com/afosto/yaac/issues", - "source": "https://github.com/afosto/yaac/tree/v1.4.0" + "source": "https://github.com/afosto/yaac/tree/v1.5.0" }, - "time": "2022-02-18T15:18:06+00:00" + "time": "2022-07-15T10:42:38+00:00" }, { "name": "apimatic/jsonmapper", @@ -324,16 +324,16 @@ }, { "name": "awobaz/compoships", - "version": "2.1.3", + "version": "2.1.4", "source": { "type": "git", "url": "https://github.com/topclaudy/compoships.git", - "reference": "c5b107f16a2a8650fb2dbc21babd4a65a0f48585" + "reference": "ba86741d9b439d1179a6432dded92b0ecc89a63a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/topclaudy/compoships/zipball/c5b107f16a2a8650fb2dbc21babd4a65a0f48585", - "reference": "c5b107f16a2a8650fb2dbc21babd4a65a0f48585", + "url": "https://api.github.com/repos/topclaudy/compoships/zipball/ba86741d9b439d1179a6432dded92b0ecc89a63a", + "reference": "ba86741d9b439d1179a6432dded92b0ecc89a63a", "shasum": "" }, "require": { @@ -372,7 +372,7 @@ ], "support": { "issues": "https://github.com/topclaudy/compoships/issues", - "source": "https://github.com/topclaudy/compoships/tree/2.1.3" + "source": "https://github.com/topclaudy/compoships/tree/2.1.4" }, "funding": [ { @@ -380,7 +380,7 @@ "type": "custom" } ], - "time": "2021-11-29T22:11:22+00:00" + "time": "2022-06-22T11:42:37+00:00" }, { "name": "aws/aws-crt-php", @@ -434,16 +434,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.231.5", + "version": "3.231.10", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "4ea642d1c7f8002037ef46e5f17c9fc1273a6021" + "reference": "e46b7c5fcb70fadf38079755982cc1d3f0583c41" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/4ea642d1c7f8002037ef46e5f17c9fc1273a6021", - "reference": "4ea642d1c7f8002037ef46e5f17c9fc1273a6021", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/e46b7c5fcb70fadf38079755982cc1d3f0583c41", + "reference": "e46b7c5fcb70fadf38079755982cc1d3f0583c41", "shasum": "" }, "require": { @@ -520,9 +520,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.231.5" + "source": "https://github.com/aws/aws-sdk-php/tree/3.231.10" }, - "time": "2022-07-13T18:36:03+00:00" + "time": "2022-07-20T18:17:18+00:00" }, { "name": "bacon/bacon-qr-code", @@ -1013,16 +1013,16 @@ }, { "name": "composer/ca-bundle", - "version": "1.3.2", + "version": "1.3.3", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "fd5dd441932a7e10ca6e5b490e272d34c8430640" + "reference": "30897edbfb15e784fe55587b4f73ceefd3c4d98c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/fd5dd441932a7e10ca6e5b490e272d34c8430640", - "reference": "fd5dd441932a7e10ca6e5b490e272d34c8430640", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/30897edbfb15e784fe55587b4f73ceefd3c4d98c", + "reference": "30897edbfb15e784fe55587b4f73ceefd3c4d98c", "shasum": "" }, "require": { @@ -1069,7 +1069,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.3.2" + "source": "https://github.com/composer/ca-bundle/tree/1.3.3" }, "funding": [ { @@ -1085,7 +1085,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:56:16+00:00" + "time": "2022-07-20T07:14:26+00:00" }, { "name": "dasprid/enum", @@ -1979,16 +1979,16 @@ }, { "name": "fakerphp/faker", - "version": "v1.19.0", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "d7f08a622b3346766325488aa32ddc93ccdecc75" + "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/d7f08a622b3346766325488aa32ddc93ccdecc75", - "reference": "d7f08a622b3346766325488aa32ddc93ccdecc75", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/37f751c67a5372d4e26353bd9384bc03744ec77b", + "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b", "shasum": "" }, "require": { @@ -2015,7 +2015,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "v1.19-dev" + "dev-main": "v1.20-dev" } }, "autoload": { @@ -2040,22 +2040,22 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.19.0" + "source": "https://github.com/FakerPHP/Faker/tree/v1.20.0" }, - "time": "2022-02-02T17:38:57+00:00" + "time": "2022-07-20T13:12:54+00:00" }, { "name": "fideloper/proxy", - "version": "4.4.1", + "version": "4.4.2", "source": { "type": "git", "url": "https://github.com/fideloper/TrustedProxy.git", - "reference": "c073b2bd04d1c90e04dc1b787662b558dd65ade0" + "reference": "a751f2bc86dd8e6cfef12dc0cbdada82f5a18750" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/c073b2bd04d1c90e04dc1b787662b558dd65ade0", - "reference": "c073b2bd04d1c90e04dc1b787662b558dd65ade0", + "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/a751f2bc86dd8e6cfef12dc0cbdada82f5a18750", + "reference": "a751f2bc86dd8e6cfef12dc0cbdada82f5a18750", "shasum": "" }, "require": { @@ -2065,7 +2065,7 @@ "require-dev": { "illuminate/http": "^5.0|^6.0|^7.0|^8.0|^9.0", "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^8.5.8|^9.3.3" }, "type": "library", "extra": { @@ -2098,22 +2098,22 @@ ], "support": { "issues": "https://github.com/fideloper/TrustedProxy/issues", - "source": "https://github.com/fideloper/TrustedProxy/tree/4.4.1" + "source": "https://github.com/fideloper/TrustedProxy/tree/4.4.2" }, - "time": "2020-10-22T13:48:01+00:00" + "time": "2022-02-09T13:33:34+00:00" }, { "name": "firebase/php-jwt", - "version": "v6.2.0", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "d28e6df83830252650da4623c78aaaf98fb385f3" + "reference": "018dfc4e1da92ad8a1b90adc4893f476a3b41cb8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/d28e6df83830252650da4623c78aaaf98fb385f3", - "reference": "d28e6df83830252650da4623c78aaaf98fb385f3", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/018dfc4e1da92ad8a1b90adc4893f476a3b41cb8", + "reference": "018dfc4e1da92ad8a1b90adc4893f476a3b41cb8", "shasum": "" }, "require": { @@ -2160,9 +2160,9 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.2.0" + "source": "https://github.com/firebase/php-jwt/tree/v6.3.0" }, - "time": "2022-05-13T20:54:50+00:00" + "time": "2022-07-15T16:48:45+00:00" }, { "name": "fruitcake/laravel-cors", @@ -2370,16 +2370,16 @@ }, { "name": "google/apiclient-services", - "version": "v0.257.0", + "version": "v0.258.0", "source": { "type": "git", "url": "https://github.com/googleapis/google-api-php-client-services.git", - "reference": "ae109202ee831a1fb70ba824181852e6179c848b" + "reference": "71eb32534aba05e373fe317c1373a9645065881c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/ae109202ee831a1fb70ba824181852e6179c848b", - "reference": "ae109202ee831a1fb70ba824181852e6179c848b", + "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/71eb32534aba05e373fe317c1373a9645065881c", + "reference": "71eb32534aba05e373fe317c1373a9645065881c", "shasum": "" }, "require": { @@ -2408,9 +2408,9 @@ ], "support": { "issues": "https://github.com/googleapis/google-api-php-client-services/issues", - "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.257.0" + "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.258.0" }, - "time": "2022-07-08T01:28:13+00:00" + "time": "2022-07-18T01:10:11+00:00" }, { "name": "google/auth", @@ -3680,16 +3680,16 @@ }, { "name": "laravel/framework", - "version": "v8.83.19", + "version": "v8.83.20", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "4264f2ee12330bdb1be050998f58ba7271236395" + "reference": "aa5908e83fccb18b135ca31aa0342cf4bd6909a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/4264f2ee12330bdb1be050998f58ba7271236395", - "reference": "4264f2ee12330bdb1be050998f58ba7271236395", + "url": "https://api.github.com/repos/laravel/framework/zipball/aa5908e83fccb18b135ca31aa0342cf4bd6909a8", + "reference": "aa5908e83fccb18b135ca31aa0342cf4bd6909a8", "shasum": "" }, "require": { @@ -3849,7 +3849,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-07-13T13:23:09+00:00" + "time": "2022-07-19T14:11:02+00:00" }, { "name": "laravel/serializable-closure", @@ -4306,16 +4306,16 @@ }, { "name": "league/commonmark", - "version": "2.3.3", + "version": "2.3.4", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "0da1dca5781dd3cfddbe328224d9a7a62571addc" + "reference": "155ec1c95626b16fda0889cf15904d24890a60d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/0da1dca5781dd3cfddbe328224d9a7a62571addc", - "reference": "0da1dca5781dd3cfddbe328224d9a7a62571addc", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/155ec1c95626b16fda0889cf15904d24890a60d5", + "reference": "155ec1c95626b16fda0889cf15904d24890a60d5", "shasum": "" }, "require": { @@ -4408,7 +4408,7 @@ "type": "tidelift" } ], - "time": "2022-06-07T21:28:26+00:00" + "time": "2022-07-17T16:25:47+00:00" }, { "name": "league/config", @@ -5124,16 +5124,16 @@ }, { "name": "microsoft/microsoft-graph", - "version": "1.72.0", + "version": "1.73.0", "source": { "type": "git", "url": "https://github.com/microsoftgraph/msgraph-sdk-php.git", - "reference": "2cf18e6f3e4519a2a749ce4656b6d3bcae1e1ac4" + "reference": "a867c548899436d5279d191d5163a831ac9ea672" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/microsoftgraph/msgraph-sdk-php/zipball/2cf18e6f3e4519a2a749ce4656b6d3bcae1e1ac4", - "reference": "2cf18e6f3e4519a2a749ce4656b6d3bcae1e1ac4", + "url": "https://api.github.com/repos/microsoftgraph/msgraph-sdk-php/zipball/a867c548899436d5279d191d5163a831ac9ea672", + "reference": "a867c548899436d5279d191d5163a831ac9ea672", "shasum": "" }, "require": { @@ -5169,9 +5169,9 @@ "homepage": "https://developer.microsoft.com/en-us/graph", "support": { "issues": "https://github.com/microsoftgraph/msgraph-sdk-php/issues", - "source": "https://github.com/microsoftgraph/msgraph-sdk-php/tree/1.72.0" + "source": "https://github.com/microsoftgraph/msgraph-sdk-php/tree/1.73.0" }, - "time": "2022-07-12T16:45:29+00:00" + "time": "2022-07-20T14:56:50+00:00" }, { "name": "mollie/mollie-api-php", @@ -8285,16 +8285,16 @@ }, { "name": "sentry/sentry", - "version": "3.6.1", + "version": "3.7.0", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-php.git", - "reference": "5b8f2934b0b20bb01da11c76985ceb5bd6c6af91" + "reference": "877bca3f0f0ac0fc8ec0a218c6070cccea266795" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/5b8f2934b0b20bb01da11c76985ceb5bd6c6af91", - "reference": "5b8f2934b0b20bb01da11c76985ceb5bd6c6af91", + "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/877bca3f0f0ac0fc8ec0a218c6070cccea266795", + "reference": "877bca3f0f0ac0fc8ec0a218c6070cccea266795", "shasum": "" }, "require": { @@ -8340,7 +8340,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.6.x-dev" + "dev-master": "3.7.x-dev" } }, "autoload": { @@ -8374,7 +8374,7 @@ ], "support": { "issues": "https://github.com/getsentry/sentry-php/issues", - "source": "https://github.com/getsentry/sentry-php/tree/3.6.1" + "source": "https://github.com/getsentry/sentry-php/tree/3.7.0" }, "funding": [ { @@ -8386,20 +8386,20 @@ "type": "custom" } ], - "time": "2022-06-27T07:58:00+00:00" + "time": "2022-07-18T07:55:36+00:00" }, { "name": "sentry/sentry-laravel", - "version": "2.12.1", + "version": "2.13.0", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-laravel.git", - "reference": "bf7b4e6d43f0cf0c320041bb7d3a2a28c7edca57" + "reference": "c5e74e5fff18014780361fb33a883af9a9fbd900" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/bf7b4e6d43f0cf0c320041bb7d3a2a28c7edca57", - "reference": "bf7b4e6d43f0cf0c320041bb7d3a2a28c7edca57", + "url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/c5e74e5fff18014780361fb33a883af9a9fbd900", + "reference": "c5e74e5fff18014780361fb33a883af9a9fbd900", "shasum": "" }, "require": { @@ -8465,7 +8465,7 @@ ], "support": { "issues": "https://github.com/getsentry/sentry-laravel/issues", - "source": "https://github.com/getsentry/sentry-laravel/tree/2.12.1" + "source": "https://github.com/getsentry/sentry-laravel/tree/2.13.0" }, "funding": [ { @@ -8477,7 +8477,7 @@ "type": "custom" } ], - "time": "2022-06-27T11:34:22+00:00" + "time": "2022-07-15T11:36:23+00:00" }, { "name": "setasign/fpdf", @@ -8599,16 +8599,16 @@ }, { "name": "socialiteproviders/apple", - "version": "5.2.0", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/SocialiteProviders/Apple.git", - "reference": "b34e1955e65ef6f5f897c8f63ace68297d28e02c" + "reference": "13bfd5ad4a6ab33ecab35d933deba01e9de6e404" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/SocialiteProviders/Apple/zipball/b34e1955e65ef6f5f897c8f63ace68297d28e02c", - "reference": "b34e1955e65ef6f5f897c8f63ace68297d28e02c", + "url": "https://api.github.com/repos/SocialiteProviders/Apple/zipball/13bfd5ad4a6ab33ecab35d933deba01e9de6e404", + "reference": "13bfd5ad4a6ab33ecab35d933deba01e9de6e404", "shasum": "" }, "require": { @@ -8666,7 +8666,7 @@ "issues": "https://github.com/socialiteproviders/providers/issues", "source": "https://github.com/socialiteproviders/providers" }, - "time": "2022-05-26T00:02:22+00:00" + "time": "2022-07-18T08:37:00+00:00" }, { "name": "socialiteproviders/manager", diff --git a/config/ninja.php b/config/ninja.php index d51e809873..8c058747fc 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -14,8 +14,8 @@ return [ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'), - 'app_version' => '5.4.11', - 'app_tag' => '5.4.11', + 'app_version' => '5.4.12', + 'app_tag' => '5.4.12', 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', ''), diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 334cfc7ad8..fd83b2529a 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -4717,7 +4717,17 @@ $LANG = array( 'delete_task_status' => 'Delete Task Status', 'restore_task_status' => 'Restore Task Status', 'lang_Hebrew' => 'Hebrew', - + 'price_change_accepted' => 'Price change accepted', + 'price_change_failed' => 'Price change failed with code', + 'restore_purchases' => 'Restore Purchases', + 'activate' => 'Activate', + 'connect_apple' => 'Connect Apple', + 'disconnect_apple' => 'Disconnect Apple', + 'disconnected_apple' => 'Successfully disconnected Apple', + 'send_now' => 'Send Now', + 'received' => 'Received', + 'converted_to_expense' => 'Successfully converted to expense', + 'converted_to_expenses' => 'Successfully converted to expenses', ); return $LANG;