IMMREX7
<?php
namespace App\Http\Controllers\Student;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use DB;
use Auth;
use Session;
class SudarshanTransportFeeController extends StudentController
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$student = \App\AdmEntry::where('idStudent', '=', Session::get('idStudent'))->first();
$stdtransport = \App\StudentTransport::where('idStudent', '=', $student->idStudent)->where('idFinancialYear','=', getFinancialYear())->first();
$feeheads = \DB::table('northfeeheads')->where('idStudent', '=', $student->idStudent)
->where('idFinancialYear','=',$student->idFinancialYear)
->where('isParent','=','0')
->where('idType', '=', 'bus')
->orderBy('toDate')
->get();
$fineheads=\DB::table('northfines')->where('idSchool', '=', $student->idSchool)->where('idFinancialYear', '=', $student->idFinancialYear)->get();
$feetotal = $feeheads->sum('amount');
$prevaccess_fee = DB::table('bus_excess_transaction')
->join('bus_transaction', 'bus_excess_transaction.idBusTransaction', '=', 'bus_transaction.idBusTransaction')
->where('idStudent', '=', $student->idStudent)
->where('idFinancialYear', '=', $student->idFinancialYear)
->where('bus_excess_transaction.isActive', '=', 'Y')
->orderBy('bus_excess_transaction.idBusTransaction', 'desc')->first();
$paidfees_tot = \App\BusTransaction::where('idStudent', '=', $student->idStudent)
->where(function($query) {
$query->whereNull('status');
$query->orWhere('status', '=', 'Cleared');
$query->orWhere('status', '=', 'In-Process');
$query->orWhere('status', '=', 'Success');
})
->select('paymentMode', 'paymentDate', 'idBusTransaction', DB::raw('SUM(totalPaid) as totalPaid'), DB::raw('SUM(discount) as discount'), DB::raw('SUM(fine) as fine'), DB::raw('SUM(penaltyAmount) as penaltyAmount'))->first();
$paidfees = \App\BusTransaction::where('idStudent', '=', $student->idStudent)
->where(function($query) {
$query->whereNull('status');
$query->orWhere('status', '=', 'In-Process');
$query->orWhere('status', '=', 'Cleared');
$query->orWhere('status', '=', 'Success');
})->get();
$lesserfees = \App\BusLesserTransaction::where('idStudent', '=', $student->idStudent)
->where(function($query) {
$query->whereNull('status');
$query->orWhere('status', '=', 'In-Process');
$query->orWhere('status', '=', 'Cleared');
$query->orWhere('status', '=', 'Success');
})->get();
return view('students.transportfees.sudarshanfeedetails', compact('lesser_transaction', 'prevaccess_fee', 'lesserfees', 'stdtransport', 'feetotal', 'paidfees_tot', 'student', 'paidfees', 'feeheads', 'excesspaid', 'penalty', 'feeheadwiseamount','fineheads'));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
}
}
Copyright © 2021 -