fixing logic
This commit is contained in:
@ -50,7 +50,7 @@ class Account extends Model
|
||||
// ->where('ARR_A', null)
|
||||
->where('AC.BATCH_DATE', $startDate)
|
||||
->whereIn(DB::raw("LEFT(CATEGORY, 3)"), ['100','600','660','101','324'])
|
||||
// ->orWhere(DB::raw("LEFT(CATEGORY, 2)"),'32')
|
||||
// ->orWhere(DB::raw("LEFT(CATEGORY, 2)"),'32')
|
||||
->groupBy('CUSTOMER_NO', 'ACCOUNT_NUMBER', 'SHORT_TITLE', 'SHORT_NAME', 'COMPANY_NAME', 'LIMIT_REF')
|
||||
->limit(100);
|
||||
} else {
|
||||
@ -171,9 +171,12 @@ class Account extends Model
|
||||
public function getDepo($cust, $acc, $dataCore)
|
||||
{
|
||||
|
||||
//DD($cust, $acc, $dataCore);
|
||||
|
||||
$timestamp = strtotime($dataCore);
|
||||
// Format the timestamp into a date format
|
||||
$date = date("m/d/Y", $timestamp);
|
||||
// dd( $date);
|
||||
$matYear = date("Y", $timestamp);
|
||||
|
||||
$data = DB::connection("db2")->table("MIS.FACT_DPK AS DPK")
|
||||
@ -191,7 +194,7 @@ class Account extends Model
|
||||
// ->where('CUSTOMER_NO', $cif)
|
||||
// ->where('LIMIT_REF', null)
|
||||
->where('PER.DATE', $date)
|
||||
->whereYear('MAT.DATE', '>', $matYear)
|
||||
//->whereYear('MAT.DATE', '>', $matYear)
|
||||
->whereIn('DPK.NO_REK', $acc)
|
||||
//->whereIn('DPK.NO_REK', '<>',$arrExp)
|
||||
// ->groupBy('CUSTOMER_NO', 'ACCOUNT_NUMBER', 'SHORT_TITLE', 'SHORT_NAME', 'COMPANY_NAME', 'CATEGORY', 'LIMIT_REF')
|
||||
@ -438,4 +441,4 @@ class Account extends Model
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user