diff --git a/app/Console/Commands/PostUpdate.php b/app/Console/Commands/PostUpdate.php index b8d57ff26400..1e5025dac200 100644 --- a/app/Console/Commands/PostUpdate.php +++ b/app/Console/Commands/PostUpdate.php @@ -50,7 +50,7 @@ class PostUpdate extends Command info("I wasn't able to migrate the data."); } - nlog("finished migrating"); + info("finished migrating"); $output = []; diff --git a/app/Jobs/RecurringInvoice/SendRecurring.php b/app/Jobs/RecurringInvoice/SendRecurring.php index 9ee37c268b14..df7d0dcc40bb 100644 --- a/app/Jobs/RecurringInvoice/SendRecurring.php +++ b/app/Jobs/RecurringInvoice/SendRecurring.php @@ -72,6 +72,11 @@ class SendRecurring implements ShouldQueue // Generate Standard Invoice $invoice = RecurringInvoiceToInvoiceFactory::create($this->recurring_invoice, $this->recurring_invoice->client); + if($this->recurring_invoice->auto_bill == "always") + $invoice->auto_bill_enabled = true; + elseif($this->recurring_invoice->auto_bill == "off") + $invoice->auto_bill_enabled = false; + $invoice->date = now()->format('Y-m-d'); $invoice->due_date = $this->recurring_invoice->calculateDueDate(now()->format('Y-m-d')); $invoice->recurring_id = $this->recurring_invoice->id; diff --git a/app/Mail/SupportMessageSent.php b/app/Mail/SupportMessageSent.php index b326ba45086d..7904eb9d916a 100644 --- a/app/Mail/SupportMessageSent.php +++ b/app/Mail/SupportMessageSent.php @@ -64,7 +64,7 @@ class SupportMessageSent extends Mailable $db = str_replace("db-ninja-", "", $company->db); $is_large = $company->is_large ? "L" : "S"; $platform = array_key_exists('platform', $this->data) ? $this->data['platform'] : "U"; - $migrated = strlen($company->company_key) == 32 ? "M" : ""; + $migrated = strlen($company->company_key) == 32 ? "M" : "T"; if(Ninja::isHosted()) $subject = "{$priority}Hosted-{$db}-{$is_large}{$platform}{$migrated} :: {$plan} :: ".date('M jS, g:ia'); diff --git a/app/Observers/InvoiceObserver.php b/app/Observers/InvoiceObserver.php index 609d1e912291..c7da824f246d 100644 --- a/app/Observers/InvoiceObserver.php +++ b/app/Observers/InvoiceObserver.php @@ -34,6 +34,8 @@ class InvoiceObserver ->where('event_id', Webhook::EVENT_CREATE_INVOICE) ->exists(); + $invoice->load('client'); + if ($subscriptions) { WebhookHandler::dispatch(Webhook::EVENT_CREATE_INVOICE, $invoice, $invoice->company); } @@ -51,6 +53,9 @@ class InvoiceObserver ->where('event_id', Webhook::EVENT_UPDATE_INVOICE) ->exists(); + $invoice->load('client'); + + if ($subscriptions) { WebhookHandler::dispatch(Webhook::EVENT_UPDATE_INVOICE, $invoice, $invoice->company); } diff --git a/app/Observers/QuoteObserver.php b/app/Observers/QuoteObserver.php index 7f54296ef8e9..89c64a603e2b 100644 --- a/app/Observers/QuoteObserver.php +++ b/app/Observers/QuoteObserver.php @@ -30,6 +30,8 @@ class QuoteObserver ->where('event_id', Webhook::EVENT_CREATE_QUOTE) ->exists(); + $quote->load('client'); + if ($subscriptions) { WebhookHandler::dispatch(Webhook::EVENT_CREATE_QUOTE, $quote, $quote->company); } @@ -47,6 +49,9 @@ class QuoteObserver ->where('event_id', Webhook::EVENT_UPDATE_QUOTE) ->exists(); + $quote->load('client'); + + if ($subscriptions) { WebhookHandler::dispatch(Webhook::EVENT_UPDATE_QUOTE, $quote, $quote->company); }