Skip to content

Commit

Permalink
Merge pull request #8391 from turbo124/master
Browse files Browse the repository at this point in the history
Minor fixes for send reminders
  • Loading branch information
turbo124 committed Mar 20, 2023
2 parents edb4a90 + 4b0193c commit 51133b2
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 105 deletions.
4 changes: 3 additions & 1 deletion app/Console/Commands/SendReminders.php
Expand Up @@ -109,7 +109,9 @@ private function billInvoices()

/** @var Invoice $invoice */
foreach ($delayedAutoBillInvoices as $invoice) {
if ($invoice->isPaid() || $invoice->account->is_deleted) {
//21-03-2023 adjustment here
if ($invoice->isPaid() || !$invoice->account || $invoice->account->is_deleted) {
// if ($invoice->isPaid() || $invoice->account->is_deleted) {
continue;
}

Expand Down
3 changes: 2 additions & 1 deletion app/Traits/GenerateMigrationResources.php
Expand Up @@ -353,7 +353,7 @@ protected function getClients()
'city' => $client->city,
'state' => $client->state,
'postal_code' => $client->postal_code,
'country_id' => $client->country_id,
'country_id' => $client->country_id ? (string) $client->country_id : (string) $this->account->country_id,
'phone' => $client->work_phone,
'private_notes' => $client->private_notes,
'website' => $client->website,
Expand Down Expand Up @@ -2042,6 +2042,7 @@ protected function getVendors()
'company_id' => $vendor->account_id,
'user_id' => $vendor->user_id,
'name' => $vendor->name,
'currency_id' => $vendor->currency_id ? (string) $vendor->currency_id : (string) $this->account->currency_id,
//'balance' => $vendor->balance ?: 0,
//'paid_to_date' => $vendor->paid_to_date ?: 0,
'address1' => $vendor->address1,
Expand Down

0 comments on commit 51133b2

Please sign in to comment.