update temuan sit 11092023
This commit is contained in:
@ -36,18 +36,23 @@
|
||||
public function index(Request $request)
|
||||
{
|
||||
|
||||
if (is_null($this->user) || !$this->user->can('konfirmasibank.create')) {
|
||||
abort(403, 'Sorry !! You are Unauthorized to view any master data !');
|
||||
}
|
||||
// dd($request);
|
||||
$data = [];
|
||||
// Tanggal awal
|
||||
// Contoh tanggal saat ini
|
||||
$today = Carbon::now();
|
||||
// dd( $today->format());
|
||||
|
||||
// Menambahkan 1 tahun ke tanggal saat ini
|
||||
$currentYear = $today->format("Y");
|
||||
$currentYear = $today->format("Y-m-d");
|
||||
|
||||
// Menambahkan 5 tahun ke tanggal saat ini
|
||||
$pastYear = $today->subYear(3)->format('Y');
|
||||
$signer = Signer::all();
|
||||
$pastYear = $today->subYear(3)->format('Y-m-d');
|
||||
|
||||
$signer = Signer::where('status',1)->get();
|
||||
|
||||
$data['currentYear'] = $currentYear;
|
||||
$data['pastYear'] = $pastYear;
|
||||
@ -69,7 +74,13 @@
|
||||
$data = [];
|
||||
$Account = new ViewAccount;
|
||||
|
||||
$Accounts = $Account->getSearchAccount($request->cif, $request->kodecabang,$request->periode)->get();
|
||||
$carbonStartDate = Carbon::createFromFormat('Y-m-d', $request->startDate);
|
||||
$formattedStartDate = $carbonStartDate->format('d/m/Y');
|
||||
$carbonEndDate = Carbon::createFromFormat('Y-m-d', $request->endDate);
|
||||
$formattedEndDate = $carbonEndDate->format('d/m/Y');
|
||||
|
||||
$Accounts = $Account->getSearchAccount($request->cif, $request->kodecabang,$formattedStartDate,$formattedEndDate)->get();
|
||||
|
||||
foreach ($Accounts as $key => $account) {
|
||||
$data[$key]['CUSTOMER_NO'] = $account->CUSTOMER_NO;
|
||||
$data[$key]['ACCOUNT_NUMBER'] = $account->ACCOUNT_NUMBER;
|
||||
@ -97,6 +108,7 @@
|
||||
abort(403, 'Sorry !! You are Unauthorized to view any master data !');
|
||||
}
|
||||
|
||||
|
||||
$account = explode("," , $request['acc_no']);
|
||||
|
||||
$ViewAccount = new ViewAccount;
|
||||
@ -171,23 +183,9 @@
|
||||
|
||||
|
||||
$ListLimits = $ViewAccount->getLimit($request['cus_no'],$request['periode']);
|
||||
// foreach ($ListLimits as $key4 => $val) {
|
||||
// $limitArr[$key4]['CUSTOMER'] = $item->CUSTOMER;
|
||||
// $limitArr[$key4]['SHORT_NAME'] = $item->SHORT_NAME;
|
||||
// $limitArr[$key4]['STREET'] = $item->STREET;
|
||||
// $limitArr[$key4]['ADDRESS'] = $item->ADDRESS;
|
||||
// $limitArr[$key4]['COMPANY_NAME'] = $item->COMPANY_NAME;
|
||||
// $limitArr[$key4]['CURRENCY'] = $item->CURRENCY;
|
||||
// $limitArr[$key4]['PRODUCT_LINE'] = $item->PRODUCT_LINE;
|
||||
// $limitArr[$key4]['PRODUCT'] = $item->PRODUCT;
|
||||
// $limitArr[$key4]['WORKING_BALANCE'] = $item->WORKING_BALANCE;
|
||||
// $limitArr[$key4]['BATCH_DATE'] = $item->OPENING_DATE;
|
||||
// }
|
||||
|
||||
|
||||
$fasilitas = Fasilitas::where('nomor_cif',$request['cus_no'] )->where('status',1)->get();
|
||||
|
||||
$signer = Signer::where('id', $request['signer'])->get();
|
||||
$signer = Signer::where('id', $request['signer'])->where('status',1)->get();
|
||||
$currentDate = Carbon::now();
|
||||
$tanggalIndonesia = $currentDate->locale('id')->isoFormat('dddd, D MMMM YYYY');
|
||||
|
||||
@ -299,8 +297,7 @@
|
||||
}
|
||||
|
||||
$data = [];
|
||||
|
||||
$fasilitas = Fasilitas::paginate(10)->appends($request->query()['cus_no_fasilitas'],$request->query()['company_name'],$request->query()['batch_date'], $request->query()['status']);
|
||||
$fasilitas = Fasilitas::where('status',1)->paginate(10)->appends($request->query()['cus_no_fasilitas'],$request->query()['company_name'],$request->query()['startDateFasilitas'],$request->query()['startDateFasilitas']);
|
||||
$Category = Category::all();
|
||||
$Company = Company::all();
|
||||
// dd($fasilitas);
|
||||
@ -549,4 +546,4 @@
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user