mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 23:17:32 -05:00 
			
		
		
		
	Merge pull request #4607 from turbo124/v5-develop
Display client name if contact name is not present
This commit is contained in:
		
						commit
						2e2b815371
					
				@ -21,7 +21,12 @@ class ClientContactPresenter extends EntityPresenter
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    public function name()
 | 
					    public function name()
 | 
				
			||||||
    {   
 | 
					    {   
 | 
				
			||||||
        return $this->entity->first_name.' '.$this->entity->last_name;
 | 
					        $contact_name = $this->entity->first_name.' '.$this->entity->last_name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if(strlen($contact_name) > 1)
 | 
				
			||||||
 | 
					            return $contact_name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return $this->entity->client->present()->name(); 
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public function first_name()
 | 
					    public function first_name()
 | 
				
			||||||
 | 
				
			|||||||
@ -367,9 +367,13 @@ class RecurringInvoice extends BaseModel
 | 
				
			|||||||
            $iterations = 10;
 | 
					            $iterations = 10;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
 | 
					        $data = [];
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					        if(!$this->next_send_date)
 | 
				
			||||||
 | 
					            return $data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $next_send_date = Carbon::parse($this->next_send_date)->copy();
 | 
					        $next_send_date = Carbon::parse($this->next_send_date)->copy();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $data = [];
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        for ($x=0; $x<$iterations; $x++) {
 | 
					        for ($x=0; $x<$iterations; $x++) {
 | 
				
			||||||
            // we don't add the days... we calc the day of the month!!
 | 
					            // we don't add the days... we calc the day of the month!!
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user