laporan file dan spd pada dbh

This commit is contained in:
Pusdatin BPKD Jkt
2022-10-27 14:44:04 +07:00
parent 2edffa6584
commit 2df12fe3d2
17 changed files with 596 additions and 45 deletions
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use App\Models\Tropd;
use App\Models\Trbas;
use App\Models\Program;
use App\Models\Kegiatan;
use App\Models\SubKegiatan;
@@ -242,4 +243,22 @@ class ItemSearchController extends Controller
}
return response()->json($sk);
}
public function rek_dana(Request $request)
{
$search = strtolower($request->q);
$ta = $request->ta;
$select = DB::raw("C_AKUN AS IDX,C_AKUN||' | '||N_AKUN as NAME");
$trbas = Trbas::select($select)->whereRaw("C_TAHUN_BERAKHIR>=$ta AND C_AKUN LIKE '4.2.01.01%' AND LENGTH(C_AKUN)>=17");
if (!empty($search)){
$trbas->whereRaw(" (LOWER(C_AKUN) LIKE '%$search%' OR LOWER(N_AKUN) LIKE '%$search%') ");
}
$trbas->orderby("C_AKUN");
$trbas = $trbas->get();
return response()->json($trbas);
}
}