Example #1
0
 public function jantinaPost()
 {
     if (Jantina::create(['nama' => strtoupper(Request::get('nama'))])) {
         Session::flash('success', 'Berjaya direkod');
         return Redirect::route('members.setup.jantina');
     }
     Session::flash('failed', 'Gagal direkod');
     return Redirect::route('members.setup.jantina');
 }
Example #2
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     User::create(array('name' => 'Suhairi Abdul Hamid', 'email' => '*****@*****.**', 'password' => Hash::make('suhairi')));
     User::create(array('name' => 'Nona Azizah', 'email' => '*****@*****.**', 'password' => Hash::make('azizah')));
     Perkhidmatan::create(array("nama" => "WANG TUNAI"));
     Perkhidmatan::create(array("nama" => "BUKU SEKOLAH"));
     Perkhidmatan::create(array("nama" => "CUKAI JALAN"));
     Perkhidmatan::create(array("nama" => "INSURANS"));
     Perkhidmatan::create(array("nama" => "TAYAR / BATERI"));
     Perkhidmatan::create(array("nama" => "KECEMASAN"));
     Startup::create(['id' => 1, 'nama' => 'YURAN', 'nilai' => '4184963.80', 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now()]);
     Startup::create(['id' => 2, 'nama' => 'TKA', 'nilai' => '90721.52', 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now()]);
     Startup::create(['id' => 3, 'nama' => 'BIASA', 'nilai' => '00.00', 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now()]);
     Startup::create(['id' => 4, 'nama' => 'PERTARUHAN', 'nilai' => '00.00', 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now()]);
     Startup::create(['id' => 5, 'nama' => 'TAYAR / BATERI', 'nilai' => '00.00', 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now()]);
     Startup::create(['id' => 6, 'nama' => 'INSURANS', 'nilai' => '00.00', 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now()]);
     Tka::create(['id' => 1, 'jumlah' => 6.0, 'status' => 1, 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now()]);
     Sumbangan::create(['id' => 1, 'nama' => 'Sumbangan Kematian']);
     Sumbangan::create(['id' => 2, 'nama' => 'Sumbangan IPTA']);
     Sumbangan::create(['id' => 3, 'nama' => 'Sumbangan Bencana']);
     Zon::create(['kod' => '01', 'nama' => 'BAHAGIAN KHIDMAT PENGURUSAN']);
     Zon::create(['kod' => '02', 'nama' => 'BAHAGIAN INDUSTRI PADI']);
     Zon::create(['kod' => '03', 'nama' => 'BAHAGIAN INDUSTRI PADI DAN BUKAN PADI']);
     Zon::create(['kod' => '04', 'nama' => 'BAHAGIAN PENGURUSAN INSTITUSI LADANG']);
     Zon::create(['kod' => '05', 'nama' => 'BAHAGIAN PERANCANGAN DAN TEKNOLOGI MAKLUMAT']);
     Zon::create(['kod' => '06', 'nama' => 'BAHAGIAN PENGURUSAN EMPANGAN DAN SUMBER AIR']);
     Zon::create(['kod' => '07', 'nama' => 'BAHAGIAN PENGAIRAN DAN SALIRAN']);
     Zon::create(['kod' => '08', 'nama' => 'BAHAGIAN KHIDMAT MEKANIKAL DAN INFRASTRUKTUR']);
     Zon::create(['kod' => '09', 'nama' => 'PERKHIDMATAN MEKANIKAL']);
     Zon::create(['kod' => '10', 'nama' => 'BAHAGIAN PENGURUSAN WILAYAH']);
     Zon::create(['kod' => '11', 'nama' => 'WILAYAH 1']);
     Zon::create(['kod' => '12', 'nama' => 'WILAYAH 2']);
     Zon::create(['kod' => '13', 'nama' => 'WILAYAH 3']);
     Zon::create(['kod' => '14', 'nama' => 'WILAYAH 4']);
     Zon::create(['kod' => '20', 'nama' => 'BAYARAN SENDIRI']);
     Jantina::create(['nama' => 'LELAKI']);
     Jantina::create(['nama' => 'PEREMPUAN']);
     Status::create(['nama' => 'AKTIF']);
     Status::create(['nama' => 'PENCEN']);
     Status::create(['nama' => 'TIDAK AKTIF']);
     Status::where('id', 3)->update(['id' => 0]);
     Takaful::create(['jumlah' => '10.00', 'status' => 1]);
     ProfileCategory::create(['id' => 1, 'nama' => 'AHLI BIASA', 'catatan' => '']);
     ProfileCategory::create(['id' => 2, 'nama' => 'PPK', 'catatan' => '']);
     ProfileCategory::create(['id' => 3, 'nama' => 'YPPPM', 'catatan' => 'Y']);
     ProfileCategory::create(['id' => 4, 'nama' => 'SPPM', 'catatan' => 'S']);
     ProfileCategory::create(['id' => 5, 'nama' => 'KOMADA', 'catatan' => '']);
     ProfileCategory::create(['id' => 6, 'nama' => 'PELADANG MART', 'catatan' => 'PM']);
     $profiles = Profile::all();
     foreach ($profiles as $profile) {
         $no_anggota = (int) $profile->no_anggota;
         if ($no_anggota != 0) {
             $profile->profile_category_id = 1;
             $profile->save();
         }
         if (strpos($profile->no_anggota, 'Y') !== false) {
             $profile->profile_category_id = 3;
             $profile->save();
         }
         if (strpos($profile->no_anggota, 'S') !== false) {
             $profile->profile_category_id = 4;
             $profile->save();
         }
         if (strpos($profile->no_anggota, 'PM') !== false) {
             $profile->profile_category_id = 6;
             $profile->save();
         }
         if (strpos($profile->no_anggota, 'A') !== false || strpos($profile->no_anggota, 'B') !== false || strpos($profile->no_anggota, 'C') !== false || strpos($profile->no_anggota, 'F') !== false) {
             $profile->profile_category_id = 2;
             $profile->save();
         }
     }
 }
