Bugs Download Excel
This commit is contained in:
@@ -268,7 +268,7 @@ class RealisasiPendapatanController extends Controller
|
||||
if ($post["export-type"]=="excel")
|
||||
{
|
||||
|
||||
$data = PendapatanRealisasi::where("tahun", $ta)->orderBy("created_at","ASC");
|
||||
$data = PendapatanRealisasi::with("listSts")->where("tahun", $ta)->orderBy("created_at","ASC");
|
||||
if (!empty($sps)){
|
||||
$data->where("kode_rekening_sps",$sps);
|
||||
}
|
||||
@@ -292,6 +292,7 @@ class RealisasiPendapatanController extends Controller
|
||||
|
||||
$rows = 2;
|
||||
foreach ($data->get() as $val){
|
||||
// var_dump($val["listSts"]); exit;
|
||||
$sheet->setCellValue(getAlphabetCell(0) . $rows, $val["simtrad4_uraian"]);
|
||||
$sheet->setCellValue(getAlphabetCell(1) . $rows, $val["simtrad4_kotor"]);
|
||||
$sheet->setCellValue(getAlphabetCell(2) . $rows, $val["simtrad4_potongan"]);
|
||||
@@ -300,11 +301,11 @@ class RealisasiPendapatanController extends Controller
|
||||
$sheet->setCellValue(getAlphabetCell(5) . $rows, $val["bersih"]);
|
||||
$sheet->setCellValue(getAlphabetCell(6) . $rows, $val["simtrad4_sp2d_bun"]);
|
||||
$sheet->setCellValue(getAlphabetCell(7) . $rows, $val["simtrad4_tgl_sp2d_bun"]);
|
||||
$sheet->setCellValue(getAlphabetCell(8) . $rows, $val["rkud_tgl"]);
|
||||
$sheet->setCellValue(getAlphabetCell(9) . $rows, $val["rkud_no_sts"]);
|
||||
$sheet->setCellValue(getAlphabetCell(8) . $rows, $val["listSts"]?$val["listSts"]["rkud_tgls"]:"");
|
||||
$sheet->setCellValue(getAlphabetCell(9) . $rows, $val["listSts"]?$val["listSts"]["rkud_no_sts"]:"");
|
||||
$sheet->setCellValue(getAlphabetCell(10) . $rows, $val["kode_rekening_sps"]);
|
||||
$sheet->setCellValue(getAlphabetCell(11) . $rows, $val["nama_rekening_sps"]);
|
||||
$sheet->setCellValue(getAlphabetCell(12) . $rows, $val["rkud_jumlah"]);
|
||||
$sheet->setCellValue(getAlphabetCell(12) . $rows, $val["listSts"]?$val["listSts"]["rkud_jumlah"]:"");
|
||||
$rows++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user