From 5b5e4ee5f307d7ac884e9b6e9f1178f0ab2f726d Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 15 Mar 2018 12:54:08 +0200 Subject: [PATCH] Show recurrence preview w/o marking active --- app/Models/Invoice.php | 2 +- resources/lang/en/texts.php | 2 +- resources/views/invoices/edit.blade.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index 928087f85b39..ffe4275d2bd8 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -1190,7 +1190,7 @@ class Invoice extends EntityModel implements BalanceAffecting * * @return null */ - public function getPrettySchedule($min = 1, $max = 10) + public function getPrettySchedule($min = 0, $max = 10) { if (! $schedule = $this->getSchedule($max)) { return null; diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 7302896b9b74..50ca3e43fc39 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -2788,7 +2788,7 @@ $LANG = array( 'client_must_be_active' => 'Error: the client must be active', 'purge_client' => 'Purge Client', 'purged_client' => 'Successfully purged client', - 'purge_client_warning' => 'All related records (invoices, tasks, expenses, documents, etc) will also be deleted.' + 'purge_client_warning' => 'All related records (invoices, tasks, expenses, documents, etc) will also be deleted.', ); diff --git a/resources/views/invoices/edit.blade.php b/resources/views/invoices/edit.blade.php index 0e155ddd3923..3e8d9dd22aba 100644 --- a/resources/views/invoices/edit.blade.php +++ b/resources/views/invoices/edit.blade.php @@ -293,8 +293,8 @@ @if (isset($lastSent) && $lastSent) {!! trans('texts.last_sent_on', ['date' => link_to('/invoices/'.$lastSent->public_id, $invoice->last_sent_date, ['id' => 'lastSent'])]) !!}

@endif - @if ($invoice->is_recurring && $invoice->getNextSendDate()) - {!! trans('texts.next_send_on', ['date' => ''.$account->formatDate($invoice->getNextSendDate()). + @if ($invoice->is_recurring) + {!! trans('texts.next_send_on', ['date' => ''.$account->formatDate($invoice->getNextSendDate() ?: $invoice->start_date). '']) !!} @if ($invoice->getDueDate())