public function run()
 {
     $faker = Faker::create();
     foreach (range(1, 10) as $index) {
         Leaveapplication::create([]);
     }
 }
Ejemplo n.º 2
0
Route::get('erpReports/paymentmethods', 'ErpReportsController@paymentmethods');
Route::get('erpReports/payments', 'ErpReportsController@payments');
Route::get('erpReports/locations', 'ErpReportsController@locations');
Route::get('erpReports/stock', 'ErpReportsController@stock');
/*
*#################################################################
*/
Route::group(['before' => 'process_payroll'], function () {
    Route::get('payrollmgmt', function () {
        $employees = Employee::all();
        return View::make('payrollmgmt', compact('employees'));
    });
});
Route::group(['before' => 'leave_mgmt'], function () {
    Route::get('leavemgmt', function () {
        $leaveapplications = Leaveapplication::all();
        return View::make('leavemgmt', compact('leaveapplications'));
    });
});
Route::get('erpmgmt', function () {
    return View::make('erpmgmt');
});
Route::get('cbsmgmt', function () {
    if (Confide::user()->user_type == 'admin') {
        $members = Member::all();
        //print_r($members);
        return View::make('cbsmgmt', compact('members'));
    }
    if (Confide::user()->user_type == 'teller') {
        $members = Member::all();
        return View::make('tellers.dashboard', compact('members'));
Ejemplo n.º 3
0
 public static function RedeemLeaveDays($employee, $leavetype)
 {
     $payrate = $employee->basic_pay / 30;
     $balancedays = Leaveapplication::getBalanceDays($employee, $leavetype);
     $amount = $balancedays * $payrate;
     Earning::insert($employee->id, 'Leave earning', 'redeemed leave days', $amount);
 }
Ejemplo n.º 4
0
 public function cancellations()
 {
     $leaveapplications = Leaveapplication::all();
     return View::make('leaveapplications.cancelled', compact('leaveapplications'));
 }