Updates for postmark webhhoks

This commit is contained in:
David Bomba 2024-09-29 14:11:33 +10:00
parent 5732794681
commit 320022155e
4 changed files with 23 additions and 21 deletions

View File

@ -68,6 +68,8 @@ class ProcessPostmarkWebhook implements ShouldQueue
return SystemLog::query() return SystemLog::query()
->where('company_id', $this->invitation->company_id) ->where('company_id', $this->invitation->company_id)
->where('type_id', SystemLog::TYPE_WEBHOOK_RESPONSE) ->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]) ->whereJsonContains('log', ['MessageID' => $message_id])
->orderBy('id', 'desc') ->orderBy('id', 'desc')
->first(); ->first();

View File

@ -50,8 +50,6 @@ class SendRecurring implements ShouldQueue
*/ */
public function __construct(public RecurringInvoice $recurring_invoice, public string $db = 'db-ninja-01') public function __construct(public RecurringInvoice $recurring_invoice, public string $db = 'db-ninja-01')
{ {
$this->recurring_invoice = $recurring_invoice;
$this->db = $db;
} }
/** /**

View File

@ -368,7 +368,7 @@ class Invoice extends BaseModel
public function activities() 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);
} }
/** /**

38
composer.lock generated
View File

@ -2854,16 +2854,16 @@
}, },
{ {
"name": "google/apiclient-services", "name": "google/apiclient-services",
"version": "v0.373.0", "version": "v0.374.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/googleapis/google-api-php-client-services.git", "url": "https://github.com/googleapis/google-api-php-client-services.git",
"reference": "88ee17077a2048ba0b2c637754b599be0523fe36" "reference": "5f6060df419f4f72dcc970197f9a9b1613cecc62"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/88ee17077a2048ba0b2c637754b599be0523fe36", "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/5f6060df419f4f72dcc970197f9a9b1613cecc62",
"reference": "88ee17077a2048ba0b2c637754b599be0523fe36", "reference": "5f6060df419f4f72dcc970197f9a9b1613cecc62",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2892,9 +2892,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/googleapis/google-api-php-client-services/issues", "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", "name": "google/auth",
@ -7874,20 +7874,22 @@
}, },
{ {
"name": "nwidart/laravel-modules", "name": "nwidart/laravel-modules",
"version": "v11.1.2", "version": "v11.1.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nWidart/laravel-modules.git", "url": "https://github.com/nWidart/laravel-modules.git",
"reference": "d275a5b9f7c329c505480750d354a7eef69fc42a" "reference": "fb1f6bd7b168baaa6212dee678c18fc983d47ed4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nWidart/laravel-modules/zipball/d275a5b9f7c329c505480750d354a7eef69fc42a", "url": "https://api.github.com/repos/nWidart/laravel-modules/zipball/fb1f6bd7b168baaa6212dee678c18fc983d47ed4",
"reference": "d275a5b9f7c329c505480750d354a7eef69fc42a", "reference": "fb1f6bd7b168baaa6212dee678c18fc983d47ed4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-dom": "*",
"ext-json": "*", "ext-json": "*",
"ext-simplexml": "*",
"php": ">=8.2", "php": ">=8.2",
"wikimedia/composer-merge-plugin": "^2.1" "wikimedia/composer-merge-plugin": "^2.1"
}, },
@ -7945,7 +7947,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/nWidart/laravel-modules/issues", "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": [ "funding": [
{ {
@ -7957,7 +7959,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2024-09-20T08:45:18+00:00" "time": "2024-09-22T20:04:49+00:00"
}, },
{ {
"name": "nyholm/psr7", "name": "nyholm/psr7",
@ -9362,16 +9364,16 @@
}, },
{ {
"name": "phpstan/phpdoc-parser", "name": "phpstan/phpdoc-parser",
"version": "1.30.1", "version": "1.31.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git", "url": "https://github.com/phpstan/phpdoc-parser.git",
"reference": "51b95ec8670af41009e2b2b56873bad96682413e" "reference": "249f15fb843bf240cf058372dad29e100cee6c17"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/51b95ec8670af41009e2b2b56873bad96682413e", "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/249f15fb843bf240cf058372dad29e100cee6c17",
"reference": "51b95ec8670af41009e2b2b56873bad96682413e", "reference": "249f15fb843bf240cf058372dad29e100cee6c17",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -9403,9 +9405,9 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types", "description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": { "support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues", "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", "name": "pragmarx/google2fa",