From 320022155e8db9c759011f916ec7493a31ab3fce Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 29 Sep 2024 14:11:33 +1000 Subject: [PATCH] Updates for postmark webhhoks --- app/Jobs/PostMark/ProcessPostmarkWebhook.php | 2 ++ app/Jobs/RecurringInvoice/SendRecurring.php | 2 -- app/Models/Invoice.php | 2 +- composer.lock | 38 ++++++++++---------- 4 files changed, 23 insertions(+), 21 deletions(-) diff --git a/app/Jobs/PostMark/ProcessPostmarkWebhook.php b/app/Jobs/PostMark/ProcessPostmarkWebhook.php index 9e489bb6b6d2..8e7a3da3aeda 100644 --- a/app/Jobs/PostMark/ProcessPostmarkWebhook.php +++ b/app/Jobs/PostMark/ProcessPostmarkWebhook.php @@ -68,6 +68,8 @@ class ProcessPostmarkWebhook implements ShouldQueue return SystemLog::query() ->where('company_id', $this->invitation->company_id) ->where('type_id', SystemLog::TYPE_WEBHOOK_RESPONSE) + ->where('category_id', SystemLog::CATEGORY_MAIL) + // ->where('client_id', $this->invitation->contact->client_id) ->whereJsonContains('log', ['MessageID' => $message_id]) ->orderBy('id', 'desc') ->first(); diff --git a/app/Jobs/RecurringInvoice/SendRecurring.php b/app/Jobs/RecurringInvoice/SendRecurring.php index 6874e2e980c0..f8c4531e41e3 100644 --- a/app/Jobs/RecurringInvoice/SendRecurring.php +++ b/app/Jobs/RecurringInvoice/SendRecurring.php @@ -50,8 +50,6 @@ class SendRecurring implements ShouldQueue */ public function __construct(public RecurringInvoice $recurring_invoice, public string $db = 'db-ninja-01') { - $this->recurring_invoice = $recurring_invoice; - $this->db = $db; } /** diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index 1cfd1df3404e..56797bfe2ec0 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -368,7 +368,7 @@ class Invoice extends BaseModel public function activities() { - return $this->hasMany(Activity::class)->orderBy('id', 'DESC')->take(50); + return $this->hasMany(Activity::class)->where('company_id', $this->company_id)->where('client_id', $this->client_id)->orderBy('id', 'DESC')->take(50); } /** diff --git a/composer.lock b/composer.lock index 737ab9f6630d..ce5e1acd83b0 100644 --- a/composer.lock +++ b/composer.lock @@ -2854,16 +2854,16 @@ }, { "name": "google/apiclient-services", - "version": "v0.373.0", + "version": "v0.374.0", "source": { "type": "git", "url": "https://github.com/googleapis/google-api-php-client-services.git", - "reference": "88ee17077a2048ba0b2c637754b599be0523fe36" + "reference": "5f6060df419f4f72dcc970197f9a9b1613cecc62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/88ee17077a2048ba0b2c637754b599be0523fe36", - "reference": "88ee17077a2048ba0b2c637754b599be0523fe36", + "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/5f6060df419f4f72dcc970197f9a9b1613cecc62", + "reference": "5f6060df419f4f72dcc970197f9a9b1613cecc62", "shasum": "" }, "require": { @@ -2892,9 +2892,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.373.0" + "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.374.0" }, - "time": "2024-09-16T00:56:51+00:00" + "time": "2024-09-23T01:02:23+00:00" }, { "name": "google/auth", @@ -7874,20 +7874,22 @@ }, { "name": "nwidart/laravel-modules", - "version": "v11.1.2", + "version": "v11.1.4", "source": { "type": "git", "url": "https://github.com/nWidart/laravel-modules.git", - "reference": "d275a5b9f7c329c505480750d354a7eef69fc42a" + "reference": "fb1f6bd7b168baaa6212dee678c18fc983d47ed4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nWidart/laravel-modules/zipball/d275a5b9f7c329c505480750d354a7eef69fc42a", - "reference": "d275a5b9f7c329c505480750d354a7eef69fc42a", + "url": "https://api.github.com/repos/nWidart/laravel-modules/zipball/fb1f6bd7b168baaa6212dee678c18fc983d47ed4", + "reference": "fb1f6bd7b168baaa6212dee678c18fc983d47ed4", "shasum": "" }, "require": { + "ext-dom": "*", "ext-json": "*", + "ext-simplexml": "*", "php": ">=8.2", "wikimedia/composer-merge-plugin": "^2.1" }, @@ -7945,7 +7947,7 @@ ], "support": { "issues": "https://github.com/nWidart/laravel-modules/issues", - "source": "https://github.com/nWidart/laravel-modules/tree/v11.1.2" + "source": "https://github.com/nWidart/laravel-modules/tree/v11.1.4" }, "funding": [ { @@ -7957,7 +7959,7 @@ "type": "github" } ], - "time": "2024-09-20T08:45:18+00:00" + "time": "2024-09-22T20:04:49+00:00" }, { "name": "nyholm/psr7", @@ -9362,16 +9364,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.30.1", + "version": "1.31.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "51b95ec8670af41009e2b2b56873bad96682413e" + "reference": "249f15fb843bf240cf058372dad29e100cee6c17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/51b95ec8670af41009e2b2b56873bad96682413e", - "reference": "51b95ec8670af41009e2b2b56873bad96682413e", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/249f15fb843bf240cf058372dad29e100cee6c17", + "reference": "249f15fb843bf240cf058372dad29e100cee6c17", "shasum": "" }, "require": { @@ -9403,9 +9405,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.30.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.31.0" }, - "time": "2024-09-07T20:13:05+00:00" + "time": "2024-09-22T11:32:18+00:00" }, { "name": "pragmarx/google2fa",