fixing filter cabang
This commit is contained in:
@ -401,7 +401,7 @@ class KonfirmasiBankController extends Controller
|
||||
$arrAccount = explode(",", $request['accNo']);
|
||||
$dateCoreAccount = Carbon::parse($request['startDate2']);
|
||||
$dateCoreDepo = Carbon::parse($request['startDate2']);
|
||||
// dd( $dateCore);
|
||||
$cabang = $request['cabang'];
|
||||
$Account = new Account();
|
||||
$data = [];
|
||||
$DataAccounts = [];
|
||||
@ -412,56 +412,56 @@ class KonfirmasiBankController extends Controller
|
||||
$DataDepo = [];
|
||||
$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 )
|
||||
->where('nama_cabang','like', '%'.$cabang.'%')
|
||||
->orderBy('jenis_rekening', 'DESC')
|
||||
->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 = DPK::where('cif',$request['cusNo'])
|
||||
->whereIn('no_rek', $arrAccount)
|
||||
->whereDate('period', $dateCoreAccount )
|
||||
->where('nama_cabang','like', '%'.$cabang.'%')
|
||||
->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 = DPK::where('cif',$request['cusNo'])
|
||||
->whereIn('no_rek', $arrAccount)
|
||||
->whereDate('period', $dateCoreAccount )
|
||||
->where('nama_cabang','like', '%'.$cabang.'%')
|
||||
->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 = DPK::where('cif',$request['cusNo'])
|
||||
->whereIn('no_rek', $arrAccount)
|
||||
->whereDate('period', $dateCoreAccount )
|
||||
->where('nama_cabang','like', '%'.$cabang.'%')
|
||||
->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 = DPK::where('cif',$request['cusNo'])
|
||||
->whereIn('no_rek', $arrAccount)
|
||||
->whereDate('period', $dateCoreAccount )
|
||||
->where('nama_cabang','like', '%'.$cabang.'%')
|
||||
->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 = DPK::where('cif',$request['cusNo'])
|
||||
->whereIn('no_rek', $arrAccount)
|
||||
->whereDate('period', $dateCoreAccount )
|
||||
->where('nama_cabang','like', '%'.$cabang.'%')
|
||||
->orderBy('jenis_rekening', 'DESC')
|
||||
->get();
|
||||
}
|
||||
@ -508,7 +508,7 @@ class KonfirmasiBankController extends Controller
|
||||
}
|
||||
|
||||
|
||||
$loans = loan::where('sk_nasabah',$request['cusNo'])->whereDate('periode', $dateCoreAccount )->whereNot('outstanding', 0)->get();
|
||||
$loans = loan::where('sk_nasabah',$request['cusNo'])->whereDate('periode', $dateCoreAccount )->whereNot('outstanding', 0)->where('nama_cabang','like', '%'.$cabang.'%')->get();
|
||||
$DataLoan = [];
|
||||
foreach ($loans as $keyLon => $lon) {
|
||||
$DataLoan[$keyLon]['ACCOUNT_NUMBER'] = $lon->no_rek;
|
||||
@ -523,7 +523,6 @@ class KonfirmasiBankController extends Controller
|
||||
}
|
||||
|
||||
|
||||
// $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;
|
||||
@ -846,4 +845,4 @@ class KonfirmasiBankController extends Controller
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -234,10 +234,10 @@
|
||||
<form class="form-horizontal" id="formSigner">
|
||||
@csrf
|
||||
<!-- Add your form fields here -->
|
||||
<input type="hidden" style="margin-bottom: 5px" name="cus_no">
|
||||
<input type="hidden" style="margin-bottom: 5px" name="kode_cabang" />
|
||||
<input type="hidden" style="margin-bottom: 5px" name="startDateExport" />
|
||||
<input type="hidden" style="margin-bottom: 5px" name="endDateExport" />
|
||||
<input type="text" style="margin-bottom: 5px" name="cus_no">
|
||||
<input type="text" style="margin-bottom: 5px" name="kode_cabang" />
|
||||
<input type="text" style="margin-bottom: 5px" name="startDateExport" />
|
||||
<input type="text" style="margin-bottom: 5px" name="endDateExport" />
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-4 col-form-label">Penandatangan</label>
|
||||
@ -368,7 +368,7 @@
|
||||
$('.loading1').show();
|
||||
var actionUrl = $(".form_customer3").attr('action');
|
||||
var cif = $("input[name=cif]").val();
|
||||
var kodecabang = $("input[name=kodecabang]").val();
|
||||
var kodecabang = $("select[name='kodecabang']").val();
|
||||
var periode = $("input[name=periode]").val();
|
||||
var startDate = $("input[name=startDate]").val();
|
||||
var endDate = $("input[name=endDate]").val();
|
||||
|
Reference in New Issue
Block a user