From 100cb2e6c4973a6559faf217ed3faee4613948b7 Mon Sep 17 00:00:00 2001 From: KhatamNugraha Date: Thu, 11 Jul 2024 11:25:00 +0700 Subject: [PATCH] update controler kobank --- ...1_041625_remove_nullable_rek_fasilitas.php | 28 ++ Entities/Account.php | 3 +- Entities/Dpk.php | 34 ++ Entities/Loan.php | 41 +++ Entities/Nasabah.php | 31 ++ Entities/Signer.php | 1 - Http/Controllers/KonfirmasiBankController.php | 299 +++++++++--------- Resources/views/exportPdf.blade.php | 139 ++------ 8 files changed, 307 insertions(+), 269 deletions(-) create mode 100644 Database/Migrations/2024_07_11_041625_remove_nullable_rek_fasilitas.php create mode 100644 Entities/Dpk.php create mode 100644 Entities/Loan.php create mode 100644 Entities/Nasabah.php diff --git a/Database/Migrations/2024_07_11_041625_remove_nullable_rek_fasilitas.php b/Database/Migrations/2024_07_11_041625_remove_nullable_rek_fasilitas.php new file mode 100644 index 0000000..05da587 --- /dev/null +++ b/Database/Migrations/2024_07_11_041625_remove_nullable_rek_fasilitas.php @@ -0,0 +1,28 @@ +string('nomor_rekening')->nullable(false)->change(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('fasilitas', function (Blueprint $table) { + $table->string('nomor_rekening')->nullable()->change(); + }); + } +}; \ No newline at end of file diff --git a/Entities/Account.php b/Entities/Account.php index e060956..07affbb 100644 --- a/Entities/Account.php +++ b/Entities/Account.php @@ -304,7 +304,6 @@ class Account extends Model public function getAccountRK($arrCusNo, $date) { - $data = []; $data = DB::connection("db2")->table("MIS.COLLECTION") ->selectRaw('ACCOUNT_NUMBER,MATURITY_DATE,MAX(BATCH_DATE) AS BATCH_DATE,MAX(OUTSTANDING) AS OUTSTANDING,LOAN_CCY,PRODUCT_LOAN,PRINCIPLE_AMOUNT,CURRENT_INTEREST_RATE,TENOR,FACILITY_TYPE,LIMIT_ID') @@ -355,4 +354,4 @@ class Account extends Model -} \ No newline at end of file +} diff --git a/Entities/Dpk.php b/Entities/Dpk.php new file mode 100644 index 0000000..cfc7929 --- /dev/null +++ b/Entities/Dpk.php @@ -0,0 +1,34 @@ +format('m/d/Y'); - $Accounts = $Account->getSearchAccount($request->cif, $arrAccount, $request->kodecabang, $startDate)->get(); - - + // $Accounts = $Account->getSearchAccount($request->cif, $arrAccount, $request->kodecabang, $startDate)->get(); + $Accounts = DPK::where('cif',$request->cif) + ->where('nama_cabang','like', '%'.$request->kodecabang.'%') + //->whereIn('no_rek', $arrAccount) + ->whereDate('period',$startDate ) + ->get(); if ($Accounts->isEmpty()) { - $Accounts = $Account->getSearchAccount($request->cif, $arrAccount, $request->kodecabang, $startDate->subDays(1)->format('m/d/Y'))->get(); + // $Accounts = $Account->getSearchAccount($request->cif, $arrAccount, $request->kodecabang, $startDate->subDays(1)->format('m/d/Y'))->get(); + $Accounts = DPK::where('cif',$request->cif) + ->where('nama_cabang','like', '%'.$request->kodecabang.'%') + //->whereIn('no_rek', $arrAccount) + ->whereDate('period',$startDate->subDays(1)->format('m/d/Y') ) + ->get(); if($Accounts->isEmpty()){ - $Accounts = $Account->getSearchAccount($request->cif, $arrAccount, $request->kodecabang, $startDate->subDays(2)->format('m/d/Y'))->get(); - if ($Accounts->isEmpty()) { - $Accounts = $Account->getSearchAccount($request->cif, $arrAccount, $request->kodecabang, $startDate->subDays(3)->format('m/d/Y'))->get(); - if ($Accounts->isEmpty()) { - $Accounts = $Account->getSearchAccount($request->cif, $arrAccount, $request->kodecabang, $startDate->subDays(4)->format('m/d/Y'))->get(); + // $Accounts = $Account->getSearchAccount($request->cif, $arrAccount, $request->kodecabang, $startDate->subDays(2)->format('m/d/Y'))->get(); + $Accounts = DPK::where('cif',$request->cif) + ->where('nama_cabang','like', '%'.$request->kodecabang.'%') + //->whereIn('no_rek', $arrAccount) + ->whereDate('period',$startDate->subDays(2)->format('m/d/Y') ) + ->get(); + if ($Accounts->isEmpty()) { + // $Accounts = $Account->getSearchAccount($request->cif, $arrAccount, $request->kodecabang, $startDate->subDays(3)->format('m/d/Y'))->get(); + $Accounts = DPK::where('cif',$request->cif) + ->where('nama_cabang','like', '%'.$request->kodecabang.'%') + //->whereIn('no_rek', $arrAccount) + ->whereDate('period',$startDate->subDays(3)->format('m/d/Y') ) + ->get(); + if ($Accounts->isEmpty()) { + //$Accounts = $Account->getSearchAccount($request->cif, $arrAccount, $request->kodecabang, $startDate->subDays(4)->format('m/d/Y'))->get(); + $Accounts = DPK::where('cif',$request->cif) + ->where('nama_cabang','like', '%'.$request->kodecabang.'%') + //->whereIn('no_rek', $arrAccount) + ->whereDate('period',$startDate->subDays(4)->format('m/d/Y') ) + ->get(); if ($Accounts->isEmpty()) { - $Accounts = $Account->getSearchAccount($request->cif, $arrAccount, $request->kodecabang, $startDate->subDays(5)->format('m/d/Y'))->get(); - } + //$Accounts = $Account->getSearchAccount($request->cif, $arrAccount, $request->kodecabang, $startDate->subDays(5)->format('m/d/Y'))->get(); + $Accounts = DPK::where('cif',$request->cif) + ->where('nama_cabang','like', '%'.$request->kodecabang.'%') + //->whereIn('no_rek', $arrAccount) + ->whereDate('period',$startDate->subDays(5)->format('m/d/Y') ) + ->get(); + } } } } @@ -131,19 +158,15 @@ class KonfirmasiBankController extends Controller foreach ($Accounts as $key => $value) { - $cekProductAccount = $Account->getCekProduct($value->CUSTOMER_NO,$value->ACCOUNT_NUMBER, $value->BATCH_DATE)->first(); - if (!$cekProductAccount) { - $data[$key]['ACCOUNT_NUMBER'] = $value->ACCOUNT_NUMBER; - $data[$key]['COMPANY_NAME'] = $value->COMPANY_NAME; - $data[$key]['SHORT_NAME'] = $value->SHORT_NAME; - $data[$key]['CURRENCY'] = $value->CURRENCY; - $data[$key]['WORKING_BALANCE'] = number_format($value->OPEN_ACTUAL_BAL, 2, ',', '.') ; - } - - + $data[$key]['ACCOUNT_NUMBER'] = $value->no_rek; + $data[$key]['COMPANY_NAME'] = $value->nama_cabang; + $data[$key]['SHORT_NAME'] = $value->jenis_rekening; + $data[$key]['CURRENCY'] = $value->kode_mata_uang; + $data[$key]['WORKING_BALANCE'] = number_format($value->jumlah_nominal, 2, ',', '.') ; } + return json_encode($data); } @@ -376,7 +399,6 @@ class KonfirmasiBankController extends Controller public function export(Request $request) { $arrAccount = explode(",", $request['accNo']); - // dd($tanggal1 ); $dateCoreAccount = Carbon::parse($request['startDate2']); $dateCoreDepo = Carbon::parse($request['startDate2']); // dd( $dateCore); @@ -388,145 +410,126 @@ class KonfirmasiBankController extends Controller $DataRK = []; $rekEscrow = []; $DataAnjak = []; - $GetCustomer = $Account->getCustomer($request['cusNo'])->first(); + $GetCustomer = Nasabah::where('cif',$request['cusNo'])->first(); + + // $listAccount = $Account->getAccount($request['cusNo'], $arrAccount, $dateCoreAccount)->get(); + $listAccount = DPK::where('cif',$request['cusNo']) + ->whereIn('no_rek', $arrAccount) + ->whereDate('period', $dateCoreAccount ) + ->orderBy('jenis_rekening', 'DESC') + ->get(); - $listAccount = $Account->getAccount($request['cusNo'], $arrAccount, $dateCoreAccount)->get(); if ($listAccount->isEmpty()) { $dateCoreDepo = $dateCoreDepo->addDays(1)->format('m/d/Y'); $dateCoreAccount = $dateCoreAccount->subDays(1)->format('m/d/Y'); - $listAccount = $Account->getAccount($request['cusNo'], $arrAccount, $dateCoreAccount)->get(); + // $listAccount = $Account->getAccount($request['cusNo'], $arrAccount, $dateCoreAccount)->get(); + $listAccount = DPK::where('cif',$request['cusNo']) + ->whereIn('no_rek', $arrAccount) + ->whereDate('period', $dateCoreAccount ) + ->orderBy('jenis_rekening', 'DESC') + ->get(); if($listAccount->isEmpty()){ $dateCoreDepo = carbon::parse($dateCoreDepo)->addDays(2)->format('m/d/Y'); $dateCoreAccount = carbon::parse($dateCoreAccount)->subDays(2)->format('m/d/Y'); - $listAccount = $Account->getAccount($request['cusNo'], $arrAccount, $dateCoreAccount)->get(); + //$listAccount = $Account->getAccount($request['cusNo'], $arrAccount, $dateCoreAccount)->get(); + $listAccount = DPK::where('cif',$request['cusNo']) + ->whereIn('no_rek', $arrAccount) + ->whereDate('period', $dateCoreAccount ) + ->orderBy('jenis_rekening', 'DESC') + ->get(); if ($listAccount->isEmpty()) { $dateCoreDepo = carbon::parse($dateCoreDepo)->addDays(3)->format('m/d/Y'); $dateCoreAccount = carbon::parse($dateCoreAccount)->subDays(3)->format('m/d/Y'); - $listAccount = $Account->getAccount($request['cusNo'], $arrAccount, $dateCoreAccount)->get(); + //$listAccount = $Account->getAccount($request['cusNo'], $arrAccount, $dateCoreAccount)->get(); + $listAccount = DPK::where('cif',$request['cusNo']) + ->whereIn('no_rek', $arrAccount) + ->whereDate('period', $dateCoreAccount ) + ->orderBy('jenis_rekening', 'DESC') + ->get(); if ($listAccount->isEmpty()) { $dateCoreDepo = carbon::parse($dateCoreDepo)->addDays(4)->format('m/d/Y'); $dateCoreAccount = carbon::parse($dateCoreAccount)->subDays(4)->format('m/d/Y'); - $listAccount = $Account->getAccount($request['cusNo'], $arrAccount, $dateCoreAccount)->get(); + // $listAccount = $Account->getAccount($request['cusNo'], $arrAccount, $dateCoreAccount)->get(); + $listAccount = DPK::where('cif',$request['cusNo']) + ->whereIn('no_rek', $arrAccount) + ->whereDate('period', $dateCoreAccount ) + ->orderBy('jenis_rekening', 'DESC') + ->get(); if ($listAccount->isEmpty()) { $dateCoreDepo = carbon::parse($dateCoreDepo)->addDays(5)->format('m/d/Y'); $dateCoreAccount = carbon::parse($dateCoreAccount)->subDays(5)->format('m/d/Y'); - $listAccount = $Account->getAccount($request['cusNo'], $arrAccount, $dateCoreAccount)->get(); + // $listAccount = $Account->getAccount($request['cusNo'], $arrAccount, $dateCoreAccount)->get(); + $listAccount = DPK::where('cif',$request['cusNo']) + ->whereIn('no_rek', $arrAccount) + ->whereDate('period', $dateCoreAccount ) + ->orderBy('jenis_rekening', 'DESC') + ->get(); } } } } } + // $Arrangement = $Account->getPinjaman($request['cusNo'], $dateCoreAccount)->get(); // DD($Arrangement); // try { foreach ($listAccount as $key1 => $account) { - - $DataAccounts[$key1]['ACCOUNT_NUMBER'] = $account->ACCOUNT_NUMBER; - $DataAccounts[$key1]['OPENING_DATE'] = $account->OPENING_DATE; - $DataAccounts[$key1]['BATCH_DATE'] = $account->BATCH_DATE; - $DataAccounts[$key1]['CUSTOMER_NO'] = $account->CUSTOMER_NO; - $DataAccounts[$key1]['SHORT_NAME'] = 'GIRO'; //$account->SHORT_NAME; - $DataAccounts[$key1]['CURRENCY'] = $account->CURRENCY; - $DataAccounts[$key1]['PRODUCT'] = $account->SHORT_TITLE; - $DataAccounts[$key1]['COMPANY_NAME'] = $account->COMPANY_NAME; - $DataAccounts[$key1]['WORKING_BALANCE'] = $account->OPEN_ACTUAL_BAL != null ? number_format($account->OPEN_ACTUAL_BAL, 2, ',', '.') : 'NIHIL'; - $DataAccounts[$key1]['MATURITY_DATE'] = '' ; - $DataAccounts[$key1]['ARRANGEMENT_ID'] = ''; - $DataAccounts[$key1]['FIXED_RATE'] = ''; - $DataAccounts[$key1]['TERM'] = ''; - //get data anjak - - if ($account->CATEGORY == '1019') { - array_push($rekEscrow, $account->ACCOUNT_NUMBER); - + if ($account->jenis_rekening != 'DEPOSITO') { + $DataAccounts[$key1]['ACCOUNT_NUMBER'] = $account->no_rek; + $DataAccounts[$key1]['BATCH_DATE'] = $account->period; + $DataAccounts[$key1]['CUSTOMER_NO'] = $account->cif; + $DataAccounts[$key1]['SHORT_NAME'] = 'GIRO'; + $DataAccounts[$key1]['CURRENCY'] = $account->kode_mata_uang; + $DataAccounts[$key1]['PRODUCT'] = $account->jenis_rekening; + $DataAccounts[$key1]['COMPANY_NAME'] = $account->nama_cabang; + $DataAccounts[$key1]['WORKING_BALANCE'] = $account->jumlah_nominal != null ? number_format(abs($account->jumlah_nominal), 2, ',', '.') : 'NIHIL'; + $DataAccounts[$key1]['MATURITY_DATE'] = '' ; + $DataAccounts[$key1]['ARRANGEMENT_ID'] = ''; + $DataAccounts[$key1]['FIXED_RATE'] = ''; + $DataAccounts[$key1]['TERM'] = ''; } } - $DataDepo = []; - try { - $Deposito = $Account->getDepo($request['cusNo'], $arrAccount, $dateCoreDepo)->get(); - } catch (Exception $e) { - return redirect()->route('konfirmasibank.timeout'); - } - $periode = ''; - foreach ($Deposito as $keyDep => $depo) { - if (substr($depo->KODE_SUB_PRODUK, -1) == 'Y') { - $periode = 'TAHUN'; - } elseif (substr($depo->KODE_SUB_PRODUK, -1) == 'M') { - $periode = 'BULAN'; - } else { - $periode = 'HARI'; - } - $DataDepo[$keyDep]['ACCOUNT_NUMBER'] = $depo->NO_REK; - $DataDepo[$keyDep]['BATCH_DATE'] = $depo->PERIOD; - $DataDepo[$keyDep]['SHORT_NAME'] = 'DEPOSITO'; - $DataDepo[$keyDep]['CURRENCY'] = $depo->KODE_MATA_UANG; - $DataDepo[$keyDep]['WORKING_BALANCE'] = number_format($depo->JUMLAH_NOMINAL, 2, ',', '.') ; - $DataDepo[$keyDep]['MATURITY_DATE'] = Carbon::parse($depo->JATUH_TEMPO)->format('d-m-Y'); - $DataDepo[$keyDep]['ARRANGEMENT_ID'] = ''; - $DataDepo[$keyDep]['FIXED_RATE'] = number_format($depo->SUKU_BUNGA, 2, ',', '.') ?? ''; - $DataDepo[$keyDep]['TERM'] = substr($depo->KODE_SUB_PRODUK, 0, -1) .' '. $periode ; - } - // dd($Deposito); + $listAccountDepo = DPK::where('cif',$request['cusNo'])->whereIn('no_rek', $arrAccount)->whereDate('period', $dateCoreDepo )->orderBy('jenis_rekening', 'DESC')->get(); - - - - try { - $Arrangement = $Account->getPinjaman($request['cusNo'], $dateCoreAccount)->get(); - - } catch (\Illuminate\Database\QueryException $e) { - return redirect()->route('konfirmasibank.timeout'); - } - - foreach ($Arrangement as $key2 => $pinjaman) { - $tanggalMulai = Carbon::parse($pinjaman->TGL_MULAI); - $tanggalJatuhTempo = Carbon::parse($pinjaman->JATUH_TEMPO); - $selisihHari = $tanggalMulai->diffInMonths($tanggalJatuhTempo); - $DataPinjaman[$key2]['CURRENCY'] = $pinjaman->KODE_MATA_UANG; - $DataPinjaman[$key2]['PRODUCT'] = $pinjaman->NAMA_PRODUK; - $DataPinjaman[$key2]['WORKING_BALANCE'] = $pinjaman->NOMINAL != null ? number_format(abs($pinjaman->NOMINAL), 2, ',', '.') : ''; - $DataPinjaman[$key2]['TERM'] = $selisihHari; - $DataPinjaman[$key2]['FIXED_RATE'] = number_format($pinjaman->INTEREST_RATE, 2, ',', '.') ?? ''; - $DataPinjaman[$key2]['MATURITY_DATE'] = date('d-m-Y', strtotime($pinjaman->JATUH_TEMPO)) ?? ''; - $DataPinjaman[$key2]['ACCOUNT_NUMBER'] = $pinjaman->NO_REK; - + foreach ($listAccountDepo as $keyDepo => $depo) { + $tanggalMulai = Carbon::parse($depo->tgl_mulai); + $tanggalJatuhTempo = Carbon::parse($depo->jatuh_tempo); + $selisihHari = $tanggalMulai->diffInMonths($tanggalJatuhTempo); + $DataDepo[$keyDepo]['ACCOUNT_NUMBER'] = $depo->no_rek; + $DataDepo[$keyDepo]['BATCH_DATE'] = $depo->period; + $DataDepo[$keyDepo]['CUSTOMER_NO'] = $depo->cif; + $DataDepo[$keyDepo]['SHORT_NAME'] = $depo->jenis_rekening; //$depo->SHORT_NAME; + $DataDepo[$keyDepo]['CURRENCY'] = $depo->kode_mata_uang; + $DataDepo[$keyDepo]['PRODUCT'] = $depo->jenis_rekening; + $DataDepo[$keyDepo]['COMPANY_NAME'] = $depo->nama_cabang; + $DataDepo[$keyDepo]['WORKING_BALANCE'] = $depo->jumlah_nominal != null ? number_format(abs($depo->jumlah_nominal), 2, ',', '.') : 'NIHIL'; + $DataDepo[$keyDepo]['MATURITY_DATE'] = $depo->jatuh_tempo; + $DataDepo[$keyDepo]['FIXED_RATE'] = $depo->suku_bunga . ' %' ; + $DataDepo[$keyDepo]['TERM'] = $selisihHari . ' BLN'; } - - try { - $listAccountRK = $Account->getAccountRK($arrAccount, $dateCoreAccount)->get(); - } catch (\Illuminate\Database\QueryException $e) { - return redirect()->route('konfirmasibank.timeout'); + $loans = loan::where('sk_nasabah',$request['cusNo'])->whereDate('periode', $dateCoreAccount )->whereNot('outstanding', 0)->get(); + $DataLoan = []; + foreach ($loans as $keyLon => $lon) { + $DataLoan[$keyLon]['ACCOUNT_NUMBER'] = $lon->no_rek; + $DataLoan[$keyLon]['BATCH_DATE'] = $lon->periode; + $DataLoan[$keyLon]['SHORT_NAME'] = $lon->product_loan; + $DataLoan[$keyLon]['CURRENCY'] = $lon->kode_mata_uang; + $DataLoan[$keyLon]['WORKING_BALANCE'] = number_format(abs($lon->outstanding), 2, ',', '.') ; + $DataLoan[$keyLon]['MATURITY_DATE'] = Carbon::parse($lon->jatuh_tempo)->format('d-m-Y'); + $DataLoan[$keyLon]['ARRANGEMENT_ID'] = ''; + $DataLoan[$keyLon]['FIXED_RATE'] = number_format($lon->interest_rate, 2, ',', '.') ?? ''; + $DataLoan[$keyLon]['TERM'] = intval($lon->tenor) ; } - foreach ($listAccountRK as $rk => $valRk) { - $DataRK[$rk]['ACCOUNT_NUMBER'] = $valRk->ACCOUNT_NUMBER; - $DataRK[$rk]['BATCH_DATE'] = $valRk->BATCH_DATE; - $DataRK[$rk]['SHORT_NAME'] = $valRk->PRODUCT_LOAN; - $DataRK[$rk]['CURRENCY'] = $valRk->LOAN_CCY; - $DataRK[$rk]['PRODUCT'] = $valRk->PRODUCT_LOAN; - $DataRK[$rk]['WORKING_BALANCE'] = $valRk->OUTSTANDING != null ? number_format(abs($valRk->OUTSTANDING), 2, ',', '.') : 'NIHIL'; - $DataRK[$rk]['MATURITY_DATE'] = date('d-m-Y', strtotime($valRk->MATURITY_DATE)) ?? ''; - $DataRK[$rk]['ARRANGEMENT_ID'] = ''; - $DataRK[$rk]['FIXED_RATE'] = number_format($valRk->CURRENT_INTEREST_RATE, 2, ',', '.') ?? ''; - $DataRK[$rk]['TERM'] = $valRk->TENOR; - - - } - - try { - $fasilitas = Fasilitas::where('nomor_cif', $request['cusNo'])->where('status', 1)->get(); - - } catch (\Illuminate\Database\QueryException $e) { - return redirect()->route('konfirmasibank.timeout'); - } - + // $CekDepo = Dpk::where('cif',$request['cusNo'])->whereDate('period', $dateCoreAccount )->whereNot('jumlah_nominal', 0)->where('jenis_rekening', 'DEPOSITO')->first(); + $fasilitas = Fasilitas::where('nomor_cif', $request['cusNo'])->where('status', 1)->get(); foreach ($fasilitas as $key3 => $val3) { $DataFasilitas[$key3]['jenis_fasilitas'] = $val3->jenis_fasilitas; $DataFasilitas[$key3]['start_date'] = $val3->start_date; @@ -538,16 +541,6 @@ class KonfirmasiBankController extends Controller $DataFasilitas[$key3]['nomor_rekening'] = $val3->nomor_rekening; } - //Get DatA Anjak - try { - $ListAnjak = $Account->getAccountAnjak($rekEscrow, $dateCoreAccount)->get(); - // dd($ListAnjak); - } catch (\Illuminate\Database\QueryException $e) { - return redirect()->route('konfirmasibank.timeout'); - } - $totalOutstanding = $ListAnjak->sum('OUTSTANDING') != null ? number_format(abs($ListAnjak->sum('OUTSTANDING')), 2, ',', '.') : 'NIHIL'; - - $ListLimits = $Account->getLimit($request['cusNo'], $request['startDate2'])->get(); $signer = Signer::where('id', $request['signerId'])->where('status', 1)->get(); $batchDate = Carbon::parse($request['startDate2']); $currentDate = Carbon::now(); @@ -556,19 +549,15 @@ class KonfirmasiBankController extends Controller $letter = new Letters(); $infoSuratNew = $letter->where('no_cif', $request['cusNo'])->orderBy('id', 'DESC')->first(); - $data['DataAccounts'] = $DataAccounts; - $data['DataPinjaman'] = $DataPinjaman; - $data['DataRK'] = $DataRK ; - $data['DataLimit'] = $ListLimits; - $data['DataFasilitas'] = $DataFasilitas; - $data['DataSigner'] = $signer; - $data['DataCustomer'] = $GetCustomer ?? ''; - $data['localDate'] = $tanggalIndonesia; - $data['today'] = $today; - $data['DataDepo'] = $DataDepo; - $data['infoSuratNew'] = $infoSuratNew; - $data['totalOutstanding'] = $totalOutstanding; - $data['loanCcy'] = $ListAnjak->isEmpty() ? '' : $ListAnjak[0]->LOAN_CCY; + $data['DataAccounts'] = $DataAccounts; + $data['DataLoan'] = $DataLoan; + $data['DataDepo'] = $DataDepo ; + $data['DataFasilitas'] = $DataFasilitas; + $data['DataSigner'] = $signer; + $data['DataCustomer'] = $GetCustomer ?? ''; + $data['localDate'] = $tanggalIndonesia; + $data['today'] = $today; + $data['infoSuratNew'] = $infoSuratNew; $pdf = PDF::loadview('konfirmasibank::exportPdf', ['data' => $data]); // Set page script to disable header on the first page @@ -676,7 +665,7 @@ class KonfirmasiBankController extends Controller } $validated = $request->validate([ - 'nomor_rekening' => 'required|string|max:10|unique:fasilitas,nomor_rekening', + // 'nomor_rekening' => 'max:10|unique:fasilitas,nomor_rekening', 'jenis_fasilitas' => 'required|string', 'cabang' => 'required|string', 'mata_uang' => 'required|string', @@ -761,7 +750,7 @@ class KonfirmasiBankController extends Controller // Validation Data\ $validator = Validator::make($request->all(), [ - 'nomor_rekening_edit' => 'required|string', + //'nomor_rekening_edit' => 'required|string', 'cabang_edit' => 'required|string', 'jenis_fasilitas_edit' => 'required|string', 'jenis_rekening_edit' => 'required|string', @@ -860,4 +849,4 @@ class KonfirmasiBankController extends Controller } -} +} \ No newline at end of file diff --git a/Resources/views/exportPdf.blade.php b/Resources/views/exportPdf.blade.php index 092db8d..eb0412d 100644 --- a/Resources/views/exportPdf.blade.php +++ b/Resources/views/exportPdf.blade.php @@ -130,8 +130,8 @@