Merge pull request #6995 from turbo124/v5-develop

v5.3.33
This commit is contained in:
David Bomba 2021-11-25 17:32:09 +11:00 committed by GitHub
commit 6129c44421
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 10990 additions and 1135 deletions

View File

@ -1 +1 @@
5.3.32 5.3.33

View File

@ -3,6 +3,7 @@
namespace App\Console\Commands; namespace App\Console\Commands;
use App\Models\Company; use App\Models\Company;
use App\Utils\Ninja;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
@ -42,6 +43,10 @@ class S3Cleanup extends Command
public function handle() public function handle()
{ {
if(!Ninja::isHosted())
return;
$c1 = Company::on('db-ninja-01')->pluck('company_key'); $c1 = Company::on('db-ninja-01')->pluck('company_key');
$c2 = Company::on('db-ninja-02')->pluck('company_key'); $c2 = Company::on('db-ninja-02')->pluck('company_key');

View File

@ -346,7 +346,8 @@ class BaseController extends Controller
}, },
'company.subscriptions'=> function ($query) use($updated_at, $user) { 'company.subscriptions'=> function ($query) use($updated_at, $user) {
$query->where('updated_at', '>=', $updated_at); // $query->where('updated_at', '>=', $updated_at);
$query->whereNotNull('updated_at');
if(!$user->isAdmin()) if(!$user->isAdmin())
$query->where('subscriptions.user_id', $user->id); $query->where('subscriptions.user_id', $user->id);

View File

@ -345,14 +345,6 @@ class BillingPortalPurchase extends Component
'quantity' => $this->quantity, 'quantity' => $this->quantity,
]; ];
$this->invoice = $this->subscription
->service()
->createInvoice($data)
->service()
->markSent()
->fillDefaults()
->save();
$is_eligible = $this->subscription->service()->isEligible($this->contact); $is_eligible = $this->subscription->service()->isEligible($this->contact);
if (is_array($is_eligible) && $is_eligible['message'] != 'Success') { if (is_array($is_eligible) && $is_eligible['message'] != 'Success') {
@ -363,6 +355,14 @@ class BillingPortalPurchase extends Component
return; return;
} }
$this->invoice = $this->subscription
->service()
->createInvoice($data)
->service()
->markSent()
->fillDefaults()
->save();
Cache::put($this->hash, [ Cache::put($this->hash, [
'subscription_id' => $this->subscription->id, 'subscription_id' => $this->subscription->id,
'email' => $this->email ?? $this->contact->email, 'email' => $this->email ?? $this->contact->email,

View File

@ -42,8 +42,5 @@ class DiskCleanup implements ShouldQueue
$files = Storage::allFiles(config('filesystems.default'), 'backups/'); $files = Storage::allFiles(config('filesystems.default'), 'backups/');
Storage::delete($files); Storage::delete($files);
$files = Storage::allFiles('public', 'backups/');
Storage::delete($files);
} }
} }

View File

@ -136,7 +136,7 @@ class CreditCard
return $this->processSuccessfulPayment($result); return $this->processSuccessfulPayment($result);
} }
$error = 'Undefined gateway error'; $error = $result ?: 'Undefined gateway error';
return $this->processUnsuccessfulPayment($error); return $this->processUnsuccessfulPayment($error);

View File

@ -98,8 +98,7 @@
"laravel/dusk": "^6.15", "laravel/dusk": "^6.15",
"mockery/mockery": "^1.3.1", "mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^5.0", "nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.0", "phpunit/phpunit": "^9.0"
"vimeo/psalm": "^4.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

1655
composer.lock generated

File diff suppressed because it is too large Load Diff

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.3.32', 'app_version' => '5.3.33',
'app_tag' => '5.3.32', 'app_tag' => '5.3.33',
'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', ''),

10431
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" overflow="visible" preserveAspectRatio="none" viewBox="0 0 35 28" width="35" height="28"><g transform="translate(0, 0)"><g transform="translate(-6.938893903907228e-17, 0) rotate(0)"><path d="M31.5,0h-28c-1.925,0 -3.4825,1.575 -3.4825,3.5l-0.0175,21c0,1.925 1.575,3.5 3.5,3.5h28c1.925,0 3.5,-1.575 3.5,-3.5v-21c0,-1.925 -1.575,-3.5 -3.5,-3.5zM31.5,7l-14,8.75l-14,-8.75v-3.5l14,8.75l14,-8.75z" style="stroke-width: 0; stroke-linecap: butt; stroke-linejoin: miter; fill: rgb(18, 18, 18);" vector-effect="non-scaling-stroke"/></g><defs><path id="path-1637627912051353" d="M31.5,0h-28c-1.925,0 -3.4825,1.575 -3.4825,3.5l-0.0175,21c0,1.925 1.575,3.5 3.5,3.5h28c1.925,0 3.5,-1.575 3.5,-3.5v-21c0,-1.925 -1.575,-3.5 -3.5,-3.5zM31.5,7l-14,8.75l-14,-8.75v-3.5l14,8.75l14,-8.75z" vector-effect="non-scaling-stroke"/></defs></g></svg>

After

Width:  |  Height:  |  Size: 919 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB