update query result data
This commit is contained in:
@ -69,7 +69,7 @@ class Account extends Model
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getAccount($cif, $startDate){
|
||||
public function getAccount($cif, $arrAccount, $startDate){
|
||||
// $uppercaseKodeCabang = Str::upper($kodecabang);
|
||||
|
||||
$data = DB::connection("db2")->table("STG_DB.ACCOUNT AS AC")
|
||||
@ -80,6 +80,7 @@ class Account extends Model
|
||||
// ->where('COMPANY_NAME', 'like', "%" .$uppercaseKodeCabang."%")
|
||||
->where('INACTIV_MARKER', NULL)
|
||||
->where('AC.BATCH_DATE',$startDate)
|
||||
->whereIn('AC.ACCOUNT_NUMBER', $arrAccount)
|
||||
->whereIn(DB::raw("LEFT(CATEGORY, 3)"),['100','600','660','101'])
|
||||
->groupBy('CUSTOMER_NO','ACCOUNT_NUMBER','SHORT_TITLE','SHORT_NAME','COMPANY_NAME')
|
||||
->limit(100);
|
||||
@ -107,7 +108,7 @@ class Account extends Model
|
||||
|
||||
$data = [];
|
||||
$data = DB::connection("db2")->table("STG_DB.AA_ARRANGEMENT")
|
||||
->select('ARRANGEMENT_ID','PRODUCT_LINE','CO_CODE','START_DATE','CURRENCY','PRODUCT_LINE','LINKED_APPL_ID')
|
||||
->select('ARRANGEMENT_ID','PRODUCT_LINE','CO_CODE','START_DATE','CURRENCY','PRODUCT','LINKED_APPL_ID')
|
||||
// ->join('STG_DB.ACCOUNT AS AC', 'AA.LINKED_APPL_ID', '=', 'AC.ACCOUNT_NUMBER')
|
||||
->where('CUSTOMER',$cus_no)
|
||||
->where('ARR_STATUS' , 'CURRENT')
|
||||
@ -125,8 +126,8 @@ class Account extends Model
|
||||
$data = DB::connection("db2")->table("STG_DB.AA_ARR_INTEREST")
|
||||
->select('FIXED_RATE')
|
||||
->where('BATCH_DATE', $startDate)
|
||||
->where(DB::raw("LEFT(ID, 12)"),$arrangementId);
|
||||
// ->orderBy('TERM','DESC');
|
||||
->where(DB::raw("LEFT(ID, 12)"),$arrangementId)
|
||||
->orderBy('ID','DESC');
|
||||
|
||||
return $data;
|
||||
}
|
||||
@ -152,6 +153,17 @@ class Account extends Model
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getSingleAccount($acNo, $date){
|
||||
$data = [];
|
||||
$data = DB::connection("db2")->table("STG_DB.ACCOUNT")
|
||||
->select('ACCOUNT_NUMBER','WORKING_BALANCE')
|
||||
->where('ACCOUNT_NUMBER',$acNo)
|
||||
->where('BATCH_DATE',$date)
|
||||
->orderBy('ACCOUNT_NUMBER','DESC');
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getCategory($category){
|
||||
$data = [];
|
||||
$data = DB::connection("db2")->table("STG_DB.CATEGORY")
|
||||
|
Reference in New Issue
Block a user