Esempio n. 1
0
 public function run()
 {
     DB::table('karyawans')->delete();
     Rekanan::create(array('kdrek' => 'RK01', 'cp' => 'Ali', 'jabatan' => 'Direktur', 'namarek' => 'Ali Sadikin', 'telpon1' => '4234234', 'alamat' => 'Jl. Galunggung', 'hp' => '08623423442', 'kodepos' => '62834', 'email' => '*****@*****.**', 'kota' => 'Kendari', 'propinsi' => 'Sulawesi utara', 'negara' => 'Indonesia', 'jbayar' => 'Cek', 'bank' => 'BCA', 'npwp' => '234982985792754', 'norek' => '342342', 'telpon2' => '0341-4245235', 'girocek' => 'werweiurho', 'fax' => '72658745', 'emailgiro' => '*****@*****.**', 'web' => 'domain.com', 'prodjasa' => 'Alat berat', 'created_at' => new DateTime(), 'updated_at' => new DateTime()));
     Rekanan::create(array('kdrek' => 'RK02', 'cp' => 'Ainur', 'jabatan' => 'Manajer Marketing', 'namarek' => 'Ainur Rohmah', 'telpon1' => '0234-435765', 'alamat' => 'Komplek Perumahan Green Hills', 'hp' => '08123346546', 'kodepos' => '79893', 'email' => '*****@*****.**', 'kota' => 'Jakarta', 'propinsi' => 'Jawa Barat', 'negara' => 'Indonesia', 'jbayar' => 'Tunai', 'bank' => 'BNI Syariah', 'npwp' => '8743654985823', 'norek' => '8723644982', 'telpon2' => '021-45634520', 'girocek' => 'wlkjhfsdf', 'fax' => '546457342', 'emailgiro' => '*****@*****.**', 'web' => '-', 'prodjasa' => 'Jasa maintenance alat berat', 'created_at' => new DateTime(), 'updated_at' => new DateTime()));
     Rekanan::create(array('kdrek' => 'RK03', 'cp' => 'Budi', 'jabatan' => 'Marketing', 'namarek' => 'Khairunisa', 'telpon1' => '023452834982', 'alamat' => 'Jl. Panglima Sudirman', 'hp' => '09823423998', 'kodepos' => '62800', 'email' => '*****@*****.**', 'kota' => 'Malang', 'propinsi' => 'Jawa Timur', 'negara' => 'Indonesia', 'jbayar' => 'Giro', 'bank' => 'Mandiri', 'npwp' => '9236498234792374', 'norek' => '4356346435', 'telpon2' => '0341-4245235', 'girocek' => 'ini giro_cek', 'fax' => '0341-8345980', 'emailgiro' => '*****@*****.**', 'web' => 'ini_domain.com', 'prodjasa' => 'Perlengkapan bangunan', 'created_at' => new DateTime(), 'updated_at' => new DateTime()));
 }
Esempio n. 2
0
 public function TambahRekanan()
 {
     $input = array('NamaPerusahaan' => Input::get('NamaPerusahaan'), 'NPWP' => Input::get('NPWP'), 'NamaDirektur' => Input::get('NamaDirektur'), 'Alamat' => Input::get('Alamat'));
     $rules = array('NamaPerusahaan' => 'required', 'NPWP' => 'required|min:20|unique:rekanan,NPWP', 'NamaDirektur' => 'required', 'Alamat' => 'required');
     $messages = array('NamaPerusahaan.required' => 'Baris <b>Nama rekanan Atau Wajib Pajak</b> tidak boleh kosong', 'NPWP.required' => 'Baris <b>NPWP</b> tidak boleh kosong', 'NPWP.min' => 'Baris <b>NPWP</b> minimal 20 karakter', 'NPWP.unique' => 'Rekanan dengan NPWP <b>' . Input::get('NPWP') . '</b> sudah terdaftar.', 'NamaDirektur.required' => 'Baris <b>Nama Direktur</b> tidak boleh kosong.', 'Alamat.required' => 'Baris <b>Alamat</b> tidak boleh kosong.');
     $validasi = BaseController::validasi($input, $rules, $messages);
     if ($validasi->validator->fails()) {
         $result['error'] = $validasi->PesanError;
     } else {
         Rekanan::create($input);
         $result['success'] = Redirect::back()->with('success', 'Data Rekanan Berhasil ditambahkan.');
     }
     return $result;
 }