Example #3
0
 public function edit($id)
 {
     $anggota = [];
     // $anggota['aktif']
     $profiles = Profile::where('status', 1)->count();
     $active = $profiles;
     // $anggota['inactive']
     $inactive = Inactive::where('updated_at', 'like', Carbon::now()->format('Y') . '%')->where('status', 1)->count();
     // $anggota['keseluruhan']
     $profiles = Profile::all();
     $keseluruhan = $profiles->count();
     $max = 0;
     foreach ($profiles as $profile) {
         $profile->no_anggota = (int) $profile->no_anggota;
         if ($profile->no_anggota != 0 && $profile->no_anggota > $max) {
             $max = $profile->no_anggota;
         }
     }
     $anggota = ['keseluruhan' => $keseluruhan, 'aktif' => $active, 'inactive' => $inactive, 'no_akhir' => $max];
     $profile = Profile::where('no_gaji', $id)->first();
     $status = ['1' => 'AKTIF', '0' => 'TIDAK AKTIF', '2' => 'PENCEN'];
     $zon = Zon::lists('nama', 'kod');
     $jantina = Jantina::lists('nama', 'id');
     return View('members.profile.edit', compact('profile', 'status', 'anggota', 'zon', 'jantina'));
 }
Example #4
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     User::create(['name' => 'Mohd Najib b Ruslah', 'email' => '*****@*****.**', 'password' => \Hash::make('najib')]);
     User::create(['name' => 'admin', 'email' => '*****@*****.**', 'password' => \Hash::make('password')]);
     User::create(['name' => 'Suhairi Abdul Hamid', 'email' => '*****@*****.**', 'password' => \Hash::make('suhairi')]);
     Cawangan::create(['nama' => 'ALOR SETAR']);
     Cawangan::create(['nama' => 'POKOK SENA']);
     Cawangan::create(['nama' => 'SUNGAI PETANI']);
     Cawangan::create(['nama' => 'PAROL']);
     Warganegara::create(['nama' => 'WARGANEGARA']);
     Warganegara::create(['nama' => 'WARGA ASING']);
     Warganegara::create(['nama' => 'LAIN_LAIN']);
     Jantina::create(['nama' => 'LELAKI']);
     Jantina::create(['nama' => 'PEREMPUAN']);
     Bangsa::create(['nama' => 'MELAYU']);
     Bangsa::create(['nama' => 'CINA']);
     Bangsa::create(['nama' => 'INDIA']);
     Bangsa::create(['nama' => 'LAIN_LAIN']);
     Kategori::create(['nama' => 'SABITAN']);
     // ---> 1
     Kategori::create(['nama' => 'BUKAN SABITAN']);
     // ---> 2
     Kategori::create(['nama' => 'DADAH']);
     // ---> 3
     Kategori::create(['nama' => 'MUDA']);
     // ---> 4
     Kategori::create(['nama' => 'PAROL']);
     // ---> 5
     Kategori::create(['nama' => 'KEM']);
     // ---> 6
     //        Kesalahan
     //            Banduan Akhir   -> 1
     //            B. Seumur Hayar -> 2
     //            B. Seumur Hidup -> 3
     //            T. Limpah Sultan-> 4
     //            H. Lama         -> 5
     //            H. Singkat      -> 6 ----> SABITAN
     //            T. M. Tinggi    -> 7
     //            T. M. Sesyen    -> 8
     //            T. M. Rendah    -> 9
     //            T. M. Rayuan    -> 10
     //            T. M. R. S      -> 11
     //            B. Dagang       -> 12 ----> B. SABITAN
     //            Dadah           -> 13
     //            Muda            -> 14
     //            Parol`          -> 15
     //            KEM             -> 16
     Kesalahan::create(['nama' => 'BANDUAN AKHIR', 'kategori_id' => '1', 'kod' => 'BA']);
     Kesalahan::create(['nama' => 'BANDUAN SEUMUR HAYAT', 'kategori_id' => '1', 'kod' => 'SH']);
     Kesalahan::create(['nama' => 'BANDUAN SEUMUR HIDUP', 'kategori_id' => '1', 'kod' => 'BSH']);
     Kesalahan::create(['nama' => 'TAHANAN LIMPAH SULTAN', 'kategori_id' => '1', 'kod' => 'TLS']);
     Kesalahan::create(['nama' => 'HUKUMAN LAMA', 'kategori_id' => '1', 'kod' => 'HL']);
     Kesalahan::create(['nama' => 'HUKUMAN SINGKAT', 'kategori_id' => '1', 'kod' => 'HS']);
     Kesalahan::create(['nama' => 'TAHANAN MAHKAMAH TINGGI', 'kategori_id' => '2', 'kod' => 'TMT']);
     Kesalahan::create(['nama' => 'TAHANAN MAHKAMAH SESYEN', 'kategori_id' => '2', 'kod' => 'TMS']);
     Kesalahan::create(['nama' => 'TAHANAN MAHKAMAH RENDAH', 'kategori_id' => '2', 'kod' => 'TMR']);
     Kesalahan::create(['nama' => 'TAHANAN MAHKAMAH RAYUAN', 'kategori_id' => '2', 'kod' => 'TMR']);
     //  KIV
     Kesalahan::create(['nama' => 'TAHANAN MAHKAMAH RENDAH SESYEN', 'kategori_id' => '2', 'kod' => 'TMRS']);
     Kesalahan::create(['nama' => 'BANDUAN DAGANG', 'kategori_id' => '2', 'kod' => 'BD']);
     Kesalahan::create(['nama' => 'DADAH', 'kategori_id' => '3', 'kod' => 'DADAH']);
     Kesalahan::create(['nama' => 'PAROL', 'kategori_id' => '4', 'kod' => 'PAROL']);
     Kesalahan::create(['nama' => 'MUDA', 'kategori_id' => '5', 'kod' => 'MUDA']);
     Kesalahan::create(['nama' => 'KEM', 'kategori_id' => '6', 'kod' => 'KEM']);
     Kesalahan::create(['nama' => 'POCA', 'kategori_id' => '6', 'kod' => 'KEM']);
     Pegawai::create(['nama' => 'NOOR HAZWAN B AB HAMID', 'pangkat' => 'KPL 15883']);
 }