diff --git a/app/Jobs/Client/UpdateTaxData.php b/app/Jobs/Client/UpdateTaxData.php index c27733c06683..3f83bb38ab1e 100644 --- a/app/Jobs/Client/UpdateTaxData.php +++ b/app/Jobs/Client/UpdateTaxData.php @@ -63,8 +63,8 @@ class UpdateTaxData implements ShouldQueue if (!$this->client->state && $this->client->postal_code) { - $this->client->state = USStates::getState($this->client->postal_code); - $this->client->saveQuietly(); + $this->client->update(['state' => USStates::getState($this->client->postal_code)]); + // $this->client->saveQuietly(); } diff --git a/app/Jobs/Expense/VendorExpenseNotify.php b/app/Jobs/Expense/VendorExpenseNotify.php index 805bb5dfe731..c225910f8f6b 100644 --- a/app/Jobs/Expense/VendorExpenseNotify.php +++ b/app/Jobs/Expense/VendorExpenseNotify.php @@ -41,6 +41,9 @@ class VendorExpenseNotify implements ShouldQueue { MultiDB::setDB($this->db); + if(!$this->expense->vendor) + return; + $this->expense->vendor->contacts->filter(function (VendorContact $contact) { return $contact->send_email && $contact->email; })->each(function (VendorContact $contact) {