Update
This commit is contained in:
@@ -102,10 +102,17 @@ class ItemSearchController extends Controller
|
|||||||
if($request->has('q')){
|
if($request->has('q')){
|
||||||
$search = strtolower($request->q);
|
$search = strtolower($request->q);
|
||||||
$ta = $request->ta;
|
$ta = $request->ta;
|
||||||
|
$jenis = $request->jenis;
|
||||||
$select = DB::raw("ID,KODE_REKENING||' | '||NAMA_REKENING as name");
|
$select = DB::raw("ID,KODE_REKENING||' | '||NAMA_REKENING as name");
|
||||||
$sps = Sps_pendapatan::select($select)
|
$sps = Sps_pendapatan::select($select)
|
||||||
->whereRaw("TAHUN=$ta AND SKPD_ID = 980 AND (LOWER(KODE_REKENING) LIKE '%$search%' OR LOWER(NAMA_REKENING) LIKE '%$search%')")
|
->whereRaw("TAHUN=$ta AND SKPD_ID = 980 AND (LOWER(KODE_REKENING) LIKE '%$search%' OR LOWER(NAMA_REKENING) LIKE '%$search%')");
|
||||||
->get();
|
|
||||||
|
if ($jenis == "dbh"){
|
||||||
|
$sps->whereRaw(" (SUBSTR(KODE_REKENING,1,12)='4.2.01.01.01') ");
|
||||||
|
}else if($jenis == "dak"){
|
||||||
|
$sps->whereRaw(" (SUBSTR(KODE_REKENING,1,12)='4.2.01.01.03' AND SUBSTR(KODE_REKENING,1,12)='4.2.01.01.04') ");
|
||||||
|
}
|
||||||
|
$sps = $sps->get();
|
||||||
}
|
}
|
||||||
return response()->json($sps);
|
return response()->json($sps);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,40 +28,34 @@ class JadwalSalurdanaController extends Controller
|
|||||||
$limit = $post["length"];
|
$limit = $post["length"];
|
||||||
$src = $post["src"];
|
$src = $post["src"];
|
||||||
$ta = $post["ta"];
|
$ta = $post["ta"];
|
||||||
|
|
||||||
$dataFilter=0;
|
$dataFilter=0;
|
||||||
$data = DB::select(DB::raw('SELECT
|
$sqlstr = 'SELECT kode_rekening,nama_rekening,spsbulan1,spsbulan2,spsbulan3,spsbulan4,
|
||||||
kode_rekening,nama_rekening,spsbulan1,spsbulan2,spsbulan3,spsbulan4,
|
spsbulan5,spsbulan6,spsbulan7,spsbulan8,spsbulan9,spsbulan10,spsbulan11,spsbulan12,
|
||||||
spsbulan5,spsbulan6,spsbulan7,spsbulan8,spsbulan9,spsbulan10,spsbulan11,spsbulan12,
|
SUBSTR(KODE_REKENING,1,12) AS kodegrup,SUBSTR(KODE_REKENING,1,9) AS groupall,
|
||||||
SUBSTR(KODE_REKENING,1,12) AS kodegrup,SUBSTR(KODE_REKENING,1,9) AS groupall,
|
NVL("1",0) AS "REAL1",NVL("2",0) AS "REAL2",NVL("3",0) AS "REAL3",
|
||||||
NVL("1",0) AS "REAL1",NVL("2",0) AS "REAL2",NVL("3",0) AS "REAL3",
|
NVL("4",0) AS "REAL4",NVL("5",0) AS "REAL5",NVL("6",0) AS "REAL6",
|
||||||
NVL("4",0) AS "REAL4",NVL("5",0) AS "REAL5",NVL("6",0) AS "REAL6",
|
NVL("7",0) AS "REAL7",NVL("8",0) AS "REAL8",NVL("9",0) AS "REAL9",
|
||||||
NVL("7",0) AS "REAL7",NVL("8",0) AS "REAL8",NVL("9",0) AS "REAL9",
|
NVL("10",0) AS "REAL10",NVL("11",0) AS "REAL11",NVL("12",0) AS "REAL12"
|
||||||
NVL("10",0) AS "REAL10",NVL("11",0) AS "REAL11",NVL("12",0) AS "REAL12"
|
FROM PROKSI.SPS_PENDAPATAN x
|
||||||
FROM PROKSI.SPS_PENDAPATAN x
|
LEFT JOIN
|
||||||
LEFT JOIN
|
|
||||||
(
|
|
||||||
SELECT * FROM (
|
|
||||||
SELECT ID_SPS,extract(month from RKUD_TGL) AS BULAN,RKUD_JUMLAH
|
|
||||||
FROM SAMASA.DBH_PENDAPATAN_REALISASI
|
|
||||||
WHERE TAHUN=\''.$ta.'\'
|
|
||||||
)
|
|
||||||
PIVOT
|
|
||||||
(
|
(
|
||||||
SUM(RKUD_JUMLAH)
|
SELECT * FROM (
|
||||||
FOR BULAN IN(1,2,3,4,5,6,7,8,9,10,11,12)
|
SELECT ID_SPS,extract(month from RKUD_TGL) AS BULAN,RKUD_JUMLAH
|
||||||
)
|
FROM SAMASA.DBH_PENDAPATAN_REALISASI
|
||||||
)y ON x.ID = y.ID_SPS
|
WHERE TAHUN=\''.$ta.'\'
|
||||||
WHERE x.TAHUN = '.$ta.' AND x.SKPD_ID=980 AND SUBSTR(x.KODE_REKENING,1,3)=\'4.2\'
|
)
|
||||||
ORDER BY kode_rekening'));
|
PIVOT
|
||||||
// var_dump($data); exit;
|
(
|
||||||
// ->where("SKPD_ID",980)
|
SUM(RKUD_JUMLAH)
|
||||||
// ->where("TAHUN",$ta)
|
FOR BULAN IN(1,2,3,4,5,6,7,8,9,10,11,12)
|
||||||
// ->whereRaw("SUBSTR(KODE_REKENING,1,3)='4.2'");
|
)
|
||||||
|
)y ON x.ID = y.ID_SPS
|
||||||
|
WHERE x.TAHUN = '.$ta.' AND x.SKPD_ID=980 AND SUBSTR(x.KODE_REKENING,1,3)=\'4.2\'';
|
||||||
|
$data = DB::select(DB::raw($sqlstr.'ORDER BY kode_rekening OFFSET '.$offset.' ROWS FETCH NEXT '.$limit.' ROWS ONLY'));
|
||||||
if (!empty($src)){
|
if (!empty($src)){
|
||||||
$data->whereRaw("(LOWER(NAMA_REKENING) LIKE '%".strtolower($src)."%' OR LOWER(KODE_REKENING) LIKE '%".strtolower($src)."%')");
|
$data->whereRaw("(LOWER(NAMA_REKENING) LIKE '%".strtolower($src)."%' OR LOWER(KODE_REKENING) LIKE '%".strtolower($src)."%')");
|
||||||
}
|
}
|
||||||
$dataFilter = count($data);
|
$dataFilter = count(DB::select(DB::raw($sqlstr)));
|
||||||
|
|
||||||
$dataTotal = Sps_pendapatan::where("SKPD_ID",980)
|
$dataTotal = Sps_pendapatan::where("SKPD_ID",980)
|
||||||
->where("TAHUN",$ta)
|
->where("TAHUN",$ta)
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class CreateSalurDanaTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('salur_dana', function (Blueprint $table) {
|
|
||||||
$table->uuid('id')->primary();
|
|
||||||
$table->date('tgl_salur');
|
|
||||||
$table->string('kode_skpd', 50);
|
|
||||||
$table->string('kode_sub_kegiatan', 50);
|
|
||||||
$table->double('jumlah', 19, 2);
|
|
||||||
$table->datetime('approved_at');
|
|
||||||
$table->string('approved_by',36);
|
|
||||||
$table->timestamps();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::dropIfExists('salur_dana');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class CreateSalurDanaDetailsTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('salur_dana_details', function (Blueprint $table) {
|
|
||||||
$table->uuid('id')->primary();
|
|
||||||
$table->string('salur_dana_id', 36);
|
|
||||||
$table->string('kode_rsk', 50);
|
|
||||||
$table->string('kode_rekening', 50);
|
|
||||||
$table->double('jumlah_salur_anggaran', 19, 2);
|
|
||||||
$table->double('jumlah_salur_skpd', 19, 2);
|
|
||||||
$table->double('jumlah_salur_realisasi', 19, 2);
|
|
||||||
$table->timestamps();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::dropIfExists('salur_dana_details');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class CreateJadwalSalurTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('jadwal_salur', function (Blueprint $table) {
|
|
||||||
$table->uuid('id')->primary();
|
|
||||||
$table->string('id_pendapatan_jadwal_salur', 50);
|
|
||||||
$table->string('tahun', 4);
|
|
||||||
$table->string('kode_akun', 50);
|
|
||||||
$table->string('nama_akun', 150);
|
|
||||||
$table->decimal('perpres', 19, 2);
|
|
||||||
$table->decimal('apbd', 19, 2);
|
|
||||||
$table->string('pmk', 50);
|
|
||||||
$table->string('pmk_pasal', 30);
|
|
||||||
$table->tinyInteger('pmk_I');
|
|
||||||
$table->tinyInteger('pmk_II');
|
|
||||||
$table->tinyInteger('pmk_III');
|
|
||||||
$table->tinyInteger('pmk_IV');
|
|
||||||
$table->decimal('jumlah', 19, 2);
|
|
||||||
$table->timestamps();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::dropIfExists('jadwal_salur');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Vendored
+8
@@ -293,3 +293,11 @@ hr{
|
|||||||
table.dataTable tr.dtrg-group.dtrg-level-1 td{
|
table.dataTable tr.dtrg-group.dtrg-level-1 td{
|
||||||
font-size: 1em !important;
|
font-size: 1em !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table.dataTable tr.dtrg-group.dtrg-level-1 td{
|
||||||
|
padding-left: 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table td, .table th{
|
||||||
|
padding: 0.5rem;
|
||||||
|
}
|
||||||
@@ -151,8 +151,8 @@
|
|||||||
],
|
],
|
||||||
"dom": "<\"top\" <\"row\"<\"col-md-6\"l><\"col-md-6 text-right\">>>rt<\"bottom\" <\"row\"<\"col-md-6\"i><\"col-md-6\"p>> ><\"clear\">",
|
"dom": "<\"top\" <\"row\"<\"col-md-6\"l><\"col-md-6 text-right\">>>rt<\"bottom\" <\"row\"<\"col-md-6\"i><\"col-md-6\"p>> ><\"clear\">",
|
||||||
"lengthMenu": [
|
"lengthMenu": [
|
||||||
[ 50, 75, 100 ],
|
[ 20, 50, 75, 100 ],
|
||||||
[ "50", "75", "100" ]
|
[ "20", "50", "75", "100" ]
|
||||||
],
|
],
|
||||||
"paging": true, // Table pagination
|
"paging": true, // Table pagination
|
||||||
"columns": [
|
"columns": [
|
||||||
@@ -250,7 +250,8 @@
|
|||||||
let textmuted = index == 1 ? "text-muted":"";
|
let textmuted = index == 1 ? "text-muted":"";
|
||||||
let labelGroup = index == 1 ?"JUMLAH | " + group : "TOTAL";
|
let labelGroup = index == 1 ?"JUMLAH | " + group : "TOTAL";
|
||||||
return $("<tr/>")
|
return $("<tr/>")
|
||||||
.append( "<td colspan=2 class=\'text-left " + textmuted +"\'><strong>"+labelGroup+"</strong></td>")
|
.append( "<td></td>")
|
||||||
|
.append( "<td class=\'text-left " + textmuted +"\'><strong>"+labelGroup+"</strong></td>")
|
||||||
.append( "<td class=\'text-right " + textmuted +"\'><strong>"+ separateNumberIndo(sum[0]) +"</strong></td>" )
|
.append( "<td class=\'text-right " + textmuted +"\'><strong>"+ separateNumberIndo(sum[0]) +"</strong></td>" )
|
||||||
.append( "<td class='text-success text-right'><strong>"+ separateNumberIndo(sumReal[0]) +"</strong></td>" )
|
.append( "<td class='text-success text-right'><strong>"+ separateNumberIndo(sumReal[0]) +"</strong></td>" )
|
||||||
.append( "<td class=\'text-right " + textmuted +"\'><strong>"+ separateNumberIndo(sum[1]) +"</strong></td>" )
|
.append( "<td class=\'text-right " + textmuted +"\'><strong>"+ separateNumberIndo(sum[1]) +"</strong></td>" )
|
||||||
|
|||||||
@@ -54,38 +54,38 @@
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
{{-- <li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="#" class="nav-link">
|
<a href="#" class="nav-link">
|
||||||
<i class="nav-icon fas fa-th-large"></i>
|
<i class="nav-icon fas fa-th-large"></i>
|
||||||
<p>Dana Alokasi Khusus<i class="right fas fa-angle-left"></i></p>
|
<p>Dana Alokasi Khusus<i class="right fas fa-angle-left"></i></p>
|
||||||
</a>
|
</a>
|
||||||
<ul class="nav nav-treeview">
|
<ul class="nav nav-treeview">
|
||||||
<?php if (Auth::user()->can("Read DBH Realisasi Pendapatan")){ ?>
|
<?php //if (Auth::user()->can("Read DAK Realisasi Pendapatan")){ ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{ url('/realisasi-pendapatan') }}" class="nav-link">
|
<a href="{{ url('/dak/realisasi-pendapatan') }}" class="nav-link">
|
||||||
<i class="fa fa-minus nav-icon"></i>
|
<i class="fa fa-minus nav-icon"></i>
|
||||||
<p>Realisasi Pendapatan</p>
|
<p>Realisasi Pendapatan</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php //} ?>
|
||||||
<?php if (Auth::user()->can("Upload DBH Rencana Belanja")){ ?>
|
<?php //if (Auth::user()->can("Upload DAK Rencana Belanja")){ ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{ url('/upload-realisasi-belanja') }}" class="nav-link">
|
<a href="{{ url('/dak/upload-realisasi-belanja') }}" class="nav-link">
|
||||||
<i class="fa fa-minus nav-icon"></i>
|
<i class="fa fa-minus nav-icon"></i>
|
||||||
<p>Upload Rencana Belanja</p>
|
<p>Upload Rencana Belanja</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php //} ?>
|
||||||
<?php if (Auth::user()->can("Read DBH Realisasi Belanja")){ ?>
|
<?php //if (Auth::user()->can("Read DAK Realisasi Belanja")){ ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{ url('/realisasi-belanja') }}" class="nav-link">
|
<a href="{{ url('/dak/realisasi-belanja') }}" class="nav-link">
|
||||||
<i class="fa fa-minus nav-icon"></i>
|
<i class="fa fa-minus nav-icon"></i>
|
||||||
<p>Realisasi Belanja</p>
|
<p>Realisasi Belanja</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php //} ?>
|
||||||
</ul>
|
</ul>
|
||||||
</li> --}}
|
</li>
|
||||||
@if ($role == "admin" || $role == "superadmin")
|
@if ($role == "admin" || $role == "superadmin")
|
||||||
<li class="nav-header">MASTER DATA</li>
|
<li class="nav-header">MASTER DATA</li>
|
||||||
<li class="nav-item"><a href="{{ url('/admin/users') }}" class="nav-link"><i class="nav-icon fas fa-th-large nav-icon"></i><p>Pengguna</p></a></li>
|
<li class="nav-item"><a href="{{ url('/admin/users') }}" class="nav-link"><i class="nav-icon fas fa-th-large nav-icon"></i><p>Pengguna</p></a></li>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-form-label label-align" for="txt_simtrad4_kotor">DBH/DAK</label>
|
<label class="col-form-label label-align" for="txt_simtrad4_kotor">DBH</label>
|
||||||
<select id="txt_id_sps" name="txt_id_sps" style="width:100%" class="form-control sps_search" required></select>
|
<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">
|
<input id="txt_rek_sps" name="txt_rek_sps" type="hidden">
|
||||||
</div>
|
</div>
|
||||||
@@ -149,9 +149,9 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
$('#txt_id_sps').select2({
|
$('#txt_id_sps').select2({
|
||||||
placeholder: 'Pilih DBH / DAK',
|
placeholder: 'Pilih DBH',
|
||||||
ajax: {
|
ajax: {
|
||||||
url: '/item-search-sps?ta='+$("#txt_ta").val(),
|
url: '/item-search-sps?ta='+$("#txt_ta").val()+'&jenis=dbh',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
delay: 250,
|
delay: 250,
|
||||||
processResults: function (data) {
|
processResults: function (data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user