Fix TRBAS Tahun Berlaku

This commit is contained in:
Pusdatin BPKD Jkt
2023-01-12 10:21:54 +07:00
parent d5fe9b9d8a
commit cd80b7e00d
3 changed files with 6 additions and 2 deletions
@@ -151,11 +151,13 @@ class ItemSearchController extends Controller
$sps = DB::select(DB::raw("SELECT x.KODE_REKENING as IDX,x.KODE_REKENING||' | '||z.NAMA_REKENING as name
FROM SAMASA.MAPPING_DBH_SKPD x
LEFT JOIN SAMASA.VW_REKENING_PENDAPATAN z ON x.ID_REKENING = z.ID
WHERE x.kode_skpd='".Auth::user()->nrk."' $filter"));
WHERE x.kode_skpd='".Auth::user()->nrk."' AND (TAHUN_BERLAKU<=".getTA()." AND TAHUN_BERAKHIR>=".getTA().") $filter"));
}else{
$select = DB::raw("KODE_REKENING AS IDX,KODE_REKENING||' | '||NAMA_REKENING as name");
$sps = VwRekeningPendapatan::select($select);
$sps->whereRaw("TAHUN_BERLAKU<=".getTA()." AND TAHUN_BERAKHIR>=".getTA());
if (!empty($search)){
$sps->whereRaw(" (LOWER(KODE_REKENING) LIKE '%$search%' OR LOWER(NAMA_REKENING) LIKE '%$search%') ");
}
@@ -180,6 +182,7 @@ class ItemSearchController extends Controller
$sts = Siesetpembayaran::select($select)
->join("NEWSIPKD.TRBAS","SI_ESET_PEMBAYARAN.KODE_BAS","=","TRBAS.C_AKUN")
->where("NO_SKPRD", $no_skprd)
->whereRaw("C_TAHUN_BERLAKU<=".getTA()." AND C_TAHUN_BERAKHIR>=".getTA())
->first();
if ($sts){
$sts["tgl_validasi"] = date("Y-m-d",strtotime($sts["tgl_validasi"]));