add new page konfirmasi bank

This commit is contained in:
KhatamNugraha
2023-08-02 14:09:40 +07:00
parent 61185134b5
commit 2ec52d344f
7 changed files with 471 additions and 7 deletions

View File

@ -29,14 +29,41 @@
/**
* Display a listing of the resource.
*/
public function index(ViewAccountDataTable $dataTable)
// public function index(ViewAccountDataTable $dataTable)
// {
// if (is_null($this->user) || !$this->user->can('konfirmasibank.read')) {
// abort(403, 'Sorry !! You are Unauthorized to view any master data !');
// }
// return $dataTable->render('konfirmasibank::index');
// }
public function index(Request $request)
{
// $keyword = $request->input('search');
if (is_null($this->user) || !$this->user->can('konfirmasibank.read')) {
abort(403, 'Sorry !! You are Unauthorized to view any master data !');
}
//$data = ViewAccount::take(10)->get();
//dd($data);
return $dataTable->render('konfirmasibank::index');
return view('konfirmasibank::pages.index');
}
public function getData(Request $request)
{
$data = [];
$Account = new ViewAccount;
$Accounts = $Account->getSearchAccount($request->cif, $request->kodecabang,$request->periode)->get();
foreach ($Accounts as $key => $account) {
$data[$key]['ACCOUNT_NUMBER'] = $account->ACCOUNT_NUMBER;
$data[$key]['COMPANY_NAME'] = $account->COMPANY_NAME;
$data[$key]['SHORT_TITLE'] = $account->SHORT_TITLE;
$data[$key]['WORKING_BALANCE'] = $account->WORKING_BALANCE;
$data[$key]['PRODUCT'] = $account->PRODUCT;
$data[$key]['CURRENCY'] = $account->CURRENCY;
}
return json_encode($data);
}