set date core

This commit is contained in:
KhatamNugraha
2023-10-05 13:08:55 +07:00
parent 14e5972731
commit c3916272a7
2 changed files with 8 additions and 10 deletions

View File

@ -39,7 +39,7 @@ class ViewAccount extends Model
]; ];
public function getSearchAccount($cif ,$arrAccount, $kodecabang, $startDate){ public function getSearchAccount($cif ,$arrAccount, $kodecabang, $startDate){
// dd($cif ,$arrAccount, $kodecabang, $startDate); // dd($cif ,$arrAccount, $kodecabang, $startDate);
$uppercaseKodeCabang = Str::upper($kodecabang); $uppercaseKodeCabang = Str::upper($kodecabang);
$data = []; $data = [];

View File

@ -76,12 +76,12 @@
$data = []; $data = [];
$Account = new ViewAccount; $Account = new ViewAccount;
$arrAccount = []; $arrAccount = [];
$startDate = Carbon::parse($request->startDate)->format('m/d/Y'); $startDate = Carbon::parse($request->startDate);
// $dateCore = $startDate->subDays(2)->format('m/d/Y'); $dateCore = $startDate->subDays(2)->format('m/d/Y');
//dd($dateCore); //dd($dateCore);
$Accounts = $Account->getSearchAccount($request->cif,$arrAccount,$request->kodecabang, $startDate)->get(); $Accounts = $Account->getSearchAccount($request->cif,$arrAccount,$request->kodecabang, $dateCore)->get();
// $product = ''; // $product = '';
// foreach ($Accounts as $key => $account) { // foreach ($Accounts as $key => $account) {
@ -116,7 +116,7 @@
$arrAccount = explode("," , $request['acc_no']); $arrAccount = explode("," , $request['acc_no']);
$startDate = Carbon::parse($request['startDate']); $startDate = Carbon::parse($request['startDate']);
//$dateCore = $startDate->subDays(2)->format('d/m/Y'); $dateCore = $startDate->subDays(2);
$ViewAccount = new ViewAccount; $ViewAccount = new ViewAccount;
$data = []; $data = [];
@ -125,7 +125,7 @@
$DataLimit = []; $DataLimit = [];
$DataAA = []; $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(); $GetCustomer = $ViewAccount->getCustomer($request['cus_no'])->first();
@ -152,8 +152,7 @@
} }
$ListPinjaman =$ViewAccount->getPinjaman($request['cus_no'],$arrAccount , $startDate )->get(); $ListPinjaman =$ViewAccount->getPinjaman($request['cus_no'],$arrAccount , $dateCore )->get();
// dd($ListPinjaman);
$ListLimits = $ViewAccount->getLimit($request['cus_no'],$request['periode']); $ListLimits = $ViewAccount->getLimit($request['cus_no'],$request['periode']);
$fasilitas = Fasilitas::where('nomor_cif',$request['cus_no'] )->where('status',1)->get(); $fasilitas = Fasilitas::where('nomor_cif',$request['cus_no'] )->where('status',1)->get();
@ -528,4 +527,3 @@
} }