Commit 8c12b1b9 by hannan

Merge branch 'master' of http://coders.3fresources.com/etimesheet/timesheet

# Conflicts:
#	packages/portal/timesheet/src/Http/Controllers/DashboardController.php
parents 42cbd031 57937b94
...@@ -77,12 +77,16 @@ input[type=number] { ...@@ -77,12 +77,16 @@ input[type=number] {
</td> </td>
@if($phase == 1) @if($phase == 1)
@for($i = 0; $i < 15 ; $i++) @for($i = 0; $i < 15 ; $i++)
<?php
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
$valuehour = $hour->where('td_date','=',$date)->where('td_project',$project['td_project'])
->where('tm_phase',$phase)
->first();
?>
<td > <td >
@if($project['td_date'] == $i+1) <input type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{$valuehour->td_hours}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{$project['td_project']}}');">
<input type="text" onkeypress="onlynumber(event)" name="hour[{{$project['td_project']}}][{{$i+1}}]" id="hour[{{$project['td_project']}}][{{$i+1}}]" value="{{$project['td_hours']}}" min="0" max="24" style="padding:2px;margin:unset;color:#A0A0A0;" onchange="limiter(this,'{{$project['td_project']}}');" readonly="readonly">
@else
<input type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{$project['td_project']}}');">
@endif
</td> </td>
@endfor @endfor
@else @else
......
...@@ -15,7 +15,7 @@ class Ts_master extends Model ...@@ -15,7 +15,7 @@ class Ts_master extends Model
public function Details() public function Details()
{ {
return $this->hasMany('App\Models\Ts_detail','tm_id','id'); return $this->hasMany('Portal\Timesheet\Model\Ts_detail','fk_tm_id','id');
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment