update dau rinci (realisasi belanja)
This commit is contained in:
@@ -18,10 +18,12 @@ use App\Models\MstJenisDana;
|
||||
use App\Models\MstJenisBelanja;
|
||||
use App\Models\MstSubJenisBelanja;
|
||||
use App\Models\VwRekeningPendapatan;
|
||||
use App\Models\MappingDauRinci;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use App\Models\PendapatanRealisasiSts;
|
||||
use App\Models\AkunTamsilTpg;
|
||||
|
||||
@@ -193,14 +195,14 @@ class ItemSearchController extends Controller
|
||||
|
||||
if (in_array($kode_akun, $arrTPG)) {
|
||||
$cek = PendapatanRealisasiSts::where("rkud_no_sts", $no_skprd)
|
||||
->where("rkud_kode_akun", $kode_akun)
|
||||
->count();
|
||||
->where("rkud_kode_akun", $kode_akun)
|
||||
->count();
|
||||
|
||||
if ($cek > 0) {
|
||||
$urlAPIDev = "http://10.15.34.90:8820/api/tpg-tamsil/cek-sp2t";
|
||||
$userDev = "sidata_tpgtamsil_dev";
|
||||
$passDev = "sidataAp!TpgT4ms1lD3v";
|
||||
|
||||
|
||||
$urlAPI = "https://simpad.jakarta.go.id/api/tpg-tamsil/cek-sp2t'";
|
||||
$user = "sidata_tpgtamsil";
|
||||
$pass = "sidataAp!TpgT4ms1l";
|
||||
@@ -218,8 +220,8 @@ class ItemSearchController extends Controller
|
||||
$sts["kode_bas"] = $httpSTS["data"]["kode_rekening"];
|
||||
$sts["n_akun"] = $httpSTS["data"]["nam_rekening"];
|
||||
$sts["nilai_bayar"] = separateNumberIndo($httpSTS["data"]["jumlah"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$select = DB::raw("NO_SKPRD,TGL_VALIDASI,KODE_BAS,NILAI_BAYAR,TRBAS.N_AKUN");
|
||||
$sts = Siesetpembayaran::select($select)
|
||||
@@ -334,9 +336,25 @@ class ItemSearchController extends Controller
|
||||
|
||||
public function dau_rinci_detail(Request $request)
|
||||
{
|
||||
$search = $request->id;
|
||||
$sk = MstDauRinci::where('id', $search)->first();
|
||||
// $search = $request->id;
|
||||
// $sk = MstDauRinci::where('id', $search)->first();
|
||||
|
||||
return response()->json($sk);
|
||||
// return response()->json($sk);
|
||||
$subJenisDana = $request->sub_jenis_dana;
|
||||
$tahun = Session::get('Tahun_Anggaran');
|
||||
$kodeSkpd = Auth::user()->kode_skpd;
|
||||
|
||||
if (!$subJenisDana || !$tahun || !$kodeSkpd) {
|
||||
return response()->json([]);
|
||||
}
|
||||
|
||||
$idDauRinciList = MappingDauRinci::where('ID_JENIS_DANA', $subJenisDana)
|
||||
->where('TAHUN', $tahun)
|
||||
->where('KODE_SKPD', $kodeSkpd)
|
||||
->pluck('ID_DAU_RINCI');
|
||||
|
||||
$outputs = MstDauRinci::whereIn('id', $idDauRinciList)->get();
|
||||
|
||||
return response()->json($outputs);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user