mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 03:40:09 -05:00 
			
		
		
		
	Working on projects
This commit is contained in:
		
							parent
							
								
									f1052ef377
								
							
						
					
					
						commit
						565df2fe98
					
				@ -58,7 +58,7 @@ class AccountPresenter extends Presenter
 | 
			
		||||
     */
 | 
			
		||||
    public function taskRate()
 | 
			
		||||
    {
 | 
			
		||||
        if ($this->entity->task_rate) {
 | 
			
		||||
        if (floatval($this->entity->task_rate)) {
 | 
			
		||||
            return Utils::roundSignificant($this->entity->task_rate);
 | 
			
		||||
        } else {
 | 
			
		||||
            return '';
 | 
			
		||||
 | 
			
		||||
@ -108,10 +108,23 @@ class ClientPresenter extends EntityPresenter
 | 
			
		||||
     */
 | 
			
		||||
    public function taskRate()
 | 
			
		||||
    {
 | 
			
		||||
      if ($this->entity->task_rate) {
 | 
			
		||||
      if (floatval($this->entity->task_rate)) {
 | 
			
		||||
          return Utils::roundSignificant($this->entity->task_rate);
 | 
			
		||||
      } else {
 | 
			
		||||
          return '';
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @return string
 | 
			
		||||
     */
 | 
			
		||||
    public function defaultTaskRate()
 | 
			
		||||
    {
 | 
			
		||||
      if ($rate = $this->taskRate()) {
 | 
			
		||||
          return $rate;
 | 
			
		||||
      } else {
 | 
			
		||||
          return $this->entity->account->present()->taskRate;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -23,4 +23,28 @@ class ProjectPresenter extends EntityPresenter
 | 
			
		||||
        return $data;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @return string
 | 
			
		||||
     */
 | 
			
		||||
    public function taskRate()
 | 
			
		||||
    {
 | 
			
		||||
      if (floatval($this->entity->task_rate)) {
 | 
			
		||||
          return Utils::roundSignificant($this->entity->task_rate);
 | 
			
		||||
      } else {
 | 
			
		||||
          return '';
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @return string
 | 
			
		||||
     */
 | 
			
		||||
    public function defaultTaskRate()
 | 
			
		||||
    {
 | 
			
		||||
      if ($rate = $this->taskRate()) {
 | 
			
		||||
          return $rate;
 | 
			
		||||
      } else {
 | 
			
		||||
          return $this->entity->client->present()->defaultTaskRate;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -66,8 +66,8 @@
 | 
			
		||||
            @if ($project->budgeted_hours)
 | 
			
		||||
                {{ trans('texts.budgeted_hours') . ': ' . $project->budgeted_hours }}<br/>
 | 
			
		||||
            @endif
 | 
			
		||||
            @if (floatval($project->task_rate))
 | 
			
		||||
                {{ trans('texts.task_rate') . ': ' . Utils::formatMoney($project->task_rate) }}<br/>
 | 
			
		||||
            @if ($project->present()->defaultTaskRate)
 | 
			
		||||
                {{ trans('texts.task_rate') . ': ' . $project->present()->defaultTaskRate }}<br/>
 | 
			
		||||
            @endif
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user