Develop
This commit is contained in:
@@ -1,128 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\MstGolongan;
|
||||
use Illuminate\Http\Request;
|
||||
use Config;
|
||||
|
||||
class MstGolonganController extends Controller
|
||||
{
|
||||
public function __construct(Request $request){
|
||||
$this->siteTitle = "Data Golongan";
|
||||
parent::__construct();
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data = MstGolongan::latest()->paginate(10);
|
||||
|
||||
return view('admin.mst_golongan.index',compact('data'))
|
||||
->with('i', (request()->input('page', 1) - 1) * 10);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$this->setSubtitle("Tambah Data");
|
||||
return view('admin.mst_golongan.create');
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
'nama_golongan' => 'required',
|
||||
'nama_pangkat' => 'required',
|
||||
'golongan_besar' => 'required',
|
||||
'alias' => 'required',
|
||||
]);
|
||||
|
||||
$requestAll = $request->all();
|
||||
MstGolongan::create($requestAll);
|
||||
|
||||
return redirect()->route('mst-golongan.index')
|
||||
->with('success','Post created successfully.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param \App\Models\MstGolongan $MstGolongan
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show(MstGolongan $MstGolongan)
|
||||
{
|
||||
$this->setSubtitle("Detail Data");
|
||||
return view('admin.mst_golongan.show',compact('MstGolongan'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param \App\Models\MstGolongan $MstGolongan
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit(MstGolongan $MstGolongan)
|
||||
{
|
||||
$this->setSubtitle("Ubah Data");
|
||||
return view('admin.mst_golongan.edit',compact('MstGolongan'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \App\Models\MstGolongan $MstGolongan
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, MstGolongan $MstGolongan)
|
||||
{
|
||||
$request->validate([
|
||||
'nama_golongan' => 'required',
|
||||
'nama_pangkat' => 'required',
|
||||
'golongan_besar' => 'required',
|
||||
'alias' => 'required',
|
||||
]);
|
||||
|
||||
$requestAll = $request->all();
|
||||
$MstGolongan->update($requestAll);
|
||||
|
||||
return redirect()->route('mst-golongan.index')
|
||||
->with('success','Golongan berhasil diubah!');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param \App\Models\MstGolongan $MstGolongan
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(MstGolongan $MstGolongan)
|
||||
{
|
||||
$MstGolongan->delete();
|
||||
|
||||
return redirect()->route('mst-golongan.index')
|
||||
->with('success','Golongan berhasil dihapus!');
|
||||
}
|
||||
|
||||
public function golonganList()
|
||||
{
|
||||
$mstGolongan = MstGolongan::select(["id","nama_golongan","nama_pangkat","alias"])->get();
|
||||
return response()->json($mstGolongan);
|
||||
}
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\MstHak;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class MstHakController extends Controller
|
||||
{
|
||||
public function __construct(){
|
||||
$this->siteTitle = "Data Hak";
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$data = MstHak::latest()->paginate(10);
|
||||
|
||||
return view('admin.mst_hak.index',compact('data'))
|
||||
->with('i', (request()->input('page', 1) - 1) * 10);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->setSubtitle("Tambah Data");
|
||||
return view('admin.mst_hak.create');
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
'nama_hak' => 'required',
|
||||
]);
|
||||
|
||||
$requestAll = $request->all();
|
||||
MstHak::create($requestAll);
|
||||
|
||||
return redirect()->route('mst-hak.index')
|
||||
->with('success','Hak berhasil dibuat.');
|
||||
}
|
||||
|
||||
public function show(MstHak $MstHak)
|
||||
{
|
||||
$this->setSubtitle("Detail Data");
|
||||
return view('admin.mst_hak.show',compact('MstHak'));
|
||||
}
|
||||
|
||||
public function edit(MstHak $MstHak)
|
||||
{
|
||||
$this->setSubtitle("Ubah Data");
|
||||
return view('admin.mst_hak.edit',compact('MstHak'));
|
||||
}
|
||||
|
||||
public function update(Request $request, MstHak $MstHak)
|
||||
{
|
||||
$request->validate([
|
||||
'nama_hak' => 'required',
|
||||
]);
|
||||
|
||||
$requestAll = $request->all();
|
||||
$MstHak->update($requestAll);
|
||||
|
||||
return redirect()->route('mst-hak.index')
|
||||
->with('success','Hak berhasil diubah!');
|
||||
}
|
||||
|
||||
public function destroy(MstHak $MstHak)
|
||||
{
|
||||
$MstHak->delete();
|
||||
|
||||
return redirect()->route('mst-hak.index')
|
||||
->with('success','Hak berhasil dihapus!');
|
||||
}
|
||||
|
||||
public function hakList()
|
||||
{
|
||||
$mstKantor = MstHak::select(["id","nama_hak"])->get();
|
||||
return response()->json($mstKantor);
|
||||
}
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\MstKantor;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class MstKantorController extends Controller
|
||||
{
|
||||
public function __construct(){
|
||||
$this->siteTitle = "Data Kantor";
|
||||
parent::__construct();
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data = MstKantor::latest()->paginate(10);
|
||||
|
||||
return view('admin.mst_kantor.index',compact('data'))
|
||||
->with('i', (request()->input('page', 1) - 1) * 10);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$this->setSubtitle("Tambah Data");
|
||||
return view('admin.mst_kantor.create');
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
'nama_kantor' => 'required',
|
||||
'wilayah' => 'required',
|
||||
]);
|
||||
|
||||
$requestAll = $request->all();
|
||||
MstKantor::create($requestAll);
|
||||
|
||||
return redirect()->route('mst-kantor.index')
|
||||
->with('success','Post created successfully.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param \App\Models\MstKantor $MstKantor
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show(MstKantor $MstKantor)
|
||||
{
|
||||
$this->setSubtitle("Detail Data");
|
||||
return view('admin.mst_kantor.show',compact('MstKantor'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param \App\Models\MstKantor $MstKantor
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit(MstKantor $MstKantor)
|
||||
{
|
||||
$this->setSubtitle("Ubah Data");
|
||||
return view('admin.mst_kantor.edit',compact('MstKantor'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \App\Models\MstKantor $MstKantor
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, MstKantor $MstKantor)
|
||||
{
|
||||
$request->validate([
|
||||
'nama_kantor' => 'required',
|
||||
'wilayah' => 'required',
|
||||
]);
|
||||
|
||||
$requestAll = $request->all();
|
||||
$MstKantor->update($requestAll);
|
||||
|
||||
return redirect()->route('mst-kantor.index')
|
||||
->with('success','Tempat Kerja berhasil diubah!');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param \App\Models\MstKantor $MstKantor
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(MstKantor $MstKantor)
|
||||
{
|
||||
$MstKantor->delete();
|
||||
|
||||
return redirect()->route('mst-kantor.index')
|
||||
->with('success','Tempat Kerja berhasil dihapus!');
|
||||
}
|
||||
|
||||
public function kantorList()
|
||||
{
|
||||
$mstKantor = MstKantor::select(["id","nama_kantor","wilayah"])->get();
|
||||
return response()->json($mstKantor);
|
||||
}
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\MstKeputusan;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class MstKeputusanController extends Controller
|
||||
{
|
||||
public function __construct(){
|
||||
$this->siteTitle = "Data Keputusan";
|
||||
parent::__construct();
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data = MstKeputusan::latest()->paginate(10);
|
||||
|
||||
return view('admin.mst_keputusan.index',compact('data'))
|
||||
->with('i', (request()->input('page', 1) - 1) * 10);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$this->setSubtitle("Tambah Data");
|
||||
return view('admin.mst_keputusan.create');
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
'nama_keputusan' => 'required',
|
||||
]);
|
||||
|
||||
$requestAll = $request->all();
|
||||
MstKeputusan::create($requestAll);
|
||||
|
||||
return redirect()->route('mst-keputusan.index')
|
||||
->with('success','Post created successfully.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param \App\Models\MstKeputusan $mstKeputusan
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show(MstKeputusan $mstKeputusan)
|
||||
{
|
||||
// var_dump($mstKeputusan); exit;
|
||||
$this->setSubtitle("Detail Data");
|
||||
return view('admin.mst_keputusan.show',compact('mstKeputusan'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param \App\Models\MstKeputusan $mstKeputusan
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit(MstKeputusan $mstKeputusan)
|
||||
{
|
||||
$this->setSubtitle("Ubah Data");
|
||||
return view('admin.mst_keputusan.edit',compact('mstKeputusan'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \App\Models\MstKeputusan $mstKeputusan
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, MstKeputusan $mstKeputusan)
|
||||
{
|
||||
$request->validate([
|
||||
'nama_keputusan' => 'required',
|
||||
]);
|
||||
|
||||
$requestAll = $request->all();
|
||||
$mstKeputusan->update($requestAll);
|
||||
|
||||
return redirect()->route('mst-keputusan.index')
|
||||
->with('success','Keputusan berhasil diubah!');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param \App\Models\MstKeputusan $mstKeputusan
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(MstKeputusan $mstKeputusan)
|
||||
{
|
||||
$mstKeputusan->delete();
|
||||
|
||||
return redirect()->route('mst-keputusan.index')
|
||||
->with('success','Keputusan berhasil dihapus!');
|
||||
}
|
||||
|
||||
public function keputusanList()
|
||||
{
|
||||
$mstKeputusan = MstKeputusan::select(["id","nama_keputusan"])->get();
|
||||
return response()->json($mstKeputusan);
|
||||
}
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\MstKpkd;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class MstKpkdController extends Controller
|
||||
{
|
||||
public function __construct(){
|
||||
$this->siteTitle = "Data KPKD";
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$data = MstKpkd::latest()->paginate(10);
|
||||
|
||||
return view('admin.mst_kpkd.index',compact('data'))
|
||||
->with('i', (request()->input('page', 1) - 1) * 10);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->setSubtitle("Tambah Data");
|
||||
return view('admin.mst_kpkd.create');
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
'nama' => 'required',
|
||||
'nip' => 'required',
|
||||
'nrk' => 'required',
|
||||
]);
|
||||
|
||||
$requestAll = $request->all();
|
||||
MstKpkd::create($requestAll);
|
||||
|
||||
return redirect()->route('mst-kpkd.index')
|
||||
->with('success','Data KPKD berhasil dibuat.');
|
||||
}
|
||||
|
||||
public function show(MstKpkd $mstKpkd)
|
||||
{
|
||||
$this->setSubtitle("Detail Data");
|
||||
return view('admin.mst_kpkd.show',compact('mstKpkd'));
|
||||
}
|
||||
|
||||
public function edit(MstKpkd $mstKpkd)
|
||||
{
|
||||
$this->setSubtitle("Ubah Data");
|
||||
return view('admin.mst_kpkd.edit',compact('mstKpkd'));
|
||||
}
|
||||
|
||||
public function update(Request $request, MstKpkd $mstKpkd)
|
||||
{
|
||||
$request->validate([
|
||||
'nama' => 'required',
|
||||
'nip' => 'required',
|
||||
'nrk' => 'required',
|
||||
]);
|
||||
|
||||
$requestAll = $request->all();
|
||||
$mstKpkd->update($requestAll);
|
||||
|
||||
return redirect()->route('mst-kpkd.index')
|
||||
->with('success','Data KPKD berhasil diubah!');
|
||||
}
|
||||
|
||||
public function destroy(MstKpkd $mstKpkd)
|
||||
{
|
||||
$mstKpkd->delete();
|
||||
|
||||
return redirect()->route('mst-kpkd.index')
|
||||
->with('success','Data KPKD berhasil dihapus!');
|
||||
}
|
||||
|
||||
public function kpkdList()
|
||||
{
|
||||
$mstKpkd = MstKpkd::where("status_aktif", 1)->select(["id","nama"])->get();
|
||||
return response()->json($mstKpkd);
|
||||
}
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\MstTempatKerja;
|
||||
use App\Models\Tropd;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class MstTempatKerjaController extends Controller
|
||||
{
|
||||
public function __construct(){
|
||||
$this->siteTitle = "Data Tempat Kerja";
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$data = MstTempatKerja::latest()->paginate(10);
|
||||
|
||||
return view('admin.mst_tempatkerja.index',compact('data'))
|
||||
->with('i', (request()->input('page', 1) - 1) * 10);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->setSubtitle("Tambah Data");
|
||||
return view('admin.mst_tempatkerja.create');
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
'skpd_id' => 'required',
|
||||
'tempat_kerja' => 'required',
|
||||
]);
|
||||
|
||||
$skpd = Tropd::where('I_ID', $request->skpd_id)->first();
|
||||
$requestAll = $request->all();
|
||||
$requestAll["skpd_name"] = $skpd->n_opd;
|
||||
|
||||
MstTempatKerja::create($requestAll);
|
||||
|
||||
return redirect()->route('mst-tempat_kerja.index')
|
||||
->with('success','Post created successfully.');
|
||||
}
|
||||
|
||||
public function show(MstTempatKerja $MstTempatKerja)
|
||||
{
|
||||
$this->setSubtitle("Detail Data");
|
||||
return view('admin.mst_tempatkerja.show',compact('MstTempatKerja'));
|
||||
}
|
||||
|
||||
public function edit(MstTempatKerja $MstTempatKerja)
|
||||
{
|
||||
$this->setSubtitle("Ubah Data");
|
||||
return view('admin.mst_tempatkerja.edit',compact('MstTempatKerja'));
|
||||
}
|
||||
|
||||
public function update(Request $request, MstTempatKerja $MstTempatKerja)
|
||||
{
|
||||
$request->validate([
|
||||
'skpd_id' => 'required',
|
||||
'tempat_kerja' => 'required',
|
||||
]);
|
||||
|
||||
$skpd = Tropd::where('I_ID', $request->skpd_id)->first();
|
||||
$requestAll = $request->all();
|
||||
$requestAll["skpd_name"] = $skpd->n_opd;
|
||||
|
||||
$MstTempatKerja->update($requestAll);
|
||||
|
||||
return redirect()->route('mst-tempat_kerja.index')
|
||||
->with('success','Tempat Kerja berhasil diubah!');
|
||||
}
|
||||
|
||||
public function destroy(MstTempatKerja $MstTempatKerja)
|
||||
{
|
||||
$MstTempatKerja->delete();
|
||||
|
||||
return redirect()->route('mst-tempat_kerja.index')
|
||||
->with('success','Tempat Kerja berhasil dihapus!');
|
||||
}
|
||||
|
||||
public function tempatKerjaList($idUnit){
|
||||
$tempatKerja = MstTempatKerja::select("tempat_kerja")
|
||||
->distinct()
|
||||
->where("id_unit",$idUnit)
|
||||
->get()->toArray();
|
||||
|
||||
$arrColumn = array_column($tempatKerja,"tempat_kerja");
|
||||
return response()->json($arrColumn);
|
||||
}
|
||||
}
|
||||
@@ -50,6 +50,11 @@ class AuthController extends Controller
|
||||
|
||||
if (Auth::check()) { // true sekalian session field di users nanti bisa dipanggil via Auth
|
||||
//Login Success
|
||||
$taValue = [];
|
||||
for($i=2022;$i<=date("Y");$i++){
|
||||
$taValue[] = $i;
|
||||
}
|
||||
Session::put('listTA', $taValue);
|
||||
return redirect()->route('home');
|
||||
|
||||
} else { // false
|
||||
|
||||
@@ -34,7 +34,11 @@ class JadwalSalurdanaController extends Controller
|
||||
$data = Sps_pendapatan::where("SKPD_ID",980)
|
||||
->where("TAHUN",$ta)
|
||||
->whereRaw("SUBSTR(KODE_REKENING,1,3)='4.2'");
|
||||
if (!empty($src)){
|
||||
$data->whereRaw("(LOWER(NAMA_REKENING) LIKE '%".strtolower($src)."%' OR LOWER(KODE_REKENING) LIKE '%".strtolower($src)."%')");
|
||||
}
|
||||
$dataFilter = $data->count();
|
||||
|
||||
$dataTotal = Sps_pendapatan::where("SKPD_ID",980)
|
||||
->where("TAHUN",$ta)
|
||||
->whereRaw("SUBSTR(KODE_REKENING,1,3)='4.2'")
|
||||
|
||||
@@ -8,6 +8,7 @@ use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
use App\Models\DbhPendapatanRealisasi;
|
||||
use App\Models\Sps_pendapatan;
|
||||
|
||||
class RealisasiPendapatanController extends Controller
|
||||
{
|
||||
@@ -38,6 +39,7 @@ class RealisasiPendapatanController extends Controller
|
||||
DB::beginTransaction();
|
||||
|
||||
$req = $request->all();
|
||||
$data["tahun"] = $req["txt_ta"];
|
||||
$data["id_sps"] = $req["txt_id_sps"];
|
||||
$txt_rek_sps = explode("|",$req["txt_rek_sps"]);
|
||||
$data["kode_rekening_sps"] = $txt_rek_sps[0];
|
||||
@@ -53,7 +55,7 @@ class RealisasiPendapatanController extends Controller
|
||||
DB::commit();
|
||||
|
||||
return redirect()->route('realisasi-pendapatan.index')
|
||||
->with('success','SKPP berhasil dibuat.');
|
||||
->with('success','Realisasi Pendapatan berhasil dibuat.');
|
||||
}catch(\Exception $e){
|
||||
|
||||
DB::rollBack();
|
||||
@@ -68,6 +70,47 @@ class RealisasiPendapatanController extends Controller
|
||||
return view('realisasi_pendapatan.edit',compact('realisasi_pendapatan'));
|
||||
}
|
||||
|
||||
public function update(Request $request, DbhPendapatanRealisasi $realisasi_pendapatan)
|
||||
{
|
||||
try{
|
||||
|
||||
DB::beginTransaction();
|
||||
|
||||
$req = $request->all();
|
||||
$data["tahun"] = $req["txt_ta"];
|
||||
$data["id_sps"] = $req["txt_id_sps"];
|
||||
$txt_rek_sps = explode("|",$req["txt_rek_sps"]);
|
||||
$data["kode_rekening_sps"] = $txt_rek_sps[0];
|
||||
$data["nama_rekening_sps"] = $txt_rek_sps[1];
|
||||
$data["simtrad4_uraian"] = $req["txt_simtrad4_uraian"];
|
||||
$data["simtrad4_kotor"] = replaceMoney($req["txt_simtrad4_kotor"]);
|
||||
$data["simtrad4_potongan"] = replaceMoney($req["txt_simtrad4_potongan"]);
|
||||
$data["simtrad4_bersih"] = replaceMoney($req["txt_simtrad4_bersih"]);
|
||||
$data["simtrad4_sp2d_bun"] = $req["txt_simtrad4_sp2d_bun"];
|
||||
$data["updated_by"] = Auth::user()->id;
|
||||
$realisasi_pendapatan->update($data);
|
||||
|
||||
DB::commit();
|
||||
|
||||
return redirect()->route('realisasi-pendapatan.index')
|
||||
->with('success','Realisasi Pendapatan berhasil diubah.');
|
||||
}catch(Throwable $e){
|
||||
|
||||
DB::rollBack();
|
||||
return redirect()->route('tx-salurdana.index')
|
||||
->with('error','Realisasi Pendapatan gagal diubah!');
|
||||
}
|
||||
}
|
||||
|
||||
public function rinciDBH(Request $request)
|
||||
{
|
||||
$idSPS = $request->idSPS;
|
||||
$select = DB::raw("spsbulan1,spsbulan2,spsbulan3,spsbulan4,spsbulan5,spsbulan6,spsbulan7,spsbulan8,spsbulan9,spsbulan10,spsbulan11,spsbulan12");
|
||||
$sps = Sps_pendapatan::select($select)->where("ID",$idSPS)->firstOrNew();
|
||||
|
||||
return response()->json($sps);
|
||||
}
|
||||
|
||||
public function datatable(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
@@ -78,6 +121,9 @@ class RealisasiPendapatanController extends Controller
|
||||
|
||||
$dataFilter=0;
|
||||
$data = DbhPendapatanRealisasi::orderBy("created_at","ASC");
|
||||
if (!empty($src)){
|
||||
$data->whereRaw("(LOWER(simtrad4_uraian) LIKE '%".strtolower($src)."%')");
|
||||
}
|
||||
$dataFilter = $data->count();
|
||||
$dataTotal = DbhPendapatanRealisasi::count();
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class DbhPendapatanRealisasi extends Eloquent
|
||||
protected $connection = 'mysql';
|
||||
protected $table = 'dbh_pendapatan_realisasi';
|
||||
protected $fillable = [
|
||||
'simtrad4_uraian','simtrad4_kotor','simtrad4_potongan','simtrad4_bersih','simtrad4_sp2d_bun',
|
||||
'tahun','simtrad4_uraian','simtrad4_kotor','simtrad4_potongan','simtrad4_bersih','simtrad4_sp2d_bun',
|
||||
'rkud_tgl','rkud_no_sts','rkud_kode_akun','rkud_nama_akun','rkud_jumlah','id_sps','kode_rekening_sps','nama_rekening_sps'
|
||||
];
|
||||
|
||||
|
||||
@@ -28,6 +28,10 @@ function SetToIndoDate($val,$monthYear=false, $full=false){
|
||||
}
|
||||
}
|
||||
|
||||
function cekData($data, $default){
|
||||
return isset($data)?$data:$default;
|
||||
}
|
||||
|
||||
function replaceMoney($val){
|
||||
return doubleval(preg_replace("/\D/","",$val));
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ class CreateDbhPendapatanRealisasiTable extends Migration
|
||||
{
|
||||
Schema::create('dbh_pendapatan_realisasi', function (Blueprint $table) {
|
||||
$table->uuid('id')->primary();
|
||||
$table->string('tahun',4);
|
||||
$table->integer('id_sps')->nullable();
|
||||
$table->string('kode_rekening_sps',50)->nullable();
|
||||
$table->string('nama_rekening_sps',150)->nullable();
|
||||
|
||||
Vendored
+1
-1
@@ -73,7 +73,7 @@ hr{
|
||||
}
|
||||
|
||||
.tblClickRow tr > td{
|
||||
cursor:pointer
|
||||
cursor:default;
|
||||
}
|
||||
|
||||
#loader-wrapper {
|
||||
|
||||
Vendored
+1
-1
@@ -2483,7 +2483,7 @@ function init_DataTables() {
|
||||
// console.log('run_datatables');
|
||||
|
||||
if (typeof ($.fn.DataTable) === 'undefined') { return; }
|
||||
console.log('init_DataTables');
|
||||
//console.log('init_DataTables');
|
||||
|
||||
var handleDataTableButtons = function () {
|
||||
if ($("#datatable-buttons").length) {
|
||||
|
||||
@@ -27,18 +27,27 @@
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<form class="form-inline mb-3" autocomplete="off">
|
||||
<div class="input-group input-group-sm mr-sm-2">
|
||||
<div class="input-group-prepend"><span class="input-group-text">Periode</span></div>
|
||||
<div class="row">
|
||||
<div class="col-1">
|
||||
<div class="form-group">
|
||||
<label>Periode</label>
|
||||
<select class="form-control form-control-sm" id="srcTA">
|
||||
<option value="2022">2022</option>
|
||||
@php
|
||||
$listTA = Session::get('listTA');
|
||||
foreach($listTA as $rowTA){
|
||||
echo "<option>$rowTA</option>";
|
||||
}
|
||||
@endphp
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group input-group-sm mr-sm-2">
|
||||
<div class="input-group-prepend"><span class="input-group-text">Berdasarkan Kata</span></div>
|
||||
</div>
|
||||
<div class="col-11">
|
||||
<div class="form-group">
|
||||
<label>Berdasarkan Kata</label>
|
||||
<input class="form-control form-control-sm" type="text" id="src">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<table id="dtTableSKPP" class="table table-striped jambo_table tblClickRow" style="width:150%">
|
||||
<thead>
|
||||
<tr class="headings">
|
||||
@@ -81,18 +90,14 @@
|
||||
$(document).ready(function(){
|
||||
var srcDate1 = null, srcDate2 = null;
|
||||
|
||||
$('#dtTableSKPP tbody').on('click', 'tr', function () {
|
||||
var data = dtTable.row( this ).data();
|
||||
location.href = "/jadwal-salurdana/" + data["id"];
|
||||
});
|
||||
|
||||
$("#src").keyup(function(e){
|
||||
if (e.keyCode == 13){
|
||||
e.preventDefault();
|
||||
dtTable.draw();
|
||||
}
|
||||
});
|
||||
|
||||
$("#srcTA").on("change",function(){
|
||||
$("#srcTA").on("change",function(e){
|
||||
dtTable.draw();
|
||||
});
|
||||
|
||||
@@ -164,8 +169,8 @@
|
||||
"infoEmpty": "Data tidak tersedia",
|
||||
"infoFiltered": "(Disaring dari _MAX_ Data)",
|
||||
"paginate": {
|
||||
"previous": "< Sebelumnya",
|
||||
"next": "Selanjutnya >",
|
||||
"previous": "<i class='fas fa-angle-double-left'></i>",
|
||||
"next": "<i class='fas fa-angle-double-right'></i>",
|
||||
}
|
||||
},
|
||||
scrollX:true,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<link rel="stylesheet" href="/css/app.css">
|
||||
@yield('styles')
|
||||
</head>
|
||||
<body class="hold-transition sidebar-mini text-sm">
|
||||
<body class="hold-transition sidebar-mini text-sm layout-fixed layout-navbar-fixed">
|
||||
<div class="wrapper">
|
||||
|
||||
@include('partials.top_menu')
|
||||
@@ -154,8 +154,48 @@
|
||||
}
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$(document).on("submit",".form-delete",function (e){
|
||||
e.preventDefault();
|
||||
let test = Swal.fire({
|
||||
title: 'Data akan dihapus?',
|
||||
showDenyButton: true,
|
||||
showCancelButton: false,
|
||||
confirmButtonText: 'Ya',
|
||||
denyButtonText: "Tidak",
|
||||
icon: "warning",
|
||||
}).then((result) => {
|
||||
/* Read more about isConfirmed, isDenied below */
|
||||
if (result.isConfirmed) {
|
||||
e.currentTarget.submit();
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
var url = window.location;
|
||||
url = url + "";
|
||||
const allLinks = document.querySelectorAll('.nav-item a');
|
||||
// const currentLink = [...allLinks].filter(e => {
|
||||
// return url.indexOf(e.href) > -1) {
|
||||
// return e.href == url;
|
||||
// }
|
||||
// });
|
||||
let currentLink = "";
|
||||
allLinks.forEach((val, idx) => {
|
||||
if (url.indexOf(val.href) > -1){
|
||||
currentLink = val;
|
||||
}
|
||||
})
|
||||
|
||||
$(currentLink).addClass("active")
|
||||
$(".has-treeview").removeClass("menu-open active");
|
||||
$(currentLink).closest(".has-treeview").addClass("menu-open active");
|
||||
$($(currentLink).closest(".has-treeview")).children("a.nav-link").addClass("active");
|
||||
$($(currentLink).closest(".nav-treeview")).closest("li.nav-item").addClass("menu-open");
|
||||
$($(currentLink).closest(".nav-treeview")).parentsUntil(".nav-sidebar > .nav-treeview").addClass('menu-open');
|
||||
});
|
||||
</script>
|
||||
@yield('scripts')
|
||||
@yield('scripts2')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<link rel="stylesheet" href="/css/app.css">
|
||||
@yield('styles')
|
||||
</head>
|
||||
<body class="hold-transition sidebar-mini text-sm">
|
||||
<body class="hold-transition sidebar-mini text-sm layout-fixed layout-navbar-fixed">
|
||||
<div class="wrapper">
|
||||
|
||||
@include('partials.top_menu')
|
||||
@@ -152,5 +152,6 @@
|
||||
});
|
||||
</script>
|
||||
@yield('scripts')
|
||||
@yield('scripts2')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -3,49 +3,51 @@
|
||||
$role = $role[0];
|
||||
@endphp
|
||||
<aside class="main-sidebar sidebar-dark-primary elevation-4">
|
||||
<a href="/AdminLTE-3.2.0/index3.html" class="brand-link">
|
||||
<img src="/AdminLTE-3.2.0/dist/img/AdminLTELogo.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3" style="opacity: .8">
|
||||
<span class="brand-text font-weight-light">E-SAMASA</span>
|
||||
<a href="javascript:void(0)" class="brand-link">
|
||||
<i class="fas fa-window-maximize fa-2x brand-image"></i>
|
||||
<span class="brand-text font-weight" style="font-size:1.5em; line-height:1;">E-SAMASA</span>
|
||||
</a>
|
||||
|
||||
<div class="sidebar">
|
||||
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
|
||||
<div class="image" style="color:#e1e1e1">
|
||||
<i class="fas fa-user-circle fa-2x"></i>
|
||||
</div>
|
||||
<div class="info">
|
||||
<a href="#" class="d-block">{{ Auth::user()->name }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav class="mt-2">
|
||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
|
||||
<li class="nav-header">MENU UTAMA</li>
|
||||
<li class="nav-item"><a href="/home" class="nav-link" ><i class="nav-icon fas fa-home"></i><p>Beranda</p></a></li>
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<i class="nav-icon fas fa-circle"></i>
|
||||
<p>
|
||||
DBH / DAK
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
<i class="nav-icon fas fa-th-large"></i>
|
||||
<p>DBH / DAK <i class="right fas fa-angle-left"></i></p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview">
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<i class="far fa-circle nav-icon"></i>
|
||||
<i class="fa fa-table nav-icon"></i>
|
||||
<p>Pendapatan<i class="right fas fa-angle-left"></i></p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview">
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('/jadwal-salurdana') }}" class="nav-link">
|
||||
<i class="far fa-dot-circle nav-icon"></i>
|
||||
<i class="fa fa-minus nav-icon"></i>
|
||||
<p>Jadwal</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('/realisasi-pendapatan') }}" class="nav-link">
|
||||
<i class="far fa-dot-circle nav-icon"></i>
|
||||
<i class="fa fa-minus nav-icon"></i>
|
||||
<p>Realisasi</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<i class="fa fa-table nav-icon"></i>
|
||||
<p>Belanja<i class="right fas fa-angle-left"></i></p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview">
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('/realisasi-belanja') }}" class="nav-link">
|
||||
<i class="fa fa-minus nav-icon"></i>
|
||||
<p>Realisasi</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link" data-toggle="dropdown" href="#">
|
||||
<i class="fas fa-th-large"></i>
|
||||
<i class="fa fa-user mr-2"></i>{{ Auth::user()->name }}</span>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
|
||||
<a class="dropdown-item modalButton" title="Ganti Kata Sandi" href="{{ route("users.changepass", Auth::user()->id) }}" ><i class="fa fa-key mr-2"></i> Ganti Kata Sandi</a>
|
||||
|
||||
@@ -24,11 +24,19 @@
|
||||
@method('PUT')
|
||||
@stop
|
||||
|
||||
@section('scripts')
|
||||
@section('scripts2')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
let $newOption = $("<option selected='selected'></option>").val({{ $realisasi_pendapatan->id_sps }}).text("{{ $realisasi_pendapatan->kode_rekening_sps."|".$realisasi_pendapatan->nama_rekening_sps }}")
|
||||
$("#txt_rek_sps").val("{{ $realisasi_pendapatan->kode_rekening_sps."|".$realisasi_pendapatan->nama_rekening_sps }}");
|
||||
$("#txt_id_sps").append($newOption).trigger('change');
|
||||
$("#txt_ta").val("{{ $realisasi_pendapatan->tahun }}");
|
||||
$("#txt_simtrad4_uraian").val("{{ $realisasi_pendapatan->simtrad4_uraian }}");
|
||||
$("#txt_simtrad4_sp2d_bun").val("{{ $realisasi_pendapatan->simtrad4_sp2d_bun }}");
|
||||
$("#txt_simtrad4_kotor").val("{{ separateNumberIndo($realisasi_pendapatan->simtrad4_kotor) }}");
|
||||
$("#txt_simtrad4_potongan").val("{{ separateNumberIndo($realisasi_pendapatan->simtrad4_potongan) }}");
|
||||
$("#txt_simtrad4_bersih").val("{{ separateNumberIndo($realisasi_pendapatan->simtrad4_bersih) }}");
|
||||
showRinciDBH({{ $realisasi_pendapatan->id_sps }});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -1,56 +1,142 @@
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12">
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-3 col-sm-3 label-align" for="txt_simtrad4_kotor">Tahun Anggaran</label>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label label-align" for="txt_simtrad4_kotor">Tahun Anggaran</label>
|
||||
<select id="txt_ta" name="txt_ta" style="width:100%" class="form-control" required>
|
||||
<option>2022</option>
|
||||
@php
|
||||
$listTA = Session::get('listTA');
|
||||
foreach($listTA as $rowTA){
|
||||
echo "<option value='$rowTA'>$rowTA</option>";
|
||||
}
|
||||
@endphp
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-3 col-sm-3 label-align" for="txt_simtrad4_kotor">DBH/DAK</label>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label label-align" for="txt_simtrad4_kotor">DBH/DAK</label>
|
||||
<select id="txt_id_sps" name="txt_id_sps" style="width:100%" class="form-control sps_search" required></select>
|
||||
<input id="txt_rek_sps" name="txt_rek_sps" type="hidden">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-3 col-sm-3 label-align" for="txt_simtrad4_uraian">Uraian</label>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<textarea id="txt_simtrad4_uraian" name="txt_simtrad4_uraian" class="form-control" required>{{ $realisasi_pendapatan->simtrad4_uraian }}</textarea>
|
||||
<label class="col-form-label col-md-5 col-sm-5 label-align">Januari</label>
|
||||
<div class="col-md-7 col-sm-7 ">
|
||||
<input class="rinci_dbh form-control-plaintext" value=0 readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-3 col-sm-3 label-align" for="txt_simtrad4_sp2d_bun">SP2D BUN</label>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<input id="txt_simtrad4_sp2d_bun" name="txt_simtrad4_sp2d_bun" class="form-control" required value="{{ $realisasi_pendapatan->simtrad4_sp2d_bun }}">
|
||||
<label class="col-form-label col-md-5 col-sm-5 label-align">Februari</label>
|
||||
<div class="col-md-7 col-sm-7 ">
|
||||
<input class="rinci_dbh form-control-plaintext" value=0 readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-3 col-sm-3 label-align" for="txt_simtrad4_kotor">Kotor</label>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<input id="txt_simtrad4_kotor" name="txt_simtrad4_kotor" class="form-control number-separator-indo" value="{{ separateNumberIndo($realisasi_pendapatan->simtrad4_kotor) }}">
|
||||
<label class="col-form-label col-md-5 col-sm-5 label-align">Maret</label>
|
||||
<div class="col-md-7 col-sm-7 ">
|
||||
<input class="rinci_dbh form-control-plaintext" value=0 readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-3 col-sm-3 label-align" for="txt_simtrad4_potongan">Potongan</label>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<input id="txt_simtrad4_potongan" name="txt_simtrad4_potongan" class="form-control number-separator-indo" value="{{ separateNumberIndo($realisasi_pendapatan->simtrad4_potongan) }}">
|
||||
<label class="col-form-label col-md-5 col-sm-5 label-align">April</label>
|
||||
<div class="col-md-7 col-sm-7 ">
|
||||
<input class="rinci_dbh form-control-plaintext" value=0 readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-3 col-sm-3 label-align" for="txt_simtrad4_bersih">Bersih</label>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<input id="txt_simtrad4_bersih" name="txt_simtrad4_bersih" class="form-control number-separator-indo" value="{{ separateNumberIndo($realisasi_pendapatan->simtrad4_bersih) }}"value="0" readonly>
|
||||
<label class="col-form-label col-md-5 col-sm-5 label-align">Mei</label>
|
||||
<div class="col-md-7 col-sm-7 ">
|
||||
<input class="rinci_dbh form-control-plaintext" value=0 readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-5 col-sm-5 label-align">Juni</label>
|
||||
<div class="col-md-7 col-sm-7 ">
|
||||
<input class="rinci_dbh form-control-plaintext" value=0 readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-5 col-sm-5 label-align">Juli</label>
|
||||
<div class="col-md-7 col-sm-7 ">
|
||||
<input class="rinci_dbh form-control-plaintext" value=0 readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-5 col-sm-5 label-align">Agustus</label>
|
||||
<div class="col-md-7 col-sm-7 ">
|
||||
<input class="rinci_dbh form-control-plaintext" value=0 readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-5 col-sm-5 label-align">September</label>
|
||||
<div class="col-md-7 col-sm-7 ">
|
||||
<input class="rinci_dbh form-control-plaintext" value=0 readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-5 col-sm-5 label-align">Oktober</label>
|
||||
<div class="col-md-7 col-sm-7 ">
|
||||
<input class="rinci_dbh form-control-plaintext" value=0 readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-5 col-sm-5 label-align">November</label>
|
||||
<div class="col-md-7 col-sm-7 ">
|
||||
<input class="rinci_dbh form-control-plaintext" value=0 readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-5 col-sm-5 label-align">Desember</label>
|
||||
<div class="col-md-7 col-sm-7 ">
|
||||
<input class="rinci_dbh form-control-plaintext" value=0 readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label label-align" for="txt_simtrad4_uraian">Uraian</label>
|
||||
<textarea id="txt_simtrad4_uraian" name="txt_simtrad4_uraian" class="form-control" required></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label label-align" for="txt_simtrad4_sp2d_bun">SP2D BUN</label>
|
||||
<input id="txt_simtrad4_sp2d_bun" name="txt_simtrad4_sp2d_bun" class="form-control" required value="">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label label-align" for="txt_simtrad4_kotor">Kotor</label>
|
||||
<input id="txt_simtrad4_kotor" name="txt_simtrad4_kotor" class="form-control number-separator-indo" value="0">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label label-align" for="txt_simtrad4_potongan">Potongan</label>
|
||||
<input id="txt_simtrad4_potongan" name="txt_simtrad4_potongan" class="form-control number-separator-indo" value="0">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label label-align" for="txt_simtrad4_bersih">Bersih</label>
|
||||
<input id="txt_simtrad4_bersih" name="txt_simtrad4_bersih" class="form-control number-separator-indo" value="0" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-sm btn-success"><i class="fa fa-save"></i> Simpan</button>
|
||||
<button id="btn_save_realisasi_pendapatan" type="submit" class="btn btn-sm btn-success"><i class="fa fa-save"></i> Simpan</button>
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var showRinciDBH = (id)=>{
|
||||
$.ajax({
|
||||
url: '/realisasi-pendapatan/rinci-dbh?idSPS='+id,
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
for(let x=0;x<=11;x++){
|
||||
let bulan=x+1;
|
||||
$($(".rinci_dbh")[x]).val(separateNumberIndo(data["spsbulan"+bulan]));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
$(document).ready(function(){
|
||||
let hitung_bersih = ()=> {
|
||||
let bersih = replaceValue($("#txt_simtrad4_kotor").val()) - replaceValue($("#txt_simtrad4_potongan").val());
|
||||
@@ -61,7 +147,7 @@
|
||||
hitung_bersih();
|
||||
})
|
||||
|
||||
$('.sps_search').select2({
|
||||
$('#txt_id_sps').select2({
|
||||
placeholder: 'Pilih DBH / DAK',
|
||||
ajax: {
|
||||
url: '/item-search-sps?ta='+$("#txt_ta").val(),
|
||||
@@ -81,10 +167,13 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('.sps_search').on('select2:select', function (e) {
|
||||
$('#txt_id_sps').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
$("#txt_rek_sps").val(data.text);
|
||||
showRinciDBH(data.id);
|
||||
})
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -27,18 +27,27 @@
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<form class="form-inline mb-3" autocomplete="off">
|
||||
<div class="input-group input-group-sm mr-sm-2">
|
||||
<div class="input-group-prepend"><span class="input-group-text">Periode</span></div>
|
||||
<div class="row">
|
||||
<div class="col-1">
|
||||
<div class="form-group">
|
||||
<label>Periode</label>
|
||||
<select class="form-control form-control-sm" id="srcTA">
|
||||
<option value="2022">2022</option>
|
||||
@php
|
||||
$listTA = Session::get('listTA');
|
||||
foreach($listTA as $rowTA){
|
||||
echo "<option>$rowTA</option>";
|
||||
}
|
||||
@endphp
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group input-group-sm mr-sm-2">
|
||||
<div class="input-group-prepend"><span class="input-group-text">Berdasarkan Kata</span></div>
|
||||
</div>
|
||||
<div class="col-11">
|
||||
<div class="form-group">
|
||||
<label>Berdasarkan Kata</label>
|
||||
<input class="form-control form-control-sm" type="text" id="src">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<table id="dtTableSKPP" class="table table-striped jambo_table tblClickRow" style="width:100%">
|
||||
<thead>
|
||||
<tr class="headings">
|
||||
@@ -74,13 +83,9 @@
|
||||
$(document).ready(function(){
|
||||
var srcDate1 = null, srcDate2 = null;
|
||||
|
||||
$('#dtTableSKPP tbody').on('click', 'tr', function () {
|
||||
var data = dtTable.row( this ).data();
|
||||
location.href = "/realisasi-pendapatan/" + data["id"];
|
||||
});
|
||||
|
||||
$("#src").keyup(function(e){
|
||||
if (e.keyCode == 13){
|
||||
e.preventDefault();
|
||||
dtTable.draw();
|
||||
}
|
||||
});
|
||||
@@ -149,8 +154,8 @@
|
||||
"infoEmpty": "Data tidak tersedia",
|
||||
"infoFiltered": "(Disaring dari _MAX_ Data)",
|
||||
"paginate": {
|
||||
"previous": "< Sebelumnya",
|
||||
"next": "Selanjutnya >",
|
||||
"previous": "<i class='fas fa-angle-double-left'></i>",
|
||||
"next": "<i class='fas fa-angle-double-right'></i>",
|
||||
}
|
||||
},
|
||||
scrollX:true,
|
||||
|
||||
@@ -16,56 +16,11 @@
|
||||
<div class="card-header">
|
||||
<h2 class="card-title"><i class="fa fa-th-list mr-2"></i> {{ $sitesubTitle }}</h2>
|
||||
<div class="card-tools">
|
||||
{{-- @if(auth()->user()->can('Tambah SKPP')) --}}
|
||||
<button class="btn btn-sm btn-default" onclick="location.href='{{ route('realisasi-pendapatan.index') }}'"><i class="fa fa-arrow-left"></i> Kembali</button>
|
||||
{{-- @endif --}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-3 col-sm-3 label-align" for="txt_simtrad4_kotor">Tahun Anggaran</label>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<select id="txt_ta" name="txt_ta" style="width:100%" class="form-control-plaintext" readonly>
|
||||
<option>2022</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-3 col-sm-3 label-align" for="txt_simtrad4_kotor">DBH/DAK</label>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<input name="txt_id_sps" style="width:100%" class="form-control-plaintext" readonly value="{{ $realisasi_pendapatan->kode_rekening_sps."|".$realisasi_pendapatan->nama_rekening_sps }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-3 col-sm-3 label-align" for="txt_simtrad4_uraian">Uraian</label>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<textarea id="txt_simtrad4_uraian" name="txt_simtrad4_uraian" class="form-control-plaintext" readonly>{{ $realisasi_pendapatan->simtrad4_uraian }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-3 col-sm-3 label-align" for="txt_simtrad4_sp2d_bun">SP2D BUN</label>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<input id="txt_simtrad4_sp2d_bun" name="txt_simtrad4_sp2d_bun" class="form-control-plaintext" value="{{ $realisasi_pendapatan->simtrad4_sp2d_bun }}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-3 col-sm-3 label-align" for="txt_simtrad4_kotor">Kotor</label>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<input id="txt_simtrad4_kotor" name="txt_simtrad4_kotor" class="form-control-plaintext number-separator-indo" value="{{ separateNumberIndo($realisasi_pendapatan->simtrad4_kotor) }}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-3 col-sm-3 label-align" for="txt_simtrad4_potongan">Potongan</label>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<input id="txt_simtrad4_potongan" name="txt_simtrad4_potongan" class="form-control-plaintext number-separator-indo" value="{{ separateNumberIndo($realisasi_pendapatan->simtrad4_potongan) }}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-3 col-sm-3 label-align" for="txt_simtrad4_bersih">Bersih</label>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<input id="txt_simtrad4_bersih" name="txt_simtrad4_bersih" class="form-control-plaintext number-separator-indo" value="{{ separateNumberIndo($realisasi_pendapatan->simtrad4_bersih) }}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div id="detail_realisasi_pendapatan" class="card-body">
|
||||
@include('realisasi_pendapatan.form')
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
@@ -78,7 +33,7 @@
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-3 col-sm-3 label-align" for="rkud_no_sts">No. STS</label>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<input id="rkud_no_sts" name="rkud_no_sts" class="form-control" value="{{ $realisasi_pendapatan->rkud_no_sts }}"></select>
|
||||
<input id="rkud_no_sts" name="rkud_no_sts" class="form-control" value="{{ $realisasi_pendapatan->rkud_no_sts }}" placeholder="Input Nomor STS"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
@@ -113,15 +68,21 @@
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
@section('scripts')
|
||||
@section('scripts2')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
let hitung_bersih = ()=> {
|
||||
let bersih = replaceValue($("#txt_simtrad4_kotor").val()) - replaceValue($("#txt_simtrad4_potongan").val());
|
||||
$("#txt_simtrad4_bersih").val(separateNumberIndo(bersih));
|
||||
}
|
||||
$("#btn_save_realisasi_pendapatan").remove();
|
||||
|
||||
hitung_bersih();
|
||||
let $newOption = $("<option selected='selected'></option>").val({{ $realisasi_pendapatan->id_sps }}).text("{{ $realisasi_pendapatan->kode_rekening_sps."|".$realisasi_pendapatan->nama_rekening_sps }}")
|
||||
$("#txt_rek_sps").val("{{ $realisasi_pendapatan->kode_rekening_sps."|".$realisasi_pendapatan->nama_rekening_sps }}");
|
||||
$("#txt_id_sps").append($newOption).trigger('change');
|
||||
$("#txt_ta").val("{{ $realisasi_pendapatan->tahun }}");
|
||||
$("#txt_simtrad4_uraian").val("{{ $realisasi_pendapatan->simtrad4_uraian }}");
|
||||
$("#txt_simtrad4_sp2d_bun").val("{{ $realisasi_pendapatan->simtrad4_sp2d_bun }}");
|
||||
$("#txt_simtrad4_kotor").val("{{ separateNumberIndo($realisasi_pendapatan->simtrad4_kotor) }}");
|
||||
$("#txt_simtrad4_potongan").val("{{ separateNumberIndo($realisasi_pendapatan->simtrad4_potongan) }}");
|
||||
$("#txt_simtrad4_bersih").val("{{ separateNumberIndo($realisasi_pendapatan->simtrad4_bersih) }}");
|
||||
showRinciDBH({{ $realisasi_pendapatan->id_sps }});
|
||||
|
||||
$("#rkud_no_sts").on("keypress", function(e){
|
||||
if (e.keyCode == 13){
|
||||
@@ -146,7 +107,12 @@
|
||||
}else{
|
||||
Swal.fire("Jumlah pada STS tidak sama!", '', 'error');
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
$("#detail_realisasi_pendapatan .form-control").removeClass();
|
||||
$("#detail_realisasi_pendapatan input, #detail_realisasi_pendapatan select, #detail_realisasi_pendapatan textarea").addClass("form-control-plaintext");
|
||||
$("#detail_realisasi_pendapatan input, #detail_realisasi_pendapatan select, #detail_realisasi_pendapatan textarea").attr("disabled", true);
|
||||
$("span.select2").hide();
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -43,6 +43,7 @@ Route::group(['middleware' => 'auth'], function () {
|
||||
Route::group(['prefix' => 'realisasi-pendapatan'], function () {
|
||||
Route::post('/datatable', [RealisasiPendapatanController::class,'datatable']);
|
||||
Route::post('/{realisasiId}/sts', [RealisasiPendapatanController::class,'sts']);
|
||||
Route::get('/rinci-dbh', [RealisasiPendapatanController::class,'rinciDBH']);
|
||||
});
|
||||
Route::resource('realisasi-pendapatan', RealisasiPendapatanController::class);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user