diff --git a/README.md b/README.md index a9bc5a50c..282a956be 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ ## [Hosted](https://www.invoiceninja.com) | [Self-Hosted](https://www.invoiceninja.org) -Join us on [Slack](http://slack.invoiceninja.com), [Discourse](https://forum.invoiceninja.com) - +Join us on [Slack](http://slack.invoiceninja.com), [Discord](https://discord.com/channels/1071654583870435439/1071654584390537279) [Discourse](https://forum.invoiceninja.com) - or [StackOverflow](https://stackoverflow.com/tags/invoice-ninja/) if you like, just make sure to add the `invoice-ninja` tag to your question. diff --git a/VERSION.txt b/VERSION.txt index 3692885ce..4b14ecd1e 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.5.67 \ No newline at end of file +5.5.68 \ No newline at end of file diff --git a/app/Console/Commands/CheckData.php b/app/Console/Commands/CheckData.php index fa74167ae..1c47c4b6d 100644 --- a/app/Console/Commands/CheckData.php +++ b/app/Console/Commands/CheckData.php @@ -1138,7 +1138,7 @@ class CheckData extends Command $cc = ClientContact::on('db-ninja-01')->where('company_id', config('ninja.ninja_default_company_id'))->where('email', $cu->user->email)->first(); if($cc){ - $ninja_portal_url = "https://invoiceninja.invoicing.co/client/ninja/{$cc->contact_key}/{$cu->company->company_key}"; + $ninja_portal_url = "https://invoiceninja.invoicing.co/client/ninja/{$cc->contact_key}/{$cu->account->key}"; $cu->ninja_portal_url = $ninja_portal_url; $cu->save(); diff --git a/app/Http/Controllers/MigrationController.php b/app/Http/Controllers/MigrationController.php index 59f2a62e9..0cfe59533 100644 --- a/app/Http/Controllers/MigrationController.php +++ b/app/Http/Controllers/MigrationController.php @@ -179,6 +179,7 @@ class MigrationController extends BaseController $company->tasks()->forceDelete(); $company->vendors()->forceDelete(); $company->expenses()->forceDelete(); + $company->purchase_orders()->forceDelete(); $company->bank_transaction_rules()->forceDelete(); $company->bank_transactions()->forceDelete(); // $company->bank_integrations()->forceDelete(); diff --git a/app/PaymentDrivers/BaseDriver.php b/app/PaymentDrivers/BaseDriver.php index 1af79af33..9f5c2cf8c 100644 --- a/app/PaymentDrivers/BaseDriver.php +++ b/app/PaymentDrivers/BaseDriver.php @@ -359,7 +359,11 @@ class BaseDriver extends AbstractPaymentDriver event(new PaymentWasCreated($payment, $payment->company, Ninja::eventVars())); if (property_exists($this->payment_hash->data, 'billing_context') && $status == Payment::STATUS_COMPLETED) { - $billing_subscription = \App\Models\Subscription::find($this->decodePrimaryKey($this->payment_hash->data->billing_context->subscription_id)); + + if(is_int($this->payment_hash->data->billing_context->subscription_id)) + $billing_subscription = \App\Models\Subscription::find($this->payment_hash->data->billing_context->subscription_id); + else + $billing_subscription = \App\Models\Subscription::find($this->decodePrimaryKey($this->payment_hash->data->billing_context->subscription_id)); // To access campaign hash => $this->payment_hash->data->billing_context->campaign; // To access campaign data => Cache::get(CAMPAIGN_HASH) diff --git a/config/ninja.php b/config/ninja.php index 1070541d6..0cce27612 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.5.67', - 'app_tag' => '5.5.67', + 'app_version' => '5.5.68', + 'app_tag' => '5.5.68', 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', ''), diff --git a/database/migrations/2023_02_05_042351_add_foreign_key_for_vendors.php b/database/migrations/2023_02_05_042351_add_foreign_key_for_vendors.php new file mode 100644 index 000000000..3cbc35f2f --- /dev/null +++ b/database/migrations/2023_02_05_042351_add_foreign_key_for_vendors.php @@ -0,0 +1,32 @@ +foreign('vendor_id')->references('id')->on('vendors')->onDelete('cascade')->onUpdate('cascade'); + + // }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +}; diff --git a/resources/views/email/template/client.blade.php b/resources/views/email/template/client.blade.php index e15e5d87e..580e6dd1e 100644 --- a/resources/views/email/template/client.blade.php +++ b/resources/views/email/template/client.blade.php @@ -110,20 +110,14 @@ position: relative; } - .doc_links { - + a.doc_links { + text-decoration: none; padding-bottom: 10px; display: inline-block; - - } - - a { - - text-decoration: none; color: inherit !important; - } +