S.No. | Department | Name | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ ++$sn; }} | {{ $ac->deptname }} |
@php
$asql = DB::table('cishc_standing_council_adv as csca')
->join('bci_advocate as ba', function ($join) {
$join->on('ba.enrolment_number', '=', DB::raw('csca.enroll_no'))
->where(DB::raw("DATE_PART('year', ba.enrolment_date)"), '=', DB::raw('csca.enroll_yr'))
->where('ba.org_id', '=', 3);
})
->join('bci_users as bu', function ($join) {
$join->on('ba.id', '=', 'bu.advocate_id')
->where('ba.org_id', '=', 3);
})
->where('csca.stn_cnl_id', '=', $ac->id)
->where('csca.display', '=', 'Y')
->where(function ($query) use ($date) {
$query->where('csca.to_date', '>=', $date)
->orWhereNull('csca.to_date');
})
->select(DB::raw("CONCAT(csca.enroll_no, '/', csca.enroll_yr) as enroll_no"), 'bu.user_name',
'csca.id', 'csca.from_date', 'csca.to_date')
->get();
if(count($asql) > 0){
@endphp
@php
foreach($asql as $aa){
$name .= $aa->enroll_no." - ".$aa->user_name." "; $from_dt .= date("d-m-Y",strtotime($aa->from_date))." "; if($aa->to_date != null) $to_dt = date("d-m-Y",strtotime($aa->to_date)); else $to_dt = ""; @endphp @php } @endphp
|