update controller konfirmasibank
This commit is contained in:
@ -39,27 +39,21 @@ class ViewAccount extends Model
|
||||
];
|
||||
|
||||
public function getSearchAccount($cif ,$arrAccount, $kodecabang, $startDate){
|
||||
// dd($cif ,$arrAccount, $kodecabang, $startDate);
|
||||
// dd($cif ,$arrAccount, $kodecabang, $startDate);
|
||||
$today = Carbon::now();
|
||||
$currentYear = $today->format("Y");
|
||||
$pastYear = $today->subYear(3)->format('Y');
|
||||
|
||||
$uppercaseKodeCabang = Str::upper($kodecabang);
|
||||
|
||||
|
||||
$data = [];
|
||||
|
||||
// dd($arrAccount);
|
||||
|
||||
if($arrAccount == null){
|
||||
|
||||
$data = DB::connection("db2")->table("STG_DB.VW_ACCOUNTS")
|
||||
|
||||
$data = DB::connection("db2")->table("STG_DB.VW_ACCOUNT")
|
||||
->select('*')
|
||||
->where('CUSTOMER_NO',$cif)
|
||||
->where('COMPANY_NAME', 'like', "%" .$uppercaseKodeCabang."%")
|
||||
->where('INACTIV_MARKER', NULL)
|
||||
->where('BATCH_DATE', $startDate)
|
||||
->whereIn(DB::raw("LEFT(CATEGORY, 3)"),['100','600','660']);
|
||||
->whereIn(DB::raw("LEFT(CATEGORY, 3)"),['100','600','660','101']);
|
||||
// ->groupBy('CUSTOMER_NO','ACCOUNT_NUMBER','SHORT_NAME','BATCH_DATE','SHORT_TITLE','CURRENCY','COMPANY_NAME','OPENING_DATE','INACTIV_MARKER');
|
||||
}else{
|
||||
$data = DB::connection("db2")->table("STG_DB.VW_ACCOUNT")
|
||||
@ -78,13 +72,13 @@ class ViewAccount extends Model
|
||||
public function getAccount($cif ,$arrAccount, $kodecabang, $startDate){
|
||||
$uppercaseKodeCabang = Str::upper($kodecabang);
|
||||
|
||||
$data = DB::connection("db2")->table("STG_DB.VW_ACCOUNTS")
|
||||
$data = DB::connection("db2")->table("STG_DB.VW_ACCOUNT")
|
||||
->select('*')
|
||||
->where('CUSTOMER_NO',$cif)
|
||||
->where('COMPANY_NAME', 'like', "%" .$uppercaseKodeCabang."%")
|
||||
->where('INACTIV_MARKER', NULL)
|
||||
->where('BATCH_DATE', 'like', "%" .$startDate."%")
|
||||
//->whereIn(DB::raw("LEFT(CATEGORY, 3)"),['100','600','660'])
|
||||
->where('BATCH_DATE', $startDate)
|
||||
->whereIn(DB::raw("LEFT(CATEGORY, 3)"),['100','600','660','101'])
|
||||
->whereIn('ACCOUNT_NUMBER', $arrAccount);
|
||||
return $data;
|
||||
}
|
||||
@ -99,13 +93,13 @@ class ViewAccount extends Model
|
||||
}
|
||||
|
||||
|
||||
public function getPinjaman($cus_no,$arrAccount){
|
||||
public function getPinjaman($cus_no,$arrAccount, $dateCore){
|
||||
$data = [];
|
||||
$data = DB::connection("db2")->table("STG_DB.VW_AA_ARR")
|
||||
->select('*')
|
||||
->where('CUSTOMER',$cus_no)
|
||||
->where('CATEGORY' , 3)
|
||||
->whereIn('ACCOUNT_NUMBER', $arrAccount);
|
||||
->where('BATCH_DATE', $dateCore);
|
||||
|
||||
return $data;
|
||||
|
||||
|
Reference in New Issue
Block a user