diff --git a/.env.example b/.env.example index 839da9ec..3ed97406 100644 --- a/.env.example +++ b/.env.example @@ -54,4 +54,4 @@ SESSION_DOMAIN=invoiceshelf.test TRUSTED_PROXIES="*" CRON_JOB_AUTH_TOKEN="" -LOG_STACK=single \ No newline at end of file +LOG_STACK=single diff --git a/app/Models/RecurringInvoice.php b/app/Models/RecurringInvoice.php index 6e71f619..70b7a4ed 100644 --- a/app/Models/RecurringInvoice.php +++ b/app/Models/RecurringInvoice.php @@ -314,7 +314,7 @@ class RecurringInvoice extends Model ->setCustomer($this->customer_id) ->setNextNumbers(); - $days = CompanySetting::getSetting('invoice_due_date_days', $this->company_id); + $days = intval(CompanySetting::getSetting('invoice_due_date_days', $this->company_id)); if (! $days || $days == 'null') { $days = 7; @@ -381,7 +381,7 @@ class RecurringInvoice extends Model 'body' => CompanySetting::getSetting('invoice_mail_body', $this->company_id), 'from' => config('mail.from.address'), 'to' => $this->customer->email, - 'subject' => 'New Invoice', + 'subject' => trans('invoices')['new_invoice'], 'invoice' => $invoice->toArray(), 'customer' => $invoice->customer->toArray(), 'company' => Company::find($invoice->company_id),