Download Jadwal Salur
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
/public/hot
|
||||
/public/storage
|
||||
/public/uploadFiles
|
||||
/public/downloadFiles
|
||||
/storage/*.key
|
||||
/vendor
|
||||
.env
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports;
|
||||
|
||||
use App\Models\VwSkppHst;
|
||||
use Maatwebsite\Excel\Concerns\FromQuery;
|
||||
use Maatwebsite\Excel\Concerns\Exportable;
|
||||
use Maatwebsite\Excel\Concerns\WithMapping;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||
|
||||
class JadwalSalurExport implements FromQuery, WithMapping, WithHeadings
|
||||
{
|
||||
use Exportable;
|
||||
|
||||
public function __construct($ta)
|
||||
{
|
||||
$this->ta = $ta;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function query()
|
||||
{
|
||||
$sqlStr = 'SELECT kode_rekening,nama_rekening,spsbulan1,spsbulan2,spsbulan3,spsbulan4,
|
||||
spsbulan5,spsbulan6,spsbulan7,spsbulan8,spsbulan9,spsbulan10,spsbulan11,spsbulan12,
|
||||
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("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("10",0) AS "REAL10",NVL("11",0) AS "REAL11",NVL("12",0) AS "REAL12"
|
||||
FROM PROKSI.SPS_PENDAPATAN x
|
||||
LEFT JOIN
|
||||
(
|
||||
SELECT * FROM (
|
||||
SELECT ID_SPS,extract(month from RKUD_TGL) AS BULAN,RKUD_JUMLAH
|
||||
FROM SAMASA.PENDAPATAN_REALISASI
|
||||
WHERE TAHUN=\''.$this->ta.'\'
|
||||
)
|
||||
PIVOT
|
||||
(
|
||||
SUM(RKUD_JUMLAH)
|
||||
FOR BULAN IN(1,2,3,4,5,6,7,8,9,10,11,12)
|
||||
)
|
||||
)y ON x.ID = y.ID_SPS
|
||||
WHERE x.TAHUN = '.$this->ta.' AND x.SKPD_ID=980 AND SUBSTR(x.KODE_REKENING,1,3)=\'4.2\'';
|
||||
|
||||
return $sqlStr;
|
||||
}
|
||||
|
||||
public function columnFormats(): array
|
||||
{
|
||||
return [
|
||||
'B' => NumberFormat::FORMAT_TEXT,
|
||||
];
|
||||
}
|
||||
|
||||
public function map($skpp_hst): array
|
||||
{
|
||||
return [
|
||||
$skpp_hst->no_skpp,
|
||||
"'".$skpp_hst->nip,
|
||||
$skpp_hst->nrk,
|
||||
$skpp_hst->nama,
|
||||
$skpp_hst->nama_golongan,
|
||||
$skpp_hst->status_pegawai,
|
||||
$skpp_hst->tugas,
|
||||
$skpp_hst->dinas,
|
||||
$skpp_hst->tgl_akhir,
|
||||
$skpp_hst->nama_hak,
|
||||
$skpp_hst->nama_keputusan,
|
||||
$skpp_hst->no_pen,
|
||||
$skpp_hst->tgl_pen,
|
||||
$skpp_hst->tgl_tmt,
|
||||
$skpp_hst->ga_pok,
|
||||
$skpp_hst->t_issum,
|
||||
$skpp_hst->t_anak,
|
||||
$skpp_hst->t_lain,
|
||||
$skpp_hst->t_jab,
|
||||
$skpp_hst->t_beras,
|
||||
$skpp_hst->tpph,
|
||||
$skpp_hst->bulat,
|
||||
$skpp_hst->p_beras,
|
||||
$skpp_hst->iuran,
|
||||
$skpp_hst->ppph,
|
||||
$skpp_hst->lain_2,
|
||||
$skpp_hst->nama_kantor,
|
||||
$skpp_hst->wilayah_kantor,
|
||||
$skpp_hst->tgl_cetak,
|
||||
$skpp_hst->keterangan,
|
||||
$skpp_hst->nama_kantor1,
|
||||
$skpp_hst->nama_kantor2,
|
||||
$skpp_hst->wilayah,
|
||||
$skpp_hst->revisi_remarks,
|
||||
date("Y-m-d",strtotime($skpp_hst->created_at)),
|
||||
];
|
||||
}
|
||||
|
||||
public function headings(): array
|
||||
{
|
||||
return [
|
||||
"No SKPP",
|
||||
"NIP",
|
||||
"NRK",
|
||||
"Nama",
|
||||
"Golongan",
|
||||
"Status Pegawai",
|
||||
"Tugas",
|
||||
"Dinas",
|
||||
"Tgl akhir",
|
||||
"Hak",
|
||||
"Keputusan",
|
||||
"No Keputusan",
|
||||
"Tgl Keputusan",
|
||||
"Tgl TMT",
|
||||
"Gaji Pokok",
|
||||
"Tunjangan Suami Istri",
|
||||
"Tunjangan Anak",
|
||||
"Tunjangan Lain",
|
||||
"Tunjangan Jabatan",
|
||||
"Tunjangan Beras",
|
||||
"Tunjangan PPH",
|
||||
"Pembulatan",
|
||||
"Potongan Beras",
|
||||
"Iuran",
|
||||
"Potongan PPH",
|
||||
"lain - Lain",
|
||||
"Kantor",
|
||||
"Wilayah",
|
||||
"Tgl Cetak",
|
||||
"Pindah Tugas Kantor 1",
|
||||
"Pindah Tugas Kantor 2",
|
||||
"Pindah Tugas Wilayah",
|
||||
"Keterangan",
|
||||
"revisi_remarks",
|
||||
"Tgl Dibuat",
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -16,17 +16,23 @@ class Controller extends BaseController
|
||||
public $siteTitle = "Beranda";
|
||||
public $sitesubTitle = "Data";
|
||||
public $siteBreadcumb =[["url"=>"/","label"=>"Beranda"]];
|
||||
public $IconTitle = "fa fa-table";
|
||||
|
||||
public function __construct() {
|
||||
View::share ( 'siteTitle' , $this->siteTitle );
|
||||
View::share ( 'sitesubTitle' , $this->sitesubTitle );
|
||||
View::share ( 'siteBreadcumb' , $this->siteBreadcumb );
|
||||
View::share ( 'iconTitle' , $this->IconTitle );
|
||||
}
|
||||
|
||||
public function setTitle($name){
|
||||
View::share ( 'siteTitle' , $name );
|
||||
}
|
||||
|
||||
public function setIconTitle($icon){
|
||||
View::share ( 'iconTitle' , $icon );
|
||||
}
|
||||
|
||||
public function setSubtitle($name){
|
||||
View::share ( 'sitesubTitle' , $name );
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ class HomeController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$this->setIconTitle("fa fa-home");
|
||||
return view('home');
|
||||
}
|
||||
|
||||
|
||||
@@ -8,12 +8,15 @@ use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
use App\Models\Sps_pendapatan;
|
||||
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
||||
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
|
||||
|
||||
class JadwalSalurdanaController extends Controller
|
||||
{
|
||||
public function __construct(){
|
||||
$this->siteTitle = "Jadwal Salur Dana";
|
||||
parent::__construct();
|
||||
$this->setTitle("Jadwal Salur Dana");
|
||||
$this->setIconTitle("fa fa-calendar-alt");
|
||||
}
|
||||
|
||||
public function index()
|
||||
@@ -21,17 +24,9 @@ class JadwalSalurdanaController extends Controller
|
||||
return view('jadwal_salurdana.index');
|
||||
}
|
||||
|
||||
public function datatable(Request $request)
|
||||
protected function queryJadwalSalurDana($ta)
|
||||
{
|
||||
$post = $request->all();
|
||||
$offset = $post["start"];
|
||||
$limit = $post["length"];
|
||||
$src = isset($post["src"]) ? $post["src"]:"";
|
||||
$ta = $post["ta"];
|
||||
$dataFilter = 0;
|
||||
$typeDana = isset($post["type_dana"])?$post["type_dana"]:"";
|
||||
$idSPS = isset($post["id_sps"])?$post["id_sps"]:"";
|
||||
$sqlstr = 'SELECT kode_rekening,nama_rekening,spsbulan1,spsbulan2,spsbulan3,spsbulan4,
|
||||
return 'SELECT kode_rekening,nama_rekening,spsbulan1,spsbulan2,spsbulan3,spsbulan4,
|
||||
spsbulan5,spsbulan6,spsbulan7,spsbulan8,spsbulan9,spsbulan10,spsbulan11,spsbulan12,
|
||||
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",
|
||||
@@ -53,6 +48,25 @@ class JadwalSalurdanaController extends Controller
|
||||
)
|
||||
)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\'';
|
||||
}
|
||||
|
||||
public function datatable(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
$offset = $post["start"];
|
||||
$limit = $post["length"];
|
||||
$src = isset($post["src"]) ? $post["src"]:"";
|
||||
$ta = $post["ta"];
|
||||
$dataFilter = 0;
|
||||
$typeDana = isset($post["type_dana"])?$post["type_dana"]:"";
|
||||
$idSPS = isset($post["id_sps"])?$post["id_sps"]:"";
|
||||
$sqlstr = $this->queryJadwalSalurDana($ta);
|
||||
|
||||
if (!empty($idSPS)){
|
||||
$sqlstr.=" AND x.ID=$idSPS";
|
||||
}
|
||||
|
||||
$dataTotal = count(DB::select(DB::raw($sqlstr)));
|
||||
|
||||
if (!empty($typeDana)){
|
||||
if ($typeDana == "cht"){
|
||||
@@ -61,12 +75,6 @@ class JadwalSalurdanaController extends Controller
|
||||
$sqlstr.=" AND SUBSTR(kode_rekening,1,12) IN ('4.2.01.01.03','4.2.01.01.04')";
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($idSPS)){
|
||||
$sqlstr.=" AND x.ID=$idSPS";
|
||||
}
|
||||
|
||||
$dataTotal = count(DB::select(DB::raw($sqlstr)));
|
||||
$data = DB::select(DB::raw($sqlstr.'ORDER BY kode_rekening OFFSET '.$offset.' ROWS FETCH NEXT '.$limit.' ROWS ONLY'));
|
||||
$dataFilter = count(DB::select(DB::raw($sqlstr)));
|
||||
|
||||
@@ -112,14 +120,19 @@ class JadwalSalurdanaController extends Controller
|
||||
NVL(V_BKU_09,0) AS V_BKU_09,
|
||||
NVL(V_BKU_10,0) AS V_BKU_10,
|
||||
NVL(V_BKU_11,0) AS V_BKU_11,
|
||||
NVL(V_BKU_12,0) AS V_BKU_12
|
||||
NVL(V_BKU_12,0) AS V_BKU_12,
|
||||
TOTAL AS TOTAL_REALISASI
|
||||
FROM (
|
||||
SELECT x.*,SUM (V_REALISASI) OVER ( PARTITION BY IDRSK ) AS Total
|
||||
FROM
|
||||
(
|
||||
SELECT IDRSK,
|
||||
extract(month FROM TO_DATE(D_POSTING, \'YYYYMMDD\')) AS BULAN,
|
||||
SUM (REALISASI) AS V_REALISASI
|
||||
FROM NEWSIPKD.VW_BKU_REALISASI_RSK
|
||||
WHERE TAHUN_ANGGARAN = \''.$ta.'\'
|
||||
GROUP BY IDRSK,D_POSTING
|
||||
) x
|
||||
)
|
||||
PIVOT
|
||||
(
|
||||
@@ -161,13 +174,14 @@ class JadwalSalurdanaController extends Controller
|
||||
) yy
|
||||
ON xx.IDRSK = yy.RSK_BELANJARINCI_ID
|
||||
) y
|
||||
ON x.KODE_RSK = y.IDRSK';
|
||||
ON x.KODE_RSK = y.IDRSK
|
||||
WHERE x.TAHUN_ANGGARAN = \''.$ta.'\' ';
|
||||
$data = DB::connection('oracle')->select(DB::raw($sqlstr.' ORDER BY x.id OFFSET '.$offset.' ROWS FETCH NEXT '.$limit.' ROWS ONLY'));
|
||||
$dataTotal = count(DB::connection('oracle')->select(DB::raw($sqlstr)));;
|
||||
if (!empty($src)){
|
||||
//$data->whereRaw("(LOWER(NAMA_REKENING) LIKE '%".strtolower($src)."%' OR LOWER(KODE_REKENING) LIKE '%".strtolower($src)."%')");
|
||||
}
|
||||
$dataFilter = count(DB::connection('oracle')->select(DB::raw($sqlstr)));
|
||||
$dataTotal = 0;
|
||||
|
||||
return response()->json([
|
||||
"recordsTotal" => $dataTotal,
|
||||
@@ -176,4 +190,79 @@ class JadwalSalurdanaController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function download()
|
||||
{
|
||||
$sqlstr = $this->queryJadwalSalurDana("2022");
|
||||
$data = DB::select(DB::raw($sqlstr));
|
||||
//var_dump($data); exit;
|
||||
$data = json_decode(json_encode($data),true);
|
||||
$fileName = 'Jadwal-salur-dana.xlsx';
|
||||
|
||||
$spreadsheet = new Spreadsheet();
|
||||
$sheet = $spreadsheet->getActiveSheet();
|
||||
$sheet->setCellValue('A1', 'Kode Rekening');
|
||||
$sheet->setCellValue('B1', 'Nama Rekening');
|
||||
$alpha = range("A","Z");
|
||||
$alphaIndex = 2;
|
||||
// Nama Kolom bulan
|
||||
$bulans = GetBulan();
|
||||
foreach($bulans as $bulan){
|
||||
$sheet->setCellValue($alpha[$alphaIndex].'1', $bulan);
|
||||
$sheet->mergeCells($alpha[$alphaIndex].'1'.':'.$alpha[$alphaIndex+1].'1');
|
||||
$alphaIndex+=2;
|
||||
}
|
||||
$sheet->setCellValue(getAlphabetCell($alphaIndex).'1', "TOTAL");
|
||||
$sheet->mergeCells(getAlphabetCell($alphaIndex).'1'.':'.getAlphabetCell($alphaIndex+1).'1');
|
||||
$sheet->mergeCells('A1:A2');
|
||||
$sheet->mergeCells('B1:B2');
|
||||
|
||||
// Nama Kolom Jadwal dan Realisasi
|
||||
$alphaIndex = 2;
|
||||
for($i=1;$i<=13;$i++){
|
||||
$sheet->setCellValue(getAlphabetCell($alphaIndex).'2', 'Jadwal');
|
||||
$sheet->setCellValue(getAlphabetCell($alphaIndex+1).'2', 'Realisasi');
|
||||
$alphaIndex+=2;
|
||||
}
|
||||
|
||||
// Data Kolom Bulan dan Realisasi
|
||||
$rows = 3;
|
||||
foreach ($data as $val){
|
||||
$sheet->setCellValue('A' . $rows, $val["kode_rekening"]);
|
||||
$sheet->setCellValue('B' . $rows, $val["nama_rekening"]);
|
||||
$alphaIndex = 2;
|
||||
$totalJadwalSalur = 0;
|
||||
$totalRealisasi = 0;
|
||||
for($i=1;$i<=12;$i++){
|
||||
$sheet->setCellValue($alpha[$alphaIndex].$rows, $val["spsbulan".$i]);
|
||||
$sheet->setCellValue($alpha[$alphaIndex+1].$rows, $val['real'.$i]);
|
||||
$alphaIndex+=2;
|
||||
$totalJadwalSalur += $val["spsbulan".$i];
|
||||
$totalRealisasi += $val['real'.$i];
|
||||
}
|
||||
$sheet->setCellValue(getAlphabetCell($alphaIndex).$rows, $totalJadwalSalur);
|
||||
$sheet->setCellValue(getAlphabetCell($alphaIndex+1).$rows, $totalRealisasi);
|
||||
|
||||
$rows++;
|
||||
}
|
||||
|
||||
// TOTAL BAWAH
|
||||
$alphaIndex = 2;
|
||||
$sheet->setCellValue("A".$rows , "TOTAL");
|
||||
$sheet->mergeCells('A'.$rows.':'.'B'.$rows);
|
||||
for ($x=1;$x<=13;$x++){
|
||||
$strAlpha = getAlphabetCell($alphaIndex);
|
||||
$SUMRANGE = $strAlpha."3:".$strAlpha.($rows-1);
|
||||
$sheet->setCellValue($strAlpha.$rows , "=SUM($SUMRANGE)");
|
||||
$alphaIndex++;
|
||||
}
|
||||
|
||||
$writer = new Xlsx($spreadsheet);
|
||||
$writer->save("downloadFiles/".$fileName);
|
||||
$headers = [
|
||||
'Content-Type' => 'application/vnd.ms-excel',
|
||||
'Content-Disposition' => 'attachment;filename='.$fileName
|
||||
];
|
||||
return response()->download("downloadFiles/".$fileName, $fileName, $headers);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,8 +10,9 @@ use Illuminate\Support\Facades\Auth;
|
||||
class NotifikasiController extends Controller
|
||||
{
|
||||
public function __construct(){
|
||||
$this->siteTitle = "Notifikasi";
|
||||
parent::__construct();
|
||||
$this->setTitle("Notifikasi");
|
||||
$this->setIconTitle("far fa-bell");
|
||||
}
|
||||
|
||||
public function index()
|
||||
|
||||
@@ -154,6 +154,7 @@ class RealisasiBelanjaController extends Controller
|
||||
$method = $request->method();
|
||||
$this->setTitle("Upload Rencana Belanja ".strtoupper($typeDana));
|
||||
$this->setSubtitle("Upload File");
|
||||
$this->setIconTitle("fas fa-upload");
|
||||
if ($request->isMethod('post')) {
|
||||
$req = $request->all();
|
||||
try{
|
||||
|
||||
@@ -117,3 +117,15 @@ function getRole()
|
||||
|
||||
return $role;
|
||||
}
|
||||
|
||||
function getAlphabetCell($idx)
|
||||
{
|
||||
$alphabet = range("A","Z");
|
||||
if ($idx > 25)
|
||||
{
|
||||
$idx -= 26;
|
||||
return $alphabet[round($idx/25)].= getAlphabetCell($idx);
|
||||
}else{
|
||||
return $alphabet[$idx];
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@
|
||||
"laravel/sanctum": "^2.11",
|
||||
"laravel/tinker": "^2.5",
|
||||
"maatwebsite/excel": "^3.1",
|
||||
"phpoffice/phpspreadsheet": "^1.24",
|
||||
"spatie/laravel-permission": "^5.3",
|
||||
"yajra/laravel-oci8": "^8"
|
||||
},
|
||||
|
||||
Generated
+11
-11
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "bfae7d71eb812cd62918b45d243676d5",
|
||||
"content-hash": "2093020b165c40a9b39e5bea40080e73",
|
||||
"packages": [
|
||||
{
|
||||
"name": "asm89/stack-cors",
|
||||
@@ -2550,16 +2550,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpoffice/phpspreadsheet",
|
||||
"version": "1.20.0",
|
||||
"version": "1.24.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
|
||||
"reference": "44436f270bb134b4a94670f3d020a85dfa0a3c02"
|
||||
"reference": "69991111e05fca3ff7398e1e7fca9ebed33efec6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/44436f270bb134b4a94670f3d020a85dfa0a3c02",
|
||||
"reference": "44436f270bb134b4a94670f3d020a85dfa0a3c02",
|
||||
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/69991111e05fca3ff7398e1e7fca9ebed33efec6",
|
||||
"reference": "69991111e05fca3ff7398e1e7fca9ebed33efec6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2583,19 +2583,19 @@
|
||||
"php": "^7.3 || ^8.0",
|
||||
"psr/http-client": "^1.0",
|
||||
"psr/http-factory": "^1.0",
|
||||
"psr/simple-cache": "^1.0"
|
||||
"psr/simple-cache": "^1.0 || ^2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "dev-master",
|
||||
"dompdf/dompdf": "^1.0",
|
||||
"dompdf/dompdf": "^1.0 || ^2.0",
|
||||
"friendsofphp/php-cs-fixer": "^3.2",
|
||||
"jpgraph/jpgraph": "^4.0",
|
||||
"mpdf/mpdf": "^8.0",
|
||||
"mpdf/mpdf": "8.1.1",
|
||||
"phpcompatibility/php-compatibility": "^9.3",
|
||||
"phpstan/phpstan": "^1.1",
|
||||
"phpstan/phpstan-phpunit": "^1.0",
|
||||
"phpunit/phpunit": "^8.5 || ^9.0",
|
||||
"squizlabs/php_codesniffer": "^3.6",
|
||||
"squizlabs/php_codesniffer": "^3.7",
|
||||
"tecnickcom/tcpdf": "^6.4"
|
||||
},
|
||||
"suggest": {
|
||||
@@ -2648,9 +2648,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
|
||||
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.20.0"
|
||||
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.24.1"
|
||||
},
|
||||
"time": "2021-11-23T15:23:42+00:00"
|
||||
"time": "2022-07-18T19:50:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpoption/phpoption",
|
||||
|
||||
Vendored
+4
@@ -317,3 +317,7 @@ hr{
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.content-header h1{
|
||||
color:#001f3f;
|
||||
}
|
||||
Vendored
+12
@@ -398,3 +398,15 @@ $(window).resize(function(){
|
||||
$($.fn.dataTable.tables(true)).DataTable().columns.adjust();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on("click",".export-data",function(){
|
||||
let form = $(this).attr("formid");
|
||||
$("#export-type").remove();
|
||||
$('<input>').attr({
|
||||
type: 'hidden',
|
||||
id: 'export-type',
|
||||
name: 'export-type',
|
||||
value: $(this).attr("extype")
|
||||
}).appendTo("#"+form);
|
||||
$("#"+form).submit();
|
||||
})
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<form id="frmJadwalSalur" method="post">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-1">
|
||||
<div class="form-group">
|
||||
@@ -53,6 +55,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table id="dtTableJadwalPendapatan" class="table table-bordered table-striped jambo_table tblClickRow" style="width:150%">
|
||||
<thead>
|
||||
<tr class="headings">
|
||||
@@ -185,7 +188,7 @@
|
||||
"columnDefs": [
|
||||
//{ className: "td-nowrap", "targets": [ 1 ] }
|
||||
],
|
||||
"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\"B>>>rt<\"bottom\" <\"row\"<\"col-md-6\"i><\"col-md-6\"p>> ><\"clear\">",
|
||||
"lengthMenu": [
|
||||
[ 50, 75, 100 ],
|
||||
[ "50", "75", "100" ]
|
||||
@@ -326,8 +329,32 @@
|
||||
// .append("<td colspan=5> <a href=\'/akun/index/detail/?acc="+groupNumber.split(".").join("_")+"\'><strong>" + groupNumber + ". " + group + "</strong></a></td>")
|
||||
// }
|
||||
},
|
||||
dataSrc: ["groupall", "kodegrup"]
|
||||
dataSrc: ["groupall", "kodegrup"],
|
||||
},
|
||||
buttons: [
|
||||
{
|
||||
extend: "collection",
|
||||
text: "Export",
|
||||
buttons: [
|
||||
{
|
||||
text: "<i class=\'fas fa-file-excel\'></i> Excel",
|
||||
className: "export-data link-excel",
|
||||
attr: {
|
||||
formid: "frmJadwalSalur",
|
||||
extype: "excel"
|
||||
}
|
||||
},
|
||||
// {
|
||||
// text: "<i class=\'fas fa-file-pdf\'></i> Pdf",
|
||||
// className: "export-data link-pdf",
|
||||
// attr: {
|
||||
// formid: "frm_proses_spm_sp2d",
|
||||
// extype: "pdf"
|
||||
// }
|
||||
// }
|
||||
],
|
||||
}
|
||||
],
|
||||
scrollX:true,
|
||||
scrollY: "350px",
|
||||
});
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{ $siteTitle }}</h1>
|
||||
<h1><i class='{{ $iconTitle }} mr-2'></i>{{ $siteTitle }}</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{ $siteTitle }}</h1>
|
||||
<h1><i class='{{ $iconTitle }} mr-2'></i>{{ $siteTitle }}</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
|
||||
@@ -39,6 +39,7 @@ Route::group(['middleware' => 'auth'], function () {
|
||||
Route::post('/{typeDana}/datatable', [JadwalSalurdanaController::class,'datatable_cht_dak']);
|
||||
Route::get('/', [JadwalSalurdanaController::class,'index']);
|
||||
Route::post('/datatable', [JadwalSalurdanaController::class,'datatable']);
|
||||
Route::post('/', [JadwalSalurdanaController::class,'download']);
|
||||
});
|
||||
|
||||
// PENDAPATAN ==================================================
|
||||
|
||||
Reference in New Issue
Block a user