diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index bb6517623240..1680a4d0764e 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -225,6 +225,7 @@ class InvoiceController extends BaseController } $invoice->invoice_date = Utils::fromSqlDate($invoice->invoice_date); + $invoice->recurring_due_date = $invoice->due_date;// Keep in SQL form $invoice->due_date = Utils::fromSqlDate($invoice->due_date); $invoice->start_date = Utils::fromSqlDate($invoice->start_date); $invoice->end_date = Utils::fromSqlDate($invoice->end_date); @@ -354,6 +355,17 @@ class InvoiceController extends BaseController $recurringHelp .= $line; } } + + $recurringDueDateHelp = ''; + foreach (preg_split("/((\r?\n)|(\r\n?))/", trans('texts.recurring_due_date_help')) as $line) { + $parts = explode("=>", $line); + if (count($parts) > 1) { + $line = $parts[0].' => '.Utils::processVariables($parts[0]); + $recurringDueDateHelp .= '
Automatically sets a due date for the invoice.
+Invoices on a monthly or yearly cycle set to be due on or before the day they are created will be due the next month. Invoices set to be due on the 29th or 30th in months that don\'t have that day will be due the last day of the month.
+Invoices on a weekly cycle set to be due on the day of the week they are created will be due the next week.
+For example:
+If you need help figuring something out post a question to our support forum.
', 'invoice_due_date' => 'Due Date', + 'due' => 'Due', 'quote_due_date' => 'Valid Until', 'valid_until' => 'Valid Until', 'reset_terms' => 'Reset terms', @@ -824,6 +841,7 @@ return array( 'gateways' => 'Payment Gateways', 'next_send_on' => 'Send Next: :date', + 'next_due_on' => 'Due Next: :date', 'no_longer_running' => 'This invoice is not scheduled to run', 'general_settings' => 'General Settings', 'customize' => 'Customize', diff --git a/resources/views/invoices/edit.blade.php b/resources/views/invoices/edit.blade.php index 6f8814a99c5f..63093a428849 100644 --- a/resources/views/invoices/edit.blade.php +++ b/resources/views/invoices/edit.blade.php @@ -113,11 +113,12 @@ @if ($entityType == ENTITY_INVOICE) @endif @@ -136,8 +137,12 @@ {!! trans('texts.last_sent_on', ['date' => link_to('/invoices/'.$lastSent->public_id, $invoice->last_sent_date, ['id' => 'lastSent'])]) !!}