Show recurrence preview w/o marking active

This commit is contained in:
Hillel Coren 2018-03-15 12:54:08 +02:00
parent 8de96b6d05
commit 5b5e4ee5f3
3 changed files with 4 additions and 4 deletions

View File

@ -1190,7 +1190,7 @@ class Invoice extends EntityModel implements BalanceAffecting
* *
* @return null * @return null
*/ */
public function getPrettySchedule($min = 1, $max = 10) public function getPrettySchedule($min = 0, $max = 10)
{ {
if (! $schedule = $this->getSchedule($max)) { if (! $schedule = $this->getSchedule($max)) {
return null; return null;

View File

@ -2788,7 +2788,7 @@ $LANG = array(
'client_must_be_active' => 'Error: the client must be active', 'client_must_be_active' => 'Error: the client must be active',
'purge_client' => 'Purge Client', 'purge_client' => 'Purge Client',
'purged_client' => 'Successfully purged 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.',
); );

View File

@ -293,8 +293,8 @@
@if (isset($lastSent) && $lastSent) @if (isset($lastSent) && $lastSent)
{!! trans('texts.last_sent_on', ['date' => link_to('/invoices/'.$lastSent->public_id, $invoice->last_sent_date, ['id' => 'lastSent'])]) !!} <p/> {!! trans('texts.last_sent_on', ['date' => link_to('/invoices/'.$lastSent->public_id, $invoice->last_sent_date, ['id' => 'lastSent'])]) !!} <p/>
@endif @endif
@if ($invoice->is_recurring && $invoice->getNextSendDate()) @if ($invoice->is_recurring)
{!! trans('texts.next_send_on', ['date' => '<span data-bind="tooltip: {title: \''.$invoice->getPrettySchedule().'\', html: true}">'.$account->formatDate($invoice->getNextSendDate()). {!! trans('texts.next_send_on', ['date' => '<span data-bind="tooltip: {title: \''.$invoice->getPrettySchedule().'\', html: true}">'.$account->formatDate($invoice->getNextSendDate() ?: $invoice->start_date).
'<span class="glyphicon glyphicon-info-sign" style="padding-left:10px;color:#B1B5BA"></span></span>']) !!} '<span class="glyphicon glyphicon-info-sign" style="padding-left:10px;color:#B1B5BA"></span></span>']) !!}
@if ($invoice->getDueDate()) @if ($invoice->getDueDate())
<br> <br>