minor fixes for checking vendor notifications

This commit is contained in:
David Bomba 2023-11-28 11:52:07 +11:00
parent dc39d7f01a
commit 9bfab816fb
2 changed files with 5 additions and 2 deletions

View File

@ -63,8 +63,8 @@ class UpdateTaxData implements ShouldQueue
if (!$this->client->state && $this->client->postal_code) { if (!$this->client->state && $this->client->postal_code) {
$this->client->state = USStates::getState($this->client->postal_code); $this->client->update(['state' => USStates::getState($this->client->postal_code)]);
$this->client->saveQuietly(); // $this->client->saveQuietly();
} }

View File

@ -41,6 +41,9 @@ class VendorExpenseNotify implements ShouldQueue
{ {
MultiDB::setDB($this->db); MultiDB::setDB($this->db);
if(!$this->expense->vendor)
return;
$this->expense->vendor->contacts->filter(function (VendorContact $contact) { $this->expense->vendor->contacts->filter(function (VendorContact $contact) {
return $contact->send_email && $contact->email; return $contact->send_email && $contact->email;
})->each(function (VendorContact $contact) { })->each(function (VendorContact $contact) {