mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 05:58:50 -05:00 
			
		
		
		
	Show recurring invoices as 'active' rather than 'sent'
This commit is contained in:
		
							parent
							
								
									86527cf572
								
							
						
					
					
						commit
						834bce5eb2
					
				@ -81,8 +81,12 @@ class RecurringInvoiceDatatable extends EntityDatatable
 | 
				
			|||||||
        $class = Invoice::calcStatusClass($model->invoice_status_id, $model->balance, $model->due_date_sql, $model->is_recurring);
 | 
					        $class = Invoice::calcStatusClass($model->invoice_status_id, $model->balance, $model->due_date_sql, $model->is_recurring);
 | 
				
			||||||
        $label = Invoice::calcStatusLabel($model->invoice_status_name, $class, $this->entityType, $model->quote_invoice_id);
 | 
					        $label = Invoice::calcStatusLabel($model->invoice_status_name, $class, $this->entityType, $model->quote_invoice_id);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if ($model->invoice_status_id == INVOICE_STATUS_SENT && (! $model->last_sent_date_sql || $model->last_sent_date_sql == '0000-00-00')) {
 | 
					        if ($model->invoice_status_id == INVOICE_STATUS_SENT) {
 | 
				
			||||||
 | 
					            if (! $model->last_sent_date_sql || $model->last_sent_date_sql == '0000-00-00') {
 | 
				
			||||||
                $label = trans('texts.pending');
 | 
					                $label = trans('texts.pending');
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                $label = trans('texts.active');
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return "<h4><div class=\"label label-{$class}\">$label</div></h4>";
 | 
					        return "<h4><div class=\"label label-{$class}\">$label</div></h4>";
 | 
				
			||||||
 | 
				
			|||||||
@ -53,8 +53,12 @@
 | 
				
			|||||||
			<li>{!! link_to(($entityType == ENTITY_QUOTE ? 'quotes' : 'invoices'), trans('texts.' . ($entityType == ENTITY_QUOTE ? 'quotes' : 'invoices'))) !!}</li>
 | 
								<li>{!! link_to(($entityType == ENTITY_QUOTE ? 'quotes' : 'invoices'), trans('texts.' . ($entityType == ENTITY_QUOTE ? 'quotes' : 'invoices'))) !!}</li>
 | 
				
			||||||
			<li class="active">{{ $invoice->invoice_number }}</li>
 | 
								<li class="active">{{ $invoice->invoice_number }}</li>
 | 
				
			||||||
		@endif
 | 
							@endif
 | 
				
			||||||
		@if ($invoice->is_recurring && $invoice->isSent() && (! $invoice->last_sent_date || $invoice->last_sent_date == '0000-00-00'))
 | 
							@if ($invoice->is_recurring && $invoice->isSent())
 | 
				
			||||||
 | 
								@if (! $invoice->last_sent_date || $invoice->last_sent_date == '0000-00-00')
 | 
				
			||||||
				{!! $invoice->present()->statusLabel(trans('texts.pending')) !!}
 | 
									{!! $invoice->present()->statusLabel(trans('texts.pending')) !!}
 | 
				
			||||||
 | 
								@else
 | 
				
			||||||
 | 
									{!! $invoice->present()->statusLabel(trans('texts.active')) !!}
 | 
				
			||||||
 | 
								@endif
 | 
				
			||||||
		@else
 | 
							@else
 | 
				
			||||||
			{!! $invoice->present()->statusLabel !!}
 | 
								{!! $invoice->present()->statusLabel !!}
 | 
				
			||||||
		@endif
 | 
							@endif
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user