Bugs Fix
This commit is contained in:
@@ -23,6 +23,7 @@ class PengaturanController extends Controller
|
||||
{
|
||||
try{
|
||||
DB::beginTransaction();
|
||||
|
||||
DB::raw(
|
||||
"UPDATE BELANJA_REALISASI t1
|
||||
SET t1.JUMLAH_ANGGARAN = (
|
||||
@@ -30,7 +31,10 @@ class PengaturanController extends Controller
|
||||
WHERE t1.KODE_RSK = t2.I_ID
|
||||
) WHERE t1.TAHUN_ANGGARAN = ".getTA()
|
||||
);
|
||||
DB::raw("UPDATE BELANJA_REALISASI SET ALOKASI_ANGGARAN = JUMLAH_ANGGARAN WHERE JENIS_DANA IN ('DBH','DAK')");
|
||||
|
||||
DB::commit();
|
||||
|
||||
return response()->json([
|
||||
"success" => true,
|
||||
"message" => "Data anggaran berhasil disesuaikan!"
|
||||
|
||||
@@ -107,7 +107,7 @@ class RealisasiBelanjaController extends Controller
|
||||
"rsk"=>"required",
|
||||
"vol"=>"required",
|
||||
"unit"=>"required",
|
||||
//"id_sps"=>"required",
|
||||
//"id_sps"=>"required", // Karena ada yg tidak memakai SPS
|
||||
]);
|
||||
|
||||
$req = $request->all();
|
||||
@@ -139,6 +139,16 @@ class RealisasiBelanjaController extends Controller
|
||||
"id_sps"=>isset($req["id_sps"])?$req["id_sps"]:0,
|
||||
"created_by"=>Auth::user()->id
|
||||
];
|
||||
|
||||
if (isset($req["id_sps"]))
|
||||
{
|
||||
$sps = Sps_pendapatan::where("ID", $req["id_sps"])->firstorNew();
|
||||
if ($sps){
|
||||
$input["kode_rekening"] = $sps["kode_rekening"];
|
||||
$input["nama_rekening"] = $sps["nama_rekening"];
|
||||
}
|
||||
}
|
||||
|
||||
BelanjaRealisasi::create($input);
|
||||
|
||||
DB::commit();
|
||||
@@ -202,6 +212,15 @@ class RealisasiBelanjaController extends Controller
|
||||
"sub_jenis_dana"=>isset($req["sub_jenis_dana"])?$req["sub_jenis_dana"]:0,
|
||||
"id_sps"=>isset($req["id_sps"])?$req["id_sps"]:0
|
||||
];
|
||||
|
||||
if (isset($req["id_sps"]))
|
||||
{
|
||||
$sps = Sps_pendapatan::where("ID", $req["id_sps"])->firstorNew();
|
||||
if ($sps){
|
||||
$input["kode_rekening"] = $sps["kode_rekening"];
|
||||
$input["nama_rekening"] = $sps["nama_rekening"];
|
||||
}
|
||||
}
|
||||
$realisasi_belanja->update($input);
|
||||
|
||||
DB::commit();
|
||||
|
||||
Vendored
+1
@@ -343,6 +343,7 @@ let subJenisBelanja = (idJenisBelanja)=>{
|
||||
let subJenisDana = (idGrup)=>{
|
||||
$('.sub_jenis_dana').select2({
|
||||
placeholder: 'Pilih Sub Jenis Dana',
|
||||
allowClear: true,
|
||||
ajax: {
|
||||
url: Url+'/item-search-subjenisdana?id_grup='+idGrup,
|
||||
dataType: 'json',
|
||||
|
||||
Reference in New Issue
Block a user