From c3916272a72c332d6a2682ed216de097460a0baa Mon Sep 17 00:00:00 2001 From: KhatamNugraha Date: Thu, 5 Oct 2023 13:08:55 +0700 Subject: [PATCH] set date core --- Entities/ViewAccount.php | 2 +- Http/Controllers/KonfirmasiBankController.php | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Entities/ViewAccount.php b/Entities/ViewAccount.php index 465c6cd..61c90f9 100644 --- a/Entities/ViewAccount.php +++ b/Entities/ViewAccount.php @@ -39,7 +39,7 @@ class ViewAccount extends Model ]; public function getSearchAccount($cif ,$arrAccount, $kodecabang, $startDate){ - // dd($cif ,$arrAccount, $kodecabang, $startDate); + // dd($cif ,$arrAccount, $kodecabang, $startDate); $uppercaseKodeCabang = Str::upper($kodecabang); $data = []; diff --git a/Http/Controllers/KonfirmasiBankController.php b/Http/Controllers/KonfirmasiBankController.php index 8cece3e..e56bf8e 100644 --- a/Http/Controllers/KonfirmasiBankController.php +++ b/Http/Controllers/KonfirmasiBankController.php @@ -76,12 +76,12 @@ $data = []; $Account = new ViewAccount; $arrAccount = []; - $startDate = Carbon::parse($request->startDate)->format('m/d/Y'); - // $dateCore = $startDate->subDays(2)->format('m/d/Y'); + $startDate = Carbon::parse($request->startDate); + $dateCore = $startDate->subDays(2)->format('m/d/Y'); //dd($dateCore); - $Accounts = $Account->getSearchAccount($request->cif,$arrAccount,$request->kodecabang, $startDate)->get(); + $Accounts = $Account->getSearchAccount($request->cif,$arrAccount,$request->kodecabang, $dateCore)->get(); // $product = ''; // foreach ($Accounts as $key => $account) { @@ -116,7 +116,7 @@ $arrAccount = explode("," , $request['acc_no']); $startDate = Carbon::parse($request['startDate']); - //$dateCore = $startDate->subDays(2)->format('d/m/Y'); + $dateCore = $startDate->subDays(2); $ViewAccount = new ViewAccount; $data = []; @@ -125,7 +125,7 @@ $DataLimit = []; $DataAA = []; - $listAccount = $ViewAccount->getAccount($request['cus_no'],$arrAccount,$request['kode_cabang'], $request['startDate'])->get(); + $listAccount = $ViewAccount->getAccount($request['cus_no'],$arrAccount,$request['kode_cabang'], $dateCore)->get(); $GetCustomer = $ViewAccount->getCustomer($request['cus_no'])->first(); @@ -152,8 +152,7 @@ } - $ListPinjaman =$ViewAccount->getPinjaman($request['cus_no'],$arrAccount , $startDate )->get(); - // dd($ListPinjaman); + $ListPinjaman =$ViewAccount->getPinjaman($request['cus_no'],$arrAccount , $dateCore )->get(); $ListLimits = $ViewAccount->getLimit($request['cus_no'],$request['periode']); $fasilitas = Fasilitas::where('nomor_cif',$request['cus_no'] )->where('status',1)->get(); @@ -527,5 +526,4 @@ } - } - + } \ No newline at end of file