Commit 370e76f2 by Azhan Hannan

email approval, add checking condition, timesheet master sts 3

parent 8bf72fa7
...@@ -78,8 +78,11 @@ class Approval extends Command ...@@ -78,8 +78,11 @@ class Approval extends Command
->where('tp_project_type', 1) ->where('tp_project_type', 1)
->with('pelulus') ->with('pelulus')
->with('staffdetails') ->with('staffdetails')
->whereHas('tm', function($query) {
$query->where('tm_timesheet_master_sts', 3);
})
->distinct() ->distinct()
->get(); ->get();
$pelulus = VwPelulus::with('details')->get(); $pelulus = VwPelulus::with('details')->get();
......
...@@ -4,6 +4,7 @@ namespace Portal\Timesheet\Model; ...@@ -4,6 +4,7 @@ namespace Portal\Timesheet\Model;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable; use Illuminate\Notifications\Notifiable;
use Portal\Timesheet\Model\Ts_master;
class VwTpStatus extends Model class VwTpStatus extends Model
{ {
...@@ -35,6 +36,11 @@ class VwTpStatus extends Model ...@@ -35,6 +36,11 @@ class VwTpStatus extends Model
{ {
return $this->hasOne('Portal\Timesheet\Model\Staff_info','fk_users','tp_pd'); return $this->hasOne('Portal\Timesheet\Model\Staff_info','fk_users','tp_pd');
} }
public function tm()
{
return $this->hasOne(Ts_master::class, 'id', 'fk_tm_id');
}
/** /**
* undocumented function * undocumented function
......
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